summaryrefslogtreecommitdiff
path: root/oidset.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2020-11-18 21:32:54 (GMT)
committerJunio C Hamano <gitster@pobox.com>2020-11-18 21:32:54 (GMT)
commitb4e245a17adc1b336269f7350e88eede6e713157 (patch)
tree36762f82926a1c900c67809ce977717cd1eb0b65 /oidset.c
parentdfbc63da03f584fd4f281dfaffc1cec50e076289 (diff)
parentc714d0587567d67e1c3702e44221c1b46dc969ff (diff)
downloadgit-b4e245a17adc1b336269f7350e88eede6e713157.zip
git-b4e245a17adc1b336269f7350e88eede6e713157.tar.gz
git-b4e245a17adc1b336269f7350e88eede6e713157.tar.bz2
Merge branch 'jc/blame-ignore-fix'
"git blame --ignore-revs-file=<file>" learned to ignore a non-existent object name in the input, instead of complaining. * jc/blame-ignore-fix: blame: silently ignore invalid ignore file objects
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 2d0ab76..5aac633 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))