Re: Git Bug - diff in commit message.
- From
Martin von Zweigbergk <martin.von.zweigbergk@gmail.com>
- Date
- Oct 24, 2011, 23:24 UTC
- Message-ID
- <CAOeW2eG_muSdbWUaPG36=1-Ay6h6-4qHgWPNdjqY5Zpb52XisQ@mail.gmail.com>
- In-Reply-To
- <7v62jvdthi.fsf@alter.siamese.dyndns.org>
Hi,
On Tue, Oct 11, 2011 at 4:00 PM, Junio C Hamano <gitster@pobox.com> wrote:
> Junio C Hamano <gitster@pobox.com> writes: > >> In the longer term, I think "git-rebase--am.sh" should be rewritten to >> have format-patch avoid the cost of actually generating the patch text,
I'm (slowly) working on this.
> And here is a quick hack to do that using "log --cherry-pick --right-only".
Thanks. I had done something similar. I have now adopted most of your changes into my patches, but I have a few questions.
Show 7 quoted lines
> + if test -f "$dotest/rebasing"
> + then
> commit=$(sed -e 's/^From \([0-9a-f]*\) .*/\1/' \
> -e q "$dotest/$msgnum") &&
> + test "$(git cat-file -t "$commit")" = commit || {
> + stop_here $this
> + }Are these braces needed?
> + git diff-tree -p --root "$commit" >"$dotest/patch"
In your previous mail in this thread, this was
+ git diff-tree --root --binary -m --first-parent "$commit" >"$dotest/patch"
I see why you dropped "-m --first-parent"; we should simply never receive such patches to "git-am --rebasing". But why isn't --binary necessary?
> diff --git a/git-rebase--am.sh b/git-rebase--am.sh > > [...]
Why was this part left out? Did you get it to work using 'git log --cherry-pick --right-only'? I'm asking because I did not get it to work with except for the case where $onto=upstream (basically when --onto is not given).
Martin