git-pull: further safety while on tracking branch.
Running 'git pull' while on the tracking branch has a built-in safety valve to fast-forward the index and working tree to match the branch head, but it errs on the safe side too cautiously. Signed-off-by: Junio C Hamano <junkio@cox.net>
Junio C Hamano committed
Mar 22, 2006 at 01:09 UTC
cf46e7b8999f25d5d7f2acd64701a100e403ee03
1 file changed
+3
-1
git-pull.sh
+3
-1
@@ -55,7 +55,9 @@ then
55
# First update the working tree to match $curr_head.
56
57
echo >&2 "Warning: fetch updated the current branch head."
58
- echo >&2 "Warning: fast forwarding your working tree."
58
+ echo >&2 "Warning: fast forwarding your working tree from"
59
+ echo >&2 "Warning: $orig_head commit."
60
+ git-update-index --refresh 2>/dev/null
61
git-read-tree -u -m "$orig_head" "$curr_head" ||
62
die "You need to first update your working tree."
63
fi