diff options
author | Junio C Hamano <gitster@pobox.com> | 2008-10-17 01:52:32 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2008-10-17 01:52:32 -0700 |
commit | 46dc1b0e332612aa32c139007fa33f4b429de9d1 (patch) | |
tree | 86e934ac60e69c03c44a9d59eab6e400c16efb5f /remote.c | |
parent | 84ed4c5d117d72f02cc918e413b9861a9d2846d7 (diff) | |
parent | 8ed0a740dd42bd0724aebed6e3b07c4ea2a2d5e8 (diff) | |
download | git-46dc1b0e332612aa32c139007fa33f4b429de9d1.tar.gz |
Merge branch 'maint'
* maint:
t1301-shared-repo.sh: don't let a default ACL interfere with the test
git-check-attr(1): add output and example sections
xdiff-interface.c: strip newline (and cr) from line before pattern matching
t4018-diff-funcname: demonstrate end of line funcname matching flaw
t4018-diff-funcname: rework negated last expression test
Typo "does not exists" when git remote update remote.
remote.c: correct the check for a leading '/' in a remote name
Add testcase to ensure merging an early part of a branch is done properly
Conflicts:
t/t7600-merge.sh
Diffstat (limited to 'remote.c')
-rw-r--r-- | remote.c | 9 |
1 files changed, 5 insertions, 4 deletions
@@ -341,13 +341,14 @@ static int handle_config(const char *key, const char *value, void *cb) if (prefixcmp(key, "remote.")) return 0; name = key + 7; + if (*name == '/') { + warning("Config remote shorthand cannot begin with '/': %s", + name); + return 0; + } subkey = strrchr(name, '.'); if (!subkey) return error("Config with no key for remote %s", name); - if (*subkey == '/') { - warning("Config remote shorthand cannot begin with '/': %s", name); - return 0; - } remote = make_remote(name, subkey - name); if (!strcmp(subkey, ".mirror")) remote->mirror = git_config_bool(key, value); |