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

Re: `git describe --dirty` doesn't consider untracked files to be dirty

From
Junio C Hamano <gitster@pobox.com>
Date
Sep 8, 2020, 23:59 UTC
Message-ID
<xmqqft7rx1k7.fsf@gitster.c.googlers.com>
In-Reply-To
<20200908231652.GC1014@pug.qqx.org>
Aaron Schrab <aaron@schrab.com> writes:
Show 14 quoted lines
> It's perhaps worth noting that submodules are already considered dirty
> when untracked files are added:
>
> $ git diff vim/bundle/fugitive
>
> $ echo foo >vim/bundle/fugitive/foo
>
> $ git diff vim/bundle/fugitive
> diff --git i/vim/bundle/fugitive w/vim/bundle/fugitive
> --- i/vim/bundle/fugitive
> +++ w/vim/bundle/fugitive
> @@ -1 +1 @@
> -Subproject commit caf3b1d5696e8d39a905e48f1e89d8c0c565168c
> +Subproject commit caf3b1d5696e8d39a905e48f1e89d8c0c565168c-dirty

It gives one vote for (1) to the part you did not quote from the message you are responding to, which was:

Show 5 quoted lines
>> I do not think this is something we want to hide behind a
>> configuration knob, but I am undecided between (1) declare that this
>> is a bug and change the behaviour of "--dirty" and (2) declare that
>> we discovered another useful behaviour and add a new option next to
>> "--dirty".

I tend to agree the consistency with that behaviour would be more useful. The discrepanthy shows the relative age of features and how our thinking has changed over time ;-)

Previous: Aaron SchrabNext: Junio C Hamano
Message 5 of 9 in “`git describe --dirty` doesn't consider untracked files to be dirty”
  1. Ash HollandSep 7, 2020
  2. Raymond E. PascoSep 8, 2020
  3. Junio C HamanoSep 8, 2020
  4. Aaron SchrabSep 8, 2020
  5. Junio C HamanoSep 8, 2020
  6. Junio C HamanoSep 19, 2020
  7. Ash HollandSep 20, 2020
  8. Junio C HamanoSep 20, 2020
  9. Junio C HamanoSep 20, 2020

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.