git-rev-parse question.

2005-08-23 Thread Junio C Hamano
I have been looking at what git-rev-parse does and could not figure out a way to convince it to give me only arguments with a '-' prefix. Specifically, I wanted to remove the hardcoded -p and -M flags from git-diff-script. Running $ sh -x git-diff-script -C HEAD^ HEAD reveals that none of

Re: git-rev-parse question.

2005-08-23 Thread Linus Torvalds
On Tue, 23 Aug 2005, Junio C Hamano wrote: I have been looking at what git-rev-parse does and could not figure out a way to convince it to give me only arguments with a '-' prefix. Gaah. Understandable. It got broken during some cleanup. Try this trivial patch, it should work better.

Re: git-rev-parse question.

2005-08-23 Thread Linus Torvalds
On Tue, 23 Aug 2005, Linus Torvalds wrote: Try this trivial patch, it should work better. Actually, don't do the show_default() part of this. We should _not_ show the default string if we haev --no-revs and the string doesn't match a rev. Also, this fixes -- handlign with --flags.