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

[PATCH] Auto-correct git pull -ff to git pull --ff.

From
tsuna <tsunanet@gmail.com>
Date
Mar 20, 2010, 01:59 UTC
Message-ID
<4d9f5be51003191859p38c7cfa9o11eafd5016b6ced@mail.gmail.com>

Hi there, I attached a trivial patch that auto-corrects a frequent typo does not trigger any error with git pull. I find it useful so I hope others will too.

-- 
Benoit "tsuna" Sigoure


From e4d43640d80fca93fda45d13e02f3fedf09f639a Mon Sep 17 00:00:00 2001
From: Benoit Sigoure <tsunanet@gmail.com>
Date: Wed, 17 Mar 2010 17:11:44 -0700
Subject: [PATCH] Auto-correct git pull -ff to git pull --ff.

This frequent typo does not trigger any error because git pull doesn't
recognize -ff and passes it through to git fetch, which parses it as a
short option, as if the option -f was simply specified twice.
---
 git-pull.sh |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/git-pull.sh b/git-pull.sh
index d45b50c..be85032 100755
--- a/git-pull.sh
+++ b/git-pull.sh
@@ -66,7 +66,7 @@ do
 		squash=--squash ;;
 	--no-sq|--no-squ|--no-squa|--no-squas|--no-squash)
 		squash=--no-squash ;;
-	--ff)
+	-ff|--ff)
 		no_ff=--ff ;;
 	--no-ff)
 		no_ff=--no-ff ;;
-- 
1.7.0.2.279.gf1ba1c
Message 1 of 1 in “Auto-correct git pull -ff to git pull --ff.”
  1. Auto-correct git pull -ff to git pull --ff.tsuna, Mar 20, 2010

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.