summaryrefslogtreecommitdiff
path: root/builtin
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2011-10-18 04:37:13 (GMT)
committerJunio C Hamano <gitster@pobox.com>2011-10-18 04:37:14 (GMT)
commita200dc8e62563165df1105eae0e980a44059c6fb (patch)
treeb4133d445668ef81b9f636ee2fc74b141cb6187e /builtin
parent6e97fccf0c77b15c86e25558d69ce54422ebcf92 (diff)
parent6eba6210d9824445c29b75f9c618abbec5184afd (diff)
downloadgit-a200dc8e62563165df1105eae0e980a44059c6fb.zip
git-a200dc8e62563165df1105eae0e980a44059c6fb.tar.gz
git-a200dc8e62563165df1105eae0e980a44059c6fb.tar.bz2
Merge branch 'bc/attr-ignore-case'
* 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: transport-helper.c
Diffstat (limited to 'builtin')
-rw-r--r--builtin/check-attr.c2
-rw-r--r--builtin/mv.c6
2 files changed, 7 insertions, 1 deletions
diff --git a/builtin/check-attr.c b/builtin/check-attr.c
index ded0d83..44c421e 100644
--- a/builtin/check-attr.c
+++ b/builtin/check-attr.c
@@ -94,6 +94,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 40f33ca..5efe6c5 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);