diff options
author | Junio C Hamano <gitster@pobox.com> | 2016-04-13 14:12:34 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2016-04-13 14:12:34 -0700 |
commit | dd27384c36223dd2ef8f31d0edb5cb6d14a4f3f9 (patch) | |
tree | e9a504428672d3af01ee18a4559b440195814da8 /abspath.c | |
parent | 5b3b015999e4b31259404c5e91c19c08780585a3 (diff) | |
parent | 8e9b20804a9900d4560e9ace4bb8c5d048a2097e (diff) | |
download | git-dd27384c36223dd2ef8f31d0edb5cb6d14a4f3f9.tar.gz git-dd27384c36223dd2ef8f31d0edb5cb6d14a4f3f9.tar.xz |
Merge branch 'js/mingw-tests-2.8'
Code clean-up.
* js/mingw-tests-2.8:
Windows: shorten code by re-using convert_slashes()
Diffstat (limited to 'abspath.c')
-rw-r--r-- | abspath.c | 5 |
1 files changed, 1 insertions, 4 deletions
@@ -167,7 +167,6 @@ const char *prefix_filename(const char *pfx, int pfx_len, const char *arg) strbuf_add(&path, pfx, pfx_len); strbuf_addstr(&path, arg); #else - char *p; /* don't add prefix to absolute paths, but still replace '\' by '/' */ strbuf_reset(&path); if (is_absolute_path(arg)) @@ -175,9 +174,7 @@ const char *prefix_filename(const char *pfx, int pfx_len, const char *arg) else if (pfx_len) strbuf_add(&path, pfx, pfx_len); strbuf_addstr(&path, arg); - for (p = path.buf + pfx_len; *p; p++) - if (*p == '\\') - *p = '/'; + convert_slashes(path.buf + pfx_len); #endif return path.buf; } |