git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: "Jan Krüger" <jk@jk.gs>
Cc: git@vger.kernel.org
Subject: Re: [PATCH 2/2] builtin/symbolic-ref.c: add option to output shortened ref
Date: Mon, 27 Feb 2012 14:28:55 -0800	[thread overview]
Message-ID: <7vwr7752s8.fsf@alter.siamese.dyndns.org> (raw)
In-Reply-To: <1330380638-9738-1-git-send-email-jk@jk.gs> ("Jan Krüger"'s message of "Mon, 27 Feb 2012 23:10:38 +0100")

Jan Krüger <jk@jk.gs> writes:

> In scripts meant to generate user-consumable output, it can be helpful
> to resolve a symbolic ref and output the result in a shortened form,
> such as for use in shell prompts. Add a new -s option to allow this.

I think this one (unlike 1/2) makes sense, but a single letter -s feels a
bit too vague.  Always spelling in long option "--short" so that it
matches "%(refname:short)" in for-each-ref might be better, I would think.

Especially given that the expected use case is primarily in scripts not
from the command line, being more explicit and easier to read has value
over being short and easier to (mis)type.

  reply	other threads:[~2012-02-27 22:29 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-27 22:10 [PATCH 2/2] builtin/symbolic-ref.c: add option to output shortened ref Jan Krüger
2012-02-27 22:28 ` Junio C Hamano [this message]
2012-02-27 22:46   ` Jan Krüger
2012-02-27 23:04     ` Junio C Hamano
2012-02-27 23:54       ` Junio C Hamano

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=7vwr7752s8.fsf@alter.siamese.dyndns.org \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=jk@jk.gs \
    /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).