author | Junio C Hamano <gitster@pobox.com> | |
Sun, 9 Nov 2008 00:13:19 +0000 (16:13 -0800) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Sun, 9 Nov 2008 00:13:19 +0000 (16:13 -0800) |
* ar/maint-mksnpath:
Use git_pathdup instead of xstrdup(git_path(...))
git_pathdup: returns xstrdup-ed copy of the formatted path
Fix potentially dangerous use of git_path in ref.c
Add git_snpath: a .git path formatting routine with output buffer
Fix potentially dangerous uses of mkpath and git_path
Fix mkpath abuse in dwim_ref and dwim_log of sha1_name.c
Add mksnpath which allows you to specify the output buffer
Conflicts:
builtin-revert.c
rerere.c
Use git_pathdup instead of xstrdup(git_path(...))
git_pathdup: returns xstrdup-ed copy of the formatted path
Fix potentially dangerous use of git_path in ref.c
Add git_snpath: a .git path formatting routine with output buffer
Fix potentially dangerous uses of mkpath and git_path
Fix mkpath abuse in dwim_ref and dwim_log of sha1_name.c
Add mksnpath which allows you to specify the output buffer
Conflicts:
builtin-revert.c
rerere.c
1 | 2 | |||
---|---|---|---|---|
builtin-revert.c | patch | | diff1 | | diff2 | | blob | history |
builtin-tag.c | patch | | diff1 | | diff2 | | blob | history |
cache.h | patch | | diff1 | | diff2 | | blob | history |
path.c | patch | | diff1 | | diff2 | | blob | history |
refs.c | patch | | diff1 | | diff2 | | blob | history |
rerere.c | patch | | diff1 | | diff2 | | blob | history |
diff --cc builtin-revert.c
index 786a956f26486856c97e15ce8ab464dfb25dcbc5,5c4ab58f4643b8a1b77507c1cc0f0b8a70691ebf..74845ef8e6f9c635bbafbf5dfea5e73cf6e11aa0
--- 1/builtin-revert.c
--- 2/builtin-revert.c
+++ b/builtin-revert.c
int i;
char *oneline, *reencoded_message = NULL;
const char *message, *encoding;
- char *defmsg = xstrdup(git_path("MERGE_MSG"));
- const char *defmsg = git_pathdup("MERGE_MSG");
++ char *defmsg = git_pathdup("MERGE_MSG");
git_config(git_default_config, NULL);
me = action == REVERT ? "revert" : "cherry-pick";
diff --cc builtin-tag.c
Simple merge
diff --cc cache.h
Simple merge
diff --cc path.c
Simple merge
diff --cc refs.c
Simple merge
diff --cc rerere.c
index 2b7a99d729e13b09239f1d9175d3d6c0048821b0,3d6ee8fa2a647d6ee8459f700cbc450c94e7f179..a0d477aaca73ff7ec8b12dc6c8255b69dbd677a5
+++ b/rerere.c
if (!is_rerere_enabled())
return -1;
- merge_rr_path = xstrdup(git_path("MERGE_RR"));
+ merge_rr_path = git_pathdup("MERGE_RR");
- fd = hold_lock_file_for_update(&write_lock, merge_rr_path, 1);
+ fd = hold_lock_file_for_update(&write_lock, merge_rr_path,
+ LOCK_DIE_ON_ERROR);
read_rr(merge_rr);
return fd;
}