{"thread":{"id":"4763","subject":"[PATCH] Teach rev-parse the ... syntax.","startedAt":"2006-07-04T09:02:22Z","lastAt":"2006-07-04T11:17:07Z","messageCount":3,"participants":["Santi Béjar","Johannes Schindelin","Santi"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"23204","messageId":"873bdhbv4x.fsf@gmail.com","threadId":"4763","inReplyTo":null,"subject":"[PATCH] Teach rev-parse the ... syntax.","fromName":"Santi Béjar","fromEmail":"sbejar@gmail.com","sentAt":"2006-07-04T09:02:22Z","receivedAt":"2006-07-04T09:02:22Z","isPatch":true,"sender":{"key":"santi@agolina.net","avatar":null},"body":"Signed-off-by: Santi Béjar <sbejar@gmail.com>\n---\n\n I think this time the mail patch is OK, I've tested it.\n\n builtin-rev-parse.c |   17 ++++++++++++++++-\n 1 files changed, 16 insertions(+), 1 deletions(-)\n\ndiff --git a/builtin-rev-parse.c b/builtin-rev-parse.c\nindex 5f5ade4..8d2beb2 100644\n--- a/builtin-rev-parse.c\n+++ b/builtin-rev-parse.c\n@@ -331,14 +331,29 @@ int cmd_rev_parse(int argc, const char *\n \t\t\tunsigned char end[20];\n \t\t\tconst char *next = dotdot + 2;\n \t\t\tconst char *this = arg;\n+\t\t\tint symmetric = *next == '.';\n+\n \t\t\t*dotdot = 0;\n+\t\t\tnext += symmetric;\n+\n \t\t\tif (!*next)\n \t\t\t\tnext = \"HEAD\";\n \t\t\tif (dotdot == arg)\n \t\t\t\tthis = \"HEAD\";\n \t\t\tif (!get_sha1(this, sha1) && !get_sha1(next, end)) {\n \t\t\t\tshow_rev(NORMAL, end, next);\n-\t\t\t\tshow_rev(REVERSED, sha1, this);\n+\t\t\t\tshow_rev(symmetric?NORMAL:REVERSED, sha1, this);\n+\t\t\t\tif (symmetric) {\n+\t\t\t\t  struct commit *a, *b;\n+\t\t\t\t  a = lookup_commit_reference(sha1);\n+\t\t\t\t  b = lookup_commit_reference(end);\n+\t\t\t\t  struct commit_list *exclude = get_merge_bases(a, b,1);\n+\t\t\t\t  while (exclude) {\n+\t\t\t\t    show_rev(REVERSED,\n+\t\t\t\t\t     exclude->item->object.sha1,NULL);\n+\t\t\t\t    exclude = exclude->next;\n+\t\t\t\t  }\n+\t\t\t\t}\n \t\t\t\tcontinue;\n \t\t\t}\n \t\t\t*dotdot = '.';\n-- \n1.4.1.ge6c0-dirty\n"},{"id":"23209","messageId":"Pine.LNX.4.63.0607041247200.29667@wbgn013.biozentrum.uni-wuerzburg.de","threadId":"4763","inReplyTo":"873bdhbv4x.fsf@gmail.com","subject":"Re: [PATCH] Teach rev-parse the ... syntax.","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2006-07-04T10:50:50Z","receivedAt":"2006-07-04T10:50:50Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Tue, 4 Jul 2006, Santi Béjar wrote:\n\n> +\t\t\t\t  struct commit_list *exclude = get_merge_bases(a, b,1);\n\nYou never free_commit_list() exclude.\n\nSide thought: we do not really support multiple ranges, do we? E.g.\n\n\tgit-rev-list HEAD~10..HEAD~8 HEAD^..\n\nwould not yield the intended result, right? (And same goes for ... ranges) \nMaybe we should at least warn about that.\n\nCiao,\nDscho"},{"id":"23213","messageId":"8aa486160607040417n2016ecc3h70e6f3c92f851b13@mail.gmail.com","threadId":"4763","inReplyTo":"Pine.LNX.4.63.0607041247200.29667@wbgn013.biozentrum.uni-wuerzburg.de","subject":"Re: [PATCH] Teach rev-parse the ... syntax.","fromName":"Santi","fromEmail":"sbejar@gmail.com","sentAt":"2006-07-04T11:17:07Z","receivedAt":"2006-07-04T11:17:07Z","isPatch":true,"sender":{"key":"santi@agolina.net","avatar":null},"body":"2006/7/4, Johannes Schindelin <Johannes.Schindelin@gmx.de>:\n> Hi,\n>\n> On Tue, 4 Jul 2006, Santi Béjar wrote:\n>\n> > +                               struct commit_list *exclude = get_merge_bases(a, b,1);\n>\n> You never free_commit_list() exclude.\n>\n\nUps! But thanks to Junio it is already there :)\n\nSanti\n-- \nLooking for signature...\nLooking for signature...done\n"}]}