Package: devscripts Version: 2.13.2 Severity: normal Tags: patch Hi
Recent git version uploaded to unstable changed the output format of git status when the working directory is clean: Older versions have: nothing to commit (working directory clean) whereas git 1:1.8.3.1-1 as uploaded in unstable has nothing to commit, working directory clean 518 elsif ($prog eq 'git') { 519 if (! @files_to_commit && ($all || $release)) { 520 # check to see if the WC is clean. git-commit would exit 521 # nonzero, so don't run it in --all or --release mode. 522 my $status=`LANG=C git status`; 523 if ($status=~/nothing to commit \(working directory clean\)/) { 524 print $status; 525 return; 526 } 527 } so with newer git versions the status on line 523 do not match the expression and git will exit later on. Something like $status =~ /nothing to commit/ && $status =~ /working directory clean/ would do the trick. Regards, Salvatore
>From b721166ad224c882a23911b3d057a7ce636f00a3 Mon Sep 17 00:00:00 2001 From: Salvatore Bonaccorso <car...@debian.org> Date: Thu, 13 Jun 2013 20:02:04 +0200 Subject: [PATCH] Adapt to changed output for git status in newer git versions Newer versions of git emit "nothing to commit, working directory clean" instead of "nothing to commit (working directory clean)" on git status when a working directory is clean. Adjust the parsing to match for both cases, as git commit would exit with nonzero status and thus debcommit exit. --- scripts/debcommit.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/debcommit.pl b/scripts/debcommit.pl index 675d063..f129f38 100755 --- a/scripts/debcommit.pl +++ b/scripts/debcommit.pl @@ -520,7 +520,7 @@ sub commit { # check to see if the WC is clean. git-commit would exit # nonzero, so don't run it in --all or --release mode. my $status=`LANG=C git status`; - if ($status=~/nothing to commit \(working directory clean\)/) { + if ($status =~ /nothing to commit/ && $status =~ /working directory clean/) { print $status; return; } -- 1.7.10.4