author | Junio C Hamano <gitster@pobox.com> | |
Wed, 30 Mar 2011 21:10:41 +0000 (14:10 -0700) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Wed, 30 Mar 2011 21:10:41 +0000 (14:10 -0700) |
* maint:
contrib/thunderbird-patch-inline: do not require bash to run the script
t8001: check the exit status of the command being tested
strbuf.h: remove a tad stale docs-in-comment and reference api-doc instead
Typos: t/README
Documentation/config.txt: make truth value of numbers more explicit
git-pack-objects.txt: fix grammatical errors
parse-remote: replace unnecessary sed invocation
contrib/thunderbird-patch-inline: do not require bash to run the script
t8001: check the exit status of the command being tested
strbuf.h: remove a tad stale docs-in-comment and reference api-doc instead
Typos: t/README
Documentation/config.txt: make truth value of numbers more explicit
git-pack-objects.txt: fix grammatical errors
parse-remote: replace unnecessary sed invocation
1 | 2 | |||
---|---|---|---|---|
Documentation/config.txt | patch | | diff1 | | diff2 | | blob | history |
Documentation/git-pack-objects.txt | patch | | diff1 | | diff2 | | blob | history |
git-parse-remote.sh | patch | | diff1 | | diff2 | | blob | history |
strbuf.h | patch | | diff1 | | diff2 | | blob | history |
t/README | patch | | diff1 | | diff2 | | blob | history |
diff --cc Documentation/config.txt
Simple merge
diff --cc Documentation/git-pack-objects.txt
Simple merge
diff --cc git-parse-remote.sh
index e7013f7ba72a64ab24b991846755b6d6c068b37a,d3782d9559af8a0b99262d37f99b6035bd69e320..91688792a2eb28d6f6a84fae81f1ae390bd49b45
--- 1/git-parse-remote.sh
--- 2/git-parse-remote.sh
+++ b/git-parse-remote.sh
# this would fail in that case and would issue an error message.
GIT_DIR=$(git rev-parse -q --git-dir) || :;
-get_data_source () {
- case "$1" in
- */*)
- echo ''
- ;;
- .)
- echo self
- ;;
- *)
- if test "$(git config --get "remote.$1.url")"
- then
- echo config
- elif test -f "$GIT_DIR/remotes/$1"
- then
- echo remotes
- elif test -f "$GIT_DIR/branches/$1"
- then
- echo branches
- else
- echo ''
- fi ;;
- esac
-}
-
-get_remote_url () {
- data_source=$(get_data_source "$1")
- case "$data_source" in
- '')
- echo "$1"
- ;;
- self)
- echo "$1"
- ;;
- config)
- git config --get "remote.$1.url"
- ;;
- remotes)
- sed -ne '/^URL: */{
- s///p
- q
- }' "$GIT_DIR/remotes/$1"
- ;;
- branches)
- sed -e 's/#.*//' "$GIT_DIR/branches/$1"
- ;;
- *)
- die "internal error: get-remote-url $1" ;;
- esac
-}
-
get_default_remote () {
- curr_branch=$(git symbolic-ref -q HEAD | sed -e 's|^refs/heads/||')
+ curr_branch=$(git symbolic-ref -q HEAD)
+ curr_branch="${cur_branch#refs/heads/}"
origin=$(git config --get "branch.$curr_branch.remote")
echo ${origin:-origin}
}
diff --cc strbuf.h
Simple merge
diff --cc t/README
Simple merge