{"thread":{"id":"27995","subject":"Why do some commits not appear in \"git log\"?","startedAt":"2011-08-02T15:38:14Z","lastAt":"2011-08-06T17:43:59Z","messageCount":5,"participants":["Dov Grobgeld","Michael Witten","Junio C Hamano"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"172665","messageId":"CA++fsGEht+UDp9EnFyfvn-uT1DYPcnhpwmPy_H4PTWvsvUceAQ@mail.gmail.com","threadId":"27995","inReplyTo":"CA++fsGGG7pLt4xoeJozGnYEwOrs6NuzStYPKF_L5k49uzFB-4A@mail.gmail.com","subject":"Why do some commits not appear in \"git log\"?","fromName":"Dov Grobgeld","fromEmail":"dov.grobgeld@gmail.com","sentAt":"2011-08-02T15:38:14Z","receivedAt":"2011-08-02T15:38:14Z","isPatch":false,"sender":{"key":"dov.grobgeld@gmail.com","avatar":"https://gravatar.com/avatar/b74b57a9ce04ef5f356927856e125f1e70e7ce38772c5b8793b854b830f0fe6c?d=mp&s=160"},"body":"Hi,\n\nThis is my first post to this list, so I hope this is the appropriate place.\n\nI'm having a problem understanding why \"git log file\" does not show\nsome of the commits where file is changed. Consider the following\ncommit history:\n\n> git log --pretty=oneline --abbrev-commit | head -20\ne86d3b1 Merge remote-tracking branch 'git-svn' into MultiDataPath\n05e7103 Made the system convert DP geometric info to MultiDP info and\nload it at machine start.\n2de7375 Fixed compilation under Linux.\nb520873 Error handling!!\n73110bd New Group manager for multi data processor\ndce3ae9 Merge branch 'MultiDataPath' of\nssh://swteam/home/machine/git/SolarJet into MultiDataPath\n25dff3c Merge branch 'MultiDataPath' of\nssh://swteam/home/machine/git/SolarJet into MultiDataPath\n247f418 Rewrite of the Finger heightmap nozzle selection algorithm for\nbetter load balancing.\n026fec8 Stop all the jobs on async stop or on exception Choice nozzles\nusing max nozzles number\n84a60b7 avoid CarouselSimulationParams\nc40df74 git-svn-id: svn://swteam/SolarJet/trunk@4684\nd8e1dcc2-e5e0-4eb0-83da-8cedbf775ddd\n:\n\nNow let's limit this to the history of a single file:\n\n> git log --pretty=oneline --abbrev-commit Apps/SolarJet/Project/qt/SysScripts/init.py | head\n84a60b7 avoid CarouselSimulationParams\nc40df74 git-svn-id: svn://swteam/SolarJet/trunk@4684\nd8e1dcc2-e5e0-4eb0-83da-8cedbf775ddd\n:\n\nAs can be see above there were lots of commits omitted now. E.g.\n05e7103 (the second commit above). But if I list the changes in\n05e7103 I then get:\n\n> git show 05e7103 --name-only | grep init.py\nApps/SolarJet/Project/qt/SysScripts/init.py\n\nRunning without --name-only show that there is a substantial change in init.py\n\nSo why does this commit not show up in in \"git log file\"?\n\nOne interesting observation is that the only commits that appear in\nthe \"git log file\" command are the commits that were imported from\nsvn. All other commits are filtered out.\n\nSo is this a bug, or am I doing something wrong?\n\nThanks in advance!\nDov\n"},{"id":"172667","messageId":"CAMOZ1Bt+Z4XDPNBQyUeVk30aEOuXFAuh8jhdhFke-CDZt2pEDg@mail.gmail.com","threadId":"27995","inReplyTo":"CA++fsGEht+UDp9EnFyfvn-uT1DYPcnhpwmPy_H4PTWvsvUceAQ@mail.gmail.com","subject":"Re: Why do some commits not appear in \"git log\"?","fromName":"Michael Witten","fromEmail":"mfwitten@gmail.com","sentAt":"2011-08-02T15:56:29Z","receivedAt":"2011-08-02T15:56:29Z","isPatch":false,"sender":{"key":"mfwitten@gmail.com","avatar":"https://avatars.githubusercontent.com/u/597101?v=4"},"body":"On Tue, Aug 2, 2011 at 15:38, Dov Grobgeld <dov.grobgeld@gmail.com> wrote:\n> git log --pretty=oneline --abbrev-commit | head -20\n\nTry `--full-history' maybe? Also, rather than `head -20', you can\nlimit the output directly with `-20':\n\n  git log --pretty=oneline --abbrev-commit --full-history -20\n\nIt's hard to know what's going on in your particular example; perhaps\ngive us the output of `git log' when using the `--graph' option.\n"},{"id":"172731","messageId":"CA++fsGGhzVkXTPLui+DfTFcjve7w80Kud4RxC0p=5AenOcBSDw@mail.gmail.com","threadId":"27995","inReplyTo":"CAMOZ1Bt+Z4XDPNBQyUeVk30aEOuXFAuh8jhdhFke-CDZt2pEDg@mail.gmail.com","subject":"Re: Why do some commits not appear in \"git log\"?","fromName":"Dov Grobgeld","fromEmail":"dov.grobgeld@gmail.com","sentAt":"2011-08-03T05:47:46Z","receivedAt":"2011-08-03T05:47:46Z","isPatch":false,"sender":{"key":"dov.grobgeld@gmail.com","avatar":"https://gravatar.com/avatar/b74b57a9ce04ef5f356927856e125f1e70e7ce38772c5b8793b854b830f0fe6c?d=mp&s=160"},"body":"--full-history indeed made the missing commits show up! So why was the\ncommit pruned? It contains some substantial source changes as may be\nseen by the following commands:\n\n1. Commit history for entire project:\n\n> git log --full-history --pretty=oneline  -5 --abbrev-commit   | ~/scripts/crop\ne86d3b1 Merge remote-tracking ...\n05e7103 Made the system conver...\n2de7375 Fixed compilation unde...\nb520873 Error handling!!\n73110bd New Group manager for ...\n\n2. Diff of a single file between two commits show that 05e7103\ncontains a substantial change for the file.\n\n> git diff 05e7103 2de7375 Apps/SolarJet/Project/qt/SysScripts/init.py | wc\n    105     389    5336\n\n3. Full history of the file includes 05e7103\n\n> git log --full-history --pretty=oneline  -5 --abbrev-commit Apps/SolarJet/Project/qt/SysScripts/init.py  | ~/scripts/crop\n05e7103 Made the system conver...\n84a60b7 avoid CarouselSimulati...\nc40df74 git-svn-id: svn://swte...\n0bdf4b6 Group manager for mult...\n0536a0d git-svn-id: svn://swte...\n\n4. But the default \"pruned\" history of the file does not contain 05e7103\n\n> git log  --pretty=oneline  -5 --abbrev-commit Apps/SolarJet/Project/qt/SysScripts/init.py  | ~/scripts/crop\n84a60b7 avoid CarouselSimulati...\nc40df74 git-svn-id: svn://swte...\n0536a0d git-svn-id: svn://swte...\na720b61 Add full line wafer pr...\n08b366b git-svn-id: svn://swte...\n\n5. Here is the project graph:\n\n> git log --graph --abbrev-commit --pretty=oneline -20 | ~/scripts/crop\n*   e86d3b1 Merge remote-track...\n|\\\n| * 026fec8 Stop all the jobs ...\n| * 84a60b7 avoid CarouselSimu...\n| * c40df74 git-svn-id: svn://...\n| * fee6808 git-svn-id: svn://...\n| * 047e697 Automatic Theta Ca...\n* | 05e7103 Made the system co...\n* | 2de7375 Fixed compilation ...\n* | b520873 Error handling!!\n* | 73110bd New Group manager ...\n* |   dce3ae9 Merge branch 'Mu...\n|\\ \\\n| * \\   25dff3c Merge branch '...\n\nFinally, a few more questions. Is it possible to make gitk use the\n--full-history option when running 'gitk file'? Is there any\nconfiguration flag that always turns on \"full history\"?\n\nThanks!\nDov\n\nOn Tue, Aug 2, 2011 at 18:56, Michael Witten <mfwitten@gmail.com> wrote:\n> On Tue, Aug 2, 2011 at 15:38, Dov Grobgeld <dov.grobgeld@gmail.com> wrote:\n>> git log --pretty=oneline --abbrev-commit | head -20\n>\n> Try `--full-history' maybe? Also, rather than `head -20', you can\n> limit the output directly with `-20':\n>\n>  git log --pretty=oneline --abbrev-commit --full-history -20\n>\n> It's hard to know what's going on in your particular example; perhaps\n> give us the output of `git log' when using the `--graph' option.\n>\n"},{"id":"172793","messageId":"7vipqeb9wg.fsf@alter.siamese.dyndns.org","threadId":"27995","inReplyTo":"CA++fsGGhzVkXTPLui+DfTFcjve7w80Kud4RxC0p=5AenOcBSDw@mail.gmail.com","subject":"Re: Why do some commits not appear in \"git log\"?","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2011-08-03T18:57:35Z","receivedAt":"2011-08-03T18:57:35Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Dov Grobgeld <dov.grobgeld@gmail.com> writes:\n\n> --full-history indeed made the missing commits show up! So why was the\n> commit pruned? It contains some substantial source changes...\n\nI suspect that these \"substantial changes\" did not make any contribution\nto the end result. Read\n\nhttp://thread.gmane.org/gmane.comp.version-control.git/89400/focus=90659\n\nThese days, the --post-simplify option implemented in that discussion\nthread is called --simplify-merges or something, I think.\n"},{"id":"173065","messageId":"CA++fsGE2JfnHc2JCsJg21FLXGfMWnzCjpUdwk+dcK72e5P18eg@mail.gmail.com","threadId":"27995","inReplyTo":"CA++fsGG1xHm2ubXB-EL56L6xSau9AQX=o8fvmZb_7zNFkqdW2w@mail.gmail.com","subject":"Re: Why do some commits not appear in \"git log\"?","fromName":"Dov Grobgeld","fromEmail":"dov.grobgeld@gmail.com","sentAt":"2011-08-06T17:43:59Z","receivedAt":"2011-08-06T17:43:59Z","isPatch":false,"sender":{"key":"dov.grobgeld@gmail.com","avatar":"https://gravatar.com/avatar/b74b57a9ce04ef5f356927856e125f1e70e7ce38772c5b8793b854b830f0fe6c?d=mp&s=160"},"body":"Ok, now I grok it. Indeed these \"substantial changes\" by mistake\nundid another large change. So the net result was zero, which git was\nsmart enough to figure out, and therefore these two changes +D and -D\ncancelled one another and none of them were shown.\n\nThanks a lot!\nDov\n\n\nOn Wed, Aug 3, 2011 at 21:57, Junio C Hamano <gitster@pobox.com> wrote:\n>\n> Dov Grobgeld <dov.grobgeld@gmail.com> writes:\n>\n> > --full-history indeed made the missing commits show up! So why was the\n> > commit pruned? It contains some substantial source changes...\n>\n> I suspect that these \"substantial changes\" did not make any contribution\n> to the end result. Read\n>\n> http://thread.gmane.org/gmane.comp.version-control.git/89400/focus=90659\n>\n> These days, the --post-simplify option implemented in that discussion\n> thread is called --simplify-merges or something, I think.\n"}]}