summaryrefslogtreecommitdiff
path: root/submodule.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2015-08-24 20:20:39 (GMT)
committerJunio C Hamano <gitster@pobox.com>2015-08-25 19:49:19 (GMT)
commit1f76a10b2d72245332ac41bd79249cb82f3946f0 (patch)
treefe99b9539117ac164cd05ea50143539c8abf21cd /submodule.c
parente7ffa38c6e726e8014b76297b06f78e008deb2d0 (diff)
downloadgit-1f76a10b2d72245332ac41bd79249cb82f3946f0.zip
git-1f76a10b2d72245332ac41bd79249cb82f3946f0.tar.gz
git-1f76a10b2d72245332ac41bd79249cb82f3946f0.tar.bz2
write_file(): drop caller-supplied LF from calls to create a one-liner file
All of the callsites covered by this change call write_file() or write_file_gently() to create a one-liner file. Drop the caller supplied LF and let these callees to append it as necessary. Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'submodule.c')
-rw-r--r--submodule.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/submodule.c b/submodule.c
index 5519f11..4549c1b 100644
--- a/submodule.c
+++ b/submodule.c
@@ -1103,7 +1103,7 @@ void connect_work_tree_and_git_dir(const char *work_tree, const char *git_dir)
/* Update gitfile */
strbuf_addf(&file_name, "%s/.git", work_tree);
- write_file(file_name.buf, "gitdir: %s\n",
+ write_file(file_name.buf, "gitdir: %s",
relative_path(git_dir, real_work_tree, &rel_path));
/* Update core.worktree setting */