Home Home > GIT Browse
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichal Marek <mmarek@suse.cz>2011-06-02 11:21:39 +0200
committerMichal Marek <mmarek@suse.cz>2011-07-25 12:26:04 +0200
commit9502a1ce05f2ee18a47dc53d90ef20abe46ddf07 (patch)
tree7d7054b67bc07648c1cdc2338ca24fdf4b196447
parent2f842929de4f29a7e81c27986eb81e24f93e3242 (diff)
mainline-commit: Handle 3.x
-rwxr-xr-xscripts/mainline-commit27
1 files changed, 17 insertions, 10 deletions
diff --git a/scripts/mainline-commit b/scripts/mainline-commit
index 585978463e..7e2954fff2 100755
--- a/scripts/mainline-commit
+++ b/scripts/mainline-commit
@@ -138,7 +138,7 @@ fetch_from()
name=${name##**/}
case "$version" in
- 2.*)
+ *.* )
version=v${version}
esac
base_id=$(rev_parse "$version^{commit}")
@@ -146,12 +146,12 @@ fetch_from()
return 0
fi
refspec=($(git ls-remote "$url" | \
- sed -rn -e 's@.*(refs/tags/v2\.[^^]*)$@\1:\1@p' -e \
+ sed -rn -e 's@.*(refs/tags/v[1-9][^^]*)$@\1:\1@p' -e \
"s@.*(refs/heads/master)\$@\\1:upstream/$name@p"))
case "$version" in
- v2.*)
+ v*)
if ! echo "${refspec[@]}" | grep -q "/$version:"; then
- # if we are looking for a v2.* tag and it is not there,
+ # if we are looking for a v* tag and it is not there,
# do not bother fetching anything
return 1
fi
@@ -207,6 +207,7 @@ get_base_id()
return
fi
fi
+ local is_stable=false
case "$base" in
2.6.11.*)
# The history tree has 2.6.11.y up to 2.6.11.5; but there
@@ -216,12 +217,16 @@ get_base_id()
2.6.*-rt*)
fetch_from "tip/linux-2.6-tip.git"
;;
- 2.6.*.*)
+ 3.0.0*)
+ fetch_from "torvalds/linux-2.6.git" "$base"
+ ;;
+ 2.6.*.* | [3-9].*.* | [1-9][0-9].*.* )
+ is_stable=true
if ! fetch_from "stable/linux-${base%.*}.y.git" "$base"; then
fetch_from "longterm/linux-${base%.*}.y.git" "$base"
fi
;;
- 2.6.*)
+ 2.6.* | [3-9].* | [1-9][0-9].*)
fetch_from "torvalds/linux-2.6.git" "$base"
;;
*)
@@ -229,14 +234,16 @@ get_base_id()
esac
if test -z "$base_id"; then
case "$base" in
- 2.6.*.*-rc*)
- # RCs for stable are typically not in git
- base_id=0
- ;;
2.6.*-rt*)
# not all rt releases are tagged in tip
base_id=0
;;
+ *-rc* )
+ if $is_stable; then
+ # RCs for stable are typically not in git
+ base_id=0
+ fi
+ ;;
esac
fi
}