git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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
Previous: Junio C HamanoNext: Junio C Hamano
Message 7 of 9 in “Git Bug - diff in commit message.”
  1. anikeySep 8, 2011
  2. Michael WittenSep 8, 2011
  3. Thomas RastSep 9, 2011
  4. Johannes SixtSep 9, 2011
  5. Junio C HamanoSep 9, 2011
  6. Junio C HamanoOct 11, 2011
  7. Martin von ZweigbergkOct 24, 2011
  8. Junio C HamanoOct 25, 2011
  9. Junio C HamanoSep 8, 2011

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.