summaryrefslogtreecommitdiff
path: root/git-debrebase
diff options
context:
space:
mode:
authorIan Jackson <ijackson@chiark.greenend.org.uk>2018-08-25 13:21:09 +0100
committerIan Jackson <ijackson@chiark.greenend.org.uk>2018-08-25 13:21:09 +0100
commit777fa0d9d3dbc4f2b498c116c469ab3bdaa13a1c (patch)
tree40018532e539a3d581059ab94bb702e0e22309d7 /git-debrebase
parent788c71b25686960edf9cf80b2f4d3223951959ec (diff)
git-debrebase: gbp_pq_export: Return flag, are there any patches?
All callers currently ignore the return value, so NFC. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Diffstat (limited to 'git-debrebase')
-rwxr-xr-xgit-debrebase5
1 files changed, 4 insertions, 1 deletions
diff --git a/git-debrebase b/git-debrebase
index 529286e..a0fc2aa 100755
--- a/git-debrebase
+++ b/git-debrebase
@@ -494,6 +494,7 @@ sub gbp_pq_export ($$$) {
# must be run in a workarea. $bname and patch-queue/$bname
# ought not to exist. Leaves you on patch-queue/$bname with
# the patches staged but not committed.
+ # returns 1 if there were any patches
printdebug "gbp_pq_export $bname $base $tip\n";
runcmd @git, qw(checkout -q -b), $bname, $base;
runcmd @git, qw(checkout -q -b), "patch-queue/$bname", $tip;
@@ -503,7 +504,9 @@ sub gbp_pq_export ($$$) {
{ local ($!,$?); copy('../gbp-pq-err', \*STDERR); }
failedcmd @gbp_cmd;
}
- runcmd @git, qw(add -f debian/patches) if stat_exists 'debian/patches';
+ return 0 unless stat_exists 'debian/patches';
+ runcmd @git, qw(add -f debian/patches);
+ return 1;
}