summaryrefslogtreecommitdiff
path: root/examples/add.c
diff options
context:
space:
mode:
Diffstat (limited to 'examples/add.c')
-rw-r--r--examples/add.c19
1 files changed, 2 insertions, 17 deletions
diff --git a/examples/add.c b/examples/add.c
index 542360ea9..1c93b1140 100644
--- a/examples/add.c
+++ b/examples/add.c
@@ -28,7 +28,7 @@
enum index_mode {
INDEX_NONE,
- INDEX_ADD,
+ INDEX_ADD
};
struct index_options {
@@ -110,22 +110,7 @@ int print_matched_cb(const char *path, const char *matched_pathspec, void *paylo
return ret;
}
-void init_array(git_strarray *array, int argc, char **argv)
-{
- unsigned int i;
-
- array->count = argc;
- array->strings = calloc(array->count, sizeof(char *));
- assert(array->strings != NULL);
-
- for (i = 0; i < array->count; i++) {
- array->strings[i] = argv[i];
- }
-
- return;
-}
-
-void print_usage(void)
+static void print_usage(void)
{
fprintf(stderr, "usage: add [options] [--] file-spec [file-spec] [...]\n\n");
fprintf(stderr, "\t-n, --dry-run dry run\n");