aboutsummaryrefslogtreecommitdiffstats
path: root/gitweb/gitweb.perl
diff options
context:
space:
mode:
authorAbhijeet Sonar <abhijeet.nkt@gmail.com>2024-06-27 00:38:00 +0530
committerJunio C Hamano <gitster@pobox.com>2024-06-26 13:04:08 -0700
commitb8ae42e292c51348b8d8730225396ac9ef72f550 (patch)
tree0239b437e552aa14cbeb8c6abec4d7431f0add9d /gitweb/gitweb.perl
parentGit 2.45 (diff)
downloadgit-b8ae42e292c51348b8d8730225396ac9ef72f550.tar.gz
git-b8ae42e292c51348b8d8730225396ac9ef72f550.zip
describe: refresh the index when 'broken' flag is used
When describe is run with 'dirty' flag, we refresh the index to make sure it is in sync with the filesystem before determining if the working tree is dirty. However, this is not done for the codepath where the 'broken' flag is used. This causes `git describe --broken --dirty` to false positively report the worktree being dirty if a file has different stat info than what is recorded in the index. Running `git update-index -q --refresh` to refresh the index before running diff-index fixes the problem. Also add tests to deliberately update stat info of a file before running describe to verify it behaves correctly. Reported-by: Paul Millar <paul.millar@desy.de> Suggested-by: Junio C Hamano <gitster@pobox.com> Helped-by: Junio C Hamano <gitster@pobox.com> Helped-by: Phillip Wood <phillip.wood123@gmail.com> Signed-off-by: Abhijeet Sonar <abhijeet.nkt@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'gitweb/gitweb.perl')
0 files changed, 0 insertions, 0 deletions