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

Re: git blame and cherry-picking

From
Avery Pennarun <apenwarr@gmail.com>
Date
Aug 7, 2008, 17:53 UTC
Message-ID
<32541b130808071053g5fd0ce4u24d28263f38e0207@mail.gmail.com>
In-Reply-To
<91A979F0-1329-4CA6-AADC-6CF55872B57A@midwinter.com>
On 8/6/08, Steven Grimm <koreth@midwinter.com> wrote:
Show 7 quoted lines
> What, if any, is the approved way to get git blame to follow cherry-picked
> changes? Right now blame is good about showing you the actual responsible
> revision and author in the case of merges, but if you cherry-pick a change
> with "-n" (to test before committing), the modifications are attributed to
> the person who did the cherry-pick instead of the cherry-picked revision's
> author. Even without the "-n" option, the changes are attributed to the
> cherry-pick *revision* instead of the original one.

It sounds like you at least want to avoid using "-n", if it really does lose author information that way. If the patch doesn't work, you can always "git commit --amend" or "git reset --hard HEAD^".

I don't think tracing through to the original revision is useful anyway; nothing you'd find through the original commit would be relevant to git blame, AFAICS, since none of those other patches were applied to the branch you're looking at.

Have fun,
Avery
Previous: Jeff King
Message 7 of 7 in “git blame and cherry-picking”
  1. Steven GrimmAug 6, 2008
  2. Alex RiesenAug 7, 2008
  3. Jeff KingAug 7, 2008
  4. Steven GrimmAug 7, 2008
  5. Junio C HamanoAug 7, 2008
  6. Jeff KingAug 7, 2008
  7. Avery PennarunAug 7, 2008

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.