From: Vincent van Ravesteijn Date: Sat, 26 May 2012 12:53:26 GMT Subject: Re: git rebase -f --autosquash Message-ID: <4FC0D246.2010701@lyx.org> In-Reply-To: <33DF11B90FEF4CB6B4103BE0AAF9B256@gmail.com> Op 26-5-2012 9:30, Andy Kitchen schreef: > On Tuesday, 15 May 2012 at 2:35 AM, Junio C Hamano wrote: >> Given "EDITOR=: git commit args..." and "EDITOR=: git merge args..." are >> equivalent to giving "--no-edit" option to these commands, I would imagine >> "git rebase opts... --no-editor args..." would not be such a stretch. > I agree. However, I think it would be more intuitive to make --autosquash > work with -f or even just on its own in non-interactive mode. > It definitely makes sense practically and semantically to autosquash > non-interactively. Otherwise one needs to activate interactive mode > and effectively disable it in the same command which is a bit esoteric. > ... > In summary, I propose: > > 1a) > > $ git rebase -f --autosquash > is made to be effectively equivalent to: > $ EDITOR=: git rebase -i --autosquash > I think the following one-line patch will effectively do what you want. diff --git a/git-rebase.sh b/git-rebase.sh index 24a2840..c4ffdcd 100755 --- a/git-rebase.sh +++ b/git-rebase.sh @@ -228,8 +228,9 @@ do -p) preserve_merges=t test -z "$interactive_rebase" && interactive_rebase=implied ;; --autosquash) autosquash=t + test -z "$interactive_rebase" && interactive_rebase=implied ;; --no-autosquash) Vincent