Merge branch 'jc/am-3-fallback-regression-fix'
[gitweb.git] / builtin / rev-list.c
index ff84a825ff776abc01087f37782223ee26a1af7a..491d298fa25cebb1afd9b33cbbd099efe72629bc 100644 (file)
@@ -42,6 +42,7 @@ static const char rev_list_usage[] =
 "    --abbrev=<n> | --no-abbrev\n"
 "    --abbrev-commit\n"
 "    --left-right\n"
+"    --count\n"
 "  special purpose:\n"
 "    --bisect\n"
 "    --bisect-vars\n"
@@ -216,7 +217,7 @@ static void print_var_int(const char *var, int val)
 static int show_bisect_vars(struct rev_list_info *info, int reaches, int all)
 {
        int cnt, flags = info->flags;
-       char hex[41] = "";
+       char hex[GIT_SHA1_HEXSZ + 1] = "";
        struct commit_list *tried;
        struct rev_info *revs = info->revs;
 
@@ -241,7 +242,7 @@ static int show_bisect_vars(struct rev_list_info *info, int reaches, int all)
                cnt = reaches;
 
        if (revs->commits)
-               strcpy(hex, sha1_to_hex(revs->commits->item->object.sha1));
+               sha1_to_hex_r(hex, revs->commits->item->object.sha1);
 
        if (flags & BISECT_SHOW_ALL) {
                traverse_commit_list(revs, show_commit, show_object, info);
@@ -349,13 +350,16 @@ int cmd_rev_list(int argc, const char **argv, const char *prefix)
            revs.diff)
                usage(rev_list_usage);
 
+       if (revs.show_notes)
+               die(_("rev-list does not support display of notes"));
+
        save_commit_buffer = (revs.verbose_header ||
                              revs.grep_filter.pattern_list ||
                              revs.grep_filter.header_list);
        if (bisect_list)
                revs.limited = 1;
 
-       if (use_bitmap_index) {
+       if (use_bitmap_index && !revs.prune) {
                if (revs.count && !revs.left_right && !revs.cherry_mark) {
                        uint32_t commit_count;
                        if (!prepare_bitmap_walk(&revs)) {