Skip to content

Commit

Permalink
allow empty commits to avoid errors in corner cases
Browse files Browse the repository at this point in the history
It is safer to get empty commit than to process corner cases, proved
also by testing :)

Signed-off-by: Denis Zalevskiy <denis.zalevskiy@jolla.com>
  • Loading branch information
Denis Zalevskiy committed Oct 25, 2014
1 parent 0557420 commit c0d4f7d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tools/git-vault-rebase-generate.awk
Expand Up @@ -36,7 +36,7 @@ function prepare_commands() {
cmd="git cherry-pick " ids[1];
for (i = 1; i <= length(ids); i++) {
cmd = cmd " && git cherry-pick --no-commit " ids[i] \
" && git commit --no-edit --amend";
" && git commit --no-edit --amend --allow-empty";
}
push_command(cmd);
}
Expand All @@ -53,7 +53,7 @@ function prepare_commands() {
}
array_clear(old_tags);
push_command("git cherry-pick --no-commit " id);
push_command("git commit --no-edit --amend");
push_command("git commit --no-edit --amend --allow-empty");
} else {
push_echo("tag " tag);
push_command("git cherry-pick " id);
Expand All @@ -79,7 +79,7 @@ $1 == "old_tag" {
push(old_tags, length(old_tags), "git cherry-pick " $2);
} else {
push(old_tags, length(old_tags), "git cherry-pick --no-commit " $2);
push(old_tags, length(old_tags), "git commit --no-edit --amend");
push(old_tags, length(old_tags), "git commit --no-edit --amend --allow-empty");
}
}

Expand Down

0 comments on commit c0d4f7d

Please sign in to comment.