* Where did Documentation/perf_counter disappear from linux-2.6-tip.git ?
@ 2009-12-22 10:04 Tomas Carnecky
[not found] ` <6b08a1ab.3349a908.4b30b80f.ab91f@o2.pl>
2009-12-22 18:08 ` Junio C Hamano
0 siblings, 2 replies; 4+ messages in thread
From: Tomas Carnecky @ 2009-12-22 10:04 UTC (permalink / raw)
To: Git Mailing List
$ git --version
git version 1.6.6.rc4
# Documentation/perf_counter is missing from the master branch, so first
let's find
# out what the last commit was that touched that subdirectory:
$ git log --all -1 -- Documentation/perf_counter
commit 436224a6d8bb3e29fe0cc18122f8d1f593da67b8
Author: Peter Zijlstra <a.p.zijlstra@chello.nl>
Date: Tue Jun 2 21:02:36 2009 +0200
...
M Documentation/perf_counter/builtin-report.c
# Great, let's look in which branch that commit is
$ git branch --contains 436224a6d8bb3e29fe0cc18122f8d1f593da67b8
* master
# So, let's look at the log of master and limit it to that subdirectory:
$ git log master -- Documentation/perf_counter
$
# Damn, that doesn't make any sense. In commit 43622 there were files in
that subdirectory, in master they have gone missing and yet log doesn't
show any commit touching that subdirectory?
# Let's try something different:
$ git log --diff-filter=D --name-status --all -- Documentation/perf_counter
...
# Ah, now we're getting somewhere, but still no sight of a commit which
removed for example Documentation/perf_counter/.gitignore
# I'm sure I'm probably just missing a tiny little switch for git-log. I
also tried other combination of name-status, diff-filter etc, but soon
after gave up.
tom
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Where did Documentation/perf_counter disappear from linux-2.6-tip.git ?
[not found] ` <6b08a1ab.3349a908.4b30b80f.ab91f@o2.pl>
@ 2009-12-22 12:23 ` Tomas Carnecky
0 siblings, 0 replies; 4+ messages in thread
From: Tomas Carnecky @ 2009-12-22 12:23 UTC (permalink / raw)
To: Daniel, Git Mailing List
On 12/22/09 1:14 PM, Daniel wrote:
> Dnia 22 grudnia 2009 11:04 Tomas Carnecky<tomas.carnecky@gmail.com> napisał(a):
>
>> $ git --version
>> git version 1.6.6.rc4
>>
>> # Documentation/perf_counter is missing from the master branch, so first
>> let's find
>> # out what the last commit was that touched that subdirectory:
>> $ git log --all -1 -- Documentation/perf_counter
>> commit 436224a6d8bb3e29fe0cc18122f8d1f593da67b8
>> Author: Peter Zijlstra<a.p.zijlstra@chello.nl>
>> Date: Tue Jun 2 21:02:36 2009 +0200
>> ...
>> M Documentation/perf_counter/builtin-report.c
>>
>> # Great, let's look in which branch that commit is
>> $ git branch --contains 436224a6d8bb3e29fe0cc18122f8d1f593da67b8
>> * master
>>
>> # So, let's look at the log of master and limit it to that subdirectory:
>> $ git log master -- Documentation/perf_counter
>> $
>>
>> # Damn, that doesn't make any sense. In commit 43622 there were files in
>> that subdirectory, in master they have gone missing and yet log doesn't
>> show any commit touching that subdirectory?
>> # Let's try something different:
>> $ git log --diff-filter=D --name-status --all -- Documentation/perf_counter
>> ...
>>
>> # Ah, now we're getting somewhere, but still no sight of a commit which
>> removed for example Documentation/perf_counter/.gitignore
>> # I'm sure I'm probably just missing a tiny little switch for git-log. I
>> also tried other combination of name-status, diff-filter etc, but soon
>> after gave up.
>>
>> tom
>> --
> Try
>
> $ git log --follow -- Documentation/perf_counter
>
Ah, that did the trick:
86470930, perf_counter tools: Move from Documentation/perf_counter/ to
tools/perf/
However, that still doesn't answer my question why a simple git log
doesn't show the commits. There are commits which touch that
subdirectory, so why is a list of 'commits which touch that
subdirectory' empty? Or am I misunderstanding what 'git log -- dir/' is
supposed to do? I thought it did exactly that.
tom
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Where did Documentation/perf_counter disappear from linux-2.6-tip.git ?
2009-12-22 10:04 Where did Documentation/perf_counter disappear from linux-2.6-tip.git ? Tomas Carnecky
[not found] ` <6b08a1ab.3349a908.4b30b80f.ab91f@o2.pl>
@ 2009-12-22 18:08 ` Junio C Hamano
2009-12-22 18:18 ` Tomas Carnecky
1 sibling, 1 reply; 4+ messages in thread
From: Junio C Hamano @ 2009-12-22 18:08 UTC (permalink / raw)
To: Tomas Carnecky; +Cc: Git Mailing List
Tomas Carnecky <tomas.carnecky@gmail.com> writes:
> $ git --version
> git version 1.6.6.rc4
>
> # Documentation/perf_counter is missing from the master branch, so
> first let's find
> # out what the last commit was that touched that subdirectory:
> $ git log --all -1 -- Documentation/perf_counter
> commit 436224a6d8bb3e29fe0cc18122f8d1f593da67b8
> Author: Peter Zijlstra <a.p.zijlstra@chello.nl>
> Date: Tue Jun 2 21:02:36 2009 +0200
> ...
> M Documentation/perf_counter/builtin-report.c
>
> # Great, let's look in which branch that commit is
> $ git branch --contains 436224a6d8bb3e29fe0cc18122f8d1f593da67b8
> * master
>
> # So, let's look at the log of master and limit it to that subdirectory:
> $ git log master -- Documentation/perf_counter
> $
Add --full-history so that you would get _all_ possible explanation of the
history, perhaps?
In a history with this shape:
---A---B---C---D---E
\ /
F---G
suppose that
- commit F introduces a path;
- commit G removes the path;
- no other commit has the path in question.
Without --full-history, "log E -- path" is asked to give "_one_ possible
way to explain the current state of path in E" (iow, "why there is nothing
there right now at E?").
Two explanations are possible even in this vastly simplified toy history.
- It didn't exist in A, and none of the subsequent commits B, C, D that
lead to E did anything to change that.
- F added it, but G changed mind and removed it.
When "log" encounters a merge commit while traversing the history
backwards (in this case D) with paths limiter, if there is a commit among
its parent whose tree matches its tree with respect to the paths, side
branches leading to all the other parents are culled and only that one
history is followed to explain the history. In this case, neither C or D
has the path, so their trees with respect to the paths limiter match, and
git doesn't follow the side branch that has F and G without
--full-history.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Where did Documentation/perf_counter disappear from linux-2.6-tip.git ?
2009-12-22 18:08 ` Junio C Hamano
@ 2009-12-22 18:18 ` Tomas Carnecky
0 siblings, 0 replies; 4+ messages in thread
From: Tomas Carnecky @ 2009-12-22 18:18 UTC (permalink / raw)
To: Junio C Hamano; +Cc: Git Mailing List
On 12/22/09 7:08 PM, Junio C Hamano wrote:
> Tomas Carnecky<tomas.carnecky@gmail.com> writes:
>
>> $ git --version
>> git version 1.6.6.rc4
>>
>> # Documentation/perf_counter is missing from the master branch, so
>> first let's find
>> # out what the last commit was that touched that subdirectory:
>> $ git log --all -1 -- Documentation/perf_counter
>> commit 436224a6d8bb3e29fe0cc18122f8d1f593da67b8
>> Author: Peter Zijlstra<a.p.zijlstra@chello.nl>
>> Date: Tue Jun 2 21:02:36 2009 +0200
>> ...
>> M Documentation/perf_counter/builtin-report.c
>>
>> # Great, let's look in which branch that commit is
>> $ git branch --contains 436224a6d8bb3e29fe0cc18122f8d1f593da67b8
>> * master
>>
>> # So, let's look at the log of master and limit it to that subdirectory:
>> $ git log master -- Documentation/perf_counter
>> $
>
> Add --full-history so that you would get _all_ possible explanation of the
> history, perhaps?
>
> In a history with this shape:
>
> ---A---B---C---D---E
> \ /
> F---G
>
> suppose that
>
> - commit F introduces a path;
> - commit G removes the path;
> - no other commit has the path in question.
>
> Without --full-history, "log E -- path" is asked to give "_one_ possible
> way to explain the current state of path in E" (iow, "why there is nothing
> there right now at E?").
>
> Two explanations are possible even in this vastly simplified toy history.
>
> - It didn't exist in A, and none of the subsequent commits B, C, D that
> lead to E did anything to change that.
>
> - F added it, but G changed mind and removed it.
>
> When "log" encounters a merge commit while traversing the history
> backwards (in this case D) with paths limiter, if there is a commit among
> its parent whose tree matches its tree with respect to the paths, side
> branches leading to all the other parents are culled and only that one
> history is followed to explain the history. In this case, neither C or D
> has the path, so their trees with respect to the paths limiter match, and
> git doesn't follow the side branch that has F and G without
> --full-history.
I've never used nor seen --full-history before, but it did help in this
case, git log now correctly sees the commits touching that subdirectory.
Thanks for the explanation.
tom
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2009-12-22 18:19 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-12-22 10:04 Where did Documentation/perf_counter disappear from linux-2.6-tip.git ? Tomas Carnecky
[not found] ` <6b08a1ab.3349a908.4b30b80f.ab91f@o2.pl>
2009-12-22 12:23 ` Tomas Carnecky
2009-12-22 18:08 ` Junio C Hamano
2009-12-22 18:18 ` Tomas Carnecky
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).