git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* [PATCH] git-diff.txt: prefer not using <commit>..<commit>
@ 2019-03-17 11:09 Denton Liu
  2019-03-17 13:24 ` Duy Nguyen
                   ` (2 more replies)
  0 siblings, 3 replies; 16+ messages in thread
From: Denton Liu @ 2019-03-17 11:09 UTC (permalink / raw)
  To: Git Mailing List
  Cc: Ævar Arnfjörð Bjarmason, Andreas Schwab,
	Denton Liu, Duy Nguyen, Elijah Newren, Johannes Schindelin,
	Johannes Sixt, Junio C Hamano, Philip Oakley, vincent.guittot,
	Viresh Kumar

The documentation used to consider

	git diff <commit> <commit>

and

	git diff <commit>..<commit>

to be equal counterparts. However, rev-list-ish commands also use the
<commit>..<commit> notation, but in a logically conflicting manner which
was confusing for some users (including me!).

Deprecating the notation entirely is not really an option because it
would be an arduous process without much end-value. In addition, there
are some valid use-cases that we don't want to break.

Document the preference of the first form so that future confusion can
be minimised.

Signed-off-by: Denton Liu <liu.denton@gmail.com>
---

Thanks all on your feedback on the discussion thread[1]! I opted for
just the documentation-only route so we don't break any valid use-cases.

[1]: https://public-inbox.org/git/20190311093751.GA31092@archbookpro.localdomain/

 Documentation/git-diff.txt | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/Documentation/git-diff.txt b/Documentation/git-diff.txt
index 72179d993c..10c7a2220c 100644
--- a/Documentation/git-diff.txt
+++ b/Documentation/git-diff.txt
@@ -63,7 +63,11 @@ two blob objects, or changes between two files on disk.
 
 'git diff' [<options>] <commit>..<commit> [--] [<path>...]::
 
-	This is synonymous to the previous form.  If <commit> on
+	This is synonymous to the previous form.  However,
+	users should prefer the previous form over this form
+	as this form may be more confusing due to the same
+	notation having a logically conflicting meaning in
+	linkgit:git-rev-list[1]-ish commands.  If <commit> on
 	one side is omitted, it will have the same effect as
 	using HEAD instead.
 
-- 
2.21.0.512.g57bf1b23e1


^ permalink raw reply related	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2019-03-21 14:13 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-17 11:09 [PATCH] git-diff.txt: prefer not using <commit>..<commit> Denton Liu
2019-03-17 13:24 ` Duy Nguyen
2019-03-18  6:45   ` Junio C Hamano
2019-03-19  1:12     ` Denton Liu
2019-03-21 14:12     ` Johannes Schindelin
2019-03-17 13:40 ` Ævar Arnfjörð Bjarmason
2019-03-17 14:01   ` Duy Nguyen
2019-03-17 14:12     ` Ævar Arnfjörð Bjarmason
2019-03-18  6:47       ` Junio C Hamano
2019-03-18 17:46   ` Elijah Newren
2019-03-18 19:07     ` Ævar Arnfjörð Bjarmason
2019-03-19  0:56       ` Junio C Hamano
2019-03-20 14:21       ` Elijah Newren
2019-03-18 17:59 ` Elijah Newren
2019-03-20 17:28   ` Denton Liu
2019-03-21 13:58     ` Elijah Newren

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).