Re: git index: how does it work?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Aha ---

that explains it, then.

Is there a lower-level interface to rename detection than via "status"? And... um... hmmm.... how does it work? The hash codes don't help for "almost" the same. Is there an approximate string matching algorithm built in somewhere?

Thanks,

-- Shaun

On Aug 12, 2009, at 7:47 PM, Sverre Rabbelier wrote:

Heya,

On Wed, Aug 12, 2009 at 04:52, Shaun Cutts<shaun@xxxxxxxxxxxxx> wrote:
Are renames being tracked by the index, and is there a more basic interface
than "status" to query about them?

Nope, git never explicitly tracks renames. Try this:
$ mv foo bar
$ git rm --cached foo
$ git add bar
$ git status

It'll tell you that you renamed foo to bar, even if you never executed 'git mv'.

This is because git does rename _detection_, that is, it'll notice
that you have another file with (almost) the same contents, so it
assumes you did a rename.

--
Cheers,

Sverre Rabbelier


--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]