summaryrefslogtreecommitdiff
path: root/git-pull.sh
diff options
context:
space:
mode:
authorShawn O. Pearce <spearce@spearce.org>2006-12-28 07:34:48 (GMT)
committerJunio C Hamano <junkio@cox.net>2006-12-28 09:05:15 (GMT)
commitf94741324e26af42093a89e955ff9a923abff951 (patch)
tree0beeca333111820b6af3705435ccb837f7793e20 /git-pull.sh
parentb1f5f64fc831eb9f90bd07dc708279a921410bb2 (diff)
downloadgit-f94741324e26af42093a89e955ff9a923abff951.zip
git-f94741324e26af42093a89e955ff9a923abff951.tar.gz
git-f94741324e26af42093a89e955ff9a923abff951.tar.bz2
Use GIT_REFLOG_ACTION environment variable instead.
Junio rightly pointed out that the --reflog-action parameter was starting to get out of control, as most porcelain code needed to hand it to other porcelain and plumbing alike to ensure the reflog contained the top-level user action and not the lower-level actions it invoked. At Junio's suggestion we are introducing the new set_reflog_action function to all shell scripts, allowing them to declare early on what their default reflog name should be, but this setting only takes effect if the caller has not already set the GIT_REFLOG_ACTION environment variable. Signed-off-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'git-pull.sh')
-rwxr-xr-xgit-pull.sh6
1 files changed, 3 insertions, 3 deletions
diff --git a/git-pull.sh b/git-pull.sh
index 1703091..fd4ffb8 100755
--- a/git-pull.sh
+++ b/git-pull.sh
@@ -7,6 +7,7 @@
USAGE='[-n | --no-summary] [--no-commit] [-s strategy]... [<fetch-options>] <repo> <head>...'
LONG_USAGE='Fetch one or more remote refs and merge it/them into the current HEAD.'
. git-sh-setup
+set_reflog_action "pull $*"
strategy_args= no_summary= no_commit= squash=
while case "$#,$1" in 0) break ;; *,-*) ;; *) break ;; esac
@@ -45,7 +46,7 @@ do
done
orig_head=$(git-rev-parse --verify HEAD 2>/dev/null)
-git-fetch --update-head-ok --reflog-action=pull "$@" || exit 1
+git-fetch --update-head-ok "$@" || exit 1
curr_head=$(git-rev-parse --verify HEAD 2>/dev/null)
if test "$curr_head" != "$orig_head"
@@ -118,6 +119,5 @@ case "$strategy_args" in
esac
merge_name=$(git-fmt-merge-msg <"$GIT_DIR/FETCH_HEAD") || exit
-git-merge "--reflog-action=pull $*" \
- $no_summary $no_commit $squash $strategy_args \
+git-merge $no_summary $no_commit $squash $strategy_args \
"$merge_name" HEAD $merge_head