mirror of
https://gerrit.googlesource.com/git-repo
synced 2026-05-07 11:29:27 +00:00
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>
This commit is contained in:
committed by
gerrit-scoped@luci-project-accounts.iam.gserviceaccount.com
parent
3b0eebeccf
commit
8869a30283
+2
-2
@@ -2673,7 +2673,7 @@ class Project:
|
||||
if update_ref_cmds:
|
||||
GitCommand(
|
||||
self,
|
||||
["update-ref", "--no-deref", "--stdin"],
|
||||
["update-ref", "--stdin"],
|
||||
bare=True,
|
||||
input="".join(update_ref_cmds),
|
||||
).Wait()
|
||||
@@ -2921,7 +2921,7 @@ class Project:
|
||||
)
|
||||
GitCommand(
|
||||
self,
|
||||
["update-ref", "--no-deref", "--stdin"],
|
||||
["update-ref", "--stdin"],
|
||||
bare=True,
|
||||
input=delete_cmds,
|
||||
log_as_error=False,
|
||||
|
||||
Reference in New Issue
Block a user