Re: Missing features in git
- From
Jakub Narebski <jnareb@gmail.com>
- Date
- Nov 14, 2006, 17:15 UTC
- Message-ID
- <200611141815.24236.jnareb@gmail.com>
- In-Reply-To
- <20061114154739.GB5453@diana.vm.bytemark.co.uk>
Karl Hasselström wrote:
Show 20 quoted lines
> On 2006-11-14 15:53:18 +0100, Jakub Narebski wrote: > >> linux@horizon.com wrote: >> >>> Then you could check out an arbitrary version without any of the >>> annoyance above; I could "git checkout tags/foo" or even "git >>> checkout deadbeef~3". I wouldn't be on a current branch (which >>> would necessitate changing "git branch" output), so HEAD would >>> simply contain an object ID directly rather than being a >>> symlink/symref. >> >> And what would happen if you want to checkout other branch? Where >> the ID in the HEAD would go to? HEAD just _has_ to be reference to >> _branch_. > > The id that used to be HEAD would not be saved anywhere. It would > still be reachable from your refs, presumably, just like before you > checked it out. (It would not be the case that you had made commits on > an unnamed branch that would now get lost, because the tool would > refuse to commit until you had created a name for the branch.)
If HEAD would contain an commit ID directly, then you shouldn't be able to commit at all. Not very useful, it is.
-- Jakub Narebski