summaryrefslogtreecommitdiff
path: root/ident.c
diff options
context:
space:
mode:
authorJens Lehmann <Jens.Lehmann@web.de>2011-05-14 16:26:58 (GMT)
committerJunio C Hamano <gitster@pobox.com>2011-05-14 17:57:56 (GMT)
commitd4e98b581b5b3b70ca58cb6677ec02bee4ae7007 (patch)
treedd7e761a47e9221afa5d1e61f7f86d2a7e2a78ad /ident.c
parent44ca0c8ed927c8e7525ceec412704ff9967ff6ac (diff)
downloadgit-d4e98b581b5b3b70ca58cb6677ec02bee4ae7007.zip
git-d4e98b581b5b3b70ca58cb6677ec02bee4ae7007.tar.gz
git-d4e98b581b5b3b70ca58cb6677ec02bee4ae7007.tar.bz2
Submodules: Don't parse .gitmodules when it contains, merge conflicts
Commands like "git status", "git diff" and "git fetch" would fail when the .gitmodules file contained merge conflicts because the config parser would call die() when hitting the conflict markers: "fatal: bad config file line <n> in <path>/.gitmodules" While this behavior was on the safe side, it is really unhelpful to the user to have commands like status and diff fail, as these are needed to find out what's going on. And the error message is only mildly helpful, as it points to the right file but doesn't mention that it is unmerged. Users of git gui were not shown any conflicts at all when this happened. Improve the situation by checking if the index records .gitmodules as unmerged. When that is the case we can't make any assumptions about the configuration to be found there after the merge conflict is resolved by the user, so assume that all recursion is disabled unless .git/config or the global config say otherwise. As soon as the merge conflict is resolved and the .gitmodules file has been staged subsequent commands again honor any configuration done there. Signed-off-by: Jens Lehmann <Jens.Lehmann@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'ident.c')
0 files changed, 0 insertions, 0 deletions