Skip to content

describe and diff: implement --no-optional-locks

Benjamin Woodruff via GitGitGadget git 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 8 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2describe: implement --no-optional-locksDocumentation/git-describe.adoc Documentation/git.adoc builtin/describe.c +1 more+29 -60 replies
2/2diff: implement --no-optional-locksDocumentation/config/diff.adoc Documentation/git.adoc builtin/diff.c +2 more+56 -20 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/2] describe and diff: implement --no-optional-locks

git describe and git diff may update the index in the background for similar performance reasons to git-status. These patches implement the --no-optional-locks option for these commands, which allows scripts to bypass this behavior.

I'm implementing this as a solution to a stale lockfile issue we've sporadically encountered due to a build script that runs git describe. We're mitigating this issue by using libgit2 in our build script, which does not have the same background update behavior for its git_describe_workdir implementation, but it would be nice to have this option supported in the git CLI.

Tests and documentation changes are included!

Benjamin Woodruff (2):
describe: implement --no-optional-locks
diff: implement --no-optional-locks

 Documentation/config/diff.adoc     |  4 ++-
 Documentation/git-describe.adoc    | 12 ++++++++
 Documentation/git.adoc             |  4 ++-
 builtin/describe.c                 | 12 ++++----
 builtin/diff.c                     |  4 +++
 t/meson.build                      |  1 +
 t/t4070-diff-auto-refresh-index.sh | 46 ++++++++++++++++++++++++++++++
 t/t6120-describe.sh                |  8 ++++++
 8 files changed, 84 insertions(+), 7 deletions(-)
 create mode 100755 t/t4070-diff-auto-refresh-index.sh

base-commit: e969bc875963a10890d61ba84eab3a460bd9e535
Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-1872%2Fbgw%2Fbgw%2Fdiff-describe-optional-locks-v1
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-1872/bgw/bgw/diff-describe-optional-locks-v1
Pull-Request: https://github.com/gitgitgadget/git/pull/1872

Signature · 1 line
gitgitgadget