Skip to content

Commit 8869a30

Browse files
mene-apngerrit-scoped@luci-project-accounts.iam.gserviceaccount.com
authored andcommitted
project: Drop --no-deref from update-ref --stdin
repo calls `git update-ref --stdin` when updating multiple refs during repo init and repo sync. Historically, `--no-deref` was also passed. Older Git 2.17 which we still support rejects the combination of `--stdin` and `--no-deref`, emitting a usage error even when the stdin input is valid. The `--no-deref` option is only meaningful when updating symbolic refs such as HEAD. The stdin-based update-ref path only operates on explicit refs (tags, remote refs, alternates) and never symbolic refs. Remove the unnecessary option to restore compatibility with Git 2.17 while preserving identical behavior on newer Git versions. Tested with: - Git 2.17.1 - Git 2.34.1 Change-Id: I22001de03800f5699b26a40bc1fb1fec002ed048 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/571721 Reviewed-by: Mike Frysinger <vapier@google.com> Reviewed-by: Gavin Mak <gavinmak@google.com> Commit-Queue: Enei <miyako.enei@alpsalpine.com> Tested-by: Enei <miyako.enei@alpsalpine.com>
1 parent 3b0eebe commit 8869a30

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

project.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2673,7 +2673,7 @@ def _RemoteFetch(
26732673
if update_ref_cmds:
26742674
GitCommand(
26752675
self,
2676-
["update-ref", "--no-deref", "--stdin"],
2676+
["update-ref", "--stdin"],
26772677
bare=True,
26782678
input="".join(update_ref_cmds),
26792679
).Wait()
@@ -2921,7 +2921,7 @@ def _RemoteFetch(
29212921
)
29222922
GitCommand(
29232923
self,
2924-
["update-ref", "--no-deref", "--stdin"],
2924+
["update-ref", "--stdin"],
29252925
bare=True,
29262926
input=delete_cmds,
29272927
log_as_error=False,

0 commit comments

Comments
 (0)