From: Jakub Narebski <jnareb@gmail.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: Yakup Akbay <yakbay@ubicom.com>, git@vger.kernel.org
Subject: Re: Weird behavior of git rev-parse
Date: Tue, 14 Jul 2009 04:34:42 -0700 (PDT) [thread overview]
Message-ID: <m3iqhvv6ph.fsf@localhost.localdomain> (raw)
In-Reply-To: <7vvdlvhbtg.fsf@alter.siamese.dyndns.org>
Junio C Hamano <gitster@pobox.com> writes:
> Yakup Akbay <yakbay@ubicom.com> 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
prev parent reply other threads:[~2009-07-14 11:34 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-14 7:20 Weird behavior of git rev-parse Yakup Akbay
2009-07-14 9:06 ` Santi Béjar
2009-07-14 9:07 ` Junio C Hamano
2009-07-14 10:01 ` Yakup Akbay
2009-07-14 11:34 ` Jakub Narebski [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m3iqhvv6ph.fsf@localhost.localdomain \
--to=jnareb@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=yakbay@ubicom.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).