diff options
author | Junio C Hamano <gitster@pobox.com> | 2017-10-23 07:19:02 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2017-10-23 07:19:02 +0200 |
commit | dd3bfe4f5fda5e8e8093be2d18cdc80a90e25e5b (patch) | |
tree | 69f56b9802809276e92b5abf9e531976d041224d /convert.c | |
parent | Merge branch 'ls/travis-scriptify' into maint (diff) | |
parent | ThreadSanitizer: add suppressions (diff) | |
download | git-dd3bfe4f5fda5e8e8093be2d18cdc80a90e25e5b.tar.xz git-dd3bfe4f5fda5e8e8093be2d18cdc80a90e25e5b.zip |
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.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -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) |