On Monday 12 April 2010 18:25:01 Jim Meyering wrote: > 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.
I can't pinpoint it. In some versions or configurations of git, git status seems to be enough, but I get the following here with git 1.7.0.2.273.gc2413: $ git diff-index --name-only HEAD $ touch README $ git diff-index --name-only HEAD README $ git status > /dev/null $ git diff-index --name-only HEAD README $ git update-index --refresh $ git diff-index --name-only HEAD Another unrelated issue with how git-version-gen is used in packages like diffutils (and now, patch) is that version string changes do not trigger autoconf: when you build, change something, optionally commit stuff, and then rebuild, the string that git-version-gen reports will differ from the version string used during the build. This is really quite bad. (Patch previously had some make rules for working around that, but this functionality hasn't been restored, yet. This should become part of the git- version-gen module.) (I had a similar dependency issue when rebuilding after reconfiguring something; the rebuild also didn't work as expected without a "make clean".) > BTW, it's nice to see how GNU patch is evolving. Thanks -- getting there eventually, I hope :-) Andreas