From 777fa0d9d3dbc4f2b498c116c469ab3bdaa13a1c Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Sat, 25 Aug 2018 13:21:09 +0100 Subject: [PATCH] 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 --- git-debrebase | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/git-debrebase b/git-debrebase index 529286e6..a0fc2aaa 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; } -- 2.30.2