aboutsummaryrefslogtreecommitdiff
path: root/convert.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2017-10-23 14:19:02 +0900
committerJunio C Hamano <gitster@pobox.com>2017-10-23 14:19:02 +0900
commitdd3bfe4f5fda5e8e8093be2d18cdc80a90e25e5b (patch)
tree69f56b9802809276e92b5abf9e531976d041224d /convert.c
parenta37b73e9bb8b830a679abad23eff9b0949e07416 (diff)
parent6cdf8a7929688ea5702ab53f450d038e973e64e1 (diff)
downloadgit-dd3bfe4f5fda5e8e8093be2d18cdc80a90e25e5b.tar.gz
git-dd3bfe4f5fda5e8e8093be2d18cdc80a90e25e5b.tar.xz
Merge branch 'ma/ts-cleanups' into maint
Assorted bugfixes and clean-ups. * ma/ts-cleanups: ThreadSanitizer: add suppressions strbuf_setlen: don't write to strbuf_slopbuf pack-objects: take lock before accessing `remaining` convert: always initialize attr_action in convert_attrs
Diffstat (limited to 'convert.c')
-rw-r--r--convert.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/convert.c b/convert.c
index 387c1c545..d7144201f 100644
--- a/convert.c
+++ b/convert.c
@@ -1041,7 +1041,6 @@ static void convert_attrs(struct conv_attrs *ca, const char *path)
ca->crlf_action = git_path_check_crlf(ccheck + 4);
if (ca->crlf_action == CRLF_UNDEFINED)
ca->crlf_action = git_path_check_crlf(ccheck + 0);
- ca->attr_action = ca->crlf_action;
ca->ident = git_path_check_ident(ccheck + 1);
ca->drv = git_path_check_convert(ccheck + 2);
if (ca->crlf_action != CRLF_BINARY) {
@@ -1055,12 +1054,14 @@ static void convert_attrs(struct conv_attrs *ca, const char *path)
else if (eol_attr == EOL_CRLF)
ca->crlf_action = CRLF_TEXT_CRLF;
}
- ca->attr_action = ca->crlf_action;
} else {
ca->drv = NULL;
ca->crlf_action = CRLF_UNDEFINED;
ca->ident = 0;
}
+
+ /* Save attr and make a decision for action */
+ ca->attr_action = ca->crlf_action;
if (ca->crlf_action == CRLF_TEXT)
ca->crlf_action = text_eol_is_crlf() ? CRLF_TEXT_CRLF : CRLF_TEXT_INPUT;
if (ca->crlf_action == CRLF_UNDEFINED && auto_crlf == AUTO_CRLF_FALSE)