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

Re: [PATCH] rebase -m: Fix incorrect short-logs of already applied commits.

From
David Kastrup <dak@gnu.org>
Date
Sep 1, 2007, 09:20 UTC
Message-ID
<85ps12agiz.fsf@lola.goethe.zz>
In-Reply-To
<7vmyw6u5ca.fsf@gitster.siamese.dyndns.org>
Junio C Hamano <gitster@pobox.com> writes:
> I would propose doing the attached patch on top of yours.
> Opinion?
>
> +	git rev-list --pretty=oneline -1 "$cmt" | sed -e 's/^[^ ]* //'
What about
    git-rev-list --pretty=format:%s -1 "$cmt"

It seems pretty pointless to first print with a wrong format, then fix it up afterwards.

Incidentally, the above spews out a full commit line before the entry (meaning this does not work with current git-rev-list). This is arguably wrong: when format: is employed, the user presumably knows perfectly well what he wants printed.

So I guess I vouch for both not using sed as well as what I consider fixing git-rev-list --pretty=format:

-- 
David Kastrup, Kriemhildstr. 15, 44793 Bochum
Previous: NixNext: Johannes Sixt
Message 13 of 15 in “rebase -m: Fix incorrect short-logs of already applied commits.”
  1. rebase -m: Fix incorrect short-logs of already applied commits.Johannes Sixt, Sep 1, 2007
  2. Junio C HamanoSep 1, 2007
  3. rebase--interactive: do not use one-or-more (\+) in sed.Junio C Hamano, Sep 1, 2007
  4. Johannes SchindelinSep 1, 2007
  5. David KastrupSep 2, 2007
  6. Junio C HamanoSep 2, 2007
  7. David KastrupSep 2, 2007
  8. Simon 'corecode' SchubertSep 2, 2007
  9. Johannes SchindelinSep 2, 2007
  10. NixSep 2, 2007
  11. Benoit SIGOURESep 5, 2007
  12. NixSep 5, 2007
  13. David KastrupSep 1, 2007
  14. Johannes SixtSep 1, 2007
  15. Robin RosenbergSep 1, 2007

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.