Re: [FIXED PATCH] Make rebase save ORIG_HEAD if changing current branch
- From
Brian Gernhardt <benji@silverinsanity.com>
- Date
- Jul 7, 2008, 14:36 UTC
- Message-ID
- <B8E7062C-8CE6-492B-BDB4-91993140739B@silverinsanity.com>
- In-Reply-To
- <20080707111803.GF31490@mit.edu>
On Jul 7, 2008, at 7:18 AM, Theodore Tso wrote:
Show 11 quoted lines
> On Sun, Jul 06, 2008 at 11:28:36PM -0700, Junio C Hamano wrote:
>> (1) ORIG_HEAD is not strictly necessary these days, because we have
>> reflogs;
>
> True, but (and please correct me if I'm wrong) ORIG_HEAD will always
> be pointing out HEAD before the user typed pretty much any git
> porcelein command (which saves HEAD into ORIG_HEAD), but with reflogs,
> it you have to paw through multiple HEAD@{n} to find the 'n' which
> corresponds to state before executing the git plumbing command, since
> multiple git plumbing commands could have updated the HEAD's reflog,
> right?This is _exactly_ why I wanted `pull --rebase` to set ORIG_HEAD. Reflogs are great in their own way, but having ORIG_HEAD regularly being available for a quick way to set it back or refer to the original state is just too useful.
~~ Brian