summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorOswald Buddenhagen <oswald.buddenhagen@gmx.de>2023-03-30 12:01:56 +0200
committerOswald Buddenhagen <oswald.buddenhagen@gmx.de>2024-01-09 16:49:35 +0000
commit7e769b158f070ff0bc7b3d7cdf00f654e03d1c9f (patch)
tree9982d91059bed7616c09e7659398de31b1024a54 /bin
parent0252201b8c632cdce6593af782f74e8769fb8b5b (diff)
gpush: delay (re-)setting the push base to the local branch's base
when the series isn't pushed right away, but only (re-)grouped, then it is more intuitive to postpone resetting the base until the actual push, lest one will have to rebase again (when the local series receives another conflicted rebase in between). the wording of the help text is intentionally very broad, as it will soon cover more cases. Change-Id: I3ca99bc5d011b546e9f014c176c3c1bbc0f7a8e7 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Diffstat (limited to 'bin')
-rwxr-xr-xbin/git-gpush11
1 files changed, 10 insertions, 1 deletions
diff --git a/bin/git-gpush b/bin/git-gpush
index 53299b9..48e98da 100755
--- a/bin/git-gpush
+++ b/bin/git-gpush
@@ -202,6 +202,10 @@ Options:
Reset the base of a previously pushed series to the local branch's
base. Typically used after a conflicted pull.
+ When the base-modifying options are used with --group, the
+ resolution of bases which relate to the local branch is delayed
+ until the next push.
+
The base-modifying options may be used with --list-rebase and
--list-online, but their effect is not persisted in this case.
@@ -1600,7 +1604,6 @@ sub determine_base($)
# This all doesn't appear to be worth it ...
}
if (!length($base)) {
- $base = $local_base;
printf("Basing series %s on local branch's base.\n", format_group_id($group))
if ($verbose);
}
@@ -1940,6 +1943,12 @@ sub do_rebase_changes($$)
my ($group, $upstreamed_changes) = @_;
my ($base, $changes) = ($$group{base}, $$group{changes});
+ if (!length($base)) {
+ print "Resetting base to local branch's base.\n" if ($debug);
+ $base = $local_base;
+ $$group{base} = $base;
+ }
+
printf("Rebasing %s to %s.\n", format_group_id($group), format_id($base))
if ($verbose);