Re: Tracking branch history

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

 




On Fri, 12 May 2006, Daniel Barkalow wrote:
>
> One feature that might make git more intuitive to people is if we were to 
> additionally track the history of what commit was the head of each branch 
> over time. This is only vaguely related to the history of the content, but 
> it's well-defined and sometimes significant.
> 
> E.g., if you know that two weeks ago, what you had worked, but it doesn't 
> work now, you can use git-bisect to figure out what happened, but first 
> you have to figure out what commit it was that you were using two weeks 
> ago. Two weeks ago, we had that information, but we didn't keep it.

Note that this is possible, but it must be done literally as a separate 
history from the commit history. 

IOW, a good (?) way to do it is to literally have a commit hook that 
basically just does

	echo $new >> .git/$branch-commit-history

possibly together with a datestamp thing (ie it could be something like
"echo $new "$USER" $(date)" rather than just the commit SHA1).

Make sure that not just "git commit", but anything else that changes the 
branch (notably, "git fetch" and a fast-forward merge as a result of an 
explicit merge or a "git pull") would also do this same thing.

But realize that this is really purely a per-repository logging thing, and 
not really bound to the actual git history any way.

			Linus
-
: 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]