git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH 3/3] Documentation: revisions: add note about 3dots usages as continuation indications

From
Junio C Hamano <gitster@pobox.com>
Date
Nov 6, 2017, 04:34 UTC
Message-ID
<xmqqk1z4hvo0.fsf@gitster.mtv.corp.google.com>
In-Reply-To
<20171105162730.31405-3-bedhanger@gmx.de>
Ann T Ropea <bedhanger@gmx.de> writes:
Show 36 quoted lines
> Also, fix typo: "three dot" ---> "three-dot" (align with "two-dot").
>
> Signed-off-by: Ann T Ropea <bedhanger@gmx.de>
> ---
>  Documentation/revisions.txt | 11 ++++++++++-
>  1 file changed, 10 insertions(+), 1 deletion(-)
>
> diff --git a/Documentation/revisions.txt b/Documentation/revisions.txt
> index 61277469c874..d1b126427177 100644
> --- a/Documentation/revisions.txt
> +++ b/Documentation/revisions.txt
> @@ -271,7 +271,7 @@ The '..' (two-dot) Range Notation::
>   for commits that are reachable from r2 excluding those that are reachable
>   from r1 by '{caret}r1 r2' and it can be written as 'r1..r2'.
>  
> -The '...' (three dot) Symmetric Difference Notation::
> +The '...' (three-dot) Symmetric Difference Notation::
>   A similar notation 'r1\...r2' is called symmetric difference
>   of 'r1' and 'r2' and is defined as
>   'r1 r2 --not $(git merge-base --all r1 r2)'.
> @@ -285,6 +285,15 @@ is a shorthand for 'HEAD..origin' and asks "What did the origin do since
>  I forked from them?"  Note that '..' would mean 'HEAD..HEAD' which is an
>  empty range that is both reachable and unreachable from HEAD.
>  
> +However, there are instances where '<sha1>...' is *not*
> +equivalent to '<sha1>...HEAD'.  See the "RAW OUTPUT FORMAT"
> +section of linkgit:git-diff[1]: the three-dot notations used
> +there are simply continuation indications for the abbreviated
> +SHA-1 values.  The ones encountered there are usually
> +associated with file/index/tree contents rather than with commit
> +objects, and the range operators described above are only
> +applicable to commit objects (i.e., 'r1' and 'r2').
> +
>  Other <rev>{caret} Parent Shorthand Notations
>  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>  Three other shorthands exist, particularly useful for merge commits,

I actually have a mild suspicion that this is going in a wrong direction. In very early days of Git, we wanted to make sure that people can tell if a long hex string is a truncated object name or a full one (mostly because some lower-level commands insisted to be fed only full object name).

These days, everybody knows when they see 79ec0be62a that it is *not* a full object name and will no longer be confused unlike early days and there is no strong reason to waste six output columns of "git diff --raw" output by using these three dots.

I wonder if we can come up with a solution in line with the patch 1/3 in this series, which got rid of the "..." that indicated that the hexstring was not a full object name.

Previous: Ann T RopeaNext: Junio C Hamano
Message 4 of 58 in “checkout: describe_detached_head: remove 3dots after committish”
  1. 1/3 checkout: describe_detached_head: remove 3dots after committishAnn T Ropea, Nov 5, 2017
  2. 2/3 Documentation: user-manual: limit potentially confusing usage of 3dots (and 2dots)Ann T Ropea, Nov 5, 2017
  3. 3/3 Documentation: revisions: add note about 3dots usages as continuation indicationsAnn T Ropea, Nov 5, 2017
  4. Junio C HamanoNov 6, 2017
  5. Junio C HamanoNov 6, 2017
  6. Philip OakleyNov 7, 2017
  7. Junio C HamanoNov 7, 2017
  8. Ann T RopeaNov 7, 2017
  9. Philip OakleyNov 7, 2017
  10. Junio C HamanoNov 8, 2017
  11. Philip OakleyNov 9, 2017
  12. Ann T RopeaNov 13, 2017
  13. Ann T RopeaNov 13, 2017
  14. Ann T RopeaNov 13, 2017
  15. Junio C HamanoNov 14, 2017
  16. Ann T RopeaNov 19, 2017
  17. Junio C HamanoNov 20, 2017
  18. Ann T RopeaNov 19, 2017
  19. Ann T RopeaNov 19, 2017
  20. Eric SunshineNov 19, 2017
  21. Ann T RopeaNov 19, 2017
  22. Eric SunshineNov 19, 2017
  23. Ann T RopeaNov 19, 2017
  24. Junio C HamanoNov 20, 2017
  25. Philip OakleyNov 20, 2017
  26. Junio C HamanoNov 22, 2017
  27. Philip OakleyNov 22, 2017
  28. Junio C HamanoNov 24, 2017
  29. Ann T RopeaNov 24, 2017
  30. Ann T RopeaNov 24, 2017
  31. Ann T RopeaNov 24, 2017
  32. Ann T RopeaNov 24, 2017
  33. Ann T RopeaNov 24, 2017
  34. Ann T RopeaNov 24, 2017
  35. Junio C HamanoNov 25, 2017
  36. Junio C HamanoNov 26, 2017
  37. Junio C HamanoNov 26, 2017
  38. Junio C HamanoNov 26, 2017
  39. Ann T RopeaDec 3, 2017
  40. Ann T RopeaDec 3, 2017
  41. Ann T RopeaDec 3, 2017
  42. Ann T RopeaDec 3, 2017
  43. Ann T RopeaDec 3, 2017
  44. Junio C HamanoDec 4, 2017
  45. Ann T RopeaDec 4, 2017
  46. Junio C HamanoDec 5, 2017
  47. Ann T RopeaDec 6, 2017
  48. Junio C HamanoDec 6, 2017
  49. Ann T RopeaDec 6, 2017
  50. Ann T RopeaDec 3, 2017
  51. Ann T RopeaDec 3, 2017
  52. Junio C HamanoDec 4, 2017
  53. Ann T RopeaNov 19, 2017
  54. Junio C HamanoNov 20, 2017
  55. Ann T RopeaNov 13, 2017
  56. Ann T RopeaNov 13, 2017
  57. Ann T RopeaNov 13, 2017
  58. Junio C HamanoNov 14, 2017

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.