On Thu, Jun 26, 2008 at 7:43 AM, Edward Z. Yang <edwardzyang@thewritingpot.com> wrote:You can work around the problem by issuing the following commands at this point: echo ".gitattributes -crlf" >> .gitattributes echo ".gitmodules -crlf" >> .gitattributes git add .gitattributes Yes, this also fails on linux (without the workaround). To fix it "properly", git-config needs to choose between lf and crlf (git-submodule uses git-config to write .gitmodules). But this depends on * whether the 'configfile' is (or will be!) tracked by git (e.g. .gitmodules) * whether a crlf-attribute is specified for the 'configfile' * the setting of core.autocrlf A simpler solution might be to treat .gitmodules specially in check_safe_crlf(), maybe something like this (possibly wrapped by gmail...): diff --git a/convert.c b/convert.c index 1c66844..254a99b 100644 --- a/convert.c +++ b/convert.c @@ -91,6 +91,15 @@ static void check_safe_crlf(const char *path, int action, if (!checksafe) return; + /* Dirty hack: git-submodule uses git-config to update .gitmodules, and + * there's no reasonable way for git-config to know if the user prefers + * crlf or lf line endings for this file. And since it really doesn't + * matter, lets just ignore that the line endings might be modified by + * a later checkout. + */ + if (!strcmp(path, ".gitmodules")) + return; + if (action == CRLF_INPUT || auto_crlf <= 0) { /* * CRLFs would not be restored by checkout: -- larsh -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
| Ingo Molnar | [git pull] x86 arch updates for v2.6.25 |
| Greg Kroah-Hartman | [PATCH 02/46] sysfs: crash debugging |
| Chuck Ebbert | Why do so many machines need "noapic"? |
| Greg KH | Re: [BUG] 2.6.24-git usb reset problems |
git: | |
| Wink Saville | Resolving conflicts |
| Andreas Ericsson | git integration with monodevelop |
| Jon Smirl | ! [rejected] master -> master (non-fast forward) |
| Nicolas Bock | error: cannot lock ref 'refs/remotes/origin/*' |
| GVG GVG | ssh_exchange_identification: Connection closed by remote host |
| Christian Weisgerber | Re: libiconv problem |
| Daniel Ouellet | identifying sparse files and get ride of them trick available? |
| Richard Stallman | Real men don't attack straw men |
| Dushan Tcholich | Re: ksoftirqd high cpu load on kernels 2.6.24 to 2.6.27-rc1-mm1 |
| Larry McVoy | Re: tcp bw in 2.6 |
| Arjan van de Ven | Re: [GIT]: Networking |
| Jarek Poplawski | Re: [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock(). |
