git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Philippe Vaucher <philippe.vaucher@gmail.com>
To: Chris Packham <judge.packham@gmail.com>
Cc: Johannes Sixt <j.sixt@viscovery.net>,
	Brett Randall <javabrett@gmail.com>,
	"git@vger.kernel.org" <git@vger.kernel.org>
Subject: Re: A couple of rebase --autosquash proposals
Date: Mon, 9 Dec 2013 10:39:12 +0100	[thread overview]
Message-ID: <CAGK7Mr75jPCWWRDE9ohLXaxk-JuRosf8960KfJ0HknaAVq-qXg@mail.gmail.com> (raw)
In-Reply-To: <52A58CBB.6040809@gmail.com>

> >> * fixup! or squash! on it's own would default to fixing-up the
> >> previous commit (or result of previous step of rebase if that was a
> >> squash/fixup).
> >
> > Why would you want that? To fixup the previous commit, just use 'git
> > commit --amend'. What am I missing?
>
> In the past I've used this kind of approach when doing merging/porting
> work with 3rd party code (or just large integrations). The first (and
> eventually final) commit introduces the new code. The subsequent fixups
> address build issues which are either errors in the 3rd party code
> (which I will want to submit bug reports for later and carry in my tree
> as real commits) or errors in my merging (which I want to squash into
> the merge commit). When faced with a screen full of compilation errors
> I'm not sure which of these 2 categories are applicable at the time so I
> tend to have lots of little fixups that I need to juggle around with git
> rebase once I've got the code compiling and passing some tests.
>
> All that being said I think allowing multiple "fixup!\n" stack up on
> each other might be a bit dangerous. There are cases where
> fixup!-fixup!-real might be useful but those would be hard to
> distinguish those from cases where someone absent mindedly forgot to put
> something after "fixup!".


You guys probably already know about it, but there is `git commit
--fixup SHA1` to create !fixup commits intended for a particular
commit. I think using this feature solves all the problem the OP has?

Philippe

  reply	other threads:[~2013-12-09  9:39 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-09  2:23 A couple of rebase --autosquash proposals Brett Randall
2013-12-09  6:51 ` Johannes Sixt
2013-12-09  9:26   ` Chris Packham
2013-12-09  9:39     ` Philippe Vaucher [this message]
2013-12-09  9:52     ` Brett Randall
2013-12-09 20:20   ` Junio C Hamano
2013-12-09 23:20     ` Brett Randall

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=CAGK7Mr75jPCWWRDE9ohLXaxk-JuRosf8960KfJ0HknaAVq-qXg@mail.gmail.com \
    --to=philippe.vaucher@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=j.sixt@viscovery.net \
    --cc=javabrett@gmail.com \
    --cc=judge.packham@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).