summaryrefslogtreecommitdiff
path: root/notes-merge.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2011-10-26 16:13:27 -0700
committerJunio C Hamano <gitster@pobox.com>2011-10-26 16:13:27 -0700
commitf0911b996cac9b89b9175676f74bbcb5a9a9e34f (patch)
tree03bd073f1cc63a3b68f9a8a14babf44a09a3a2a6 /notes-merge.c
parent411e6cf1971936ba31ffa142a6d5dc5c06dc8f7a (diff)
parent8280baf565e1c72adaa6d2dfef70d18837126898 (diff)
downloadgit-f0911b996cac9b89b9175676f74bbcb5a9a9e34f.tar.gz
Merge branch 'maint-1.7.6' into maint
* maint-1.7.6: notes_merge_commit(): do not pass temporary buffer to other function gitweb: Fix links to lines in blobs when javascript-actions are enabled mergetool: no longer need to save standard input mergetool: Use args as pathspec to unmerged files t9159-*.sh: skip for mergeinfo test for svn <= 1.4 date.c: Support iso8601 timezone formats remote: only update remote-tracking branch if updating refspec remote rename: warn when refspec was not updated remote: "rename o foo" should not rename ref "origin/bar" remote: write correct fetch spec when renaming remote 'remote'
Diffstat (limited to 'notes-merge.c')
-rw-r--r--notes-merge.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/notes-merge.c b/notes-merge.c
index e1aaf43b43..baaf31f4ae 100644
--- a/notes-merge.c
+++ b/notes-merge.c
@@ -680,7 +680,7 @@ int notes_merge_commit(struct notes_merge_options *o,
* Finally store the new commit object SHA1 into 'result_sha1'.
*/
struct dir_struct dir;
- const char *path = git_path(NOTES_MERGE_WORKTREE "/");
+ char *path = xstrdup(git_path(NOTES_MERGE_WORKTREE "/"));
int path_len = strlen(path), i;
const char *msg = strstr(partial_commit->buffer, "\n\n");
@@ -720,6 +720,7 @@ int notes_merge_commit(struct notes_merge_options *o,
result_sha1);
OUTPUT(o, 4, "Finalized notes merge commit: %s",
sha1_to_hex(result_sha1));
+ free(path);
return 0;
}