summaryrefslogtreecommitdiff
path: root/builtin
diff options
context:
space:
mode:
authorJohannes Schindelin <johannes.schindelin@gmx.de>2018-08-04 19:23:09 (GMT)
committerJunio C Hamano <gitster@pobox.com>2018-08-06 20:04:28 (GMT)
commit46af44b07dd433c073778f0d5ab27d0167dbcec4 (patch)
tree0de805aa54c8d8718e358ce3b087985725c08b8f /builtin
parent53f9a3e157dbbc901a02ac2c73346d375e24978c (diff)
downloadgit-46af44b07dd433c073778f0d5ab27d0167dbcec4.zip
git-46af44b07dd433c073778f0d5ab27d0167dbcec4.tar.gz
git-46af44b07dd433c073778f0d5ab27d0167dbcec4.tar.bz2
pull --rebase=<type>: allow single-letter abbreviations for the type
Git for Windows' original 4aa8b8c8283 (Teach 'git pull' to handle --rebase=interactive, 2011-10-21) had support for the very convenient abbreviation git pull --rebase=i which was later lost when it was ported to the builtin `git pull`, and it was not introduced before the patch eventually made it into Git as f5eb87b98dd (pull: allow interactive rebase with --rebase=interactive, 2016-01-13). However, it is *really* a useful short hand for the occasional rebasing pull on branches that do not usually want to be rebased. So let's reintroduce this convenience, at long last. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin')
-rw-r--r--builtin/pull.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/builtin/pull.c b/builtin/pull.c
index 49cc3be..5b92aa6 100644
--- a/builtin/pull.c
+++ b/builtin/pull.c
@@ -48,11 +48,11 @@ static enum rebase_type parse_config_rebase(const char *key, const char *value,
return REBASE_FALSE;
else if (v > 0)
return REBASE_TRUE;
- else if (!strcmp(value, "preserve"))
+ else if (!strcmp(value, "preserve") || !strcmp(value, "p"))
return REBASE_PRESERVE;
- else if (!strcmp(value, "merges"))
+ else if (!strcmp(value, "merges") || !strcmp(value, "m"))
return REBASE_MERGES;
- else if (!strcmp(value, "interactive"))
+ else if (!strcmp(value, "interactive") || !strcmp(value, "i"))
return REBASE_INTERACTIVE;
if (fatal)