all repos — cgit @ d188ed4f2905e6d10abd26c45572a0d48eb53969

a hyperfast web frontend for git written in c

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>
Lars Hjemli hjemli@gmail.com
Thu, 24 Apr 2008 23:40:51 +0200
commit

d188ed4f2905e6d10abd26c45572a0d48eb53969

parent

fe1230dece81450004d02fa8a470f8dab8f7fdd9

1 files changed, 0 insertions(+), 6 deletions(-)

jump to
M ui-diff.cui-diff.c

@@ -258,12 +258,6 @@ if (type == OBJ_BAD) {

cgit_print_error(fmt("Bad object name: %s", new_rev)); return; } - if (type != OBJ_COMMIT) { - cgit_print_error(fmt("Unhandled object type: %s", - typename(type))); - return; - } - commit = lookup_commit_reference(new_rev_sha1); if (!commit || parse_commit(commit)) cgit_print_error(fmt("Bad commit: %s", sha1_to_hex(new_rev_sha1)));