{"thread":{"id":"49483","subject":"[PATCH] doc: fix a typo and clarify a sentence","startedAt":"2018-10-03T21:22:13Z","lastAt":"2018-10-10T23:27:51Z","messageCount":7,"participants":["Mihir Mehta","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"359590","messageId":"20181003210824.24634-1-mihir@cs.utexas.edu","threadId":"49483","inReplyTo":null,"subject":"[PATCH] doc: fix a typo and clarify a sentence","fromName":"Mihir Mehta","fromEmail":"mihir@cs.utexas.edu","sentAt":"2018-10-03T21:08:24Z","receivedAt":"2018-10-03T21:22:13Z","isPatch":true,"sender":{"key":"mihir@cs.utexas.edu","avatar":"https://avatars.githubusercontent.com/u/407260?v=4"},"body":"I noticed that git-merge-base was unlikely to actually be a git command,\nand tried it in my shell. Seeing that it doesn't work, I cleaned up two\nplaces in the docs where it appears.\n\nSigned-off-by: Mihir Mehta <mihir@cs.utexas.edu>\n---\n Documentation/git-diff.txt                  | 5 +++--\n Documentation/howto/update-hook-example.txt | 2 +-\n 2 files changed, 4 insertions(+), 3 deletions(-)\n\ndiff --git a/Documentation/git-diff.txt b/Documentation/git-diff.txt\nindex b180f1fa5..6173f569e 100644\n--- a/Documentation/git-diff.txt\n+++ b/Documentation/git-diff.txt\n@@ -72,8 +72,9 @@ two blob objects, or changes between two files on disk.\n \tThis form is to view the changes on the branch containing\n \tand up to the second <commit>, starting at a common ancestor\n \tof both <commit>.  \"git diff A\\...B\" is equivalent to\n-\t\"git diff $(git-merge-base A B) B\".  You can omit any one\n-\tof <commit>, which has the same effect as using HEAD instead.\n+\t\"git diff $(git merge-base A B) B\".  You can omit any one\n+\tof the two instances of <commit>, which has the same effect as\n+\tusing HEAD in its place.\n \n Just in case if you are doing something exotic, it should be\n noted that all of the <commit> in the above description, except\ndiff --git a/Documentation/howto/update-hook-example.txt b/Documentation/howto/update-hook-example.txt\nindex a5193b1e5..89821ec74 100644\n--- a/Documentation/howto/update-hook-example.txt\n+++ b/Documentation/howto/update-hook-example.txt\n@@ -80,7 +80,7 @@ case \"$1\" in\n       info \"The branch '$1' is new...\"\n     else\n       # updating -- make sure it is a fast-forward\n-      mb=$(git-merge-base \"$2\" \"$3\")\n+      mb=$(git merge-base \"$2\" \"$3\")\n       case \"$mb,$2\" in\n         \"$2,$mb\") info \"Update is fast-forward\" ;;\n \t*)\t  noff=y; info \"This is not a fast-forward update.\";;\n-- \n2.19.0\n\n"},{"id":"359655","messageId":"xmqqwoqw29uw.fsf@gitster-ct.c.googlers.com","threadId":"49483","inReplyTo":"20181003210824.24634-1-mihir@cs.utexas.edu","subject":"Re: [PATCH] doc: fix a typo and clarify a sentence","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2018-10-05T06:20:07Z","receivedAt":"2018-10-05T06:20:13Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Mihir Mehta <mihir@cs.utexas.edu> writes:\n\n> diff --git a/Documentation/git-diff.txt b/Documentation/git-diff.txt\n> index b180f1fa5..6173f569e 100644\n> --- a/Documentation/git-diff.txt\n> +++ b/Documentation/git-diff.txt\n> @@ -72,8 +72,9 @@ two blob objects, or changes between two files on disk.\n>  \tThis form is to view the changes on the branch containing\n>  \tand up to the second <commit>, starting at a common ancestor\n>  \tof both <commit>.  \"git diff A\\...B\" is equivalent to\n> -\t\"git diff $(git-merge-base A B) B\".  You can omit any one\n> -\tof <commit>, which has the same effect as using HEAD instead.\n> +\t\"git diff $(git merge-base A B) B\".  You can omit any one\n\n\"git merge-base\" is a more modern way to spell \"git-merge-base\" and\nwe have been trying to update the mention of the latter in the docs\nto the former.  Thanks for doing this.\n\n> +\tof the two instances of <commit>, which has the same effect as\n\nThe paragraph is about <commit>...<commit> three-dot notation.  I\nsuspect that you wanted to say <commit>... and ...<commit> are\nallowed, implying that a bare ... is not allowed and does not mean\nthe same thing as what HEAD...HEAD means.  But that is not the case.\nAsking \"git diff HEAD...HEAD\" by omitting both may not give very\ninteresting output (it always becomes a no-op), but nevertheless it\nis a valid thing to ask (iow \"git diff $commit1...$commit2\" is what\nyou can safely write without having to worry about one or both going\nempty string).  So I'd rather not to see this change in this form.\nIt is an incomplete attempt to discourage use of <empty>...<empty>\nbut without giving enough justification.\n\n\tSide note.  I am not recommending to do so, but\n\t\"discouragement with enough justification\" would look like\n\tthis.\n\n\tYou can omit <commit> on any side of the three dots, which\n\thas the same effect as using HEAD instead.  Omitting both\n\tand leaving only three dots is not an error but that merely\n\tspecifies a set of commits that are and are not reachable\n\tfrom HEAD at the same time, which by definition is an empty\n\tset, hence it is not very useful.\n\n> +\tusing HEAD in its place.\n\n> +++ b/Documentation/howto/update-hook-example.txt\n> @@ -80,7 +80,7 @@ case \"$1\" in\n>        info \"The branch '$1' is new...\"\n>      else\n>        # updating -- make sure it is a fast-forward\n> -      mb=$(git-merge-base \"$2\" \"$3\")\n> +      mb=$(git merge-base \"$2\" \"$3\")\n\nI strongly suspect that inside update-hook, the original still\nshould work (iow, $GIT_EXEC_PATH should already have been prepended\nto $PATH before a hoook is called).  But the updated form should\nalso work, and it is the form we humans need to type, so let's take\nthis change.\n\nThanks.\n\n>        case \"$mb,$2\" in\n>          \"$2,$mb\") info \"Update is fast-forward\" ;;\n>  \t*)\t  noff=y; info \"This is not a fast-forward update.\";;\n"},{"id":"360035","messageId":"20181010152007.14441-1-mihir@cs.utexas.edu","threadId":"49483","inReplyTo":"xmqqwoqw29uw.fsf@gitster-ct.c.googlers.com","subject":"","fromName":"Mihir Mehta","fromEmail":"mihir@cs.utexas.edu","sentAt":"2018-10-10T15:20:06Z","receivedAt":"2018-10-10T15:20:19Z","isPatch":false,"sender":{"key":"mihir@cs.utexas.edu","avatar":"https://avatars.githubusercontent.com/u/407260?v=4"},"body":"Thanks, Junio. Instead of removing that part of the patch, I opted to\nexpand it to make it a little clearer (in my opinion) than it was\nbefore. Let me know if this works.\n\nMihir.\n"},{"id":"360036","messageId":"20181010152007.14441-2-mihir@cs.utexas.edu","threadId":"49483","inReplyTo":"20181010152007.14441-1-mihir@cs.utexas.edu","subject":"[PATCH] doc: fix a typo and clarify a sentence","fromName":"Mihir Mehta","fromEmail":"mihir@cs.utexas.edu","sentAt":"2018-10-10T15:20:07Z","receivedAt":"2018-10-10T15:20:29Z","isPatch":true,"sender":{"key":"mihir@cs.utexas.edu","avatar":"https://avatars.githubusercontent.com/u/407260?v=4"},"body":"I noticed that git-merge-base was unlikely to actually be a git command,\nand tried it in my shell. Seeing that it doesn't work, I cleaned up two\nplaces in the docs where it appears.\n\nSigned-off-by: Mihir Mehta <mihir@cs.utexas.edu>\n---\n Documentation/git-diff.txt                  | 7 ++++---\n Documentation/howto/update-hook-example.txt | 2 +-\n 2 files changed, 5 insertions(+), 4 deletions(-)\n\ndiff --git a/Documentation/git-diff.txt b/Documentation/git-diff.txt\nindex b180f1fa5..a122f9ded 100644\n--- a/Documentation/git-diff.txt\n+++ b/Documentation/git-diff.txt\n@@ -72,10 +72,11 @@ two blob objects, or changes between two files on disk.\n \tThis form is to view the changes on the branch containing\n \tand up to the second <commit>, starting at a common ancestor\n \tof both <commit>.  \"git diff A\\...B\" is equivalent to\n-\t\"git diff $(git-merge-base A B) B\".  You can omit any one\n-\tof <commit>, which has the same effect as using HEAD instead.\n+\t\"git diff $(git merge-base A B) B\".  You can omit any one\n+\tof the two instances of <commit>, which has the same effect as\n+\tusing HEAD in its place; omitting both results in an empty diff.\n \n-Just in case if you are doing something exotic, it should be\n+Just in case you are doing something exotic, it should be\n noted that all of the <commit> in the above description, except\n in the last two forms that use \"..\" notations, can be any\n <tree>.\ndiff --git a/Documentation/howto/update-hook-example.txt b/Documentation/howto/update-hook-example.txt\nindex a5193b1e5..89821ec74 100644\n--- a/Documentation/howto/update-hook-example.txt\n+++ b/Documentation/howto/update-hook-example.txt\n@@ -80,7 +80,7 @@ case \"$1\" in\n       info \"The branch '$1' is new...\"\n     else\n       # updating -- make sure it is a fast-forward\n-      mb=$(git-merge-base \"$2\" \"$3\")\n+      mb=$(git merge-base \"$2\" \"$3\")\n       case \"$mb,$2\" in\n         \"$2,$mb\") info \"Update is fast-forward\" ;;\n \t*)\t  noff=y; info \"This is not a fast-forward update.\";;\n-- \n2.19.0\n\n"},{"id":"360095","messageId":"xmqq36tdla1a.fsf@gitster-ct.c.googlers.com","threadId":"49483","inReplyTo":"20181010152007.14441-1-mihir@cs.utexas.edu","subject":"Re: none","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2018-10-10T22:19:29Z","receivedAt":"2018-10-10T22:19:35Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Mihir Mehta <mihir@cs.utexas.edu> writes:\n\n> Thanks, Junio. Instead of removing that part of the patch, I opted to\n> expand it to make it a little clearer (in my opinion) than it was\n> before. Let me know if this works.\n\nI am mildly negative on that change.  \"Omitting both would give an\nempty diff\" would be understandable to anybody who understands that\nan omitted end of dot-dot is substituted with HEAD *and* thinks what\nrange HEAD..HEAD means, so it is just an additional noise to them,\nand to those who do not want to waste time on thinking, it is a\nstatement that reads as if \"it will be an error\" without saying why\nit is an error.  So overall, it seems, at least to me, that the\nadditional text adds negative value.\n\nSo, I dunno.\n"},{"id":"360099","messageId":"20181010222654.19871-1-mihir@cs.utexas.edu","threadId":"49483","inReplyTo":"xmqq36tdla1a.fsf@gitster-ct.c.googlers.com","subject":"[PATCH] doc: fix a typo and clarify a sentence","fromName":"Mihir Mehta","fromEmail":"mihir@cs.utexas.edu","sentAt":"2018-10-10T22:26:54Z","receivedAt":"2018-10-10T22:27:04Z","isPatch":true,"sender":{"key":"mihir@cs.utexas.edu","avatar":"https://avatars.githubusercontent.com/u/407260?v=4"},"body":"I noticed that git-merge-base was unlikely to actually be a git command,\nand tried it in my shell. Seeing that it doesn't work, I cleaned up two\nplaces in the docs where it appears.\n\nSigned-off-by: Mihir Mehta <mihir@cs.utexas.edu>\n---\n Documentation/git-diff.txt                  | 4 ++--\n Documentation/howto/update-hook-example.txt | 2 +-\n 2 files changed, 3 insertions(+), 3 deletions(-)\n\ndiff --git a/Documentation/git-diff.txt b/Documentation/git-diff.txt\nindex b180f1fa5..030f162f3 100644\n--- a/Documentation/git-diff.txt\n+++ b/Documentation/git-diff.txt\n@@ -72,10 +72,10 @@ two blob objects, or changes between two files on disk.\n \tThis form is to view the changes on the branch containing\n \tand up to the second <commit>, starting at a common ancestor\n \tof both <commit>.  \"git diff A\\...B\" is equivalent to\n-\t\"git diff $(git-merge-base A B) B\".  You can omit any one\n+\t\"git diff $(git merge-base A B) B\".  You can omit any one\n \tof <commit>, which has the same effect as using HEAD instead.\n \n-Just in case if you are doing something exotic, it should be\n+Just in case you are doing something exotic, it should be\n noted that all of the <commit> in the above description, except\n in the last two forms that use \"..\" notations, can be any\n <tree>.\ndiff --git a/Documentation/howto/update-hook-example.txt b/Documentation/howto/update-hook-example.txt\nindex a5193b1e5..89821ec74 100644\n--- a/Documentation/howto/update-hook-example.txt\n+++ b/Documentation/howto/update-hook-example.txt\n@@ -80,7 +80,7 @@ case \"$1\" in\n       info \"The branch '$1' is new...\"\n     else\n       # updating -- make sure it is a fast-forward\n-      mb=$(git-merge-base \"$2\" \"$3\")\n+      mb=$(git merge-base \"$2\" \"$3\")\n       case \"$mb,$2\" in\n         \"$2,$mb\") info \"Update is fast-forward\" ;;\n \t*)\t  noff=y; info \"This is not a fast-forward update.\";;\n-- \n2.19.0\n\n"},{"id":"360108","messageId":"xmqqo9c1jsb1.fsf@gitster-ct.c.googlers.com","threadId":"49483","inReplyTo":"20181010222654.19871-1-mihir@cs.utexas.edu","subject":"Re: [PATCH] doc: fix a typo and clarify a sentence","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2018-10-10T23:27:46Z","receivedAt":"2018-10-10T23:27:51Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Mihir Mehta <mihir@cs.utexas.edu> writes:\n\n> -Just in case if you are doing something exotic, it should be\n> +Just in case you are doing something exotic, it should be\n\nThanks.  Somehow I didn't notice this change earlier, but it looks\ngood, too.\n\nWill queue.\n"}]}