From: Vincent van Ravesteijn <vfr@lyx.org>
To: Andy Kitchen <kitchen.andy@gmail.com>
Cc: git@vger.kernel.org, "Junio C Hamano" <gitster@pobox.com>,
"Carlos Martín Nieto" <cmn@elego.de>
Subject: Re: git rebase -f --autosquash
Date: Sat, 26 May 2012 14:53:26 +0200 [thread overview]
Message-ID: <4FC0D246.2010701@lyx.org> (raw)
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<base>
> is made to be effectively equivalent to:
> $ EDITOR=: git rebase -i --autosquash<base>
>
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
next prev parent reply other threads:[~2012-05-26 12:53 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-12 10:38 git rebase -f --autosquash Andy Kitchen
2012-05-12 11:05 ` Carlos Martín Nieto
2012-05-14 16:35 ` Junio C Hamano
2012-05-26 7:30 ` Andy Kitchen
2012-05-26 12:53 ` Vincent van Ravesteijn [this message]
2012-05-27 6:44 ` Junio C Hamano
2012-06-04 19:44 ` Phil Hord
2012-06-04 20:05 ` Junio C Hamano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4FC0D246.2010701@lyx.org \
--to=vfr@lyx.org \
--cc=cmn@elego.de \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=kitchen.andy@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).