summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: cadd8a7)
raw | patch | inline | side by side (parent: cadd8a7)
author | Junio C Hamano <junkio@cox.net> | |
Sat, 25 Nov 2006 09:10:10 +0000 (01:10 -0800) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Sat, 25 Nov 2006 09:10:10 +0000 (01:10 -0800) |
Building on top of the earlier refspec glob pattern enhancement,
this allows a glob pattern to say the updates should be forced
by prefixing it with '+' as usual, like this:
Pull: +refs/heads/*:refs/remotes/origin/*
Signed-off-by: Junio C Hamano <junkio@cox.net>
this allows a glob pattern to say the updates should be forced
by prefixing it with '+' as usual, like this:
Pull: +refs/heads/*:refs/remotes/origin/*
Signed-off-by: Junio C Hamano <junkio@cox.net>
git-parse-remote.sh | patch | blob | history |
diff --git a/git-parse-remote.sh b/git-parse-remote.sh
index e281b7c6ebd5515d74201869574eed6077f37c9d..19bc3857d17b74324edbad58156a3e3c85fe0497 100755 (executable)
--- a/git-parse-remote.sh
+++ b/git-parse-remote.sh
expand_refs_wildcard () {
for ref
do
+ lref=${ref#'+'}
# a non glob pattern is given back as-is.
- expr "z$ref" : 'zrefs/.*/\*:refs/.*/\*$' >/dev/null || {
+ expr "z$lref" : 'zrefs/.*/\*:refs/.*/\*$' >/dev/null || {
echo "$ref"
continue
}
- from=`expr "z$ref" : 'z\(refs/.*/\)\*:refs/.*/\*$'`
- to=`expr "z$ref" : 'zrefs/.*/\*:\(refs/.*/\)\*$'`
+
+ from=`expr "z$lref" : 'z\(refs/.*/\)\*:refs/.*/\*$'`
+ to=`expr "z$lref" : 'zrefs/.*/\*:\(refs/.*/\)\*$'`
+ local_force=
+ test "z$lref" = "z$ref" || local_force='+'
echo "$ls_remote_result" |
(
IFS=' '
then
continue
fi
- echo "${name}:${to}${mapped}"
+ echo "${local_force}${name}:${to}${mapped}"
done
)
done