summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOswald Buddenhagen <oswald.buddenhagen@gmx.de>2023-03-23 11:56:42 +0100
committerOswald Buddenhagen <oswald.buddenhagen@gmx.de>2024-01-09 16:33:30 +0000
commit518a551ec9629bfe285e287044ea98839154b728 (patch)
tree6d08a51d98b2e2e927e6eee6f1d7593904c4a9fc
parent7a364ff7cd820c821cc674230ced3ca1e4f63d6b (diff)
gpush: simplify skipping push of unmodified series
since commit 152da287e, push_changes() won't do anything anyway if there are no modified Changes in the series. so remove the now redundant code. Change-Id: I2365317612bd26e764ad0bccb2e54215d20d0d1c Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
-rwxr-xr-xbin/git-gpush9
1 files changed, 2 insertions, 7 deletions
diff --git a/bin/git-gpush b/bin/git-gpush
index 2bb8780..cffe982 100755
--- a/bin/git-gpush
+++ b/bin/git-gpush
@@ -1579,7 +1579,6 @@ sub classify_changes_online($)
{
my ($group) = @_;
- my $any_modified = 0;
foreach my $change (@{$$group{changes}}) {
my $commit = $$change{final};
next if (!$commit); # Rebase failure
@@ -1633,13 +1632,9 @@ sub classify_changes_online($)
$$change{freshness} = NEW;
}
}
- $any_modified++;
+ $have_modified = 1;
}
}
- if ($any_modified) {
- $$group{have_modified} = 1;
- $have_modified = 1;
- }
}
sub annotate_changes($)
@@ -2029,7 +2024,7 @@ sub execute_pushing()
}
if ($have_modified) {
foreach my $group (@$groups) {
- push_changes($group) if ($$group{have_modified});
+ push_changes($group);
}
} else {
print "No modified commits - nothing to push.\n" if (!$quiet);