]> gitweb.ps.run Git - ps-cgit/commitdiff
ui-diff: remove test on object type
authorLars Hjemli <hjemli@gmail.com>
Thu, 24 Apr 2008 21:40:51 +0000 (23:40 +0200)
committerLars Hjemli <hjemli@gmail.com>
Thu, 24 Apr 2008 21:41:39 +0000 (23:41 +0200)
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>
ui-diff.c

index 625b5fddd17418ec78dec2b736a03a2a1f1a8eed..12e78b157a59651efce90718e6a2b16633abc6fa 100644 (file)
--- a/ui-diff.c
+++ b/ui-diff.c
@@ -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));
                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)));