Merge branch 'ar/mksnpath'
authorJunio C Hamano <gitster@pobox.com>
Wed, 5 Nov 2008 19:35:53 +0000 (11:35 -0800)
committerJunio C Hamano <gitster@pobox.com>
Wed, 5 Nov 2008 19:35:53 +0000 (11:35 -0800)
* ar/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 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

1  2 
builtin-revert.c
builtin-tag.c
cache.h
path.c
refs.c

index 7483a7a63bf09a7a123e442e9b933b9d24f2b1a6,7e50c2aa542772b2bac7c599df8865c3dbae5bcd..4038b4118da087069db82bfcf6e0dd298aec9036
@@@ -251,7 -251,7 +251,7 @@@ static int revert_or_cherry_pick(int ar
        int i, index_fd, clean;
        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");
        struct merge_options o;
        struct tree *result, *next_tree, *base_tree, *head_tree;
        static struct lock_file index_lock;
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