summaryrefslogtreecommitdiff
path: root/rev-list.c
diff options
context:
space:
mode:
Diffstat (limited to 'rev-list.c')
-rw-r--r--rev-list.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/rev-list.c b/rev-list.c
index c60aa72957..3a32e405a3 100644
--- a/rev-list.c
+++ b/rev-list.c
@@ -624,6 +624,11 @@ int main(int argc, char **argv)
if (!merge_order) {
sort_by_date(&list);
+ if (list && !limited && max_count == 1 &&
+ !tag_objects && !tree_objects && !blob_objects) {
+ show_commit(list->item);
+ return 0;
+ }
if (limited)
list = limit_list(list);
if (topo_order)