Hi, On Thu, 15 Jan 2009, Thomas Rast wrote: > Johannes Schindelin wrote: > > On Thu, 15 Jan 2009, Thomas Rast wrote: > > > > > Let git-checkout save the old branch as a symref in LAST_HEAD, and > > > make 'git checkout -' switch back to LAST_HEAD, like 'cd -' does in > > > the shell. > > > > Actually, what you want is in the reflog, no? So... parsing > > .git/logs/HEAD for the latest occurrence of "checkout: moving from " and > > then using everything up until the next space should give you the branch > > name, right? > > It just feels wrong to grab that information from there; it's a > free-form comment field for user consumption. And it wasn't even that > hard to implement a LAST_HEAD. There are a number of issues why I would like to avoid introducing LAST_HEAD: - it does not work when you are using different Git versions on the same repository, - it does not work when you switched recently, - you are storing redundant information, - yes, the field is meant for user consumption, but no, it is not free-form, - AFAICT your version could never be convinced to resurrect deleted branches, without resorting to reflogs anyway. - the reflog method reflects pretty much exactly how people work around the lack of "checkout -" currently, so why not just use the same proven approach? Ciao, Dscho -- 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