mirror of
https://git.zx2c4.com/cgit/
synced 2024-11-10 07:10:33 +00:00
ui-diff: remove test on object type
By removing the test for commit objects it's now possible to specify a tag name for the id query-string parameter (it already worked for id2). Signed-off-by: Lars Hjemli <hjemli@gmail.com>
This commit is contained in:
parent
fe1230dece
commit
d188ed4f29
@ -258,12 +258,6 @@ void cgit_print_diff(const char *new_rev, const char *old_rev, const char *prefi
|
|||||||
cgit_print_error(fmt("Bad object name: %s", new_rev));
|
cgit_print_error(fmt("Bad object name: %s", new_rev));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (type != OBJ_COMMIT) {
|
|
||||||
cgit_print_error(fmt("Unhandled object type: %s",
|
|
||||||
typename(type)));
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
commit = lookup_commit_reference(new_rev_sha1);
|
commit = lookup_commit_reference(new_rev_sha1);
|
||||||
if (!commit || parse_commit(commit))
|
if (!commit || parse_commit(commit))
|
||||||
cgit_print_error(fmt("Bad commit: %s", sha1_to_hex(new_rev_sha1)));
|
cgit_print_error(fmt("Bad commit: %s", sha1_to_hex(new_rev_sha1)));
|
||||||
|
Loading…
Reference in New Issue
Block a user