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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Theodore Tso wrote:
> On Sun, Feb 04, 2007 at 11:12:34AM -0800, Linus Torvalds wrote:
>> On Sun, 4 Feb 2007, Jeff King wrote:
>>> 
>>> 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.
>> 
>> I agree, that probably would make most sense. If we do this at all. On the 
>> other hand, I suspect that most editors would probably want to pipe the 
>> contents to the program, not write it to a temp-file.
> 
> ... and use it with --incremental, as well.  In emacs you can have the
> annotation take place as it is being written out relatively easily, by
> arranging to have a callback function get called each time more
> information is handed back to emacs via a pipe.

So perhaps instead of "git blame --contents /tmp/foo.c file.c" we should
have "cat /tmp/foo.c | git blame --stdin file.c", hmmm? Editor would then
pipe current contents of the buffer to "git blame --stdin --incremental
file.c" (where file.c is the name in tree/in HEAD).

-- 
Jakub Narebski
Warsaw, Poland
ShadeHawk on #git


-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]