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

Re: [PATCH] builtin/describe.c: ignore untracked changes in submodules

From
Junio C Hamano <gitster@pobox.com>
Date
Sep 10, 2010, 00:21 UTC
Message-ID
<7vy6bajvnd.fsf@alter.siamese.dyndns.org>
In-Reply-To
<CC-1wlyJRzGfkPwn1Ra8d4Ot7mMnUGxYChGZHdqp-lQ5URlUFhNp4Ilyrh4bGk1dWF6drZXvim0@cipher.nrlssc.navy.mil>
Brandon Casey <casey@nrlssc.navy.mil> writes:
Show 11 quoted lines
> From: Brandon Casey <drafnel@gmail.com>
>
> Since 'git describe' does not append -dirty to the version string it
> produces when untracked files exist in the working directory of the main
> repository, it should not do so for submodules either.
>
> Add --ignore-submodules=untracked to the call to diff-index which is used
> to decide whether or not the '-dirty' string is necessary.
>
> Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil>
> ---

Hmm, this changes the behaviour in a big way but it probably is for the better. At least it is consistent with the recent fixes to the interaction between diff and submodules.

Objections from submodule users?
Show 19 quoted lines
>  builtin/describe.c |    3 ++-
>  1 files changed, 2 insertions(+), 1 deletions(-)
>
> diff --git a/builtin/describe.c b/builtin/describe.c
> index 43caff2..6c4f15b 100644
> --- a/builtin/describe.c
> +++ b/builtin/describe.c
> @@ -29,7 +29,8 @@ static const char *dirty;
>  
>  /* diff-index command arguments to check if working tree is dirty. */
>  static const char *diff_index_args[] = {
> -	"diff-index", "--quiet", "HEAD", "--", NULL
> +	"diff-index", "--quiet", "--ignore-submodules=untracked", "HEAD",
> +	"--", NULL
>  };
>  
>  
> -- 
> 1.7.2.1
Previous: Brandon CaseyNext: Jens Lehmann
Message 2 of 14 in “builtin/describe.c: ignore untracked changes in submodules”
  1. builtin/describe.c: ignore untracked changes in submodulesBrandon Casey, Sep 9, 2010
  2. Junio C HamanoSep 10, 2010
  3. Jens LehmannSep 10, 2010
  4. Brandon CaseySep 12, 2010
  5. Jens LehmannSep 13, 2010
  6. yj2133011Sep 12, 2010
  7. Jens LehmannSep 11, 2010
  8. Junio C HamanoSep 11, 2010
  9. Jens LehmannSep 11, 2010
  10. Junio C HamanoSep 12, 2010
  11. Junio C HamanoSep 12, 2010
  12. Jens LehmannSep 13, 2010
  13. Junio C HamanoSep 13, 2010
  14. Jens LehmannSep 14, 2010

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.