All of lore.kernel.org
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Michael Haggerty <mhagger@alum.mit.edu>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] Add cross-references between docs for for-each-ref and show-ref
Date: Wed, 22 Jan 2014 07:58:46 -0800	[thread overview]
Message-ID: <xmqqbnz4ypmx.fsf@gitster.dls.corp.google.com> (raw)
In-Reply-To: <1390389800-26769-1-git-send-email-mhagger@alum.mit.edu> (Michael Haggerty's message of "Wed, 22 Jan 2014 12:23:20 +0100")

Michael Haggerty <mhagger@alum.mit.edu> writes:

> Add cross-references between the manpages for git-for-each-ref(1) and
> git-show-ref(1).
>
> Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
> ---
> There is a lot of overlap between the functionality of these two
> commands.

Two differences I most often use (i.e. take advantage of) are:

 - The former is about showing 0 or more matching refs, and not
   matching anything is a perfectly normal condition, i.e.

   $ git for-each-ref refs/heads/no-such

   exits with status 0.  The latter can be used with --verify to
   check if one ref exists, on the other hand.

 - The former takes the match-from-left-to-right pattern (similar to
   the usual pathspec match), while the latter matches from the
   tail.

   $ git for-each-ref refs/heads/*  ;# only one-level names
   $ git for-each-ref refs/heads/** ;# catches both master and mh/path-max
   $ git show-ref master ;# refs/heads/master, refs/remotes/origin/master,...

      reply	other threads:[~2014-01-22 15:58 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-22 11:23 [PATCH] Add cross-references between docs for for-each-ref and show-ref Michael Haggerty
2014-01-22 15:58 ` Junio C Hamano [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=xmqqbnz4ypmx.fsf@gitster.dls.corp.google.com \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=mhagger@alum.mit.edu \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.