Re: [SOLVED] `git fetch tag NAME' into mirror repo does not update HEAD, what to do?

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

 



On Thursday 12 August 2010 15:34:24 Tomas Carnecky wrote:
> On 8/12/10 3:22 PM, Brian Foster wrote:
> > On Thursday 12 August 2010 14:32:41 Tomas Carnecky wrote:
> >>                                                         When you use
> >> 'git update-ref --no-deref HEAD v2' it will modify HEAD
> > 
> >  NO, it gets an error [ ... ]
> 
> Oh the subtleties when working with plumbing:
>    git update-ref --no-deref HEAD v2^{commit}

 Yes, that updates HEAD, leaving SLAVE in the odd state
 of HEAD being v2 and master's head being v1 (which I
 presume is another example of detached head?).

> >[ ... ]
> >  I do_not_ want a detached head!  This has perhaps been
> >  confused by my improperly saying “update HEAD” when I
> >  meant “update the master branch”.  [ ... ]
> >                                 Having HEAD continue to
> >  be a symref to refs/heads/master (which, in this case,
> >  is the same commit as v2) is correct.
> 
> Just make sure your tools and scripts don't break when you reset the
> branch like that (especially when the update is non-fast forward as
> fetch+reset won't warn you when this happens).

 Understood.  And I'm not too worried about that happening,
 albeit the current procedures are perhaps not as robust as
 they could or should be.  Again, thanks for the suggestions
 and help.

cheers!
	-blf-

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