> > > > 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 >
This feels better to me. Diffed against my previus commit. The problem was that commit-id wasn't called if a branch point was specified nor was that value checked for validity. Index: gitfork.sh =================================================================== --- c9ccaa172ccab8e56f2fe621ee24896bfddacf26/gitfork.sh (mode:100755 sha1:386148ae9a99739d06a09742ff4157d0f7e4e223) +++ f9e06a309f63ac6858d019b51f2172283378d2ef/gitfork.sh (mode:100755 sha1:dbb508b8431368fc95cc9516eada52f5bf0f8bc1) @@ -16,7 +16,7 @@ name=$1 destdir=$2 -head=$3 +head=$(gitXnormid.sh -c $3) die () { echo gitfork.sh: $@ >&2 @@ -36,9 +36,6 @@ [ -e "$destdir" ] && die "$destdir already exists" -[ "$head" ] || head=$(commit-id) -head=$(gitXnormid.sh -c $head) - git lntree "$destdir" echo $head >.git/heads/$name ln -s heads/$name "$destdir/.git/HEAD" - To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html