Re: which files are "known to git"?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, May 22, 2018 at 12:09 AM, Elijah Newren <newren@xxxxxxxxx> wrote:
>
> I had always assumed prior to your email that 'known to Git' meant
> 'tracked' or 'recorded in the index'.

That's been my intention as well ;-)

> From Documentation/git-clean.txt:
>
>     Normally, only files unknown to Git are removed, but if the `-x`
>     option is specified, ignored files are also removed.

The above makes it sound as if "unknown to Git" is synonym
to "not marked as ignored via the exclude mechanism", which would
incorrectly imply "known to Git" is "marked as ignored via the exclude
mechanism".

Which is a sheer nonsense.

I think this is written while forgetting that "known to Git" was already a term
with a specific meaning, and used a confusing term unnecessarily loosely.

 "clean" removes files that are not in the index and are not marked as
ignored by default, but with "clean -x", the user can remove all files that
are not in the index, even the ones that are marked as ignored.

In the above version of description, "files that are not in the index" can
be replaced with "untracked files" and we can also say "files unknown to
Git" (if we want to), but the set of files "clean" operates by default is
narrower than "unknown to Git"--it is "unknown to Git and not marked as
ignored".



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux