setup: set startup_info->have_repository more reliably
[gitweb.git] / builtin / read-tree.c
index 43b47f72f1deffa8fa5e3fa5ac403d4c4a819355..8c693e756852ef2ec3aac3bfc77d71c6258a8306 100644 (file)
@@ -34,7 +34,7 @@ static int list_tree(unsigned char *sha1)
 }
 
 static const char * const read_tree_usage[] = {
-       N_("git read-tree [[-m [--trivial] [--aggressive] | --reset | --prefix=<prefix>] [-u [--exclude-per-directory=<gitignore>] | -i]] [--no-sparse-checkout] [--index-output=<file>] (--empty | <tree-ish1> [<tree-ish2> [<tree-ish3>]])"),
+       N_("git read-tree [(-m [--trivial] [--aggressive] | --reset | --prefix=<prefix>) [-u [--exclude-per-directory=<gitignore>] | -i]] [--no-sparse-checkout] [--index-output=<file>] (--empty | <tree-ish1> [<tree-ish2> [<tree-ish3>]])"),
        NULL
 };
 
@@ -90,7 +90,7 @@ static int debug_merge(const struct cache_entry * const *stages,
        debug_stage("index", stages[0], o);
        for (i = 1; i <= o->merge_size; i++) {
                char buf[24];
-               sprintf(buf, "ent#%d", i);
+               xsnprintf(buf, sizeof(buf), "ent#%d", i);
                debug_stage(buf, stages[i], o);
        }
        return 0;