summaryrefslogtreecommitdiff
path: root/ref-filter.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2017-02-07 19:50:34 (GMT)
committerJunio C Hamano <gitster@pobox.com>2017-02-07 19:50:34 (GMT)
commit44a6b6ce1777f587c318008fe59b901a296f5326 (patch)
treed8c5f7d58fb7efc1705fcf0ff55d1cdc92868ea0 /ref-filter.c
parent3d9e4ce3ebef4f5aa47dad49f730e085f32b98da (diff)
downloadgit-44a6b6ce1777f587c318008fe59b901a296f5326.zip
git-44a6b6ce1777f587c318008fe59b901a296f5326.tar.gz
git-44a6b6ce1777f587c318008fe59b901a296f5326.tar.bz2
ref-filter: resurrect "strip" as a synonym to "lstrip"
We forgot that "strip" was introduced at 0571979bd6 ("tag: do not show ambiguous tag names as "tags/foo"", 2016-01-25) as part of Git 2.8 (and 2.7.1) when we started calling this "lstrip" to make it easier to explain the new "rstrip" operation. We shouldn't have renamed the existing one; "lstrip" should have been a new synonym that means the same thing as "strip". Scripts in the wild are surely using the original form already. Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'ref-filter.c')
-rw-r--r--ref-filter.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/ref-filter.c b/ref-filter.c
index 01b5c18..2a94d6d 100644
--- a/ref-filter.c
+++ b/ref-filter.c
@@ -112,7 +112,8 @@ static void refname_atom_parser_internal(struct refname_atom *atom,
atom->option = R_NORMAL;
else if (!strcmp(arg, "short"))
atom->option = R_SHORT;
- else if (skip_prefix(arg, "lstrip=", &arg)) {
+ else if (skip_prefix(arg, "lstrip=", &arg) ||
+ skip_prefix(arg, "strip=", &arg)) {
atom->option = R_LSTRIP;
if (strtol_i(arg, 10, &atom->lstrip))
die(_("Integer value expected refname:lstrip=%s"), arg);