# Adding Git to Better SCM Initiative : Comparison

17 messages from 2007-12-10 to 2008-01-14. Participants: Jakub Narebski, Eyvind Bernhardsen, David Kastrup, Florian Weimer, Johannes Schindelin, Linus Torvalds, Chris Shoemaker, Dmitry Potapov.
Thread: https://gitlist.dev/t/11226

## Jakub Narebski, 2007-12-10 12:57

Subject: Adding Git to Better SCM Initiative : Comparison
Message-ID: <200712101357.49325.jnareb@gmail.com>
URL: https://gitlist.dev/e/200712101357.49325.jnareb%40gmail.com

```
I have noticed that your SCM comparison at "Better SCM Initiative"
website
  http://better-scm.berlios.de/comparison/comparison.html
misses one of the Git, version control system which is used to manage
Linux kernel, and one of the main open source (distributed) version
control systems (among Mercurial, Bazaar-NG, Monotone and Darcs).

Git used to be "stupid content tracker", something to build
user-friendly SCM interface on (e.g. Cogito) but it evolved into fully
fledged SCM since.

Git was created by Linus Torvalds in response to the change of BitKeeper 
licensing, as a tool to manage Linux kernel sources. It is based on 
three years of Linus experience with BitKeeper, and inspired by 
Monotone architecture.  It was designed for Linux kernel, and is used
by various projects, including X.Org, various Freedesktop projects,
WINE, OLPC (One Laptop Per Child), Samba.

<blurb src="http://git-scm.org">
Git  is  a  popular version control system designed to handle very large
projects with speed and  efficiency; it is used mainly for various open
source projects, most notably the Linux kernel.

Git  falls in the category of distributed source code management tools,
similar to e.g. GNU Arch or Monotone (or BitKeeper in the proprietary
world). Every Git working  directory is a full-fledged repository with
full revision tracking capabilities, not dependent on network access or
a central server.

Git is an Open Source project covered by the GNU General Public License v2.
It was originally written by Linus Torvalds and is currently maintained
by Junio C Hamano.
</blurb>

Below there is (slightly doctored) patch to the sources for the site.


BTW. when asking about updating GIT info for comparison, please CC
git mailing list, git@vger.kernel.org


Index: src/comparison/scm-comparison.xml
===================================================================
--- src/comparison/scm-comparison.xml   (revision 290)
+++ src/comparison/scm-comparison.xml   (working copy)
@@ -38,6 +38,9 @@ <implementations>
             <impl id="darcs">
                 <name>Darcs</name>
             </impl>
+            <impl id="git">
+                <name>Git</name>
+            </impl>
             <impl id="mercurial">
                 <name>Mercurial</name>
             </impl>
@@ -106,6 +109,7 @@ <title>Atomic Commits</title>
                 <s id="svk">Commits are atomic.</s>
                 <s id="aegis">Commits are atomic.</s>
                 <s id="bitkeeper">Yes (but need to verify)</s>
+                <s id="git">Yes.</s>
                 <s id="mercurial">Yes.</s>
                 <s id="monotone">Yes.</s>
                 <s id="opencm">Yes. Commits are atomic.</s>
@@ -142,6 +146,13 @@ <title>Files and Directories Moves or Renames</title>
                 <s id="darcs">Yes. Renames are supported.</s>
                 <s id="bitkeeper">Yes. Renames are supported.</s>
                 <s id="aegis">Yes. Renames are supported.</s>
+                <s id="git">
+                    Yes (or no depending on interpretation). Git detects
+                    renames based on content regardless of whether the
+                    committer indicated the fact.
+                    You can follow history of file across renames using
+                    'git log -M --follow'.
+                </s>
                 <s id="mercurial">Yes. Renames are supported.</s>
                 <s id="monotone">Yes. Renames are supported.</s>
                 <s id="opencm">Yes. Renames are supported</s>
@@ -214,6 +225,13 @@ <title>File and Directories Copies</title>
                     Yes. Copies are supported.
                 </s>
                 <s id="aegis">No. Copies are not supported.</s>
+                <s id="git">
+                    Yes (or no depending on interpretation). Git detects
+                    copies (when requested) based on content regardless
+                    of whether the committer indicated the fact.
+                    You can follow history of file across copies using
+                    'git log -C -C --follow'.
+                </s>
                 <s id="mercurial">Yes. Copies are supported</s>
                 <s id="monotone">Yes. Copies are supported</s>
                 <s id="opencm">No. Copies are not supported.</s>
@@ -267,6 +285,7 @@ <title>Remote Repository Replication</title>
                 <s id="darcs">Yes.</s>
                 <s id="bitkeeper">Yes.</s>
                 <s id="aegis">Yes.</s>
+                <s id="git">Yes.</s>
                 <s id="mercurial">Yes.</s>
                 <s id="monotone">Yes.</s>
                 <s id="opencm">No.</s>
@@ -313,6 +332,7 @@ <title>Propagating Changes to Parent Repositories</title>
                 <s id="darcs">Yes.</s>
                 <s id="bitkeeper">Yes.</s>
                 <s id="aegis">Yes.</s>
+                <s id="git">Yes.</s>
                 <s id="mercurial">Yes.</s>
                 <s id="monotone">Yes.</s>
                 <s id="opencm">No.</s>
@@ -373,6 +393,10 @@ <title>Repository Permissions</title>
                 <s id="svk">
                     Same as subversion.
                 </s>
+                <s id="git">
+                    Partial (?). It is possible to lock down repository
+                    (access to branches and tags) using hooks.
+                </s>
                 <s id="mercurial">
                     Yes. It is possible to lock down repositories,
                     subdirectories, or files using hooks.
@@ -455,6 +479,13 @@ <title>Changesets' Support</title>
                 <s id="darcs">
                     Yes. Changesets are supported.
                 </s>
+                <s id="git">
+                    Yes. Changesets are supported.<br />
+                    Actually Git is snapshot based which means Git records
+                    the full state in every commit.  This means that any two
+                    commits can be compared directly very quickly, although the
+                    repository is typically browsed as a series of changesets.
+                </s>
                 <s id="mercurial">
                     Yes. Changesets are supported.
                 </s>
@@ -509,6 +540,11 @@ <title>Tracking Line-wise File History</title>
                 <s id="arch">Not in the command line client, but ViewARCH,
                 a web-interface for Arch, has it.</s>
                 <s id="darcs">Yes. (darcs annotate)</s>
+                <s id="git">
+                    Yes. (git blame, git gui blame).
+                    It can also detect the origin of copied and moved source
+                    lines, and can ignore whitespace changes.
+                </s>
                 <s id="mercurial">Yes. (hg annotate)</s>
                 <s id="monotone">Yes, as of version 0.19.</s>
                 <s id="aegis">Yes. aeannotate</s>
@@ -570,6 +606,11 @@ <title>Ability to Work only on One Directory...</title>
                     whole.
                 </s>
                 <s id="aegis">No. All changes are made repository-wide.</s>
+                <s id="git">
+                    No. All changes are made repository-wide.  However
+                    it is possible to commit only selected changes in the
+                    working tree rather than everything.  You can also
+                    use submodules (subproject) support.</s>
                 <s id="mercurial">
                     It is possible to commit changes only in a subset of the
                     tree. There are plans for partial checkouts.
@@ -636,6 +677,10 @@ <title>Tracking Uncommited Changes</title>
                     Yes, using "darcs whatsnew".
                 </s>
                 <s id="aegis">Yes. Using aediff</s>
+                <s id="git">
+                    Yes, of course. Using git diff.
+                    Note that git uses staging area for commits (index).
+                </s>
                 <s id="mercurial">Yes. Using hg diff.</s>
                 <s id="monotone">Yes. In a similar fashion to CVS.</s>
                 <s id="opencm">Yes. Using cm diff</s>
@@ -681,6 +726,11 @@ <title>Per-File Commit Messages</title>
                 <s id="darcs">
                     No.
                 </s>
+                <s id="git">
+                    No.  The message applies to the commit as a whole.
+                    But you can tag (with description) given contents
+                    of a file (blob).
+                </s>
                 <s id="mercurial">
                     No.
                 </s>
@@ -782,6 +832,15 @@ <title>Documentation</title>
                     and the client contains a help tool that offers
                     an integrated help system.
                 </s>
+                <s id="git">
+                    Good. There's Git User's Manual, manpages, some
+                    technical documentation and some howtos.  All
+                    documentation is also available
+                    <a href="http://www.kernel.org/pub/software/scm/git/docs">online</a>
+                    in HTML format; there is additional information (including
+                    beginnings of FAQ) on a
+                    <a href="http://git-scm.org/gitwiki">git wiki</a>.
+                </s>
                 <s id="mercurial">
                     Very good. There's an overview and tutorial on the
                     web site, and integrated help for every command.
@@ -894,6 +953,16 @@ <title>Ease of Deployment</title>
                     to install the subversion perl bindings and a few modules
                     from CPAN.
                 </s>
+                <s id="git">
+                    Very good.  Install from RPM or deb on Linux; use
+                    msysGit or Cygwin install on Windows.  Git requires
+                    zlib; also POSIX shell and utilities and Perl for some
+                    commands.
+                    Installing from sources is easy: Makefile has ready
+                    configuration for many OS, you can also use autoconf
+                    to generate Makefile configuration.  Compiling docs
+                    requires asciidoc toolchain, but you can use prebuild.
+                </s>
                 <s id="mercurial">
                     Excellent.  Binary packages are available for all
                     popular platforms.  Building from source requires
@@ -1006,6 +1075,13 @@ <title>Command Set</title>
                     but since the model is different most commands are
                     unique.
                 </s>
+                <s id="git">
+                    Tries to follow CVS conventions, but deviates where there
+                    is a different design (following BitKeeper for DVCS).
+                    Large command set (~140) is divided into plumbing commands
+                    (low lewel, to be used in scripts) and porcelain (high level).
+                    It is easy to add new commands as scripts, or as git aliases.
+                </s>
                 <s id="mercurial">
                     Tries to follow CVS conventions, but deviates where there
                     is a different design.
@@ -1106,6 +1182,13 @@ <title>Networking Support</title>
                     There exists some HTTP-functionality, but it is quite
                     limited.
                 </s>
+                <s id="git">
+                    Excellent.  Uses HTTPS (with WebDAV) or ssh for push
+                    (to publish changes to server) and HTTP, FTP, ssh or custom
+                    "git" protocol for fetch (read from server).  There is also
+                    git-bundle for offline transport, and tools to exchange
+                    (create and apply) patches via email.
+                </s>
                 <s id="mercurial">
                     Excellent.  Uses HTTP or ssh.  Remote access also
                     works safely without locks over read-only network
@@ -1203,6 +1286,11 @@ <title>Portability</title>
                     Very good. Supports many UNIXes, Mac OS X, and Windows,
                     and is written in a portable language.
                 </s>
+                <s id="git">
+                    Good to very good.  Portable across all POSIX systems.
+                    There exists Win32 binary using MinGW (msysGit),
+                    or you can use binary provided by Cygwin.
+                </s>
                 <s id="mercurial">
                     Excellent. Runs on all platforms supported by
                     Python.  Repositories are portable across CPU
@@ -1300,6 +1388,10 @@ <title>Web Interface</title>
                     is included in the distribution.
                 </s>
                 <s id="aegis">Yes.</s>
+                <s id="git">
+                    Yes, gitweb is included in git since version 1.4.0.
+                    Other web interfaces exists: cgit, wit, git-php
+                </s>
                 <s id="mercurial">Yes.  The web interface is a bundled component.</s>
                 <s id="monotone">No.</s>
                 <s id="opencm">No.</s>
@@ -1373,6 +1464,12 @@ <title>Availability of Graphical User-Interfaces.</title>
                 <s id="aegis">
                     There is tkaegis.
                 </s>
+                <s id="git">
+                    There is history viewer 'gitk' and commit tool 'git-gui';
+                    both in Tcl/Tk.  There also exists a number of third-party
+                    GUIs, including: qgit (Qt), GitView (GTK+), Giggle (GTK+),
+                    tig (ncurses).
+                </s>
                 <s id="mercurial">
                     History viewing available with hgit extension;
                     check-in extension (hgct) makes committing easier.
@@ -1453,6 +1550,7 @@ <title>License</title>
                 GNU GPL (open-source)
             </s>
             <s id="svk">Perl License. (open source)</s>
+            <s id="git">GNU GPL v2 (open source)</s>
             <s id="mercurial">GNU GPL (open source)</s>
             <s id="monotone">GNU GPL (open source)</s>
             <s id="opencm">

```

## Eyvind Bernhardsen, 2007-12-10 13:09

Subject: Re: Adding Git to Better SCM Initiative : Comparison
Message-ID: <E876AFC0-498C-48B4-8B83-DB44585F76C5@orakel.ntnu.no>
URL: https://gitlist.dev/e/E876AFC0-498C-48B4-8B83-DB44585F76C5%40orakel.ntnu.no
In-Reply-To: <200712101357.49325.jnareb@gmail.com>

```
On 10. des. 2007, at 13.57, Jakub Narebski wrote:

> I have noticed that your SCM comparison at "Better SCM Initiative"
> website
>   http://better-scm.berlios.de/comparison/comparison.html
> misses one of the Git, version control system which is used to manage

"misses one of the Git"?
-- 
Eyvind

```

## Jakub Narebski, 2007-12-10 13:20

Subject: Re: Adding Git to Better SCM Initiative : Comparison
Message-ID: <200712101420.03165.jnareb@gmail.com>
URL: https://gitlist.dev/e/200712101420.03165.jnareb%40gmail.com
In-Reply-To: <E876AFC0-498C-48B4-8B83-DB44585F76C5@orakel.ntnu.no>

```
Eyvind Bernhardsen wrote:
> On 10. des. 2007, at 13.57, Jakub Narebski wrote:
> 
>> I have noticed that your SCM comparison at "Better SCM Initiative"
>> website
>>   http://better-scm.berlios.de/comparison/comparison.html
>> misses one of the Git, version control system which is used to manage
> 
> "misses one of the Git"?

Gaaah... I started to write "misses one of the main OSS DSCM", but end 
up with "misses Git [...] one of the main open source (distributed) 
version control systems"... and forgot to remove "one of the".

-- 
Jakub Narebski
Poland

```

## David Kastrup, 2007-12-10 14:33

Subject: Re: Adding Git to Better SCM Initiative : Comparison
Message-ID: <85r6hupql3.fsf@lola.goethe.zz>
URL: https://gitlist.dev/e/85r6hupql3.fsf%40lola.goethe.zz
In-Reply-To: <200712101357.49325.jnareb@gmail.com>

```
Jakub Narebski <jnareb@gmail.com> writes:

> Git was created by Linus Torvalds in response to the change of BitKeeper 
> licensing, as a tool to manage Linux kernel sources. It is based on 
> three years of Linus experience with BitKeeper, and inspired by 

of Linus' experience

> Monotone architecture.  It was designed for Linux kernel, and is used

Monotone's architecture.

-- 
David Kastrup, Kriemhildstr. 15, 44793 Bochum

```

## Florian Weimer, 2007-12-10 14:49

Subject: Re: Adding Git to Better SCM Initiative : Comparison
Message-ID: <87ve76mwos.fsf@mid.deneb.enyo.de>
URL: https://gitlist.dev/e/87ve76mwos.fsf%40mid.deneb.enyo.de
In-Reply-To: <200712101357.49325.jnareb@gmail.com>

```
* Jakub Narebski:

> +                <s id="git">
> +                    Yes (or no depending on interpretation). Git

This should be "No." (same for copies below).

> +                <s id="git">
> +                    Partial (?). It is possible to lock down repository
> +                    (access to branches and tags) using hooks.
> +                </s>

I doubt this works reliably.  You still can access data once you've got
its SHA1 hash, for instance.

> +                <s id="git">
> +                    Yes. Changesets are supported.<br />
> +                    Actually Git is snapshot based which means Git records
> +                    the full state in every commit.  This means that any two
> +                    commits can be compared directly very quickly, although the
> +                    repository is typically browsed as a series of changesets.
> +                </s>

I don't think this explanation is necessary.  What does Subversion say?

> +                <s id="git">
> +                    Yes. (git blame, git gui blame).
> +                    It can also detect the origin of copied and moved source
> +                    lines, and can ignore whitespace changes.
> +                </s>

A simple "Yes." should suffice.

> @@ -636,6 +677,10 @@ <title>Tracking Uncommited Changes</title>
>                      Yes, using "darcs whatsnew".
>                  </s>
>                  <s id="aegis">Yes. Using aediff</s>
> +                <s id="git">
> +                    Yes, of course. Using git diff.
> +                    Note that git uses staging area for commits (index).
> +                </s>

Simply "Yes.".  "git diff" is wrong, it's actually "git diff HEAD".

> @@ -681,6 +726,11 @@ <title>Per-File Commit Messages</title>
>                  <s id="darcs">
>                      No.
>                  </s>
> +                <s id="git">
> +                    No.  The message applies to the commit as a whole.
> +                    But you can tag (with description) given contents
> +                    of a file (blob).
> +                </s>

Have we got any real tool support for this?  This should be "No.".

> @@ -1006,6 +1075,13 @@ <title>Command Set</title>
>                      but since the model is different most commands are
>                      unique.
>                  </s>
> +                <s id="git">
> +                    Tries to follow CVS conventions, but deviates where there
> +                    is a different design (following BitKeeper for DVCS).

I don't think this is true.  Is there any command that closely matches
what CVS does?

> @@ -1203,6 +1286,11 @@ <title>Portability</title>
>                      Very good. Supports many UNIXes, Mac OS X, and Windows,
>                      and is written in a portable language.
>                  </s>
> +                <s id="git">
> +                    Good to very good.  Portable across all POSIX systems.
> +                    There exists Win32 binary using MinGW (msysGit),
> +                    or you can use binary provided by Cygwin.
> +                </s>

Isn't Windows support still a bit lacking in terms of performance?

```

## Johannes Schindelin, 2007-12-10 15:23

Subject: Re: Adding Git to Better SCM Initiative : Comparison
Message-ID: <Pine.LNX.4.64.0712101522290.27959@racer.site>
URL: https://gitlist.dev/e/Pine.LNX.4.64.0712101522290.27959%40racer.site
In-Reply-To: <87ve76mwos.fsf@mid.deneb.enyo.de>

```
Hi,

On Mon, 10 Dec 2007, Florian Weimer wrote:

> * Jakub Narebski:
> 
> > +                <s id="git">
> > +                    Yes (or no depending on interpretation). Git
> 
> This should be "No." (same for copies below).

Nice.  I have no idea what you are talking about, as you only quoted the 
answer, but not the question.  (Same for the other quoted text.)

Thanks,
Dscho

```

## Florian Weimer, 2007-12-10 15:36

Subject: Re: Adding Git to Better SCM Initiative : Comparison
Message-ID: <8763z6mujd.fsf@mid.deneb.enyo.de>
URL: https://gitlist.dev/e/8763z6mujd.fsf%40mid.deneb.enyo.de
In-Reply-To: <Pine.LNX.4.64.0712101522290.27959@racer.site>

```
* Johannes Schindelin:

>> > +                <s id="git">
>> > +                    Yes (or no depending on interpretation). Git
>> 
>> This should be "No." (same for copies below).
>
> Nice.  I have no idea what you are talking about, as you only quoted the 
> answer, but not the question. 

Oops.  It's about the rename/copy detection stuff.

> (Same for the other quoted text.)

I tried to provide more context in those cases; the @@ lines should be
sufficient, I guess.

```

## Jakub Narebski, 2007-12-10 15:47

Subject: Re: Adding Git to Better SCM Initiative : Comparison
Message-ID: <m34peqtuuj.fsf@roke.D-201>
URL: https://gitlist.dev/e/m34peqtuuj.fsf%40roke.D-201
In-Reply-To: <87ve76mwos.fsf@mid.deneb.enyo.de>

```
Florian Weimer <fw@deneb.enyo.de> writes:

> * Jakub Narebski:
> > @@ -214,6 +225,13 @@ <title>File and Directories Copies</title>
[...]
> > +                <s id="git">
> > +                    Yes (or no depending on interpretation). Git
> 
> This should be "No." (same for copies below).

I would agree to "N/A" or "Partial", but with 'git log --follow'
implemented at least for single file I wouldn't say that that git
doesn't support file and directories renames (copies).  It does, in
it's own fashion, using rename (copy) detection instead of rename
(copy) tracking.

By the way, the explanation for "File and Directories Copies" section
itself is a bit imprecise; well at least it doesn't lead to easy
answer for git.  I took it as question if we can examine _history_
of a file (or directory) across renames (copies).  Other
interpretation would be if version control system in question
correctly handles renames and copies during merges... but it is in
TODO (Add intelligent merging of renamed paths.)
 
> > +                <s id="git">
> > +                    Partial (?). It is possible to lock down repository
> > +                    (access to branches and tags) using hooks.
> > +                </s>
> 
> I doubt this works reliably.  You still can access data once you've got
> its SHA1 hash, for instance.

So what? The data is not visible, so it is as if it didn't
exist. Besides if you are truly paranoid you can I think remove
downloaded pack.

By the way the default 'contrib/hooks/update-paranoid' implements ACL
restricting access to branches and tags, but I think that you can
write a hook which would refuse update if there are changes outside
specified subdirectory for example.

Note however that "repository permissions" are much more important for
centralized SCMs than for distributed SCMs, where you can form
"network of trust" (like Linus with his kernel's lieutenants and
subsystem maintainers).

> > +                <s id="git">
> > +                    Yes. Changesets are supported.<br />
> > +                    Actually Git is snapshot based which means Git records
> > +                    the full state in every commit.  This means that any two
> > +                    commits can be compared directly very quickly, although the
> > +                    repository is typically browsed as a series of changesets.
> > +                </s>
> 
> I don't think this explanation is necessary.  What does Subversion say?

Subversion has the following currently:

  Partial support. There are implicit changeset that are generated on
  each commit.


Well, we could follow Mercurial, Monotone and Darcs and simply write

+                <s id="git">
+                    Yes. Changesets are supported.
+                </s>

> > +                <s id="git">
> > +                    Yes. (git blame, git gui blame).
> > +                    It can also detect the origin of copied and moved source
> > +                    lines, and can ignore whitespace changes.
> > +                </s>
> 
> A simple "Yes." should suffice.

Each SCM names the command for displaying line-wise file history,
if it of course exists.

While "can ignore whitespace changes" is not that important, detection
of contents movement and copying is important differentiation,
possible (or at least implemented) because Git uses rename detection
rather than rename tracking.
 
> > @@ -636,6 +677,10 @@ <title>Tracking Uncommited Changes</title>
> >                      Yes, using "darcs whatsnew".
> >                  </s>
> >                  <s id="aegis">Yes. Using aediff</s>
> > +                <s id="git">
> > +                    Yes, of course. Using git diff.
> > +                    Note that git uses staging area for commits (index).
> > +                </s>
> 
> Simply "Yes.".  "git diff" is wrong, it's actually "git diff HEAD".

Actually it depends on the definition of "uncommitted changes".
Besides "git diff HEAD" _is_ "using git diff".

But it's true that 'of course' there is not needed.

> > @@ -681,6 +726,11 @@ <title>Per-File Commit Messages</title>
> >                  <s id="darcs">
> >                      No.
> >                  </s>
> > +                <s id="git">
> > +                    No.  The message applies to the commit as a whole.
> > +                    But you can tag (with description) given contents
> > +                    of a file (blob).
> > +                </s>
> 
> Have we got any real tool support for this?  This should be "No.".

True. But I'd rather leave it as "No. The message applies to the
commit as a whole." because that is important property.

> > @@ -1006,6 +1075,13 @@ <title>Command Set</title>
> >                      but since the model is different most commands are
> >                      unique.
> >                  </s>
> > +                <s id="git">
> > +                    Tries to follow CVS conventions, but deviates where there
> > +                    is a different design (following BitKeeper for DVCS).
> 
> I don't think this is true.  Is there any command that closely matches
> what CVS does?

Yes: init, add, annotate (alias to blame), checkout, commit, diff,
status, log, version. At least in principle, if not in output format.

I don't think that Mercurial and Monotone follow CVS much better than
Git. (But that was one of answers I was having problems with.)

> > @@ -1203,6 +1286,11 @@ <title>Portability</title>
> >                      Very good. Supports many UNIXes, Mac OS X, and Windows,
> >                      and is written in a portable language.
> >                  </s>
> > +                <s id="git">
> > +                    Good to very good.  Portable across all POSIX systems.
> > +                    There exists Win32 binary using MinGW (msysGit),
> > +                    or you can use binary provided by Cygwin.
> > +                </s>
> 
> Isn't Windows support still a bit lacking in terms of performance?

That is more a problem with Windows, than Git ;-)

-- 
Jakub Narebski
Poland
ShadeHawk on #git

```

## Florian Weimer, 2007-12-10 16:28

Subject: Re: Adding Git to Better SCM Initiative : Comparison
Message-ID: <87r6huldjw.fsf@mid.deneb.enyo.de>
URL: https://gitlist.dev/e/87r6huldjw.fsf%40mid.deneb.enyo.de
In-Reply-To: <m34peqtuuj.fsf@roke.D-201>

```
* Jakub Narebski:

> Florian Weimer <fw@deneb.enyo.de> writes:
>
>> * Jakub Narebski:
>> > @@ -214,6 +225,13 @@ <title>File and Directories Copies</title>
> [...]
>> > +                <s id="git">
>> > +                    Yes (or no depending on interpretation). Git
>> 
>> This should be "No." (same for copies below).
>
> I would agree to "N/A" or "Partial", but with 'git log --follow'
> implemented at least for single file I wouldn't say that that git
> doesn't support file and directories renames (copies).  It does, in
> it's own fashion, using rename (copy) detection instead of rename
> (copy) tracking.

It's undoubtly a difficult question.  In my experience, developers tend
to not mark renames properly, so rename detection in log/diff/annotate
is still helpful even if renames are encoded explicitly.  But this was a
learning process; I used to think that explicit rename support was
essential.

>> > +                <s id="git">
>> > +                    Partial (?). It is possible to lock down repository
>> > +                    (access to branches and tags) using hooks.
>> > +                </s>
>> 
>> I doubt this works reliably.  You still can access data once you've got
>> its SHA1 hash, for instance.
>
> So what? The data is not visible, so it is as if it didn't
> exist.

Uhm, I'd commit something that references some SHA-1, and voilà, I can
read the object with that SHA-1.

>> > +                <s id="git">
>> > +                    Yes. Changesets are supported.<br />
>> > +                    Actually Git is snapshot based which means Git records
>> > +                    the full state in every commit.  This means that any two
>> > +                    commits can be compared directly very quickly, although the
>> > +                    repository is typically browsed as a series of changesets.
>> > +                </s>
>> 
>> I don't think this explanation is necessary.  What does Subversion say?
>
> Subversion has the following currently:
>
>   Partial support. There are implicit changeset that are generated on
>   each commit.

Hmm.

> Well, we could follow Mercurial, Monotone and Darcs and simply write
>
> +                <s id="git">
> +                    Yes. Changesets are supported.
> +                </s>

Makes sense, especially since there's "git bundle" nowadays.

>> I don't think this is true.  Is there any command that closely matches
>> what CVS does?
>
> Yes: init, add, annotate (alias to blame), checkout, commit, diff,
> status, log, version. At least in principle, if not in output format.

I think we disagree on the meaning of "close" here. 8-/

In my experience, it's hard to see the parallels between GIT and CVS
because the semantics are so different.  This is, to some extent,
unavoidable.  But I'm not sure if knowing your way around CVS actually
helps learning GIT (the old sayings about BASIC come to my mind).

```

## Linus Torvalds, 2007-12-10 16:38

Subject: Re: Adding Git to Better SCM Initiative : Comparison
Message-ID: <alpine.LFD.0.9999.0712100837300.12046@woody.linux-foundation.org>
URL: https://gitlist.dev/e/alpine.LFD.0.9999.0712100837300.12046%40woody.linux-foundation.org
In-Reply-To: <87ve76mwos.fsf@mid.deneb.enyo.de>

```


On Mon, 10 Dec 2007, Florian Weimer wrote:

> * Jakub Narebski:
> 
> > +                <s id="git">
> > +                    Yes (or no depending on interpretation). Git
> 
> This should be "No." (same for copies below).

No.

Git handles renames and copies better than most SCM's that _claim_ to 
handle them. Saying we don't do them is just stupid. We do them *right*. 
The fact that inferior systems do it differently is _their_ problem, and 
not a cause for saying that git wouldn't do them.

		Linus

```

## Chris Shoemaker, 2007-12-10 16:50

Subject: Re: Adding Git to Better SCM Initiative : Comparison
Message-ID: <20071210165052.GA22327@pe.Belkin>
URL: https://gitlist.dev/e/20071210165052.GA22327%40pe.Belkin
In-Reply-To: <87ve76mwos.fsf@mid.deneb.enyo.de>

```
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?

2) If I'm browsing the history of some code in a renamed file, does
the history continue through the rename?

By these criteria, git certainly does support renames.

-chris

```

## Jakub Narebski, 2007-12-10 17:21

Subject: Re: Adding Git to Better SCM Initiative : Comparison
Message-ID: <m3zlwisbxx.fsf@roke.D-201>
URL: https://gitlist.dev/e/m3zlwisbxx.fsf%40roke.D-201
In-Reply-To: <20071210165052.GA22327@pe.Belkin>

```
Chris Shoemaker <c.shoemaker@cox.net> writes:

> 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

```

## Jakub Narebski, 2008-01-13 00:44

Subject: Re: Adding Git to Better SCM Initiative : Comparison
Message-ID: <200801130144.14574.jnareb@gmail.com>
URL: https://gitlist.dev/e/200801130144.14574.jnareb%40gmail.com
In-Reply-To: <200801071057.27710.shlomif@iglu.org.il>

```
On Mon, 7 Jan 2008, Shlomi Fish wrote:
> 
> I'm CCing all the correspondents, because I'm banned from the vger.kernel.org 
> mail. This has been an obstacle for me in several legitimate occassions and 
> this one is the latest. I'm still CCing it, so the people in the mailing list 
> will receive the replies.
> 
> On Monday 10 December 2007, Jakub Narebski wrote:
> > I have noticed that your SCM comparison at "Better SCM Initiative"
> > website
> >   http://better-scm.berlios.de/comparison/comparison.html
> > misses one of the Git, version control system which is used to manage
> > Linux kernel, and one of the main open source (distributed) version
> > control systems (among Mercurial, Bazaar-NG, Monotone and Darcs).
> >
> 
> Indeed git is absent. That's because no one until you has volunteered to send 
> a patch that adds it to the comparison. Another requirement is for someone to 
> volunteer to become a "champion" for the version control system and maintain 
> it into the future. So who is going to be the champion?

I can be git champion for "Better SCM Initiative" comparison... although
I'd rather somebody else was it.
 
[...] 
> > Below there is (slightly doctored) patch to the sources for the site.
> >
> 
> Despite the fact that I the comparison was recently patched to add Bazaar and 
> fix some grammatical problems, the patch still applies cleanly. However, I 
> saw that some people commented on it here. Can you send me a new patch 
> integrating all this commentary?

I'll try to send revised patch soon. Integrating commentary is a bit
harder that it could be because some responses were sent _only_ to
git mailing list, so I'd have to browse through git mailing list
archives.


BTW. some of the questions / comments were caused by the fact that the
features listed in Better SCM Initiative: Comparison are a bit ambiguous.

What does for example "Atomic Commit" mean? Does it mean that if we
interrupt commit in the middle we would always get full commit or none,
and not some f**d-up intermediate state? Hos CVS can have atomic commits
then?

What does "Renames Support" mean? Does it mean that when browsing history
we [can] show file / directory renames? Does it mean that log of file or
directory history [can] follow renames? Does it mean that line-wise file
history [can] follow renames? Renames support in merges is as TODO, so
I don't think that this one matters in this question. Because the answer,
especially in the case of git which is a bit different in that it does
rename detection and not rename tracking (using inodes / file-ids),
depends on that...

-- 
Jakub Narebski
Poland

```

## Dmitry Potapov, 2008-01-14 00:14

Subject: Re: Adding Git to Better SCM Initiative : Comparison
Message-ID: <20080114001408.GV2963@dpotapov.dyndns.org>
URL: https://gitlist.dev/e/20080114001408.GV2963%40dpotapov.dyndns.org
In-Reply-To: <200801130144.14574.jnareb@gmail.com>

```
On Sun, Jan 13, 2008 at 01:44:10AM +0100, Jakub Narebski wrote:
> 
> What does "Renames Support" mean? 

Accordingly to the clarification provided there, it means retaining the
history of the file when its name changed. So I would write like this:

Yes. Git can automatically detects renames and show history together,
however being content oriented rather than file oriented, the notion of
"retaining the history of the file" can not exactly applied to it.

> Because the answer,
> especially in the case of git which is a bit different in that it does
> rename detection and not rename tracking (using inodes / file-ids),
> depends on that...

Git is different in that it tracks the content as the whole rather than
tracking a set of files. When you look at some source code, what you
really want to know who and why wrote *this*, and usually it does not
matter to you whether it was written in this file or another one. CVS
is really bad at that, because if you renamed a file, it would be very
difficult to go back to history and find that. Many file-ids based SCMs
have solved this problem, however, they do not do any better than CVS
in another very common case -- when your code is moved around as result
of refactoring, but Git addresses both problems, not just one!

So, it is not as much about explicit renaming vs automatic, but about
different design goals. After finishing reading this questionnaire,
it seems to me that a more proper title for it would be "Better CVS
Initiative", so it is not surprisingly that Git does not fit into it
well. It is like trying to put characteristics of your LCD into a
questionnaire for CRT monitors -- some does not make sense, other
misleading, and most important ones are not mentioned anyway...


Dmitry

```

## Jakub Narebski, 2008-01-14 00:31

Subject: Re: Adding Git to Better SCM Initiative : Comparison
Message-ID: <200801140131.23027.jnareb@gmail.com>
URL: https://gitlist.dev/e/200801140131.23027.jnareb%40gmail.com
In-Reply-To: <20080114001408.GV2963@dpotapov.dyndns.org>

```
On Mon, 14 January 2008, Dmitry Potapov wrote:
> On Sun, Jan 13, 2008 at 01:44:10AM +0100, Jakub Narebski wrote:
> > 
> > What does "Renames Support" mean? 

By the way, the question was to the author of Better SCM Initiative
Comparison, Shlomi Fish.

> Accordingly to the clarification provided there, it means retaining the
> history of the file when its name changed. So I would write like this:
> 
> Yes. Git can automatically detects renames and show history together,
> however being content oriented rather than file oriented, the notion of
> "retaining the history of the file" can not exactly applied to it.

"History of a file" can be defined as "<scm> log 'file'", and this is
well defined also for git. And 'rename support' for file means just
that this history of a file (of a current file contents) follows file
renames.

IIRC this des not work for directories... but on the other hand git,
tracking contents only as a goal, does not track directories.

> > Because the answer,
> > especially in the case of git which is a bit different in that it does
> > rename detection and not rename tracking (using inodes / file-ids),
> > depends on that...
> 
> Git is different in that it tracks the content as the whole rather than
> tracking a set of files. When you look at some source code, what you
> really want to know who and why wrote *this*, and usually it does not
> matter to you whether it was written in this file or another one. CVS
> is really bad at that, because if you renamed a file, it would be very
> difficult to go back to history and find that. Many file-ids based SCMs
> have solved this problem, however, they do not do any better than CVS
> in another very common case -- when your code is moved around as result
> of refactoring, but Git addresses both problems, not just one!

AFAIK Mercurial (hg) is not file-id based, but does explicitely track
renames. There was even an idea presented on git mailing list to mark
renames in commit object in some "note" header.

> So, it is not as much about explicit renaming vs automatic, but about
> different design goals. After finishing reading this questionnaire,
> it seems to me that a more proper title for it would be "Better CVS
> Initiative", so it is not surprisingly that Git does not fit into it
> well. It is like trying to put characteristics of your LCD into a
> questionnaire for CRT monitors -- some does not make sense, other
> misleading, and most important ones are not mentioned anyway...

Please remember that AFAIK this table is _older_ than Git itself.
But it is a fact that some characteristics are much patterned after
CVS features and misfeatures.

It would be much better if for each feature there was some test
described which would allow to check if the feature is supported.

By the way, even before "git log --follow" you could have "this file
was renamed to that file" in the commit/revision patchset. This is
IMHO enough of rename support. Much more important is correct support
for renames in merges, which is in TODO for Better-SCM comparison...

-- 
Jakub Narebski
Poland

```

## Dmitry Potapov, 2008-01-14 06:58

Subject: Re: Adding Git to Better SCM Initiative : Comparison
Message-ID: <20080114065810.GY2963@dpotapov.dyndns.org>
URL: https://gitlist.dev/e/20080114065810.GY2963%40dpotapov.dyndns.org
In-Reply-To: <200801140131.23027.jnareb@gmail.com>

```
On Mon, Jan 14, 2008 at 01:31:19AM +0100, Jakub Narebski wrote:
> On Mon, 14 January 2008, Dmitry Potapov wrote:
> 
> > Yes. Git can automatically detects renames and show history together,
> > however being content oriented rather than file oriented, the notion of
> > "retaining the history of the file" can not exactly applied to it.
> 
> "History of a file" can be defined as "<scm> log 'file'", and this is
> well defined also for git. 

You missed the key word here -- *retaining*. In fact, if you define the
history of a file just as something what "<scm> log" produce then what
is the problem with CVS here? Why do most people say that CVS does not
retain file history over rename? Certainly, you can type "cvs old-name"
and see history of one file, and if you type "cvs new-name" then history
of another... But somehow most people think about these two pieces as
being the history of *one* file... So, your definition is incorrect or,
at least, very different from what most people mean by that.

BTW, when you type "git log 'file'", it shows you not history of a file,
but history of changes that affect the specified paths...

> And 'rename support' for file means just
> that this history of a file (of a current file contents) follows file
> renames.

To equate a file with its contents is like to equate a variable with
its value. They are not exactly the same. If you renamed a file and
completely changed its contents, is it still the same file or not?
If you think about file as being inode then the answer is yes, but if
look at its content then the answer is no.

Git tracks contents, while many other SCMs tracks files regardless of
their contents. So, Git can show the history of file contents, but
not the history of a file...

> 
> IIRC this des not work for directories... 

Git works for directories, it is just that the --follow option cannot
applied to it, because this option means to follow the file contents,
which does not make much sense for directories.

> but on the other hand git,
> tracking contents only as a goal, does not track directories.

Exactly.

> > 
> > Git is different in that it tracks the content as the whole rather than
> > tracking a set of files. When you look at some source code, what you
> > really want to know who and why wrote *this*, and usually it does not
> > matter to you whether it was written in this file or another one. CVS
> > is really bad at that, because if you renamed a file, it would be very
> > difficult to go back to history and find that. Many file-ids based SCMs
> > have solved this problem, however, they do not do any better than CVS
> > in another very common case -- when your code is moved around as result
> > of refactoring, but Git addresses both problems, not just one!
> 
> AFAIK Mercurial (hg) is not file-id based, but does explicitely track
> renames. There was even an idea presented on git mailing list to mark
> renames in commit object in some "note" header.

I suspect the main reason why Mercurial support that is that a lot of
programmers whose mind was mangled by many years of CVS experience asked
for that feature. In practice, what you really want to track is contents.
And it is not difficult to add some "note" to the commit and teach Git to
follow it, but I don't see any practical value in that...

> > So, it is not as much about explicit renaming vs automatic, but about
> > different design goals. After finishing reading this questionnaire,
> > it seems to me that a more proper title for it would be "Better CVS
> > Initiative", so it is not surprisingly that Git does not fit into it
> > well. It is like trying to put characteristics of your LCD into a
> > questionnaire for CRT monitors -- some does not make sense, other
> > misleading, and most important ones are not mentioned anyway...
> 
> Please remember that AFAIK this table is _older_ than Git itself.
> But it is a fact that some characteristics are much patterned after
> CVS features and misfeatures.

Well, if it is so old, that explains why it gave me such impression...

> 
> It would be much better if for each feature there was some test
> described which would allow to check if the feature is supported.

Wanna test your LCD monitor with some old CRT tests? -:)

> 
> By the way, even before "git log --follow" you could have "this file
> was renamed to that file" in the commit/revision patchset. 

You could write that in CVS message too, but I don't think it can
be considered as retaining the history of the file...


Dmitry

```

## Jakub Narebski, 2008-01-14 12:14

Subject: Re: Adding Git to Better SCM Initiative : Comparison
Message-ID: <200801141314.21686.jnareb@gmail.com>
URL: https://gitlist.dev/e/200801141314.21686.jnareb%40gmail.com
In-Reply-To: <20080114065810.GY2963@dpotapov.dyndns.org>

```
Dnia poniedziałek 14. stycznia 2008 07:58, Dmitry Potapov napisał:
> On Mon, Jan 14, 2008 at 01:31:19AM +0100, Jakub Narebski wrote:
> > On Mon, 14 January 2008, Dmitry Potapov wrote:
> > 
> > > Yes. Git can automatically detects renames and show history together,
> > > however being content oriented rather than file oriented, the notion of
> > > "retaining the history of the file" can not exactly applied to it.
> > 
> > "History of a file" can be defined as "<scm> log 'file'", and this is
> > well defined also for git. 
> 
> You missed the key word here -- *retaining*. In fact, if you define the
> history of a file just as something what "<scm> log" produce then what
> is the problem with CVS here? Why do most people say that CVS does not
> retain file history over rename? Certainly, you can type "cvs old-name"
> and see history of one file, and if you type "cvs new-name" then history
> of another... But somehow most people think about these two pieces as
> being the history of *one* file... So, your definition is incorrect or,
> at least, very different from what most people mean by that.

I assume that 0th part of rename support is true, i.e. that we can
recover previous full-tree state of repository.

> BTW, when you type "git log 'file'", it shows you not history of a file,
> but history of changes that affect the specified paths...

The fact that in "git log <path>" the <path> part is path _limiter_
(and can be directory, or set of directories) rather than being limited
to simply single filename is what makes git different, both in good
("git log subsystem/path") and in bad (different from what other SCM
used to) way.

When you type "git log --follow='file'", it shows you history of
a _contents_ which currently is in 'file'; even if there were rename
in the history of 'file' somewhere in the past.

When you type "git log 'directory'", it shows you (simplified) history
of changes affesting specified directory (usually some subsystem).


IMHO "rename support" should be defined as
1.) showing renames when examining given revision (status, log, show;
    whatever it is called).
2.) it should be able to follow history of a file when it looks like
    this: add, change, rename, change.

> > And 'rename support' for file means just
> > that this history of a file (of a current file contents) follows file
> > renames.
[...]
> > 
> > IIRC this des not work for directories... 
> 
> Git works for directories, it is just that the --follow option cannot
> applied to it, because this option means to follow the file contents,
> which does not make much sense for directories.

But it would be nice to have somehow "git log --follow=directory" work,
even if directory in which susystem resides was renamed. It is harder
work also because (I think) directories are more often split and joined
than file[s contents].

> > > Git is different in that it tracks the content as the whole rather than
> > > tracking a set of files. When you look at some source code, what you
> > > really want to know who and why wrote *this*, and usually it does not
> > > matter to you whether it was written in this file or another one. CVS
> > > is really bad at that, because if you renamed a file, it would be very
> > > difficult to go back to history and find that. Many file-ids based SCMs
> > > have solved this problem, however, they do not do any better than CVS
> > > in another very common case -- when your code is moved around as result
> > > of refactoring, but Git addresses both problems, not just one!
> > 
> > AFAIK Mercurial (hg) is not file-id based, but does explicitely track
> > renames. There was even an idea presented on git mailing list to mark
> > renames in commit object in some "note" header.
> 
> I suspect the main reason why Mercurial support that is that a lot of
> programmers whose mind was mangled by many years of CVS experience asked
> for that feature. In practice, what you really want to track is contents.
> And it is not difficult to add some "note" to the commit and teach Git to
> follow it, but I don't see any practical value in that...

Mercurial can be IMHO from architecture point of view be viewed a bit
as "CVS done right", much more than Subversion, with its path-hashed
changeset storage, manifest file, and changelog / changerev file.

And I guess that Mercurial supports this because of the most important
part of "renames support" (which is present only as TODO for Better-SCM
comparison), namely merging correct files in presence of renames.
 
> > 
> > It would be much better if for each feature there was some test
> > described which would allow to check if the feature is supported.
> 
> Wanna test your LCD monitor with some old CRT tests? -:)

If those tests were done correctly, not from technical side ("renames
support" and other similar thingies for SCMs, refresh rate for LCD/CRT),
but from user side (does command which shows history of a file follows
renames, eyestrain / image sharpness for monitors).... :-)

-- 
Jakub Narebski
Poland

```
