[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] Really update the git index to avoid false -dirty versions
From: |
Jim Meyering |
Subject: |
Re: [PATCH] Really update the git index to avoid false -dirty versions |
Date: |
Mon, 12 Apr 2010 18:25:01 +0200 |
Andreas Gruenbacher wrote:
> * build-aux/git-version-gen: Use git update-index here; git status
> will leave the index outdated.
> ---
> build-aux/git-version-gen | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/build-aux/git-version-gen b/build-aux/git-version-gen
> index 16da2a8..e754c77 100755
> --- a/build-aux/git-version-gen
> +++ b/build-aux/git-version-gen
> @@ -127,7 +127,7 @@ fi
> v=`echo "$v" |sed 's/^v//'`
>
> # Don't declare a version "dirty" merely because a time stamp has changed.
> -git status > /dev/null 2>&1
> +git update-index --refresh > /dev/null 2>&1
Thanks for the patch.
Can you describe a scenario in which
using "git update-index --refresh" makes
git-version-gen work better than with "git status"?
In the example I tried (touch an unmodified, vc'd file),
they appear to have the same net effect.
BTW, it's nice to see how GNU patch is evolving.