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

Re: Adding Git to Better SCM Initiative : Comparison

From
Jakub Narebski <jnareb@gmail.com>
Date
Dec 10, 2007, 17:21 UTC
Message-ID
<m3zlwisbxx.fsf@roke.D-201>
In-Reply-To
<20071210165052.GA22327@pe.Belkin>
Chris Shoemaker <c.shoemaker@cox.net> writes:
Show 18 quoted lines
> On Mon, Dec 10, 2007 at 03:49:39PM +0100, Florian Weimer wrote:
> > * Jakub Narebski:
> > 
> > > +                <s id="git">
> > > +                    Yes (or no depending on interpretation). Git
> > 
> > This should be "No." (same for copies below).
> 
> ISTM that people are stuck using less than helpful criteria for
> judging whether renames are supported.  Namely, in effect, they ask:
> "Does the user get to do extra work in order to get rename-detection?"
> 
> Let me humbly suggest an alternate, two-fold, very practical criteria
> that I actually care about as a user:
> 
> 1) If I edit file A, while another developer renames file A to B, and
> I merge my work with his, do I have to clean things up myself, or does
> everything Just Work?

The only thing Git doesn't implement _yet_ is when you have renamed a directory, and another developer created a new file in the old directory name. Currently Git creates new files in old directory. Note however that moving files to other directory might need changes in files: for example Java, or header files includes in C/C++. This is not very common, though.

BTW. this issue is in TODO for "Better SCM : Comparison"
 * Add intelligent merging of renamed paths.
> 2) If I'm browsing the history of some code in a renamed file, does
> the history continue through the rename?

And Git does support it in both "git blame" (or "git gui blame"), and in "git log" thanks to --follow option.

Note however that --follow cannot be used (yet?) with directories or pathspecs. Not that other SCMs support wildcard pathspec limiting...

> By these criteria, git certainly does support renames.

That's why I wrote "Yes", adding "or no" (as suggested by Robin Rosenberg) because it does it dofferently than other SCMs.

-- 
Jakub Narebski
Poland
ShadeHawk on #git
Previous: Chris ShoemakerNext: Jakub Narebski
Message 12 of 17 in “Adding Git to Better SCM Initiative : Comparison”
  1. Jakub NarebskiDec 10, 2007
  2. Eyvind BernhardsenDec 10, 2007
  3. Jakub NarebskiDec 10, 2007
  4. David KastrupDec 10, 2007
  5. Florian WeimerDec 10, 2007
  6. Johannes SchindelinDec 10, 2007
  7. Florian WeimerDec 10, 2007
  8. Jakub NarebskiDec 10, 2007
  9. Florian WeimerDec 10, 2007
  10. Linus TorvaldsDec 10, 2007
  11. Chris ShoemakerDec 10, 2007
  12. Jakub NarebskiDec 10, 2007
  13. Jakub NarebskiJan 13, 2008
  14. Dmitry PotapovJan 14, 2008
  15. Jakub NarebskiJan 14, 2008
  16. Dmitry PotapovJan 14, 2008
  17. Jakub NarebskiJan 14, 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.