Re: [PATCH] Add option -b/--branch to clone for select a new HEAD
- From
Jeff King <peff@peff.net>
- Date
- Aug 25, 2009, 21:57 UTC
- Message-ID
- <20090825215726.GA30981@coredump.intra.peff.net>
- In-Reply-To
- <1251228467-29638-1-git-send-email-catap@catap.ru>
On Tue, Aug 25, 2009 at 11:27:47PM +0400, Kirill A. Korinskiy wrote:
Show 13 quoted lines
> +test_expect_success 'clone' ' > + > + git clone parent clone && > + (cd clone && git rev-parse --verify refs/remotes/origin/master) > + > +' > + > +test_expect_success 'clone -b' ' > + > + git clone -b two parent clone-b && > + (cd clone-b && test $(git rev-parse --verify HEAD) = $(git rev-parse --verify refs/remotes/origin/two)) > + > +'
OK, I think that second test makes sense (though please wrap the very long line), but now what is the first one doing? Shouldn't it be:
(cd clone &&
test $(git rev-parse --verify HEAD) = \
$(git rev-parse --verify refs/remotes/origin/master)
)also?
-Peff