Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does git have an equivalent for the bazaar automv plugin?

Tags:

git

dvcs

bazaar

The only distributed revision control system I've used on my projects is bazaar. I don't know much about git and mercurial except how to do checkouts. The reason I like bazaar is the automv plugin. It detects when I've moved/deleted files manualy (from command line/ide etc.) which I tend to do alot when I'm in a hurry. But bazaar is really slow and I'm thinking of moving to git. Does git have something similar to this functionality?

like image 919
Vasil Avatar asked Feb 05 '26 09:02

Vasil


1 Answers

The way Git works in the move/rename situation is quite different. Git tracks only content, so it knows that file X had SHA1 hash abc123... at one commit, and file Y happened to have the same hash abc123... at the next commit. So the Git tools, when viewing history or whatever, conclude that file X must have been renamed to filename Y at that point.

In this way, Git reconstructs the actions taken to move from one commit to the next, without having to have that knowledge at commit time. It can event detect situations where you rename a file and change something within the file (of course it doesn't do this by comparing SHA1 hashes, but by doing a text compare between files that were changed in a commit).

like image 111
Greg Hewgill Avatar answered Feb 07 '26 23:02

Greg Hewgill