[PATCH 1/2] pull: pass --strategy along to to rebase

Subsystems: the rest

DORMANTno replies

2 messages, 1 author, 2016-06-15 · open the first message on its own page

[PATCH 1/2] pull: pass --strategy along to to rebase

From: Jay Soffian <hidden>
Date: 2016-06-15 22:44:16

rebase supports --strategy, so pull should pass the option along to it.

Signed-off-by: Jay Soffian <redacted>
---
I noticed the other day that pull didn't pass --strategy along to rebase, but
forgot I'd noticed, even though Johannes replied w/a patch. Anyway, my next
patch documents pull's usage via its OPTIONS_SPEC and I noticed the problem
again. I fix it here so that I can document its use in the next patch. :-)

 git-pull.sh |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/git-pull.sh b/git-pull.sh
index 46da0f4..3ce32b5 100755
--- a/git-pull.sh
+++ b/git-pull.sh
@@ -174,6 +174,7 @@ fi
 
 merge_name=$(git fmt-merge-msg <"$GIT_DIR/FETCH_HEAD") || exit
 test true = "$rebase" &&
-	exec git-rebase --onto $merge_head ${oldremoteref:-$merge_head}
+	exec git-rebase $strategy_args --onto $merge_head \
+	${oldremoteref:-$merge_head}
 exec git-merge $no_summary $no_commit $squash $no_ff $strategy_args \
 	"$merge_name" HEAD $merge_head
-- 
1.5.4.2.285.g1e9f

[PATCH 2/2] pull: document usage via OPTIONS_SPEC

From: Jay Soffian <hidden>
Date: 2016-06-15 22:44:16

document usage via OPTIONS_SPEC

Signed-off-by: Jay Soffian <redacted>
---
 git-pull.sh |   32 +++++++++++++++++++++++++++++---
 1 files changed, 29 insertions(+), 3 deletions(-)
diff --git a/git-pull.sh b/git-pull.sh
index 3ce32b5..194c1d0 100755
--- a/git-pull.sh
+++ b/git-pull.sh
@@ -4,10 +4,36 @@
 #
 # Fetch one or more remote refs and merge it/them into the current HEAD.
 
-USAGE='[-n | --no-summary] [--[no-]commit] [--[no-]squash] [--[no-]ff] [-s strategy]... [<fetch-options>] <repo> <head>...'
-LONG_USAGE='Fetch one or more remote refs and merge it/them into the current HEAD.'
 SUBDIRECTORY_OK=Yes
-OPTIONS_SPEC=
+OPTIONS_SPEC="\
+git pull [options] [<repo>] [<refspec>]
+--
+  fetch options
+q,quiet          make the fetch process less verbose
+v,verbose        make the fetch process more verbose
+a,append         append to FETCH_HEAD instead of overwritting
+upload-pack=,    specify path to git-fetch-pack on remote end
+f,force          force local branch to be updated by remote branch
+t,tags           fetch all remote tags
+no-tags          do not fetch any remote tags
+k,keep           keep downloaded pack
+u,update-head-ok used internally between git pull and git fetch
+depth=           deep shallow history by specified number of commits
+  merge options
+summary          show diffstat at end of merge
+n,no-summary     do not show diff stat at end of merge
+commit           commit the result after merging
+no-commit        do not commit the result after merging
+squash           update the index and working tree only
+no-squash        override --squash, perform a normal merge and commit
+ff               only update branch pointer if merge is a fast-forward
+no-ff            do a merge commit even if the merge is a fast-forward
+s,strategy=      use given merge strategy
+  rebase options
+rebase           rebase after fetching
+no-rebase        merge after fetching
+s,strategy=      use given merge strategy; implies -m to rebase
+"
 . git-sh-setup
 set_reflog_action "pull $*"
 require_work_tree
-- 
1.5.4.2.285.g1e9f
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help