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

[PATCH 4/4] pull: parse pull.ff as a bool or string

From
Paul Tan <pyokagan@gmail.com>
Date
May 13, 2015, 09:52 UTC
Message-ID
<1431510740-9710-5-git-send-email-pyokagan@gmail.com>
In-Reply-To
<1431510740-9710-1-git-send-email-pyokagan@gmail.com>

Since b814da8 (pull: add pull.ff configuration, 2014-01-15) git-pull supported setting --(no-)ff via the pull.ff configuration value. However, as it only matches the string values of "true" and "false", it does not support other boolean aliases such as "on", "off", "1", "0". This is inconsistent with the merge.ff setting, which supports these aliases.

Fix this by using the bool_or_string_config function to retrieve the value of pull.ff.

Signed-off-by: Paul Tan <pyokagan@gmail.com>
---
 git-pull.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/git-pull.sh b/git-pull.sh
index e51dd37..09bc678 100755
--- a/git-pull.sh
+++ b/git-pull.sh
@@ -54,7 +54,7 @@ then
 fi
 
 # Setup default fast-forward options via `pull.ff`
-pull_ff=$(git config pull.ff)
+pull_ff=$(bool_or_string_config pull.ff)
 case "$pull_ff" in
 true)
 	no_ff=--ff
-- 
2.1.4
Previous: Paul TanNext: Johannes Schindelin
Message 16 of 17 in “make pull.ff=true override merge.ff”
  1. 0/4 make pull.ff=true override merge.ffPaul Tan, May 13, 2015
  2. 1/4 t7601: test for pull.ff=true overrides merge.ff=falsePaul Tan, May 13, 2015
  3. Johannes SchindelinMay 14, 2015
  4. Junio C HamanoMay 14, 2015
  5. sh -x -i -v with continuous integration, was Re: [PATCH 1/4] t7601: test for pull.ff=true overrides merge.ff=falseJohannes Schindelin, May 14, 2015
  6. Junio C HamanoMay 14, 2015
  7. Jeff KingMay 16, 2015
  8. Junio C HamanoMay 16, 2015
  9. Jeff KingMay 18, 2015
  10. Junio C HamanoMay 18, 2015
  11. Jeff KingMay 18, 2015
  12. Junio C HamanoMay 18, 2015
  13. Paul TanMay 16, 2015
  14. 2/4 pull: make pull.ff=true override merge.ffPaul Tan, May 13, 2015
  15. 3/4 Documentation/config.txt: clarify that pull.ff overrides merge.ffPaul Tan, May 13, 2015
  16. 4/4 pull: parse pull.ff as a bool or stringPaul Tan, May 13, 2015
  17. Johannes SchindelinMay 14, 2015

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.