Re: svn versus git
- From
- J. Bruce Fields <bfields@fieldses.org>
- Date
- Dec 13, 2006, 22:18 UTC
- Message-ID
- <20061213221841.GB4928@fieldses.org>
- In-Reply-To
- <200612132200.41420.andyparkins@gmail.com>
On Wed, Dec 13, 2006 at 10:00:37PM +0000, Andy Parkins wrote:
Show 12 quoted lines
> svn add:: > Put files and directories under version control, scheduling them for > addition to repository. They will be added in next commit. This > doesn't really add anything, it just schedules. > git add:: > Add files to the index file. This command does not simply schedule. It > takes the current contents of the file and copies it to the git staging > area. > > The git index makes this command more complicated for git; however git > is using the verb "add" more correctly. In the subversion case, nothing > is actually added to a repository, it is merely scheduled for addition.
Well, you could argue whether adding something to the index is really adding it to "a repository".
Show 10 quoted lines
> svn cat:: > Output the contents of specified files or URLs. Optionally at a > specific revision. > git cat-file -p $(git-ls-tree $REV $file | cut -d " " -f 3 | cut -f 1):: > git-ls-tree lists the object ID for $file in revision $REV, this is cut > out of the output and used as an argument to git-cat-file, which should > really be called git-cat-object, and simply dumps that object to stdout. > > Subversion wins. This is a distinctly non-user friendly way of reading > a file.
Still, unfriendly, but not quite as bad:
git -p cat-file -p revision:path
Show 5 quoted lines
> svn diff:: > Display the differences between two paths. Defaults to showing the > differences between HEAD and the working copy. > git diff:: > As for svn;
though note slightly different default. (Diffs against index, not HEAD).