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:
authorRené Scharfe <l.s.r@web.de>2020-11-10 14:38:27 +0300
committerJunio C Hamano <gitster@pobox.com>2020-11-11 00:05:06 +0300
commitc714d0587567d67e1c3702e44221c1b46dc969ff (patch)
tree1d921346269705a17fb023894d5bc8d8dde36e89 /oidset.c
parent610e2b924020fe2d6a55e7ca6651f309b85c2d1d (diff)
blame: silently ignore invalid ignore file objects
Since 610e2b9240 (blame: validate and peel the object names on the ignore list, 2020-09-24) git blame reports checks if objects specified with --ignore-rev and in files loaded with --ignore-revs-file and config option blame.ignoreRevsFile are actual objects and dies if they aren't. The intent is to report typos to the user. This also breaks the ability to use a single ignore file for multiple repositories. Typos are presumably less likely in files than on the command line, so alerting is less useful here. Restore that feature by skipping non-commits without dying. Reported-by: Jean-Yves Avenard <jyavenard@mozilla.com> Signed-off-by: René Scharfe <l.s.r@web.de> Reviewed-by: Barret Rhoden <brho@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'oidset.c')
-rw-r--r--oidset.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/oidset.c b/oidset.c
index 2d0ab76fb5..5aac633c1f 100644
--- a/oidset.c
+++ b/oidset.c
@@ -72,9 +72,10 @@ void oidset_parse_file_carefully(struct oidset *set, const char *path,
if (!sb.len)
continue;
- if (parse_oid_hex(sb.buf, &oid, &p) || *p != '\0' ||
- (fn && fn(&oid, cbdata)))
+ if (parse_oid_hex(sb.buf, &oid, &p) || *p != '\0')
die("invalid object name: %s", sb.buf);
+ if (fn && fn(&oid, cbdata))
+ continue;
oidset_insert(set, &oid);
}
if (ferror(fp))