зеркало из https://github.com/microsoft/git.git
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
This commit is contained in:
Коммит
b4e245a17a
5
oidset.c
5
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))
|
||||
|
|
|
@ -39,10 +39,10 @@ test_expect_success 'validate --ignore-rev' '
|
|||
test_must_fail git blame --ignore-rev X^{tree} file
|
||||
'
|
||||
|
||||
# Ensure bogus --ignore-revs-file requests are caught
|
||||
# Ensure bogus --ignore-revs-file requests are silently accepted
|
||||
test_expect_success 'validate --ignore-revs-file' '
|
||||
git rev-parse X^{tree} >ignore_x &&
|
||||
test_must_fail git blame --ignore-revs-file ignore_x file
|
||||
git blame --ignore-revs-file ignore_x file
|
||||
'
|
||||
|
||||
for I in X XT
|
||||
|
|
Загрузка…
Ссылка в новой задаче