git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Martin von Zweigbergk <martin.von.zweigbergk@gmail.com>
To: Johannes Sixt <j.sixt@viscovery.net>
Cc: git@vger.kernel.org, Knut Franke <Knut.Franke@gmx.de>
Subject: Re: [PATCH 7/7] rebase (without -p): correctly calculate patches to rebase
Date: Fri, 20 Jul 2012 08:58:15 -0700	[thread overview]
Message-ID: <CAOeW2eEMQrmSwS4ziTWetrWxkS-CTCPrJrzchCb1ZnqmaFhW7g@mail.gmail.com> (raw)
In-Reply-To: <50091469.5030307@viscovery.net>

On Fri, Jul 20, 2012 at 1:18 AM, Johannes Sixt <j.sixt@viscovery.net> wrote:
> Am 7/18/2012 9:27, schrieb Martin von Zweigbergk:
>> diff --git a/git-rebase--am.sh b/git-rebase--am.sh
>> index 37c1b23..fe3fdd1 100644
>> --- a/git-rebase--am.sh
>> +++ b/git-rebase--am.sh
>> @@ -16,11 +16,9 @@ skip)
>>       ;;
>>  esac
>>
>> -test -n "$rebase_root" && root_flag=--root
>>  test -n "$keep_empty" && git_am_opt="$git_am_opt --keep-empty"
>> -git format-patch -k --stdout --full-index --ignore-if-in-upstream \
>> -     --src-prefix=a/ --dst-prefix=b/ \
>> -     --no-renames $root_flag "$revisions" |
>> +generate_revisions |
>> +sed -e 's/\([0-9a-f]\{40\}\)/From \1 Mon Sep 17 00:00:00 2001/' |
>>  git am $git_am_opt --rebasing --resolvemsg="$resolvemsg" &&
>>  move_to_original_branch
>
> Just curious (as all tests pass): What does this do? It looks like
> format-patch is not called anymore and git-am sees only SHA1s. Does it
> force git-am to cherry-pick the patches?

That probably deserves to be mentioned in the commit message. Or maybe
in as a comment in the code. Either way, since 0fbb95d (am: don't call
mailinfo if $rebasing, 2012-06-26), 'git am --rebasing' never looks at
anything but the sha1, so most of the output from 'git format-patch'
is currently ignored. It doesn't do cherry-pick, though, but runs 'git
diff-tree' and other commands and then feeds the result to 'git
apply', just like a regular 'git am' invocation would.

Martin

  reply	other threads:[~2012-07-20 15:58 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-18  7:27 [PATCH 0/7] correctly calculate patches to rebase Martin von Zweigbergk
2012-07-18  7:27 ` [PATCH 1/7] git-rebase--am.sh: avoid special-casing --keep-empty Martin von Zweigbergk
2012-07-18  7:27   ` [PATCH 2/7] git-rebase--interactive.sh: extract function for adding "pick" line Martin von Zweigbergk
2012-07-18  7:27     ` [PATCH 3/7] git-rebase--interactive: group all $preserve_merges code Martin von Zweigbergk
2012-07-18  7:27       ` [PATCH 4/7] git-rebase--interactive.sh: look up subject in add_pick_line Martin von Zweigbergk
2012-07-18  7:27         ` [PATCH 5/7] rebase -p: use --cherry-mark for todo file Martin von Zweigbergk
2012-07-18  7:27           ` [PATCH 6/7] rebase -p: don't request --left-right only to ignore left side Martin von Zweigbergk
2012-07-18  7:27             ` [PATCH 7/7] rebase (without -p): correctly calculate patches to rebase Martin von Zweigbergk
2012-07-20  8:18               ` Johannes Sixt
2012-07-20 15:58                 ` Martin von Zweigbergk [this message]
2012-07-20  8:14         ` [PATCH 4/7] git-rebase--interactive.sh: look up subject in add_pick_line Johannes Sixt
2012-07-20 15:47           ` Martin von Zweigbergk
2012-07-22 20:51             ` Junio C Hamano
2012-07-18 12:48     ` [PATCH 2/7] git-rebase--interactive.sh: extract function for adding "pick" line Neil Horman
2012-07-18  7:32 ` [PATCH 0/7] correctly calculate patches to rebase Martin von Zweigbergk

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=CAOeW2eEMQrmSwS4ziTWetrWxkS-CTCPrJrzchCb1ZnqmaFhW7g@mail.gmail.com \
    --to=martin.von.zweigbergk@gmail.com \
    --cc=Knut.Franke@gmx.de \
    --cc=git@vger.kernel.org \
    --cc=j.sixt@viscovery.net \
    /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).