From dd1e5b313a0aef5d22cd9909c14e4b1b6dcbea79 Mon Sep 17 00:00:00 2001 From: Heiko Voigt Date: Wed, 14 Jul 2010 13:59:57 +0200 Subject: add configuration variable for --autosquash option of interactive rebase If you use this feature regularly you can now enable it by default. In case the user wants to override this config on the commandline --no-autosquash can be used to force disabling. Signed-off-by: Heiko Voigt Signed-off-by: Junio C Hamano --- Documentation/git-rebase.txt | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'Documentation/git-rebase.txt') diff --git a/Documentation/git-rebase.txt b/Documentation/git-rebase.txt index be23ad2359..911b1380f3 100644 --- a/Documentation/git-rebase.txt +++ b/Documentation/git-rebase.txt @@ -199,6 +199,9 @@ rebase.stat:: Whether to show a diffstat of what changed upstream since the last rebase. False by default. +rebase.autosquash:: + If set to true enable '--autosquash' option by default. + OPTIONS ------- :: @@ -326,6 +329,7 @@ idea unless you know what you are doing (see BUGS below). instead. --autosquash:: +--no-autosquash:: When the commit log message begins with "squash! ..." (or "fixup! ..."), and there is a commit whose title begins with the same ..., automatically modify the todo list of rebase -i @@ -334,6 +338,10 @@ idea unless you know what you are doing (see BUGS below). commit from `pick` to `squash` (or `fixup`). + This option is only valid when the '--interactive' option is used. ++ +If the '--autosquash' option is enabled by default using the +configuration variable `rebase.autosquash`, this option can be +used to override and disable this setting. --no-ff:: With --interactive, cherry-pick all rebased commits instead of -- cgit v1.2.3 From 93ce190cd16b4c5ff16cc000eb75bd6e6c3238ac Mon Sep 17 00:00:00 2001 From: Mike Lundy Date: Thu, 29 Jul 2010 00:04:29 +0200 Subject: rebase: support -X to pass through strategy options git-rebase calls out to merge strategies, but did not support merge strategy options so far. Add this, in the same style used in git-merge. Sadly we have to do the full quoting/eval dance here, since merge-recursive supports the --subtree= option which potentially contains whitespace. This patch does not cover git rebase -i, which does not call any merge strategy directly except in --preserve-merges, and even then only for merges. [jc: with a trivial fix-up for 'expr'] Signed-off-by: Mike Lundy Signed-off-by: Thomas Rast Signed-off-by: Junio C Hamano --- Documentation/git-rebase.txt | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'Documentation/git-rebase.txt') diff --git a/Documentation/git-rebase.txt b/Documentation/git-rebase.txt index be23ad2359..b4314568f5 100644 --- a/Documentation/git-rebase.txt +++ b/Documentation/git-rebase.txt @@ -250,6 +250,13 @@ on top of the branch using the given strategy, using the 'ours' strategy simply discards all patches from the , which makes little sense. +-X :: +--strategy-option=:: + Pass the through to the merge strategy. + This implies `\--merge` and, if no strategy has been + specified, `-s recursive`. Note the reversal of 'ours' and + 'theirs' as noted in above for the `-m` option. + -q:: --quiet:: Be quiet. Implies --no-stat. -- cgit v1.2.3 From cd035b1cef39811fd3116aa07d99395960ec947a Mon Sep 17 00:00:00 2001 From: Matthieu Moy Date: Tue, 10 Aug 2010 17:17:51 +0200 Subject: rebase -i: add exec command to launch a shell command The typical usage pattern would be to run a test (or simply a compilation command) at given points in history. The shell command is ran (from the worktree root), and the rebase is stopped when the command fails, to give the user an opportunity to fix the problem before continuing with "git rebase --continue". This needs a little rework of skip_unnecessary_picks, which wasn't robust enough to deal with lines like exec >"file name with many spaces" in the todolist. The new version extracts command, sha1 and rest from each line, but outputs the line itself verbatim to avoid changing the whitespace layout. Signed-off-by: Matthieu Moy Signed-off-by: Junio C Hamano --- Documentation/git-rebase.txt | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'Documentation/git-rebase.txt') diff --git a/Documentation/git-rebase.txt b/Documentation/git-rebase.txt index be23ad2359..9c68b667e9 100644 --- a/Documentation/git-rebase.txt +++ b/Documentation/git-rebase.txt @@ -459,6 +459,30 @@ sure that the current HEAD is "B", and call $ git rebase -i -p --onto Q O ----------------------------- +Reordering and editing commits usually creates untested intermediate +steps. You may want to check that your history editing did not break +anything by running a test, or at least recompiling at intermediate +points in history by using the "exec" command (shortcut "x"). You may +do so by creating a todo list like this one: + +------------------------------------------- +pick deadbee Implement feature XXX +fixup f1a5c00 Fix to feature XXX +exec make +pick c0ffeee The oneline of the next commit +edit deadbab The oneline of the commit after +exec cd subdir; make test +... +------------------------------------------- + +The interactive rebase will stop when a command fails (i.e. exits with +non-0 status) to give you an opportunity to fix the problem. You can +continue with `git rebase --continue`. + +The "exec" command launches the command in a shell (the one specified +in `$SHELL`, or the default shell if `$SHELL` is not set), so you can +use shell features (like "cd", ">", ";" ...). The command is run from +the root of the working tree. SPLITTING COMMITS ----------------- -- cgit v1.2.3 From b9190e79134ceea2ed0f4a3d1aa90ce6398858f7 Mon Sep 17 00:00:00 2001 From: Jonathan Nieder Date: Fri, 20 Aug 2010 05:39:48 -0500 Subject: Documentation: do not convert ... operator to ellipses The symmetric difference or merge-base operator ... as used by rev-list and diff is actually three period characters. If it gets replaced by an ellipsis glyph in the manual, that would stop readers from copying and pasting it. Signed-off-by: Jonathan Nieder Signed-off-by: Junio C Hamano --- Documentation/git-rebase.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Documentation/git-rebase.txt') diff --git a/Documentation/git-rebase.txt b/Documentation/git-rebase.txt index b4314568f5..b8aa0b999d 100644 --- a/Documentation/git-rebase.txt +++ b/Documentation/git-rebase.txt @@ -207,7 +207,7 @@ OPTIONS . May be any valid commit, and not just an existing branch name. + -As a special case, you may use "A...B" as a shortcut for the +As a special case, you may use "A\...B" as a shortcut for the merge base of A and B if there is exactly one merge base. You can leave out at most one of A and B, in which case it defaults to HEAD. -- cgit v1.2.3