summaryrefslogtreecommitdiff
path: root/git-debrebase
diff options
context:
space:
mode:
authorIan Jackson <ijackson@chiark.greenend.org.uk>2018-01-31 15:31:16 +0000
committerIan Jackson <ijackson@chiark.greenend.org.uk>2018-06-16 12:25:49 +0100
commit3fdad08cc0d365364b9075e02261c5941bfe3cf5 (patch)
treec51edc75969b7016060a168087d6a897c2039798 /git-debrebase
parentc7244a622fedfc203a935692a6f9e54733494dfc (diff)
git-debrebase: fix changelog manip
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Diffstat (limited to 'git-debrebase')
-rwxr-xr-xgit-debrebase5
1 files changed, 3 insertions, 2 deletions
diff --git a/git-debrebase b/git-debrebase
index c89e598..9a71bd3 100755
--- a/git-debrebase
+++ b/git-debrebase
@@ -967,8 +967,9 @@ sub cmd_new_upstream_v0 () {
# Now we have to add a changelog stanza so the Debian version
# is right.
die if unlink "debian";
- die $! unless $!==ENOTEMPTY;
- unlink "debian/changelog" or die $!;
+ die $! unless $!==ENOENT or $!==ENOTEMPTY;
+ unlink "debian/changelog" or $!==ENOENT or die $!;
+ mkdir "debian" or die $!;
open CN, ">", "debian/changelog" or die $!;
my $oldclog = git_cat_file ":debian/changelog";
$oldclog =~ m/^($package_re) \(\S+\) / or