Re: [PATCH 2/2] Make Git respect changes to .gitattributes during checkout.

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

 



Kristian Amlie schrieb:
> We do this by popping off elements on the attribute stack, until we
> reach the level where a new .gitattributes was checked out. The next
> time someone calls git_checkattr(), it will reconstruct the
> attributes from that point.
...
> +	gitattrlen = strlen(GITATTRIBUTES_FILE);
> +	pathlen = strlen(path);
> +	if (!strncmp(path + pathlen - gitattrlen, GITATTRIBUTES_FILE, gitattrlen)) {
> +		/* Invalidate attributes if a new .gitattributes file was checked out. */

But if there was file .abc.txt that was checked out before .gitattributes
was checked out, then the new .gitattributes won't have been used for
.abc.txt, yet, right?

(Disclaimer: I didn't read the code, just your description and this comment.)

-- Hannes
--
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]

  Powered by Linux