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

Re: What's in git.git (stable)

From
Jeff King <peff@peff.net>
Date
Feb 4, 2007, 18:51 UTC
Message-ID
<20070204185144.GB24368@coredump.intra.peff.net>
In-Reply-To
<7vps8qtgbm.fsf@assigned-by-dhcp.cox.net>
On Sun, Feb 04, 2007 at 01:36:29AM -0800, Junio C Hamano wrote:
Show 7 quoted lines
>  - Teaching "git blame" to also use the working tree files
>    and/or index.  I actually think defaulting to working tree
>    when an explicit HEAD is not given (and --cached to use the
>    one in the index) makes a lot of sense, but I haven't got
>    around to code the latter yet.  Not defaulting to HEAD
>    changes semantics, so if we ever are going to do it, I think
>    we should do so before 1.5.0.

Just a thought, but it might be useful to blame the contents of an arbitrary file (but starting the history at a given pathname). Something like "git blame --contents /tmp/foo.c file.c", with contents defaulting to "file.c". There's much discussion of editor interfaces, and this leaves the possibility of git-blaming the contents of the editor buffer (after writing it out to a temp file) without having to save changes to the working tree file.

Admittedly, I think this will be rare, but if you git-blame from an editor, it seems awkward to either be inaccurate (by blaming the last saved working tree file, but comparing it to the buffer) or to save the file as a side effect.

-Peff
Previous: Junio C HamanoNext: Linus Torvalds
Message 5 of 14 in “[ANNOUNCE] GIT 1.5.0-rc3”
  1. Junio C HamanoFeb 1, 2007
  2. Bill LearFeb 1, 2007
  3. Robin RosenbergFeb 1, 2007
  4. What's in git.git (stable)Junio C Hamano, Feb 4, 2007
  5. Jeff KingFeb 4, 2007
  6. Linus TorvaldsFeb 4, 2007
  7. Theodore TsoFeb 4, 2007
  8. Jakub NarebskiFeb 4, 2007
  9. David KågedalFeb 4, 2007
  10. 1/2 Rename get_ident() to fmt_ident() and make it available to outsideJunio C Hamano, Feb 5, 2007
  11. 2/2 git-blame: no rev means start from the working tree file.Junio C Hamano, Feb 5, 2007
  12. Quick status updatesJunio C Hamano, Feb 6, 2007
  13. git-push: allow globbing wildcard refspec.Junio C Hamano, Feb 6, 2007
  14. Shawn O. PearceFeb 6, 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.