Files
git-repo/man
Romaric Jodin 3656290156 upload: add --ignore-remote-commits
When uploading a branch that merges another remote-tracking branch (such
as an upstream branch into the destination branch), ReviewableBranch
only excludes the destination tracking branch (^base). As a result, git
rev-list walks the merged parent and counts all merged commits even
though they already exist on a remote branch, triggering the unusual
commit count warning in _VerifyPendingCommits.

Add --ignore-remote-commits to `repo upload` to pass --not --remotes to
git rev-list in ReviewableBranch so commits already reachable from
refs/remotes/* are excluded from the pending commit list.

Test: ./run_tests tests/test_project.py tests/test_subcmds_upload.py
Change-Id: Ib1fb864982729e20a621144580fe95daa478eaee
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/651284
Tested-by: Romaric Jodin <rjodin@google.com>
Reviewed-by: Brian Gan <brgan@google.com>
Commit-Queue: Romaric Jodin <rjodin@google.com>
2026-11-03 00:10:19 -08:00
..
2026-06-25 16:07:53 -07:00
2026-06-25 16:07:53 -07:00
2026-06-25 16:07:53 -07:00
2022-07-11 16:42:23 +00:00
2026-06-25 16:07:53 -07:00
2022-07-11 16:42:23 +00:00
2022-07-11 16:42:23 +00:00
2026-06-25 16:07:53 -07:00
2026-09-30 01:11:40 -07:00
2026-06-25 16:07:53 -07:00
2022-07-11 16:42:23 +00:00
2026-06-25 16:07:53 -07:00
2026-06-25 16:07:53 -07:00
2022-07-11 16:42:23 +00:00
2026-06-25 16:07:53 -07:00
2026-06-25 16:07:53 -07:00
2022-07-11 16:42:23 +00:00
2022-07-11 16:42:23 +00:00
2026-06-25 16:07:53 -07:00
2022-07-11 16:42:23 +00:00
2026-06-25 16:07:53 -07:00