summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuido Günther <agx@sigxcpu.org>2009-06-12 10:43:06 +0200
committerGuido Günther <agx@sigxcpu.org>2009-06-12 10:45:24 +0200
commit882f9716762fb086046f58b5c22ff658e69a2298 (patch)
treefe22cf708497ad3a0c9d77f9e944f6edf3ea9f3c
parent55a89e1050a524cfa7559c62e879eb01993fddc8 (diff)
downloadgit-buildpackage-882f9716762fb086046f58b5c22ff658e69a2298.tar.gz
git-buildpackage-882f9716762fb086046f58b5c22ff658e69a2298.tar.bz2
git-buildpackage-882f9716762fb086046f58b5c22ff658e69a2298.zip
check for snapshot mode
when checking if we need to add a new section. Closes: #532583 Thanks: Ove Kaaven for sorting this out
-rwxr-xr-xgit-dch7
1 files changed, 5 insertions, 2 deletions
diff --git a/git-dch b/git-dch
index 14bb495b..ec1c0607 100755
--- a/git-dch
+++ b/git-dch
@@ -341,8 +341,11 @@ def main(argv):
if cp['Distribution'] != "UNRELEASED" and not found_snapshot_header and commits:
# the last version was a release and we have pending commits
add_section = True
- elif options.new_version or not found_snapshot_header:
- # the user wants to force a new version or switch to snapshot mode
+ elif options.new_version:
+ # the user wants to force a new version
+ add_section = True
+ elif options.snapshot and not found_snapshot_header:
+ # the user want to switch to snapshot mode
add_section = True
else:
add_section = False