git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Brandon Casey <casey@nrlssc.navy.mil>
Cc: git@vger.kernel.org, johannes.schindelin@gmx.de,
	Jens.Lehmann@web.de, Brandon Casey <drafnel@gmail.com>
Subject: Re: [PATCH] builtin/describe.c: ignore untracked changes in submodules
Date: Thu, 09 Sep 2010 17:21:26 -0700	[thread overview]
Message-ID: <7vy6bajvnd.fsf@alter.siamese.dyndns.org> (raw)
In-Reply-To: <CC-1wlyJRzGfkPwn1Ra8d4Ot7mMnUGxYChGZHdqp-lQ5URlUFhNp4Ilyrh4bGk1dWF6drZXvim0@cipher.nrlssc.navy.mil> (Brandon Casey's message of "Thu\,  9 Sep 2010 14\:12\:19 -0500")

Brandon Casey <casey@nrlssc.navy.mil> writes:

> 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?

>  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

  reply	other threads:[~2010-09-10  0:21 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-09 19:12 [PATCH] builtin/describe.c: ignore untracked changes in submodules Brandon Casey
2010-09-10  0:21 ` Junio C Hamano [this message]
2010-09-10 18:40   ` Jens Lehmann
2010-09-12 19:10     ` Brandon Casey
2010-09-13 17:59       ` Jens Lehmann
     [not found]       ` <1258122337.8606899.1284400767503.JavaMail.fmail@mwmweb047>
2010-09-13 18:18         ` Jens Lehmann
2010-09-13 23:14           ` Junio C Hamano
2010-09-14 20:30             ` Jens Lehmann
     [not found]   ` <1464835923.7527323.1284144028047.JavaMail.fmail@mwmweb047>
2010-09-11 18:11     ` Jens Lehmann
2010-09-11 19:13       ` Junio C Hamano
2010-09-11 20:23         ` Jens Lehmann
2010-09-12 17:44           ` Junio C Hamano
2010-09-12 20:07             ` Junio C Hamano
2010-09-12  2:22 ` yj2133011

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7vy6bajvnd.fsf@alter.siamese.dyndns.org \
    --to=gitster@pobox.com \
    --cc=Jens.Lehmann@web.de \
    --cc=casey@nrlssc.navy.mil \
    --cc=drafnel@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=johannes.schindelin@gmx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).