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

Can someone explain this git-blame/git-rev behavior to me?

From
David Kastrup <dak@gnu.org>
Date
Jul 16, 2007, 10:43 UTC
Message-ID
<86sl7oaasx.fsf@lola.quinscape.zz>
Try the following (assuming you have a clone of the git master):

git-blame tags/v1.4.2-rc1~87 -- contrib/emacs/vc-git.el | grep b5dd b5dd9d20 (Ville Skyttä 2006-07-05 01:35:52 +0300 164) (defun vc-git-print-log (file &optional buffer) b5dd9d20 (Ville Skyttä 2006-07-05 01:35:52 +0300 167) (vc-do-command buffer 'async "git" name "rev-list" "--pretty" "HEAD" "--"))) b5dd9d20 (Ville Skyttä 2006-07-05 01:35:52 +0300 169) (defun vc-git-diff (file &optional rev1 rev2 buffer) b5dd9d20 (Ville Skyttä 2006-07-05 01:35:52 +0300 170) (let ((name (file-relative-name file)) b5dd9d20 (Ville Skyttä 2006-07-05 01:35:52 +0300 171) (buf (or buffer "*vc-diff*"))) b5dd9d20 (Ville Skyttä 2006-07-05 01:35:52 +0300 173) (vc-do-command buf 0 "git" name "diff-tree" "-p" rev1 rev2 "--") b5dd9d20 (Ville Skyttä 2006-07-05 01:35:52 +0300 174) (vc-do-command buf 0 "git" name "diff-index" "-p" (or rev1 "HEAD") "--"))

Ok, now do

git-name-rev b5dd9d20 b5dd9d20 tags/v1.4.2-rc1~88

So what is it I am doing wrong here? The problem I have is that in Emacs, one can go to the "next version" in an annotated file, and I get stuck in a loop here, since tags/v1.4.2-rc1~88 delivers

git-rev-list HEAD --not tags/v1.4.2-rc1~88 --parents contrib/emacs/vc-git.el|tail -1|git-name-rev --stdin
d87b90e47f7430455385edcf8506288b9a73d3b5 (tags/v1.4.2-rc1~87) b5dd9d2027c1bd5758033c7baf6d087752b0263d (tags/v1.4.2-rc1~88) 280242d1cc1fe2847f649d2f16b273e168fcbc48 (tags/v1.4.2-rc1~92)

So we have tags/v1.4.2-rc1~87 listed as successor again, so I get into a loop of blame.

Is there something I don't understand about merges?

FWIW, git-fsck --unreachable b5dd9d20 git-fsck --unreachable d87b90e47f do not return anything.

-- 
David Kastrup
Next: Johannes Sixt
Message 1 of 5 in “Can someone explain this git-blame/git-rev behavior to me?”
  1. David KastrupJul 16, 2007
  2. Johannes SixtJul 16, 2007
  3. Junio C HamanoJul 16, 2007
  4. David KastrupJul 17, 2007
  5. David KastrupJul 16, 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.