{"thread":{"id":"23162","subject":"git log: why are --full-diff and --pickaxe-all separate options?","startedAt":"2010-03-24T15:52:13Z","lastAt":"2010-03-24T17:19:15Z","messageCount":3,"participants":["Jay Soffian","Jeff King","Junio C Hamano"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"137708","messageId":"76718491003240852m2a2c12afjca2c71f6c78b2047@mail.gmail.com","threadId":"23162","inReplyTo":null,"subject":"git log: why are --full-diff and --pickaxe-all separate options?","fromName":"Jay Soffian","fromEmail":"jaysoffian@gmail.com","sentAt":"2010-03-24T15:52:13Z","receivedAt":"2010-03-24T15:52:13Z","isPatch":false,"sender":{"key":"jaysoffian@gmail.com","avatar":"https://avatars.githubusercontent.com/u/155970?v=4"},"body":"I just did this:\n\n$ git log -p -- /some/path\n\nAnd didn't get the full commit. I know about the --pickaxe-all option,\nso I optimistically tried:\n\n$ git log -p --pickaxe-all -- /some/path\n\nWhich of course, does not do what I want. Eventually I found in the\nman page that I can do this:\n\n$ git log -p --full-diff -- /some/path\n\nBut now I wonder why these are separate options. Is there any reason\nthey shouldn't be unified?\n\nRegardless, perhaps --pickaxe-all without -S and --full-diff without\n-p should be errors?\n\nj.\n"},{"id":"137709","messageId":"20100324162005.GA6626@sigill.intra.peff.net","threadId":"23162","inReplyTo":"76718491003240852m2a2c12afjca2c71f6c78b2047@mail.gmail.com","subject":"Re: git log: why are --full-diff and --pickaxe-all separate options?","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2010-03-24T16:20:06Z","receivedAt":"2010-03-24T16:20:06Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Wed, Mar 24, 2010 at 11:52:13AM -0400, Jay Soffian wrote:\n\n> But now I wonder why these are separate options. Is there any reason\n> they shouldn't be unified?\n\nI agree it is confusing, and the answer is \"maybe\". A long and gory\nexplanation can be found here:\n\n  http://article.gmane.org/gmane.comp.version-control.git/34909\n\nRead the later messages in the thread from Junio, too, as he goes back\nand forth a bit. I don't remember if anything happened after that, or\nwhy not.\n\n-Peff\n"},{"id":"137714","messageId":"7vy6hhr624.fsf@alter.siamese.dyndns.org","threadId":"23162","inReplyTo":"76718491003240852m2a2c12afjca2c71f6c78b2047@mail.gmail.com","subject":"Re: git log: why are --full-diff and --pickaxe-all separate options?","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2010-03-24T17:19:15Z","receivedAt":"2010-03-24T17:19:15Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Jay Soffian <jaysoffian@gmail.com> writes:\n\n> But now I wonder why these are separate options. Is there any reason\n> they shouldn't be unified?\n\nThey do entirely different things, and It does not make any sense to\n\"unify\" them.\n\nBut it would be an improvement to make them work better together.\n\n - Erroring out when --pickaxe-all is given without -S would make sense;\n\n - Making --full-diff to imply --pickaxe-all when -S is used would also\n   make sense.\n\n\n[Footnote]\n\n*1* I wrote the following before reading Jeff's response where I explained\nit already; it should say the same thing so if you read the message Jeff\npointed at, you don't have to read this, but I didn't want to waste my\ntyping, so ...\n\n  The log dataflow is:\n\n  - revision walker finds commits one-by-one, but limiting the commits\n    to the ones that touch the paths in the pathspec.\n\n  - each found commit and its ancestor(s) are given to the diff\n    machinery, in order to skip the commit if there is no difference,\n    and also as a side effect to show the diff.\n\n  - diff front-end collects paths in the commit pair, limited by the\n    pathspec given.  however, this can be countermanded with full-diff.\n\n  - diffcore does its thing---compares the collected paths, ignoring\n    changes between pairs that do not satisfy pickaxe filter (if given).\n\n    - when pickaxe is in effect, usually paths that do not satisfy the\n      pickaxe filter is _discarded_ even if they are different between\n      the parent and the child.\n\n    - pickaxe-all however prevents the above.  If even one path\n      satisifies the pickaxe filter, all paths survive.\n\n  - if there are still changes after the above computation, the change\n    is shown in diff form (when -p is given).\n\nFor example, \"log -Shello -- world/\" would:\n\n  a) limit to commits that touch something in world/ directory;\n\n  b) compare commit and its parents but limit this comparison in world/\n     directory.\n\n  c) if some compared file have different number of \"hello\" in parent and\n     child, diff for only those files is shown.\n\n  Giving --full-diff affects step b.  files outside world/ will also be\n  inspected in step c and the ones that changes the number of \"hello\"\n  are shown even if outside world/\n\n  Giving --pickaxe affects step c.\n"}]}