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

1 messages from 2010-03-20 to 2010-03-20. Participants: tsuna.
Thread: https://gitlist.dev/t/23096

## tsuna, 2010-03-20 01:59

Subject: [PATCH] Auto-correct git pull -ff to git pull --ff.
Message-ID: <4d9f5be51003191859p38c7cfa9o11eafd5016b6ced@mail.gmail.com>
URL: https://gitlist.dev/e/4d9f5be51003191859p38c7cfa9o11eafd5016b6ced%40mail.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


```
