diff options
author | Jonathan Druart <jonathan.druart@gmail.com> | 2017-03-15 17:07:15 -0300 |
---|---|---|
committer | Jonathan Druart <jonathan.druart@gmail.com> | 2017-03-17 17:05:11 -0300 |
commit | 7afcfdb8a55384e79405ae44a697c36fa5f583a7 (patch) | |
tree | 6c135c212d8e86dec8749786e568edc717b75bfc | |
parent | 127f251ce377f2a4b1300452a0ab93a7ee5e6481 (diff) | |
download | git-bz-7afcfdb8a55384e79405ae44a697c36fa5f583a7.tar.gz |
Only edit the first commit
Usually when I use `git bz attach -e` I only want to edit the first
commit to change the status and obsolete the patches.
-rwxr-xr-x | git-bz | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -1926,6 +1926,7 @@ def attach_commits(bug, commits, include_comments=True, edit_comments=False, sta commits = list(commits) commits.reverse() + is_first = True for commit in commits: filename = make_filename(commit.subject) + ".patch" patch = get_patch(commit) @@ -1933,7 +1934,7 @@ def attach_commits(bug, commits, include_comments=True, edit_comments=False, sta body = strip_bug_url(bug, get_body(commit)) else: body = None - if edit_comments: + if edit_comments and is_first is True: description, body, obsoletes, statuses, patch_complexities, depends = edit_attachment_comment(bug, commit.subject, body) else: description = commit.subject @@ -1945,6 +1946,7 @@ def attach_commits(bug, commits, include_comments=True, edit_comments=False, sta patch_complexities = [] depends = [] + is_first = False bug_changes = {} if len(statuses) > 0: |