@matheusbsbs / matheus-bagliano / commits / f887564ab7
Fork 0

Use git-merge instead of git-resolve in git-pull.

Signed-off-by: Junio C Hamano <junkio@cox.net>

Junio C Hamano committed Sep 16, 2005 at 23:38 UTC f887564ab72e107bcdee3ba83c91e2bb4ae13ca7
1 file changed +33 -7
git-pull.sh
+33 -7
@@ -6,6 +6,38 @@
6
7 . git-sh-setup || die "Not a git archive"
8
9 +usage () {
10 + die "git pull [-n] [-s strategy]... <repo> <head>..."
11 +}
12 +
13 +strategy_args= no_summary=
14 +while case "$#,$1" in 0) break ;; *,-*) ;; *) break ;; esac
15 +do
16 + case "$1" in
17 + -n|--n|--no|--no-|--no-s|--no-su|--no-sum|--no-summ|\
18 + --no-summa|--no-summar|--no-summary)
19 + no_summary=-n ;;
20 + -s=*|--s=*|--st=*|--str=*|--stra=*|--strat=*|--strate=*|\
21 + --strateg=*|--strategy=*|\
22 + -s|--s|--st|--str|--stra|--strat|--strate|--strateg|--strategy)
23 + case "$#,$1" in
24 + *,*=*)
25 + strategy=`expr "$1" : '-[^=]*=\(.*\)'` ;;
26 + 1,*)
27 + usage ;;
28 + *)
29 + strategy="$2"
30 + shift ;;
31 + esac
32 + strategy_args="${strategy_args}-s $strategy "
33 + ;;
34 + -*)
35 + usage
36 + ;;
37 + esac
38 + shift
39 +done
40 +
41 orig_head=$(cat "$GIT_DIR/HEAD") || die "Pulling into a black hole?"
42 git-fetch --update-head-ok "$@" || exit 1
43
@@ -35,12 +67,6 @@ case "$merge_head" in
67 echo >&2 "No changes."
68 exit 0
69 ;;
38 -*' '?*)
39 - echo >&2 "Pulling more than one heads; making an Octopus."
40 - exec git-octopus
41 - ;;
70 esac
71
44 -git-resolve \
45 - "$(cat "$GIT_DIR"/HEAD)" \
46 - $merge_head "Merge $merge_name"
72 +git-merge $no_summary $strategy_args "Merge $merge_name" HEAD $merge_head