{"thread":{"id":"22004","subject":"Where did Documentation/perf_counter disappear from linux-2.6-tip.git ?","startedAt":"2009-12-22T10:04:21Z","lastAt":"2009-12-22T18:18:40Z","messageCount":4,"participants":["Tomas Carnecky","Junio C Hamano"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"130235","messageId":"4B3099A5.6040808@gmail.com","threadId":"22004","inReplyTo":null,"subject":"Where did Documentation/perf_counter disappear from linux-2.6-tip.git ?","fromName":"Tomas Carnecky","fromEmail":"tomas.carnecky@gmail.com","sentAt":"2009-12-22T10:04:21Z","receivedAt":"2009-12-22T10:04:21Z","isPatch":false,"sender":{"key":"tomas.carnecky@gmail.com","avatar":null},"body":"  $ git --version\ngit version 1.6.6.rc4\n\n# Documentation/perf_counter is missing from the master branch, so first \nlet's find\n# out what the last commit was that touched that subdirectory:\n$ git log --all -1 -- Documentation/perf_counter\ncommit 436224a6d8bb3e29fe0cc18122f8d1f593da67b8\nAuthor: Peter Zijlstra <a.p.zijlstra@chello.nl>\nDate:   Tue Jun 2 21:02:36 2009 +0200\n...\nM       Documentation/perf_counter/builtin-report.c\n\n# Great, let's look in which branch that commit is\n$ git branch --contains 436224a6d8bb3e29fe0cc18122f8d1f593da67b8\n* master\n\n# So, let's look at the log of master and limit it to that subdirectory:\n$ git log master -- Documentation/perf_counter\n$\n\n# Damn, that doesn't make any sense. In commit 43622 there were files in \nthat subdirectory, in master they have gone missing and yet log doesn't \nshow any commit touching that subdirectory?\n# Let's try something different:\n$ git log --diff-filter=D --name-status --all -- Documentation/perf_counter\n...\n\n# Ah, now we're getting somewhere, but still no sight of a commit which \nremoved for example Documentation/perf_counter/.gitignore\n# I'm sure I'm probably just missing a tiny little switch for git-log. I \nalso tried other combination of name-status, diff-filter etc, but soon \nafter gave up.\n\ntom\n"},{"id":"130238","messageId":"4B30BA3D.2080305@gmail.com","threadId":"22004","inReplyTo":"6b08a1ab.3349a908.4b30b80f.ab91f@o2.pl","subject":"Re: Where did Documentation/perf_counter disappear from linux-2.6-tip.git ?","fromName":"Tomas Carnecky","fromEmail":"tomas.carnecky@gmail.com","sentAt":"2009-12-22T12:23:25Z","receivedAt":"2009-12-22T12:23:25Z","isPatch":false,"sender":{"key":"tomas.carnecky@gmail.com","avatar":null},"body":"  On 12/22/09 1:14 PM, Daniel wrote:\n> Dnia 22 grudnia 2009 11:04 \tTomas Carnecky<tomas.carnecky@gmail.com>  napisał(a):\n>\n>>    $ git --version\n>> git version 1.6.6.rc4\n>>\n>> # Documentation/perf_counter is missing from the master branch, so first\n>> let's find\n>> # out what the last commit was that touched that subdirectory:\n>> $ git log --all -1 -- Documentation/perf_counter\n>> commit 436224a6d8bb3e29fe0cc18122f8d1f593da67b8\n>> Author: Peter Zijlstra<a.p.zijlstra@chello.nl>\n>> Date:   Tue Jun 2 21:02:36 2009 +0200\n>> ...\n>> M       Documentation/perf_counter/builtin-report.c\n>>\n>> # Great, let's look in which branch that commit is\n>> $ git branch --contains 436224a6d8bb3e29fe0cc18122f8d1f593da67b8\n>> * master\n>>\n>> # So, let's look at the log of master and limit it to that subdirectory:\n>> $ git log master -- Documentation/perf_counter\n>> $\n>>\n>> # Damn, that doesn't make any sense. In commit 43622 there were files in\n>> that subdirectory, in master they have gone missing and yet log doesn't\n>> show any commit touching that subdirectory?\n>> # Let's try something different:\n>> $ git log --diff-filter=D --name-status --all -- Documentation/perf_counter\n>> ...\n>>\n>> # Ah, now we're getting somewhere, but still no sight of a commit which\n>> removed for example Documentation/perf_counter/.gitignore\n>> # I'm sure I'm probably just missing a tiny little switch for git-log. I\n>> also tried other combination of name-status, diff-filter etc, but soon\n>> after gave up.\n>>\n>> tom\n>> --\n> Try\n>\n> $ git log --follow -- Documentation/perf_counter\n>\nAh, that did the trick:\n86470930, perf_counter tools: Move from Documentation/perf_counter/ to \ntools/perf/\n\nHowever, that still doesn't answer my question why a simple git log \ndoesn't show the commits. There are commits which touch that \nsubdirectory, so why is a list of 'commits which touch that \nsubdirectory' empty? Or am I misunderstanding what 'git log -- dir/' is \nsupposed to do? I thought it did exactly that.\n\ntom\n"},{"id":"130247","messageId":"7vmy1a3mrh.fsf@alter.siamese.dyndns.org","threadId":"22004","inReplyTo":"4B3099A5.6040808@gmail.com","subject":"Re: Where did Documentation/perf_counter disappear from linux-2.6-tip.git ?","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2009-12-22T18:08:02Z","receivedAt":"2009-12-22T18:08:02Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Tomas Carnecky <tomas.carnecky@gmail.com> writes:\n\n>  $ git --version\n> git version 1.6.6.rc4\n>\n> # Documentation/perf_counter is missing from the master branch, so\n> first let's find\n> # out what the last commit was that touched that subdirectory:\n> $ git log --all -1 -- Documentation/perf_counter\n> commit 436224a6d8bb3e29fe0cc18122f8d1f593da67b8\n> Author: Peter Zijlstra <a.p.zijlstra@chello.nl>\n> Date:   Tue Jun 2 21:02:36 2009 +0200\n> ...\n> M       Documentation/perf_counter/builtin-report.c\n>\n> # Great, let's look in which branch that commit is\n> $ git branch --contains 436224a6d8bb3e29fe0cc18122f8d1f593da67b8\n> * master\n>\n> # So, let's look at the log of master and limit it to that subdirectory:\n> $ git log master -- Documentation/perf_counter\n> $\n\nAdd --full-history so that you would get _all_ possible explanation of the\nhistory, perhaps?\n\nIn a history with this shape:\n\n    ---A---B---C---D---E\n            \\     /\n             F---G\n\nsuppose that\n\n - commit F introduces a path;\n - commit G removes the path;\n - no other commit has the path in question.\n\nWithout --full-history, \"log E -- path\" is asked to give \"_one_ possible\nway to explain the current state of path in E\" (iow, \"why there is nothing\nthere right now at E?\").\n\nTwo explanations are possible even in this vastly simplified toy history.\n\n - It didn't exist in A, and none of the subsequent commits B, C, D that\n   lead to E did anything to change that.\n\n - F added it, but G changed mind and removed it.\n\nWhen \"log\" encounters a merge commit while traversing the history\nbackwards (in this case D) with paths limiter, if there is a commit among\nits parent whose tree matches its tree with respect to the paths, side\nbranches leading to all the other parents are culled and only that one\nhistory is followed to explain the history.  In this case, neither C or D\nhas the path, so their trees with respect to the paths limiter match, and\ngit doesn't follow the side branch that has F and G without\n--full-history.\n"},{"id":"130249","messageId":"4B310D80.4010502@gmail.com","threadId":"22004","inReplyTo":"7vmy1a3mrh.fsf@alter.siamese.dyndns.org","subject":"Re: Where did Documentation/perf_counter disappear from linux-2.6-tip.git ?","fromName":"Tomas Carnecky","fromEmail":"tomas.carnecky@gmail.com","sentAt":"2009-12-22T18:18:40Z","receivedAt":"2009-12-22T18:18:40Z","isPatch":false,"sender":{"key":"tomas.carnecky@gmail.com","avatar":null},"body":"On 12/22/09 7:08 PM, Junio C Hamano wrote:\n> Tomas Carnecky<tomas.carnecky@gmail.com>  writes:\n>\n>>   $ git --version\n>> git version 1.6.6.rc4\n>>\n>> # Documentation/perf_counter is missing from the master branch, so\n>> first let's find\n>> # out what the last commit was that touched that subdirectory:\n>> $ git log --all -1 -- Documentation/perf_counter\n>> commit 436224a6d8bb3e29fe0cc18122f8d1f593da67b8\n>> Author: Peter Zijlstra<a.p.zijlstra@chello.nl>\n>> Date:   Tue Jun 2 21:02:36 2009 +0200\n>> ...\n>> M       Documentation/perf_counter/builtin-report.c\n>>\n>> # Great, let's look in which branch that commit is\n>> $ git branch --contains 436224a6d8bb3e29fe0cc18122f8d1f593da67b8\n>> * master\n>>\n>> # So, let's look at the log of master and limit it to that subdirectory:\n>> $ git log master -- Documentation/perf_counter\n>> $\n>\n> Add --full-history so that you would get _all_ possible explanation of the\n> history, perhaps?\n>\n> In a history with this shape:\n>\n>      ---A---B---C---D---E\n>              \\     /\n>               F---G\n>\n> suppose that\n>\n>   - commit F introduces a path;\n>   - commit G removes the path;\n>   - no other commit has the path in question.\n>\n> Without --full-history, \"log E -- path\" is asked to give \"_one_ possible\n> way to explain the current state of path in E\" (iow, \"why there is nothing\n> there right now at E?\").\n>\n> Two explanations are possible even in this vastly simplified toy history.\n>\n>   - It didn't exist in A, and none of the subsequent commits B, C, D that\n>     lead to E did anything to change that.\n>\n>   - F added it, but G changed mind and removed it.\n>\n> When \"log\" encounters a merge commit while traversing the history\n> backwards (in this case D) with paths limiter, if there is a commit among\n> its parent whose tree matches its tree with respect to the paths, side\n> branches leading to all the other parents are culled and only that one\n> history is followed to explain the history.  In this case, neither C or D\n> has the path, so their trees with respect to the paths limiter match, and\n> git doesn't follow the side branch that has F and G without\n> --full-history.\n\nI've never used nor seen --full-history before, but it did help in this \ncase, git log now correctly sees the commits touching that subdirectory. \nThanks for the explanation.\n\ntom\n"}]}