summaryrefslogtreecommitdiffstats
path: root/sha1_file.c
diff options
context:
space:
mode:
authorBrandon Williams <bmwill@google.com>2016-12-12 19:16:55 +0100
committerJunio C Hamano <gitster@pobox.com>2016-12-13 00:22:32 +0100
commit4ac9006f832d98ca1f25d956e12f3ff79e0d25bc (patch)
tree4915a2ab954bd0431b460b2a1a726b1b29b2cc97 /sha1_file.c
parentreal_path: create real_pathdup (diff)
downloadgit-4ac9006f832d98ca1f25d956e12f3ff79e0d25bc.tar.xz
git-4ac9006f832d98ca1f25d956e12f3ff79e0d25bc.zip
real_path: have callers use real_pathdup and strbuf_realpath
Migrate callers of real_path() who duplicate the retern value to use real_pathdup or strbuf_realpath. Signed-off-by: Brandon Williams <bmwill@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'sha1_file.c')
-rw-r--r--sha1_file.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sha1_file.c b/sha1_file.c
index 9c86d1924a..6a03cc3934 100644
--- a/sha1_file.c
+++ b/sha1_file.c
@@ -291,7 +291,7 @@ static int link_alt_odb_entry(const char *entry, const char *relative_base,
struct strbuf pathbuf = STRBUF_INIT;
if (!is_absolute_path(entry) && relative_base) {
- strbuf_addstr(&pathbuf, real_path(relative_base));
+ strbuf_realpath(&pathbuf, relative_base, 1);
strbuf_addch(&pathbuf, '/');
}
strbuf_addstr(&pathbuf, entry);