All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jakub Narebski <jnareb@gmail.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] warn use of "git diff A..B"
Date: Thu, 24 Mar 2011 08:44:57 -0700 (PDT)	[thread overview]
Message-ID: <m3tyesv7zh.fsf@localhost.localdomain> (raw)
In-Reply-To: <7vei5xcxzm.fsf@alter.siamese.dyndns.org>

Junio C Hamano <gitster@pobox.com> writes:

> "git diff" (and "diff-tree") accepts a range notation "A..B" from the
> command line to specify the two endpoints to be compared; the right way to
> spell this would be "git diff A B".  This is merely a historical accident
> that comes from the fact that "git log" family of commands and "git diff"
> happens to share some code in their command line parsers.

I think it is quite useful to acept this notation to allow for
copy'n'paste from e.g. "git fetch" output:

     5e839c8..cd3065f  master     -> origin

On can simply paste "git diff 5e839c8..cd3065f".
                              ^^^^^^^^^^^^^^^^
-- 
Jakub Narebski
Poland
ShadeHawk on #git

  reply	other threads:[~2011-03-24 15:45 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-23 21:36 [PATCH] diff: remove dead code that flips arguments order Junio C Hamano
2011-03-23 21:45 ` [PATCH] warn use of "git diff A..B" Junio C Hamano
2011-03-24 15:44   ` Jakub Narebski [this message]
2011-03-25  8:27     ` Johannes Sixt
2011-03-24 18:11   ` Jay Soffian
2011-03-24 18:16     ` Jay Soffian
2011-03-24 18:33     ` Junio C Hamano
2011-03-25  9:06   ` Ævar Arnfjörð Bjarmason
2011-03-27 20:03   ` Alex Riesen
2011-03-28 16:53     ` 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=m3tyesv7zh.fsf@localhost.localdomain \
    --to=jnareb@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.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 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.