diff options
author | Junio C Hamano <gitster@pobox.com> | 2011-11-02 02:54:45 +0400 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2011-11-02 02:54:46 +0400 |
commit | a4fdd79f13ec0551be94d7a3ac57e87434239f11 (patch) | |
tree | c1d5d4bf292dab6bd36270f411e99177b3d6bd1d /builtin | |
parent | ffa4c364f4ec090438de48a986f02cdeb302b46c (diff) | |
parent | 6eba6210d9824445c29b75f9c618abbec5184afd (diff) |
Merge branch 'bc/attr-ignore-case' into maint
* bc/attr-ignore-case:
attr.c: respect core.ignorecase when matching attribute patterns
attr: read core.attributesfile from git_default_core_config
builtin/mv.c: plug miniscule memory leak
cleanup: use internal memory allocation wrapper functions everywhere
attr.c: avoid inappropriate access to strbuf "buf" member
Conflicts:
remote.c
Diffstat (limited to 'builtin')
-rw-r--r-- | builtin/check-attr.c | 2 | ||||
-rw-r--r-- | builtin/mv.c | 6 |
2 files changed, 7 insertions, 1 deletions
diff --git a/builtin/check-attr.c b/builtin/check-attr.c index 708988a0e1..abb11650fd 100644 --- a/builtin/check-attr.c +++ b/builtin/check-attr.c @@ -92,6 +92,8 @@ int cmd_check_attr(int argc, const char **argv, const char *prefix) struct git_attr_check *check; int cnt, i, doubledash, filei; + git_config(git_default_config, NULL); + argc = parse_options(argc, argv, prefix, check_attr_options, check_attr_usage, PARSE_OPT_KEEP_DASHDASH); diff --git a/builtin/mv.c b/builtin/mv.c index 40f33ca4d0..5efe6c5760 100644 --- a/builtin/mv.c +++ b/builtin/mv.c @@ -29,7 +29,11 @@ static const char **copy_pathspec(const char *prefix, const char **pathspec, to_copy--; if (to_copy != length || base_name) { char *it = xmemdupz(result[i], to_copy); - result[i] = base_name ? strdup(basename(it)) : it; + if (base_name) { + result[i] = xstrdup(basename(it)); + free(it); + } else + result[i] = it; } } return get_pathspec(prefix, result); |