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

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

 



Brandon Casey <casey@xxxxxxxxxxxxxxx> writes:

> From: Brandon Casey <drafnel@xxxxxxxxx>
>
> 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@xxxxxxxxxxxxxxx>
> ---

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
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[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]