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

Re: git history and file moves

From
Jakub Narebski <jnareb@gmail.com>
Date
Oct 24, 2008, 22:13 UTC
Message-ID
<m3vdvhhc5s.fsf@localhost.localdomain>
In-Reply-To
<4911F71203A09E4D9981D27F9D8308580AA7FFFB@orsmsx503.amr.corp.intel.com>
"Moore, Robert" <robert.moore@intel.com> writes:
Show 8 quoted lines
> 
> Thanks,
> Bob
> 
> >-----Original Message-----
>Michael J Gruber wrote:
>>Alex Riesen venit, vidit, dixit 10/22/08 13:19:
>>> 2008/10/22 Lin Ming <ming.m.lin@intel.com>:
Show 7 quoted lines
>>>> I'm looking for a way to move files to a new directory and have the
>>>> full history follow the file automatically. Is this possible?
>>>>
>>>> I know about --follow, but I want the history to just follow the file
>>>> transparently. ...
>>>
>>> Of all Git tools, what does not do this "transparently" or "automatically"?
[...]
Show 19 quoted lines
>>>> Also, we have a git web interface and we want the full
>>>> history for the moved files to be available.
>>>
>>> It is available. Whether it is shown is another question. git-web can
>>> be improved (or just configured?)
>>
>> By default, gitweb uses "-M" for diff. You can specify all options (-C,
>> -CC, -B) using  "@diff_opts" in the config file for gitweb.cgi - if that
>> is what you are using. Is it?
>>
>> Anyways, using default configs for git log and gitweb.cgi both of them
>> show the full history (renames, history before and after) for me here,
>> using current git (1.6.0.3.514.g2f91b). What is your setup?
>
> Here's what we have:
> 
> /var/www/cgi-bin/gitweb.acpica/gitweb.conf
> 
> Containts this : GITWEB_CSS = "/icons/gitweb.css";
This fragment has nothing to do with rename (file movement) detection.
> 
> What should we add to automatically get all file history?

While the 'commitdiff' view would, in default gitweb configuration, contain information about file renames, currently 'history' view does not support '--follow' option to git-log. It wouldn't be too hard to add it, but it just wasn't done (well, add to this the fact that --follow works only for simple cases).

-- 
Jakub Narebski
Poland
ShadeHawk on #git
Previous: Moore, Robert
Message 7 of 7 in “git history and file moves”
  1. Lin MingOct 22, 2008
  2. Alex RiesenOct 22, 2008
  3. Michael J GruberOct 22, 2008
  4. Moore, RobertOct 24, 2008
  5. Alex RiesenOct 24, 2008
  6. Moore, RobertOct 24, 2008
  7. Jakub NarebskiOct 24, 2008

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.