Re: Memory overrun in http-push.c

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

 



On Sun, 4 Mar 2007, Junio C Hamano wrote:

> Daniel Barkalow <barkalow@xxxxxxxxxxxx> writes:
> 
> > Actually, how about doing keyword expansion just like the new CRLF
> > handling?
> 
> That part is true, but practically speaking the only thing you
> can honestly replace is $Id$ with blob object name, and nothing
> else.  Trying to put anything that is available via commit would
> at best telling a lie and at worst ending up denying the index
> (and denying the index is denying git as somebody said).  You
> could fake the values for $Author$ and $Date$ from HEAD commit,
> but your index may or may not match HEAD commit when you check
> out path from it.

I was somehow expecting the index to be on the "working directory" side of 
conversions, but that obviously doesn't work very well (since you'd get a 
ton of unreachable blobs all the time that way). Even so, I think the 
useful thing would the the "git-describe" for HEAD, if the index entry is 
actually from HEAD (otherwise, it's a state that nobody else has seen, 
right? No point in trying to specify further...). I don't think Author and 
Date from a commit really works, because they wouldn't actually reflect 
the last change to anything near the tag, necessarily. The commit hash, on 
the other hand, tends you what to run blame on.

But, in any case, $Id <blob hash>$ would put into the working directory 
file (and suitable installed derivates thereof) something that would lead 
people with the repository to the actual blob, with at least a possible 
context. $Id <commit hash>:<path>$, for <commit hash>=HEAD, if HEAD:<path> 
is <blob hash>, should be just right.

Is it common to check out files from the index which don't match HEAD? The 
only case I can think of is resetting to a state stored in the index with 
update-index. I think my personal workflow is always HEAD->index->working 
directory->index->new HEAD.

	-Daniel
*This .sig left intentionally blank*
-
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]