diff options
author | Junio C Hamano <gitster@pobox.com> | 2014-09-03 00:27:45 +0400 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2014-09-03 00:28:44 +0400 |
commit | f655651e09b9fa7bf8ff13f1b4a5b16c7956e4cf (patch) | |
tree | 4027a4324f45863de3811cf89df768d584f08e3e /sha1_file.c | |
parent | 51eeaea2108a4105542fe03935b411dfdbf5fe2b (diff) | |
parent | 9610decf4dc6b9352b81c67e3b03e5bb47fc8427 (diff) |
Merge branch 'rs/strbuf-getcwd'
Reduce the use of fixed sized buffer passed to getcwd() calls
by introducing xgetcwd() helper.
* rs/strbuf-getcwd:
use strbuf_add_absolute_path() to add absolute paths
abspath: convert absolute_path() to strbuf
use xgetcwd() to set $GIT_DIR
use xgetcwd() to get the current directory or die
wrapper: add xgetcwd()
abspath: convert real_path_internal() to strbuf
abspath: use strbuf_getcwd() to remember original working directory
setup: convert setup_git_directory_gently_1 et al. to strbuf
unix-sockets: use strbuf_getcwd()
strbuf: add strbuf_getcwd()
Diffstat (limited to 'sha1_file.c')
-rw-r--r-- | sha1_file.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sha1_file.c b/sha1_file.c index 3f70b1d86a..95afd20910 100644 --- a/sha1_file.c +++ b/sha1_file.c @@ -350,7 +350,7 @@ static void link_alt_odb_entries(const char *alt, int len, int sep, return; } - strbuf_addstr(&objdirbuf, absolute_path(get_object_directory())); + strbuf_add_absolute_path(&objdirbuf, get_object_directory()); normalize_path_copy(objdirbuf.buf, objdirbuf.buf); alt_copy = xmemdupz(alt, len); |