Виталий Бормотов  <borm...@mail.ru> writes:

> When checking out into some different
> state, if there is no permissions to unlink files (if some files in
> the current state doesn't exist in the new) warnings are outputing,
> but then git says that checking out is successful, shows that we are
> in the new state and the non-unlinked files are marked as
> untracked.

This is done by reasonably old part of the codebase, and I think it
is exactly working as designed.  Unlinking of an existing path in
the filesystem is done for one of the two reasons:

 - The old tree has the path, the new tree does not.

 - The old tree has the path, the new tree has it but with a
   different content.

In both cases, we first attempt to unlink (and warn if we cannot)
and then attempt to create the path with the new contents in the
latter case (and die if we cannot).

The checkout itself succeeds, because having untracked cruft in your
working tree is not an error, but warnings are given to let you know
that you may want to remove them after fixing the screwy permission
problem yourself.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
  • git probably bug Виталий Бормотов
    • Re: git probably bug Junio C Hamano

Reply via email to