From: Ian Jackson Date: Sat, 25 Aug 2018 12:21:09 +0000 (+0100) Subject: git-debrebase: gbp_pq_export: Return flag, are there any patches? X-Git-Tag: archive/debian/6.10~48 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=dgit.git;a=commitdiff_plain;h=777fa0d9d3dbc4f2b498c116c469ab3bdaa13a1c;hp=788c71b25686960edf9cf80b2f4d3223951959ec 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 --- 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; }