From: Jakub Narebski Date: Tue, 14 Jul 2009 11:34:42 GMT Subject: Re: Weird behavior of git rev-parse Message-ID: In-Reply-To: <7vvdlvhbtg.fsf@alter.siamese.dyndns.org> Junio C Hamano writes: > Yakup Akbay writes: > > > Then I've tried > > > > $ git rev-parse -'hi, this is a test!' > > > > the output is: > > > > -hi, this is a test! > > > > Is this an expected behavior? > > Absolutely. rev-parse was originally written as a way for Porcelain > scripts to sift parameters into four different categories. > > * options and non-options (that's two) > > * args meant for rev-list and others (that's another two) > > Multiplying two x two gives you four combinations. > > Because you are not giving options like --revs-only, --no-revs, --flags, > nor --no-flags, rev-parse outputs everything. git-rev-parse can also be used to bring parseopt to shell scripts. -- Jakub Narebski Poland ShadeHawk on #git