summaryrefslogtreecommitdiff
path: root/git-rebase.sh
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2012-04-30 21:58:00 (GMT)
committerJunio C Hamano <gitster@pobox.com>2012-04-30 21:58:01 (GMT)
commit1692579dd3569ebc01187872db91ee2ad93cc962 (patch)
treea0f3f06c4a4d4fd9ee038de63ce69d165fc7ac22 /git-rebase.sh
parent563b3527b41a978eeef77d9426be460013c35d88 (diff)
parent90e1818f9a06015159712e204dd90868e0a6c421 (diff)
downloadgit-1692579dd3569ebc01187872db91ee2ad93cc962.zip
git-1692579dd3569ebc01187872db91ee2ad93cc962.tar.gz
git-1692579dd3569ebc01187872db91ee2ad93cc962.tar.bz2
Merge branch 'nh/empty-rebase'
"git rebase" learned to optionally keep commits that do not introduce any change in the original history. By Neil Horman * nh/empty-rebase: git-rebase: add keep_empty flag git-cherry-pick: Add test to validate new options git-cherry-pick: Add keep-redundant-commits option git-cherry-pick: add allow-empty option
Diffstat (limited to 'git-rebase.sh')
-rwxr-xr-xgit-rebase.sh5
1 files changed, 5 insertions, 0 deletions
diff --git a/git-rebase.sh b/git-rebase.sh
index 69c1374..24a2840 100755
--- a/git-rebase.sh
+++ b/git-rebase.sh
@@ -43,6 +43,7 @@ s,strategy=! use the given merge strategy
no-ff! cherry-pick all commits, even if unchanged
m,merge! use merging strategies to rebase
i,interactive! let the user edit the list of commits to rebase
+k,keep-empty preserve empty commits during rebase
f,force-rebase! force rebase even if branch is up to date
X,strategy-option=! pass the argument through to the merge strategy
stat! display a diffstat of what changed upstream
@@ -97,6 +98,7 @@ state_dir=
action=
preserve_merges=
autosquash=
+keep_empty=
test "$(git config --bool rebase.autosquash)" = "true" && autosquash=t
read_basic_state () {
@@ -220,6 +222,9 @@ do
-i)
interactive_rebase=explicit
;;
+ -k)
+ keep_empty=yes
+ ;;
-p)
preserve_merges=t
test -z "$interactive_rebase" && interactive_rebase=implied