Re: [PATCH] git checkout: don't warn about unborn branch if -f is already passed

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

 



On Wed, 2008-11-26 at 11:46 -0800, Junio C Hamano wrote:
> Matt McCutchen <matt@xxxxxxxxxxxxxxxxx> writes:
> 
> > I think it's unnecessary to warn that the checkout has been forced due to an
> > unborn current branch if -f has been explicitly passed.  For one project, I am
> > using git-new-workdir to create workdirs from a bare repository whose HEAD is
> > set to an unborn branch, and this warning started to irritate me.
> 
> I doubt anybody minds this particular change per-se, but I wonder what the
> justification of keeping a dangling HEAD in a bare repository is.
> 
> After all, the primary intended purpose of a bare repository is to serve
> as a distribution point (i.e. something you can clone from), and I think a
> dangling HEAD interferes with the usual operation of clone (although I've
> never tested this).
> 
> Care to explain why?

I am taking a course with six programming projects.  I want a separate
working tree for each project, but I want all the working trees
connected to the same repository because I often copy changes from one
project to another and that makes it more convenient to inspect the
history of one project while I am working on another.  I didn't want to
put the repository inside an arbitrary one of the working trees, so I
left it bare, and I didn't want to point its HEAD to an arbitrary one of
the projects, so I left it unborn.

The upshot is that I am using a bare repository as a distribution point
for *working trees* (via git-new-workdir), not for push/pull.

Matt

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

  Powered by Linux