{"thread":{"id":"25194","subject":"git log broken?","startedAt":"2010-09-22T07:48:08Z","lastAt":"2010-09-22T08:15:23Z","messageCount":3,"participants":["Torgny Nyblom","Matthieu Moy","Michael J Gruber"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"151280","messageId":"20100922094808.07be1757@explosive.nyblom.org","threadId":"25194","inReplyTo":null,"subject":"git log broken?","fromName":"Torgny Nyblom","fromEmail":"kde@nyblom.org","sentAt":"2010-09-22T07:48:08Z","receivedAt":"2010-09-22T07:48:08Z","isPatch":false,"sender":{"key":"kde@nyblom.org","avatar":null},"body":"Hi,\n\n(Resend as it got no replies and I want to be sure that is wasn't lost\nin the noise)\n\nI'm working on converting the KDE subversion repository to git, as\na part of this I'm trying to validate that the conversion hasn't missed\nany revisions or merges but when I run \"git log\" with different options\nI get (in my mind) strange results.\n\ngit log <file> -> produces a list of commits\ngit log --follow <file> -> produces an empty list (no output)\ngit log --name-status <file> -> no info about file\n\nIt seems like this occurs when there is a merge only commit as the\nfirst commit in the list returned by the \"bare\" log command.\n\nIs there any legit situation where this might happen?\nIf so what?\nIf not is this a bug in my convert program or in git?\n\n/Regards\nTorgny\n"},{"id":"151281","messageId":"vpqk4mecie8.fsf@bauges.imag.fr","threadId":"25194","inReplyTo":"20100922094808.07be1757@explosive.nyblom.org","subject":"Re: git log broken?","fromName":"Matthieu Moy","fromEmail":"matthieu.moy@grenoble-inp.fr","sentAt":"2010-09-22T08:05:51Z","receivedAt":"2010-09-22T08:05:51Z","isPatch":false,"sender":{"key":"matthieu.moy@grenoble-inp.fr","avatar":"https://gravatar.com/avatar/72c8a2705971a25dfaff23cece15130d405685845d911aedd5667ace277f3fc5?d=mp&s=160"},"body":"Torgny Nyblom <kde@nyblom.org> writes:\n\n> It seems like this occurs when there is a merge only commit as the\n> first commit in the list returned by the \"bare\" log command.\n\n\"git log --follow\" is not the best part of Git :-( (especially\ncompared to \"git blame\", which is excellent at following the history\nof lines of code).\n\nThere were some discussion already on --follow having bad behavior on\nmerge commit, like:\n\n  http://thread.gmane.org/gmane.comp.version-control.git/151502/focus=151664\n\nBut no one is really investing energy to make \"git log --follow\" what\nit should really be, AFAIK.\n\n> If not is this a bug in my convert program or in git?\n\nYour converter cannot have \"mis-imported\" renames, since renames do\nnot appear in the repository with Git.\n\n-- \nMatthieu Moy\nhttp://www-verimag.imag.fr/~moy/\n"},{"id":"151282","messageId":"4C99BB1B.90101@drmicha.warpmail.net","threadId":"25194","inReplyTo":"20100922094808.07be1757@explosive.nyblom.org","subject":"Re: git log broken?","fromName":"Michael J Gruber","fromEmail":"git@drmicha.warpmail.net","sentAt":"2010-09-22T08:15:23Z","receivedAt":"2010-09-22T08:15:23Z","isPatch":false,"sender":{"key":"git@grubix.eu","avatar":"https://avatars.githubusercontent.com/u/233215?v=4"},"body":"Torgny Nyblom venit, vidit, dixit 22.09.2010 09:48:\n> Hi,\n> \n> (Resend as it got no replies and I want to be sure that is wasn't lost\n> in the noise)\n> \n> I'm working on converting the KDE subversion repository to git, as\n> a part of this I'm trying to validate that the conversion hasn't missed\n> any revisions or merges but when I run \"git log\" with different options\n> I get (in my mind) strange results.\n> \n> git log <file> -> produces a list of commits\n> git log --follow <file> -> produces an empty list (no output)\n> git log --name-status <file> -> no info about file\n> \n> It seems like this occurs when there is a merge only commit as the\n> first commit in the list returned by the \"bare\" log command.\n> \n> Is there any legit situation where this might happen?\n> If so what?\n> If not is this a bug in my convert program or in git?\n\nCan you share this repo or (even better) create a minimal test which\nreproduces this?\n\nTrying with a recent git and \"some\" merge commit I don't see that behaviour.\n\nNote that, e.g., subversion needs to create commits for each tag which\ngit-svn turns into \"no-op\" commits (introducing no diff). They can\ndisappear easily if your conversion process involves rebasing or\nfilter-branching. (I'd recommend converting those commits into annotated\ntags.)\n\nMichael\n"}]}