git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Where did Documentation/perf_counter disappear from linux-2.6-tip.git ?

From
TCTomas Carnecky <tomas.carnecky@gmail.com>
Date
Dec 22, 2009, 12:23 UTC
Message-ID
<4B30BA3D.2080305@gmail.com>
In-Reply-To
<6b08a1ab.3349a908.4b30b80f.ab91f@o2.pl>
  On 12/22/09 1:14 PM, Daniel wrote:
Show 42 quoted lines
> 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
Previous: Tomas Carnecky
Message 4 of 4 in “Where did Documentation/perf_counter disappear from linux-2.6-tip.git ?”
  1. Tomas CarneckyDec 22, 2009
  2. Junio C HamanoDec 22, 2009
  3. Tomas CarneckyDec 22, 2009
  4. Tomas CarneckyDec 22, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.