if (*next != line_termination)
die("update %s has extra input: %s", update->ref_name, next);
} else if (!line_termination)
- die("update %s missing [<oldvalue>] NUL", update->ref_name);
+ die("update %s missing <oldvalue>", update->ref_name);
return next;
}
if (update->have_old && is_null_sha1(update->old_sha1))
die("delete %s given zero <oldvalue>", update->ref_name);
} else if (!line_termination)
- die("delete %s missing [<oldvalue>] NUL", update->ref_name);
+ die("delete %s missing <oldvalue>", update->ref_name);
if (*next != line_termination)
die("delete %s has extra input: %s", update->ref_name, next);
update_store_old_sha1("verify", update, value.buf);
hashcpy(update->new_sha1, update->old_sha1);
} else if (!line_termination)
- die("verify %s missing [<oldvalue>] NUL", update->ref_name);
+ die("verify %s missing <oldvalue>", update->ref_name);
if (*next != line_termination)
die("verify %s has extra input: %s", update->ref_name, next);
test_expect_success 'stdin -z fails update with no old value' '
printf $F "update $a" "$m" >stdin &&
test_must_fail git update-ref -z --stdin <stdin 2>err &&
- grep "fatal: update $a missing \\[<oldvalue>\\] NUL" err
+ grep "fatal: update $a missing <oldvalue>" err
'
test_expect_success 'stdin -z fails update with too many arguments' '
test_expect_success 'stdin -z fails delete with no old value' '
printf $F "delete $a" >stdin &&
test_must_fail git update-ref -z --stdin <stdin 2>err &&
- grep "fatal: delete $a missing \\[<oldvalue>\\] NUL" err
+ grep "fatal: delete $a missing <oldvalue>" err
'
test_expect_success 'stdin -z fails delete with too many arguments' '
test_expect_success 'stdin -z fails verify with no old value' '
printf $F "verify $a" >stdin &&
test_must_fail git update-ref -z --stdin <stdin 2>err &&
- grep "fatal: verify $a missing \\[<oldvalue>\\] NUL" err
+ grep "fatal: verify $a missing <oldvalue>" err
'
test_expect_success 'stdin -z fails option with unknown name' '