summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--debian/changelog1
-rwxr-xr-xdgit6
2 files changed, 6 insertions, 1 deletions
diff --git a/debian/changelog b/debian/changelog
index 68fb46e..a63f27d 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -5,6 +5,7 @@ dgit (3.10~) unstable; urgency=medium
to dgit private workarea. Closes:#853085.
* dgit: Strip initial newline from Changes line from dpkg-parsechangelog
so as to avoid blank line in commit messages. Closes:#853093.
+ * dgit: Do not fail when run with detached HEAD. Closes:#853022.
Test suite:
* quilt-useremail: New test for user config copying (#853085).
diff --git a/dgit b/dgit
index f1f9332..724dba1 100755
--- a/dgit
+++ b/dgit
@@ -4435,8 +4435,12 @@ sub cmd_clone {
}
sub branchsuite () {
- my @cmd = (@git, qw(symbolic-ref HEAD));
+ my @cmd = (@git, qw(symbolic-ref -q HEAD));
my $branch = cmdoutput_errok @cmd;
+ if (!defined $branch) {
+ $?==256 or failedcmd @cmd;
+ return undef;
+ }
if ($branch =~ m#$lbranch_re#o) {
return $1;
} else {