{"thread":{"id":"45552","subject":"[PATCH] Docs: Add some missing options to git-diff.txt","startedAt":"2017-03-30T19:50:46Z","lastAt":"2017-04-11T14:40:10Z","messageCount":4,"participants":["Andreas Heiduk","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"315814","messageId":"1490903375-2115-1-git-send-email-asheiduk@gmail.com","threadId":"45552","inReplyTo":null,"subject":"[PATCH] Docs: Add some missing options to git-diff.txt","fromName":"Andreas Heiduk","fromEmail":"asheiduk@gmail.com","sentAt":"2017-03-30T19:49:35Z","receivedAt":"2017-03-30T19:50:46Z","isPatch":true,"sender":{"key":"asheiduk@gmail.com","avatar":"https://avatars.githubusercontent.com/u/9371344?v=4"},"body":"git-diff understands \"--ours\", \"--theirs\" and \"--base\" for files with\nconflicts. But so far they were not documented for the central diff\ncommand but only for diff-files.\n\nSigned-off-by: Andreas Heiduk <asheiduk@gmail.com>\n---\n Documentation/git-diff.txt | 8 ++++++++\n 1 file changed, 8 insertions(+)\n\ndiff --git a/Documentation/git-diff.txt b/Documentation/git-diff.txt\nindex bbab35f..91ced4f 100644\n--- a/Documentation/git-diff.txt\n+++ b/Documentation/git-diff.txt\n@@ -97,6 +97,14 @@ OPTIONS\n :git-diff: 1\n include::diff-options.txt[]\n \n+-1 --base::\n+-2 --ours::\n+-3 --theirs::\n+-0::\n+\tDiff against the \"base\" version, \"our branch\" or \"their\n+\tbranch\" respectively. The option -0 can be given to omit diff\n+\toutput for unmerged entries and just show \"Unmerged\".\n+\n <path>...::\n \tThe <paths> parameters, when given, are used to limit\n \tthe diff to the named paths (you can give directory\n-- \n2.7.4\n\n"},{"id":"315821","messageId":"xmqqinmq34d3.fsf@gitster.mtv.corp.google.com","threadId":"45552","inReplyTo":"1490903375-2115-1-git-send-email-asheiduk@gmail.com","subject":"Re: [PATCH] Docs: Add some missing options to git-diff.txt","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2017-03-30T20:18:48Z","receivedAt":"2017-03-30T20:18:55Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Andreas Heiduk <asheiduk@gmail.com> writes:\n\n> git-diff understands \"--ours\", \"--theirs\" and \"--base\" for files with\n> conflicts. But so far they were not documented for the central diff\n> command but only for diff-files.\n\nThis is probably a shared issue with the original text for\n\"diff-files\", but I think we must stress that these options make\nsense only when you are in the middle of conflict resolution.  \n\nIn addition, unlike \"diff-files\", if these were to appear in the\ngeneral \"git diff\" documentation, it also must stress that these\noptions are only about comparing the index and the working tree\nfiles, e.g. \"git diff --ours HEAD^ HEAD\" does not make sense.\n\n"},{"id":"316473","messageId":"20170410105907.12045-1-asheiduk@gmail.com","threadId":"45552","inReplyTo":"1490903375-2115-1-git-send-email-asheiduk@gmail.com","subject":"[PATCH v1] Docs: Add some missing options to git-diff.txt","fromName":"Andreas Heiduk","fromEmail":"asheiduk@gmail.com","sentAt":"2017-04-10T10:59:07Z","receivedAt":"2017-04-10T10:59:46Z","isPatch":true,"sender":{"key":"asheiduk@gmail.com","avatar":"https://avatars.githubusercontent.com/u/9371344?v=4"},"body":"Well, this wording picks up your points but I won't call it \"stress\nit\" :-) However this should do the job.\n\n--8<------>8------\ngit-diff understands \"--ours\", \"--theirs\" and \"--base\" for files with\nconflicts. But so far they were not documented for the central diff\ncommand but only for diff-files.\n\nSigned-off-by: Andreas Heiduk <asheiduk@gmail.com>\n---\n Documentation/git-diff.txt | 15 +++++++++++++++\n 1 file changed, 15 insertions(+)\n\ndiff --git a/Documentation/git-diff.txt b/Documentation/git-diff.txt\nindex bbab35fca..2bccf4505 100644\n--- a/Documentation/git-diff.txt\n+++ b/Documentation/git-diff.txt\n@@ -97,6 +97,21 @@ OPTIONS\n :git-diff: 1\n include::diff-options.txt[]\n \n+-1 --base::\n+-2 --ours::\n+-3 --theirs::\n+\tCompare the working tree with the \"base\" version (stage #1),\n+\t\"our branch\" (stage #2) or \"their branch\" (stage #3). The\n+\tindex contains these stages only for unmerged entries i.e.\n+\twhile resolving conflicts.  See linkgit:git-read-tree[1]\n+\tsection \"3-Way Merge\" for more information.\n+\n+-0::\n+\tOmit diff output for unmerged entries and just show\n+\t\"Unmerged\". Can be used only when comparing the working tree\n+\twith the index\n+\n+\n <path>...::\n \tThe <paths> parameters, when given, are used to limit\n \tthe diff to the named paths (you can give directory\n-- \n2.12.2\n\n"},{"id":"316594","messageId":"20170411143950.31207-1-asheiduk@gmail.com","threadId":"45552","inReplyTo":"xmqqinmq34d3.fsf@gitster.mtv.corp.google.com","subject":"[PATCH v2] Docs: Add some missing options to git-diff.txt","fromName":"Andreas Heiduk","fromEmail":"asheiduk@gmail.com","sentAt":"2017-04-11T14:39:50Z","receivedAt":"2017-04-11T14:40:10Z","isPatch":true,"sender":{"key":"asheiduk@gmail.com","avatar":"https://avatars.githubusercontent.com/u/9371344?v=4"},"body":"New attempt due to whitespace fixes after EndOfSenctence.\n\nJunio C Hamano writes:\n> This is probably a shared issue with the original text for\n> \"diff-files\", but I think we must stress that these options make\n> sense only when you are in the middle of conflict resolution.  \n>\n> In addition, unlike \"diff-files\", if these were to appear in the\n> general \"git diff\" documentation, it also must stress that these\n> options are only about comparing the index and the working tree\n> files, e.g. \"git diff --ours HEAD^ HEAD\" does not make sense.\n\nWell, this wording picks up your points but I won't call it \"stress\nit\" :-) However this should do the job.\n\n\n------- 8< -------------------------- >8 -------------\ngit-diff understands \"--ours\", \"--theirs\" and \"--base\" for files with\nconflicts. But so far they were not documented for the central diff\ncommand but only for diff-files.\n\nSigned-off-by: Andreas Heiduk <asheiduk@gmail.com>\n---\n Documentation/git-diff.txt | 14 ++++++++++++++\n 1 file changed, 14 insertions(+)\n\ndiff --git a/Documentation/git-diff.txt b/Documentation/git-diff.txt\nindex bbab35fca..b0c1bb95c 100644\n--- a/Documentation/git-diff.txt\n+++ b/Documentation/git-diff.txt\n@@ -97,6 +97,20 @@ OPTIONS\n :git-diff: 1\n include::diff-options.txt[]\n \n+-1 --base::\n+-2 --ours::\n+-3 --theirs::\n+\tCompare the working tree with the \"base\" version (stage #1),\n+\t\"our branch\" (stage #2) or \"their branch\" (stage #3).  The\n+\tindex contains these stages only for unmerged entries i.e.\n+\twhile resolving conflicts.  See linkgit:git-read-tree[1]\n+\tsection \"3-Way Merge\" for detailed information.\n+\n+-0::\n+\tOmit diff output for unmerged entries and just show\n+\t\"Unmerged\".  Can be used only when comparing the working tree\n+\twith the index.\n+\n <path>...::\n \tThe <paths> parameters, when given, are used to limit\n \tthe diff to the named paths (you can give directory\n-- \n2.12.2\n\n"}]}