author | Junio C Hamano <junkio@cox.net> | |
Mon, 15 May 2006 20:48:22 +0000 (13:48 -0700) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Mon, 15 May 2006 20:48:22 +0000 (13:48 -0700) |
* fix:
Fix pack-index issue on 64-bit platforms a bit more portably.
Install git-send-email by default
Fix compilation on newer NetBSD systems
git config syntax updates
Another config file parsing fix.
checkout: use --aggressive when running a 3-way merge (-m).
Fix pack-index issue on 64-bit platforms a bit more portably.
Install git-send-email by default
Fix compilation on newer NetBSD systems
git config syntax updates
Another config file parsing fix.
checkout: use --aggressive when running a 3-way merge (-m).
1 | 2 | |||
---|---|---|---|---|
Makefile | patch | | diff1 | | diff2 | | blob | history |
pack-objects.c | patch | | diff1 | | diff2 | | blob | history |
repo-config.c | patch | | diff1 | | diff2 | | blob | history |
sha1_file.c | patch | | diff1 | | diff2 | | blob | history |
t/t1300-repo-config.sh | patch | | diff1 | | diff2 | | blob | history |
diff --cc Makefile
Simple merge
diff --cc pack-objects.c
Simple merge
diff --cc repo-config.c
index 63eda1bb783fcb9ff72843e74383abb0f0581441,58b6c5284fa806ddda70e84d3871415ba26c893f..284af2273c2e34e9138cd1817571d5402ceda89f
--- 1/repo-config.c
--- 2/repo-config.c
+++ b/repo-config.c
static int get_value(const char* key_, const char* regex_)
{
int i;
+ char *tl;
- key = malloc(strlen(key_)+1);
- for (i = 0; key_[i]; i++)
- key[i] = tolower(key_[i]);
- key[i] = 0;
+ key = strdup(key_);
+ for (tl=key+strlen(key)-1; tl >= key && *tl != '.'; --tl)
+ *tl = tolower(*tl);
+ for (tl=key; *tl && *tl != '.'; ++tl)
+ *tl = tolower(*tl);
+ if (use_key_regexp) {
+ key_regexp = (regex_t*)malloc(sizeof(regex_t));
+ if (regcomp(key_regexp, key, REG_EXTENDED)) {
+ fprintf(stderr, "Invalid key pattern: %s\n", key_);
+ return -1;
+ }
+ }
+
if (regex_) {
if (regex_[0] == '!') {
do_not_match = 1;
diff --cc sha1_file.c
Simple merge
diff --cc t/t1300-repo-config.sh
index 7090ea92c1ace40079493447d12fc61da416cb9c,028d15956bb4c18a6adf5d91b934ae060608ecbb..8260d57b63d7f988a4c236d99ce2c9931a67c5e3
+++ b/t/t1300-repo-config.sh
test_expect_success 'hierarchical section value' 'cmp .git/config expect'
- 1.2.3.alpha=beta
+cat > expect << EOF
+beta.noindent=sillyValue
+nextsection.nonewline=wow2 for me
+123456.a123=987
++version.1.2.3eX.alpha=beta
+EOF
+
+test_expect_success 'working --list' \
+ 'git-repo-config --list > output && cmp output expect'
+
+cat > expect << EOF
+beta.noindent sillyValue
+nextsection.nonewline wow2 for me
+EOF
+
+test_expect_success '--get-regexp' \
+ 'git-repo-config --get-regexp in > output && cmp output expect'
+
cat > .git/config << EOF
[novalue]
variable