git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH v5 4/6] pull: add --merge option

From
Felipe Contreras <felipe.contreras@gmail.com>
Date
Apr 29, 2014, 11:17 UTC
Message-ID
<1398770226-9686-5-git-send-email-felipe.contreras@gmail.com>
In-Reply-To
<1398770226-9686-1-git-send-email-felipe.contreras@gmail.com>
Also, deprecate --no-rebase since there's no need for it any more.
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
---
 Documentation/git-pull.txt | 8 ++++++--
 git-pull.sh                | 6 +++++-
 2 files changed, 11 insertions(+), 3 deletions(-)
diff --git a/Documentation/git-pull.txt b/Documentation/git-pull.txt
index 9a91b9f..767bca3 100644
--- a/Documentation/git-pull.txt
+++ b/Documentation/git-pull.txt
@@ -127,8 +127,12 @@ It rewrites history, which does not bode well when you
 published that history already.  Do *not* use this option
 unless you have read linkgit:git-rebase[1] carefully.
 
---no-rebase::
-	Override earlier --rebase.
+-m::
+--merge::
+	Force a merge.
++
+See `pull.mode`, `branch.<name>.pullmode` in linkgit:git-config[1] if you want
+to make `git pull` always use `--merge`.
 
 Options related to fetching
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~
diff --git a/git-pull.sh b/git-pull.sh
index 3dfd856..26e4e55 100755
--- a/git-pull.sh
+++ b/git-pull.sh
@@ -151,8 +151,12 @@ do
 	-r|--r|--re|--reb|--reba|--rebas|--rebase)
 		mode=rebase
 		;;
+	-m|--m|--me|--mer|--merg|--merge)
+		mode=merge
+		;;
 	--no-r|--no-re|--no-reb|--no-reba|--no-rebas|--no-rebase)
-		mode=
+		mode=merge
+		warn "$(gettext "--no-rebase is deprecated, please use --merge instead")"
 		;;
 	--recurse-submodules)
 		recurse_submodules=--recurse-submodules
-- 
1.9.2+fc1.3.gade8541
Previous: Felipe ContrerasNext: Felipe Contreras
Message 11 of 19 in “Reject non-ff pulls by default”
  1. 0/6 Reject non-ff pulls by defaultFelipe Contreras, Apr 29, 2014
  2. 1/6 pull: rename pull.rename to pull.modeFelipe Contreras, Apr 29, 2014
  3. Marat RadchenkoApr 29, 2014
  4. Felipe ContrerasApr 29, 2014
  5. Philip OakleyApr 29, 2014
  6. Felipe ContrerasApr 29, 2014
  7. Philip OakleyApr 29, 2014
  8. Richard HansenApr 30, 2014
  9. 2/6 pull: migrate all the tests to pull.modeFelipe Contreras, Apr 29, 2014
  10. 3/6 pull: refactor $rebase variable into $modeFelipe Contreras, Apr 29, 2014
  11. 4/6 pull: add --merge optionFelipe Contreras, Apr 29, 2014
  12. 5/6 pull: add merge-ff-only optionFelipe Contreras, Apr 29, 2014
  13. 6/6 pull: only allow ff merges by defaultFelipe Contreras, Apr 29, 2014
  14. Junio C HamanoApr 30, 2014
  15. Felipe ContrerasApr 30, 2014
  16. Junio C HamanoApr 30, 2014
  17. Felipe ContrerasApr 30, 2014
  18. Junio C HamanoApr 30, 2014
  19. Junio C HamanoApr 30, 2014

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.