git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: which files are "known to git"?

From
Elijah Newren <newren@gmail.com>
Date
May 21, 2018, 18:13 UTC
Message-ID
<CABPp-BGsa+e_4XuK0xaKbcNxg5CS8UuAjYNP9XWpAhXOPs7iaQ@mail.gmail.com>
In-Reply-To
<alpine.LFD.2.21.1805211335250.21160@localhost.localdomain>

On Mon, May 21, 2018 at 10:40 AM, Robert P. J. Day <rpjday@crashcourse.ca> wrote:

Show 17 quoted lines
> On Mon, 21 May 2018, Elijah Newren wrote:
>
>> I had always assumed prior to your email that 'known to Git' meant
>> 'tracked' or 'recorded in the index'...
>
>   i *know* i've been in this discussion before, but i don't remember
> where, i *assume* it was on this list, and i recall someone (again,
> don't remember who) who opined that there are two categories of files
> that are "known to git":
>
>   1) files known in a *positive* sense, those being explicitly tracked
>   files, and
>
>   2) files known in a *negative* sense, as in explicitly ignored files
>
> can anyone refresh my memory if that happened here, and whether that
> was the consensus after the discussion was over?

Perhaps this: https://public-inbox.org/git/EEC5BA1D5F274F02AE20FC269868FDEF@PhilipOakley/ ?

Show 8 quoted lines
> If that's the
> definition that's being used, then this passage makes sense:
>
>   "Normally, only files unknown to Git are removed, but if the -x
>   option is specified, ignored files are also removed."
>
> that pretty clearly implies that ignored files are considered "known"
> to git.

Yes, _if_ that's the definition used, then that passage makes sense. But if that's the definition used, then the other two passages I pointed out in Documentation/git-commit.txt and Documentation/git-rm.txt do NOT make sense and need to be rewritten.

Junio has already chimed in elsewhere on this thread and stated pretty clearly that the intended meaning for 'known to Git' was just (1), not (2), and even provided a suggested wording fix for Documentation/git-clean.txt. Putting that into a patch format and submitting along with an update to Documentation/glossary-content.txt as Duy suggested look like the two todos to me, though perhaps others want to discuss ways to just avoid the phrase 'known to Git' (as suggested by Jonathan).

Previous: Robert P. J. DayNext: Robert P. J. Day
Message 14 of 16 in “which files are "known to git"?”
  1. Robert P. J. DayMay 21, 2018
  2. Randall S. BeckerMay 21, 2018
  3. Elijah NewrenMay 21, 2018
  4. Duy NguyenMay 21, 2018
  5. Robert P. J. DayMay 21, 2018
  6. Robert P. J. DayMay 21, 2018
  7. Junio C HamanoMay 21, 2018
  8. Robert P. J. DayMay 21, 2018
  9. Jonathan NiederMay 21, 2018
  10. Robert P. J. DayMay 21, 2018
  11. Jonathan NiederMay 21, 2018
  12. Junio C HamanoMay 22, 2018
  13. Robert P. J. DayMay 23, 2018
  14. Elijah NewrenMay 21, 2018
  15. Robert P. J. DayMay 21, 2018
  16. Stefan BellerMay 21, 2018

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.