{"thread":{"id":"6425","subject":"[PATCH] Document --ignore-if-in-upstream in git-format-patch","startedAt":"2007-01-18T11:27:35Z","lastAt":"2007-01-19T16:58:13Z","messageCount":5,"participants":["David Kågedal","Johannes Schindelin","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"31962","messageId":"8764b4fuc8.fsf@morpheus.local","threadId":"6425","inReplyTo":null,"subject":"[PATCH] Document --ignore-if-in-upstream in git-format-patch","fromName":"David Kågedal","fromEmail":"davidk@lysator.liu.se","sentAt":"2007-01-18T11:27:35Z","receivedAt":"2007-01-18T11:27:35Z","isPatch":true,"sender":{"key":"davidk@lysator.liu.se","avatar":"https://avatars.githubusercontent.com/u/60530?v=4"},"body":"\n---\n Documentation/git-format-patch.txt |    6 ++++++\n 1 files changed, 6 insertions(+), 0 deletions(-)\n\nI looked at the code, and tried to guess what it actually did.  This\ndocumentation doesn't really explain how or why it's supposed to be\nused.\n\nSomeone who knows how it *actually* works is encouraged to send a\nbetter explanation.\n\ndiff --git a/Documentation/git-format-patch.txt b/Documentation/git-format-patch.txt\nindex 67425dc..3ad0fcd 100644\n--- a/Documentation/git-format-patch.txt\n+++ b/Documentation/git-format-patch.txt\n@@ -12,6 +12,7 @@ SYNOPSIS\n 'git-format-patch' [-n | -k] [-o <dir> | --stdout] [--attach] [--thread]\n \t           [-s | --signoff] [--diff-options] [--start-number <n>]\n \t\t   [--in-reply-to=Message-Id]\n+\t\t   [--ignore-if-in-upstream]\n \t\t   <since>[..<until>]\n \n DESCRIPTION\n@@ -78,6 +79,11 @@ OPTIONS\n \treply to the given Message-Id, which avoids breaking threads to\n \tprovide a new patch series.\n \n+--ignore-if-in-upstream::\n+\tDo not include the same patch twice.  If there are two commits\n+\tthat would produce identical patches, the second one is\n+\texcluded from the output.\n+\n CONFIGURATION\n -------------\n You can specify extra mail header lines to be added to each\n-- \n1.5.0.rc1.g04f3-dirty\n\n\n-- \nDavid Kågedal\n"},{"id":"31969","messageId":"Pine.LNX.4.63.0701181437200.22628@wbgn013.biozentrum.uni-wuerzburg.de","threadId":"6425","inReplyTo":"8764b4fuc8.fsf@morpheus.local","subject":"Re: [PATCH] Document --ignore-if-in-upstream in git-format-patch","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2007-01-18T13:40:47Z","receivedAt":"2007-01-18T13:40:47Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Thu, 18 Jan 2007, David Kågedal wrote:\n\n> Someone who knows how it *actually* works is encouraged to send a\n> better explanation.\n\nNice try... Unfortunately, I don't have time to do it.\n\n> +--ignore-if-in-upstream::\n> +\tDo not include the same patch twice.  If there are two commits\n> +\tthat would produce identical patches, the second one is\n> +\texcluded from the output.\n\nThis is not what it does, though. (If in doubt, use the source, Luke).\n\nGiven a range upstream..localbranch, --ignore-if-in-upstream looks at all \ndiffs associated with commits in localbranch..upstream (i.e. all commits \nupstream has, but not localbranch), and when traversing \nupstream..localbranch to output the commits with diffs, drops those at the \nfloor which were already seen in localbranch..upstream.\n\nThe way it does this is by hashing the diffs, and check only the hashes.\n\nCiao,\nDscho\n"},{"id":"31975","messageId":"87wt3ke82t.fsf@morpheus.local","threadId":"6425","inReplyTo":"Pine.LNX.4.63.0701181437200.22628@wbgn013.biozentrum.uni-wuerzburg.de","subject":"Re: [PATCH] Document --ignore-if-in-upstream in git-format-patch","fromName":"David Kågedal","fromEmail":"davidk@lysator.liu.se","sentAt":"2007-01-18T14:13:46Z","receivedAt":"2007-01-18T14:13:46Z","isPatch":true,"sender":{"key":"davidk@lysator.liu.se","avatar":"https://avatars.githubusercontent.com/u/60530?v=4"},"body":"Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:\n\n> Hi,\n>\n> On Thu, 18 Jan 2007, David Kågedal wrote:\n>\n>> Someone who knows how it *actually* works is encouraged to send a\n>> better explanation.\n>\n> Nice try... Unfortunately, I don't have time to do it.\n>\n>> +--ignore-if-in-upstream::\n>> +\tDo not include the same patch twice.  If there are two commits\n>> +\tthat would produce identical patches, the second one is\n>> +\texcluded from the output.\n>\n> This is not what it does, though. (If in doubt, use the source, Luke).\n\nI did.  But I haven't learnt to navigate it yet.  I get confused by\nthe global state in the code, which makes it hard to know when I\nfunction call returns interesting information or changes some global\ntable.\n\n> Given a range upstream..localbranch, --ignore-if-in-upstream looks at all \n> diffs associated with commits in localbranch..upstream (i.e. all commits \n> upstream has, but not localbranch), and when traversing \n> upstream..localbranch to output the commits with diffs, drops those at the \n> floor which were already seen in localbranch..upstream.\n\nAh, now I see.  How about this, then:\n\n+--ignore-if-in-upstream::\n+       Do not include a patch that matches a commit in\n+       <until>..<since>.  This will examine all patches reachable\n+       from <since> but not from <until> and compare them with the\n+       patches being generated, and any patch that matches is\n+       ignored.\n\nIt's hard to get something readable without writing lots about what\n<since>..<until> actually means.  Which might actually be a good idea\nto do. But I don't have time to do that :-)\n\n-- \nDavid Kågedal\n"},{"id":"31977","messageId":"Pine.LNX.4.63.0701181518150.22628@wbgn013.biozentrum.uni-wuerzburg.de","threadId":"6425","inReplyTo":"87wt3ke82t.fsf@morpheus.local","subject":"Re: [PATCH] Document --ignore-if-in-upstream in git-format-patch","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2007-01-18T14:18:47Z","receivedAt":"2007-01-18T14:18:47Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Thu, 18 Jan 2007, David Kågedal wrote:\n\n> +--ignore-if-in-upstream::\n> +       Do not include a patch that matches a commit in\n> +       <until>..<since>.  This will examine all patches reachable\n> +       from <since> but not from <until> and compare them with the\n> +       patches being generated, and any patch that matches is\n> +       ignored.\n\nMelikes.\n"},{"id":"32071","messageId":"7vlkjzhs2i.fsf@assigned-by-dhcp.cox.net","threadId":"6425","inReplyTo":"87wt3ke82t.fsf@morpheus.local","subject":"Re: [PATCH] Document --ignore-if-in-upstream in git-format-patch","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2007-01-19T16:58:13Z","receivedAt":"2007-01-19T16:58:13Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Thanks both.\n"}]}