Re: [PATCH] HEAD, ORIG_HEAD and FETCH_HEAD are really special.

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

 



On Fri, Sep 07, 2007 at 12:36:15PM +0000, Johannes Sixt wrote:
> Junio C Hamano schrieb:
> >But he has a stray .git/master file,
> >perhaps created by hand by mistake (it would be very interesting
> >to find how that file got there in the first place),
> 
> It is easy to get one there if, in a brave moment, you try
> 
>    git update-ref master $some_other_ref
> 
> instead of the correct
> 
>    git update-ref refs/heads/master $some_other_ref

  I was about to say the same :)
  I'd have added though that maybe update-ref should print a warning for
the references that do not match the restriction Junio added. This could
be done using the function Junio proposed un update_ref() in refs.c

  note that it's a sane thing to do anyways, I would not bet a lot of
money on what happens if you ask git to:

  git update-ref $foo $sha

  for foo in (completely random :P): index config packed-refs ...

  If a tool needs a new reference namespace, it can create a
subdirectory under refs/ so it does not really causes harm IMHO.
-- 
·O·  Pierre Habouzit
··O                                                madcoder@xxxxxxxxxx
OOO                                                http://www.madism.org

Attachment: pgpL5p0TcKpVL.pgp
Description: PGP signature


[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