From: Petr Baudis Date: Sun, 17 Apr 2005 12:25:34 GMT Subject: Re: fork optional branch point normazilation Message-ID: <20050417122534.GD1487@pasky.ji.cz> In-Reply-To: Dear diary, on Sun, Apr 17, 2005 at 02:04:16PM CEST, I got a letter where Brad Roberts told me that... > This might not be how you intended git fork to behave, but without doing > _something_ to protect the head parameter a bit, this is just asking for a > corrutped .git/HEAD file. > > commit 76faec069dfeae59c3ce5faaad10bdcded0cc908 > tree c291316b28eff4042c80850cd93445345a606835 > parent 1cdbc0a19b8d9b68f1f42735e2f14f1289823a63 > author Brad Roberts 1113738584 -0700 > committer Brad Roberts,,, 1113738584 -0700 > > gitfork needs to normalize the optional third parameter before using it. > > Index: gitfork.sh > =================================================================== > --- 51b1bddbbc05e50d5bbf1f9662e503c2e85d5e96/gitfork.sh (mode:100755 sha1:e5692ea9bdbc39b028fe1e1205381da632541bab) > +++ c291316b28eff4042c80850cd93445345a606835/gitfork.sh (mode:100755 sha1:386148ae9a99739d06a09742ff4157d0f7e4e223) > @@ -37,6 +37,7 @@ > [ -e "$destdir" ] && die "$destdir already exists" > > [ "$head" ] || head=$(commit-id) > +head=$(gitXnormid.sh -c $head) > > git lntree "$destdir" > echo $head >.git/heads/$name commit-id always returns the normalized commit ID. -- Petr "Pasky" Baudis Stuff: http://pasky.or.cz/ C++: an octopus made by nailing extra legs onto a dog. -- Steve Taylor