From: Nicolas Sebrecht <nicolas.s.dev@gmx.fr>
To: Junio C Hamano <gitster@pobox.com>
Cc: Nicolas Sebrecht <nicolas.s.dev@gmx.fr>,
Johannes Schindelin <Johannes.Schindelin@gmx.de>,
Nanako Shiraishi <nanako3@lavabit.com>,
John Tapsell <johnflux@gmail.com>,
git@vger.kernel.org
Subject: [PATCH] Re: rebase -i: auto-squash commits
Date: Thu, 18 Jun 2009 12:59:00 +0200 [thread overview]
Message-ID: <20090618105859.GA12924@vidovic> (raw)
In-Reply-To: <7v8wjq2kqc.fsf@alter.siamese.dyndns.org>
The 17/06/09, Junio C Hamano wrote:
> We do want our commands to be able to act intelligently and/or differently
> depending on what commit says in some cases. It is does not make sense to
> insist that the command line or configuration mechanism must be used.
>
> A really trivial example. "git log -p" shows the patch text for non-merge
> commits but not for merge commits. "git log --grep=foo" shows only
> commits that says "foo" and "git log --author=Nicolas" shows only commits
> written by you. We used to leave an explicit note in the message part of
> cherry-picked commits where they were cherry-picked from; "git merge"
> and/or "git rebase" could have paid attention to it to act differently
> (i.e. "ah, even though that commit is not in the ancestry, the moral
> equivalent patch is already applied").
But I see a huge difference between a message added by the program
itself to act well on possible comming cases and a message added by the
user to act differently at the commit time.
The latter case is exposed to the user mistakes (wrong typo,
unintentional matching pattern, etc) which could leave the repository in
unexpected states.
Git is enough hard to learn. Please, don't make the learning curve even
worse. Having the commit message possibly making git acts differently is
not usual or expected by most users.
> Besides, if you as the end user want to tell this and that commit are
> special among other commits that are being rebased to the command, which
> is the scenario Nana's patch is about, how would you do that from the
> command line option? "rebase -i --move=4-to-2 --squash=2"?
Well, as we always squash to one of the first direct ancestor and as
squashing to a merge is not usual (here at least), in most cases it just
gives "rebase -i --move=4-to-2" wich sounds reasonable enough to me.
--
Nicolas Sebrecht
next prev parent reply other threads:[~2009-06-18 10:59 UTC|newest]
Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-06-17 12:06 git rebase --interactive squash/squish/fold/rollup Minty
2009-06-17 12:55 ` John Tapsell
2009-06-17 13:45 ` Minty
2009-06-17 16:33 ` Junio C Hamano
2009-06-17 16:40 ` John Tapsell
2009-06-17 16:48 ` Paolo Bonzini
2009-06-17 17:05 ` John Koleszar
2009-06-17 20:50 ` John Tapsell
2009-06-17 18:20 ` Clemens Buchacher
2009-06-18 22:31 ` Minty
2009-06-17 21:33 ` [PATCH] rebase -i: auto-squash commits Nanako Shiraishi
2009-06-17 22:08 ` Johannes Schindelin
2009-06-18 0:11 ` [PATCH] " Nicolas Sebrecht
2009-06-18 5:07 ` Junio C Hamano
2009-06-18 8:06 ` Johannes Schindelin
2009-06-18 8:11 ` Jakub Narebski
2009-06-18 8:21 ` Junio C Hamano
2009-06-18 8:26 ` Johannes Schindelin
2009-06-18 8:17 ` Teemu Likonen
2009-06-18 8:29 ` Johannes Schindelin
2009-06-18 8:44 ` Teemu Likonen
2009-06-18 12:16 ` Johannes Schindelin
2009-06-18 13:10 ` Jakub Narebski
2009-06-18 14:04 ` John Koleszar
2009-06-18 8:20 ` Junio C Hamano
2009-06-18 8:33 ` Johannes Schindelin
2009-06-18 8:44 ` Michael J Gruber
2009-06-19 7:18 ` Miles Bader
2009-06-18 11:18 ` Nicolas Sebrecht
2009-06-18 8:34 ` Matthieu Moy
2009-06-18 8:44 ` Johannes Schindelin
2009-06-18 8:59 ` Matthieu Moy
2009-06-18 10:59 ` Nicolas Sebrecht [this message]
2009-06-18 5:21 ` [PATCH] " Junio C Hamano
2009-06-18 21:55 ` [PATCH v2] rebase -i --autosquash: " Nanako Shiraishi
2009-06-18 22:35 ` Alex Riesen
2009-06-19 23:07 ` Wincent Colaiuta
2009-06-20 1:46 ` Nanako Shiraishi
2009-06-18 7:20 ` [PATCH] rebase -i: " Michael Haggerty
2009-06-18 7:54 ` 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=20090618105859.GA12924@vidovic \
--to=nicolas.s.dev@gmx.fr \
--cc=Johannes.Schindelin@gmx.de \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=johnflux@gmail.com \
--cc=nanako3@lavabit.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).