Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarthik Nayak <karthik.188@gmail.com>2017-01-10 11:49:47 +0300
committerJunio C Hamano <gitster@pobox.com>2017-01-10 23:44:31 +0300
commit3a42980f9e5ecc2b74c538109d4007c630881f1c (patch)
treef02610e5d0e5e981003ccf67c317c63947b62bd0 /Documentation/git-for-each-ref.txt
parent17938f171f703c28696c7839a910565f0fb32121 (diff)
ref-filter: Do not abruptly die when using the 'lstrip=<N>' option
Currently when we use the 'lstrip=<N>' option, if 'N' is greater than the number of components available in the refname, we abruptly end program execution by calling die(). This behavior is undesired since a single refname with few components could end program execution. To avoid this, return an empty string whenever the value 'N' is greater than the number of components available, instead of calling die(). Signed-off-by: Karthik Nayak <Karthik.188@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation/git-for-each-ref.txt')
-rw-r--r--Documentation/git-for-each-ref.txt3
1 files changed, 1 insertions, 2 deletions
diff --git a/Documentation/git-for-each-ref.txt b/Documentation/git-for-each-ref.txt
index b0d94deea6..04ffc35524 100644
--- a/Documentation/git-for-each-ref.txt
+++ b/Documentation/git-for-each-ref.txt
@@ -98,8 +98,7 @@ refname::
abbreviation mode. If `lstrip=<N>` is appended, strips `<N>`
slash-separated path components from the front of the refname
(e.g., `%(refname:lstrip=2)` turns `refs/tags/foo` into `foo`.
- `<N>` must be a positive integer. If a displayed ref has fewer
- components than `<N>`, the command aborts with an error.
+ `<N>` must be a positive integer.
objecttype::
The type of the object (`blob`, `tree`, `commit`, `tag`).