Carrying over attributes when moving files

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

 



Eli Barzilay wrote:

> There are a number of technicalities that make git attributes a poor
> substitute for svn properties -- mainly
[...]
> and
> the fact that they're not tracked with the files (as in svn, where
> moving a file somewhere will move its properties with it).

It would be great to improve this.

Consider the following directory hierarchy.

	old-files/
		.gitattributes
		some-file.html
		other-file.html
	new-files/
		unrelated-file.html

.gitattributes specifies that old HTML files use a CRLF line ending.

	*.html crlf

What would you expect the following commands to do?

	git mv old-files/some-file.html new-files/
	git commit

How about these?

	mv old-files/some-file.html new-files/
	git add new-files/some-file.html
	git commit -a

I don’t think there’s any fundamental reason this hasn’t been taken
care of; it’s just that nobody has done it yet.

Thoughts welcome.
Jonathan
--
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]