From: Linus Torvalds Date: Fri, 24 Jun 2005 16:09:23 GMT Subject: Re: rev-parse, unknown arguments and extended sha1's Message-ID: In-Reply-To: <20050624122436.GA15182@pc117b.liacs.nl> On Fri, 24 Jun 2005, Sven Verdoolaege wrote: > > Is git-rev-parse supposed to echo arguments it doesn't understand ? > It currently does, but git-checkout-script seems to think it doesn't: > > rev=$(git-rev-parse "$arg") > if [ -z "$rev" ]; then > echo "unknown flag $arg" > exit 1 > fi Argh, there's a "--revs-only" thing that I was planning to use there, some remnant of an ealy plan (unimplemented) to use that to determine if it is a filename to be checked out, or a revision. But then I never got around to do the "specify individual filenames" part of "git checkout". Anyway, add the --revs-only, and the test against empty should make a bit more sense. In fact, it _should_ test that it's a SHA1 (and not a rev argument), but I couldn't come up with a good way to test that in shell. Linus