Git development
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Johannes Schindelin <johannes.schindelin@gmx.de>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] filter-branch: add an example how to add ACKs to a range of commits
Date: Mon, 17 Aug 2009 16:12:42 -0700	[thread overview]
Message-ID: <7v8whim3v9.fsf@alter.siamese.dyndns.org> (raw)
In-Reply-To: <34cc046b42b5a67bb1c926709bcd1163d1d2faf6.1250541493u.git.johannes.schindelin@gmx.de> (Johannes Schindelin's message of "Mon\, 17 Aug 2009 22\:38\:46 +0200 \(CEST\)")

Johannes Schindelin <johannes.schindelin@gmx.de> writes:

> When you have to add certain lines like ACKs (or for that matter,
> Signed-off-by:s) to a range of commits starting with HEAD, you might
> be tempted to use 'git rebase -i -10', but that is a waste of your
> time.

Cute.

In a case like this, I tend to just do:

    git checkout $(git merge-base master js/series)

    git format-patch --stdout master..js/series | git am -s

    git diff js/series
    git branch --with js/series
    git branch -f js/series

as the first step (checking out the base, detaching HEAD) and the last
group of steps (verifying what improvements I made while on detached HEAD,
checking what _other_ branches may need to be rebuilt, and actually
updating the branch) are very common for my every-day branch whipping
workflow, and the second case being the full "format-patch | am" is just a
special case of what I do regularly, e.g. cherry-picking, manually
fixing-up, etc.

Rebase -i is very nice if you need to dig deep but the change you make is
actually very limited.  Filter-branch is too automated and requires an
enormous amount of effort to do anything flexible.  Often I find myself
wanting to do something in the middle, and I end up doing the "detach at
the base and rebuild" procedure.

Will apply.  The hint is useful nevertheless.

      reply	other threads:[~2009-08-17 23:13 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <cover.1250541493u.git.johannes.schindelin@gmx.de>
2009-08-17 20:38 ` [PATCH] filter-branch: add an example how to add ACKs to a range of commits Johannes Schindelin
2009-08-17 23:12   ` Junio C Hamano [this message]

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=7v8whim3v9.fsf@alter.siamese.dyndns.org \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=johannes.schindelin@gmx.de \
    /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