{"thread":{"id":"4036","subject":"git-log --parents broken post v1.3.0","startedAt":"2006-05-03T11:56:16Z","lastAt":"2006-05-03T22:53:37Z","messageCount":5,"participants":["Martin Langhoff","Linus Torvalds"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"19422","messageId":"46a038f90605030456q679ceebcsa037b834bced9ca2@mail.gmail.com","threadId":"4036","inReplyTo":null,"subject":"git-log --parents broken post v1.3.0","fromName":"Martin Langhoff","fromEmail":"martin.langhoff@gmail.com","sentAt":"2006-05-03T11:56:16Z","receivedAt":"2006-05-03T11:56:16Z","isPatch":false,"sender":{"key":"martin.langhoff@gmail.com","avatar":"https://gravatar.com/avatar/1e3f311b6c4c15836501901ca58f8c0b0667246488084ba524d8bc9867e22fd9?d=mp&s=160"},"body":"Soon after v1.3.0 git-log --parents got broken. When using --parents,\nthe 'commit <sha1>' opening line would also list the SHA1 of the\nparent commits. This seems to have broken git-cvsserver.\n\nJust by testing git-cvsserver, git-bisect has said that\n\n  9153983310a169a340bd1023dccafd80b70b05bc is first bad commit\n  Author: Linus Torvalds <torvalds@osdl.org>\n  Date:   Mon Apr 17 11:59:32 2006 -0700\n\n    Log message printout cleanups\n\nBut I am not too confident that it's this particular commit -- but it\nis definitely one in this series. I had suspected of changes in\ngit-diff-tree, but the output of git-diff-tree remains unchanged as\nfar as I could test it.\n\ncheers,\n\n\nmartin\n"},{"id":"19425","messageId":"46a038f90605030510x6d582804w6c0d2fec60bd56e5@mail.gmail.com","threadId":"4036","inReplyTo":"46a038f90605030456q679ceebcsa037b834bced9ca2@mail.gmail.com","subject":"Re: git-log --parents broken post v1.3.0","fromName":"Martin Langhoff","fromEmail":"martin.langhoff@gmail.com","sentAt":"2006-05-03T12:10:00Z","receivedAt":"2006-05-03T12:10:00Z","isPatch":false,"sender":{"key":"martin.langhoff@gmail.com","avatar":"https://gravatar.com/avatar/1e3f311b6c4c15836501901ca58f8c0b0667246488084ba524d8bc9867e22fd9?d=mp&s=160"},"body":"On 5/3/06, Martin Langhoff <martin.langhoff@gmail.com> wrote:\n> Soon after v1.3.0 git-log --parents got broken. When using --parents,\n\nOk -- perhaps that was a bit of a rushed statement. Reading back on\nthe archives, it seems like it may have been intentional. The new\nheader format is more succint, but while technically I can fish the\ndata at the porcelain layer, it is quite convenient to get it directly\nfrom the commit header. Specially given that git-log has the info at\nthat time...\n\nI have to confess, I don't quite follow the changes happening in that\nseries of commits. If --parents is really not coming back I'll change\nthe log entry parsing in cvsserver. However, I suspect git-log should\nerror out on it (\"fatal: deprecated option\") so porcelains break\nexplicitly, rather than silently.\n\ncheers,\n\n\nmartin\n"},{"id":"19434","messageId":"Pine.LNX.4.64.0605030745550.4086@g5.osdl.org","threadId":"4036","inReplyTo":"46a038f90605030510x6d582804w6c0d2fec60bd56e5@mail.gmail.com","subject":"Re: git-log --parents broken post v1.3.0","fromName":"Linus Torvalds","fromEmail":"torvalds@osdl.org","sentAt":"2006-05-03T14:59:00Z","receivedAt":"2006-05-03T14:59:00Z","isPatch":false,"sender":{"key":"torvalds@linux-foundation.org","avatar":"https://avatars.githubusercontent.com/u/1024025?v=4"},"body":"\n\nOn Thu, 4 May 2006, Martin Langhoff wrote:\n\n> On 5/3/06, Martin Langhoff <martin.langhoff@gmail.com> wrote:\n> > Soon after v1.3.0 git-log --parents got broken. When using --parents,\n> \n> Ok -- perhaps that was a bit of a rushed statement. Reading back on\n> the archives, it seems like it may have been intentional.\n\nNo it wasn't. \"git log --parents\" was definitely supposed to still work. \n\nThat said, I suspect a git-cvsserver kind of usage is better off using \n\"git-rev-list --parents HEAD\" instead, which didn't break in the first \nplace.\n\n> I have to confess, I don't quite follow the changes happening in that\n> series of commits. If --parents is really not coming back I'll change\n> the log entry parsing in cvsserver. However, I suspect git-log should\n> error out on it (\"fatal: deprecated option\") so porcelains break\n> explicitly, rather than silently.\n\nNo, the option really isn't deprecated, it was just missed because nothing \nseemed to use it.. How about this diff?\n\nSigned-off-by: Yadda yadda\n\n\t\tLinus\n\n---\ndiff --git a/log-tree.c b/log-tree.c\nindex 9634c46..f9c6f7c 100644\n--- a/log-tree.c\n+++ b/log-tree.c\n@@ -3,6 +3,15 @@ #include \"diff.h\"\n #include \"commit.h\"\n #include \"log-tree.h\"\n \n+static void show_parents(struct commit *commit, int abbrev)\n+{\n+\tstruct commit_list *p;\n+\tfor (p = commit->parents; p ; p = p->next) {\n+\t\tstruct commit *parent = p->item;\n+\t\tprintf(\" %s\", diff_unique_abbrev(parent->object.sha1, abbrev));\n+\t}\n+}\n+\n void show_log(struct rev_info *opt, struct log_info *log, const char *sep)\n {\n \tstatic char this_header[16384];\n@@ -14,7 +23,10 @@ void show_log(struct rev_info *opt, stru\n \n \topt->loginfo = NULL;\n \tif (!opt->verbose_header) {\n-\t\tputs(sha1_to_hex(commit->object.sha1));\n+\t\tfputs(diff_unique_abbrev(commit->object.sha1, abbrev_commit), stdout);\n+\t\tif (opt->parents)\n+\t\t\tshow_parents(commit, abbrev_commit);\n+\t\tputchar('\\n');\n \t\treturn;\n \t}\n \n@@ -40,6 +52,8 @@ void show_log(struct rev_info *opt, stru\n \tprintf(\"%s%s\",\n \t\topt->commit_format == CMIT_FMT_ONELINE ? \"\" : \"commit \",\n \t\tdiff_unique_abbrev(commit->object.sha1, abbrev_commit));\n+\tif (opt->parents)\n+\t\tshow_parents(commit, abbrev_commit);\n \tif (parent) \n \t\tprintf(\" (from %s)\", diff_unique_abbrev(parent->object.sha1, abbrev_commit));\n \tputchar(opt->commit_format == CMIT_FMT_ONELINE ? ' ' : '\\n');\n"},{"id":"19473","messageId":"46a038f90605031514s18bc15d1r48dc03df6a7f3bd7@mail.gmail.com","threadId":"4036","inReplyTo":"Pine.LNX.4.64.0605030745550.4086@g5.osdl.org","subject":"Re: git-log --parents broken post v1.3.0","fromName":"Martin Langhoff","fromEmail":"martin.langhoff@gmail.com","sentAt":"2006-05-03T22:14:23Z","receivedAt":"2006-05-03T22:14:23Z","isPatch":false,"sender":{"key":"martin.langhoff@gmail.com","avatar":"https://gravatar.com/avatar/1e3f311b6c4c15836501901ca58f8c0b0667246488084ba524d8bc9867e22fd9?d=mp&s=160"},"body":"On 5/4/06, Linus Torvalds <torvalds@osdl.org> wrote:\n> That said, I suspect a git-cvsserver kind of usage is better off using\n> \"git-rev-list --parents HEAD\" instead, which didn't break in the first\n> place.\n\nAfter a good sleep, I woke up thinking exactly the same. Patch coming soon.\n\n\nm\n"},{"id":"19476","messageId":"11466968173651-git-send-email-martin@catalyst.net.nz","threadId":"4036","inReplyTo":"Pine.LNX.4.64.0605030745550.4086@g5.osdl.org","subject":"[PATCH] cvsserver: use git-rev-list instead of git-log","fromName":"Martin Langhoff","fromEmail":"martin@catalyst.net.nz","sentAt":"2006-05-03T22:53:37Z","receivedAt":"2006-05-03T22:53:37Z","isPatch":true,"sender":{"key":"martin@laptop.org","avatar":null},"body":"On 5/4/06, Linus Torvalds <torvalds@osdl.org> wrote:\n> No it wasn't. \"git log --parents\" was definitely supposed to still work.\n>\n> That said, I suspect a git-cvsserver kind of usage is better off using\n> \"git-rev-list --parents HEAD\" instead, which didn't break in the first\n> place.\n\nSigned-off-by: Martin Langhoff <martin@catalyst.net.nz>\n\n\n---\n\n git-cvsserver.perl |    5 +++--\n 1 files changed, 3 insertions(+), 2 deletions(-)\n\na248c9614fdd130229fb5f9565abbd77bd1d0cc9\ndiff --git a/git-cvsserver.perl b/git-cvsserver.perl\nindex 11d153c..ffd9c66 100755\n--- a/git-cvsserver.perl\n+++ b/git-cvsserver.perl\n@@ -2076,14 +2076,15 @@ sub update\n     # TODO: log processing is memory bound\n     # if we can parse into a 2nd file that is in reverse order\n     # we can probably do something really efficient\n-    my @git_log_params = ('--parents', '--topo-order');\n+    my @git_log_params = ('--pretty', '--parents', '--topo-order');\n \n     if (defined $lastcommit) {\n         push @git_log_params, \"$lastcommit..$self->{module}\";\n     } else {\n         push @git_log_params, $self->{module};\n     }\n-    open(GITLOG, '-|', 'git-log', @git_log_params) or die \"Cannot call git-log: $!\";\n+    # git-rev-list is the backend / plumbing version of git-log\n+    open(GITLOG, '-|', 'git-rev-list', @git_log_params) or die \"Cannot call git-rev-list: $!\";\n \n     my @commits;\n \n-- \n1.3.1.g24e1-dirty\n"}]}