summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 0b124bb)
raw | patch | inline | side by side (parent: 0b124bb)
author | Petr Baudis <pasky@suse.cz> | |
Fri, 29 Jul 2005 09:01:26 +0000 (11:01 +0200) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Sat, 30 Jul 2005 00:21:50 +0000 (17:21 -0700) |
All usage strings are now declared as static const char [].
This is carried over from my old git-pb branch.
Signed-off-by: Petr Baudis <pasky@ucw.cz>
Signed-off-by: Junio C Hamano <junkio@cox.net>
This is carried over from my old git-pb branch.
Signed-off-by: Petr Baudis <pasky@ucw.cz>
Signed-off-by: Junio C Hamano <junkio@cox.net>
17 files changed:
checkout-cache.c | patch | blob | history | |
commit-tree.c | patch | blob | history | |
diff-cache.c | patch | blob | history | |
diff-files.c | patch | blob | history | |
diff-helper.c | patch | blob | history | |
diff-stages.c | patch | blob | history | |
diff-tree.c | patch | blob | history | |
hash-object.c | patch | blob | history | |
local-pull.c | patch | blob | history | |
ls-files.c | patch | blob | history | |
ls-tree.c | patch | blob | history | |
read-tree.c | patch | blob | history | |
ssh-push.c | patch | blob | history | |
tar-tree.c | patch | blob | history | |
test-delta.c | patch | blob | history | |
var.c | patch | blob | history | |
verify-pack.c | patch | blob | history |
diff --git a/checkout-cache.c b/checkout-cache.c
index d6c4ff104259789d1e0ed812a0d90394e3c332dd..8d67403ae86c6deafe4c2db5fef8af64f9fe6ecc 100644 (file)
--- a/checkout-cache.c
+++ b/checkout-cache.c
return 0;
}
-static const char *checkout_cache_usage =
+static const char checkout_cache_usage[] =
"git-checkout-cache [-u] [-q] [-a] [-f] [-n] [--prefix=<string>] [--] <file>...";
int main(int argc, char **argv)
diff --git a/commit-tree.c b/commit-tree.c
index d545f62aaa48f2fb9f3aff5fd422c7ab32d94c62..b1ef0b590ab879fbbc93d04a2f8f488a223ea58d 100644 (file)
--- a/commit-tree.c
+++ b/commit-tree.c
#define MAXPARENT (16)
static unsigned char parent_sha1[MAXPARENT][20];
-static char *commit_tree_usage = "git-commit-tree <sha1> [-p <sha1>]* < changelog";
+static const char commit_tree_usage[] = "git-commit-tree <sha1> [-p <sha1>]* < changelog";
static int new_parent(int idx)
{
diff --git a/diff-cache.c b/diff-cache.c
index e3c4c8155caeb8023e022194d828d9e515a2326d..47a4e09ecc99727c7c711a121cbd4d04892484ac 100644 (file)
--- a/diff-cache.c
+++ b/diff-cache.c
}
}
-static char *diff_cache_usage =
+static const char diff_cache_usage[] =
"git-diff-cache [-m] [--cached] "
"[<common diff options>] <tree-ish> [<path>...]"
COMMON_DIFF_OPTIONS_HELP;
diff --git a/diff-files.c b/diff-files.c
index 39dd54f80a7e81f7e67faf13ba79a0a8c9e077e7..2e6416e386331b0b5f44bb3a407dbc0ab6ed8145 100644 (file)
--- a/diff-files.c
+++ b/diff-files.c
#include "cache.h"
#include "diff.h"
-static const char *diff_files_usage =
+static const char diff_files_usage[] =
"git-diff-files [-q] "
"[<common diff options>] [<path>...]"
COMMON_DIFF_OPTIONS_HELP;
diff --git a/diff-helper.c b/diff-helper.c
index 07ccd7cc38d02843d339a9feb21088912f63dcba..3fa50ee75b510c5396fe004160f80ddbe4955ca1 100644 (file)
--- a/diff-helper.c
+++ b/diff-helper.c
diff_flush(DIFF_FORMAT_PATCH, '\n');
}
-static const char *diff_helper_usage =
+static const char diff_helper_usage[] =
"git-diff-helper [-z] [-O<orderfile>] [-S<string>] [--pickaxe-all] [<path>...]";
int main(int ac, const char **av) {
diff --git a/diff-stages.c b/diff-stages.c
index cbaba552b380403d3830b80ed3e65faacb4addc8..2e9c0bce6e8a5019b85f2cb0683e0ca120699bfd 100644 (file)
--- a/diff-stages.c
+++ b/diff-stages.c
static const char *orderfile = NULL;
static const char *diff_filter = NULL;
-static char *diff_stages_usage =
+static const char diff_stages_usage[] =
"git-diff-stages [<common diff options>] <stage1> <stage2> [<path>...]"
COMMON_DIFF_OPTIONS_HELP;
diff --git a/diff-tree.c b/diff-tree.c
index 5b9467d58b064de81bfecfeebd4dfac50e515cca..0dd3cdacb2640dac7dfac3829e38b46bc450101f 100644 (file)
--- a/diff-tree.c
+++ b/diff-tree.c
return diff_tree_commit(commit, line);
}
-static char *diff_tree_usage =
+static const char diff_tree_usage[] =
"git-diff-tree [--stdin] [-m] [-s] [-v] [--pretty] [-t] "
"[<common diff options>] <tree-ish> <tree-ish>"
COMMON_DIFF_OPTIONS_HELP;
diff --git a/hash-object.c b/hash-object.c
index 0821e543f57caa264f0cff292f4c7dbe1ed0f148..c8c9adb3aa789729e3c53a0d9ff1135367e93ee0 100644 (file)
--- a/hash-object.c
+++ b/hash-object.c
printf("%s\n", sha1_to_hex(sha1));
}
-static const char *hash_object_usage =
+static const char hash_object_usage[] =
"git-hash-object [-t <type>] [-w] <file>...";
int main(int argc, char **argv)
diff --git a/local-pull.c b/local-pull.c
index 908e18750903ddbec13f38ab8e1f389685ce9212..29ae1663958317b612ff5f26707c16612e8b91bc 100644 (file)
--- a/local-pull.c
+++ b/local-pull.c
return 0;
}
-static const char *local_pull_usage =
+static const char local_pull_usage[] =
"git-local-pull [-c] [-t] [-a] [-d] [-v] [-w filename] [--recover] [-l] [-s] [-n] commit-id path";
/*
diff --git a/ls-files.c b/ls-files.c
index 41a1f9d1c261ea19e6cc2d75effcd06652d8fcde..13ca02ec7363588b8776f7c27a39e104df4569c0 100644 (file)
--- a/ls-files.c
+++ b/ls-files.c
}
}
-static const char *ls_files_usage =
+static const char ls_files_usage[] =
"git-ls-files [-z] [-t] (--[cached|deleted|others|stage|unmerged|killed])* "
"[ --ignored ] [--exclude=<pattern>] [--exclude-from=<file>] "
"[ --exclude-per-directory=<filename> ]";
-;
int main(int argc, char **argv)
{
diff --git a/ls-tree.c b/ls-tree.c
index 8d524b89a2a3cecf8d820ddc335e7159db5ccdb1..e198a20cb3dd88ae46da1aaf005846fe42843ea7 100644 (file)
--- a/ls-tree.c
+++ b/ls-tree.c
return err;
}
-static const char *ls_tree_usage =
+static const char ls_tree_usage[] =
"git-ls-tree [-d] [-r] [-z] <tree-ish> [path...]";
int main(int argc, char **argv)
diff --git a/read-tree.c b/read-tree.c
index 65f2d9a5dc5dd6cf6aaa24ca90d96c5c7ab6992d..ce2bb88f0aae8919f188a0dbc5f3338523151740 100644 (file)
--- a/read-tree.c
+++ b/read-tree.c
return deleted;
}
-static char *read_tree_usage = "git-read-tree (<sha> | -m [-u] <sha1> [<sha2> [<sha3>]])";
+static const char read_tree_usage[] = "git-read-tree (<sha> | -m [-u] <sha1> [<sha2> [<sha3>]])";
static struct cache_file cache_file;
diff --git a/ssh-push.c b/ssh-push.c
index aac70af514e0dc5507fa4997ebad54352c973215..ee424a8712fad002f0a6962c3b7067fe25aed91a 100644 (file)
--- a/ssh-push.c
+++ b/ssh-push.c
} while (1);
}
-static const char *ssh_push_usage =
+static const char ssh_push_usage[] =
"git-ssh-push [-c] [-t] [-a] [-w ref] commit-id url";
int main(int argc, char **argv)
diff --git a/tar-tree.c b/tar-tree.c
index 673ac66ed6fd37eeeaa8580b2e43f0e2cee91a16..a877fe545e74511a905f803564e51158da68d0d1 100644 (file)
--- a/tar-tree.c
+++ b/tar-tree.c
#define EXT_HEADER_PATH 1
#define EXT_HEADER_LINKPATH 2
-static const char *tar_tree_usage = "git-tar-tree <key> [basedir]";
+static const char tar_tree_usage[] = "git-tar-tree <key> [basedir]";
static char block[BLOCKSIZE];
static unsigned long offset;
diff --git a/test-delta.c b/test-delta.c
index e5d31ca2e7f913e461e818cb1a80ff4037296b9e..1be8ee0c721ec35372fee4e686d9664b143b4345 100644 (file)
--- a/test-delta.c
+++ b/test-delta.c
#include <sys/mman.h>
#include "delta.h"
-static const char *usage =
+static const char usage[] =
"test-delta (-d|-p) <from_file> <data_file> <out_file>";
int main(int argc, char *argv[])
index 488ec5147a227444490e3d73ce03e1acd786f998..3f13126cb8b88593fa81dda875e8e4080a27ae03 100644 (file)
--- a/var.c
+++ b/var.c
#include <errno.h>
#include <string.h>
-static char *var_usage = "git-var [-l | <variable>]";
+static const char var_usage[] = "git-var [-l | <variable>]";
struct git_var {
const char *name;
diff --git a/verify-pack.c b/verify-pack.c
index 30c40feebdf4369683dbb365caa13faeb5699f82..80b60a6b7cdfb2f45bb34331dbc372fcbabe8c5a 100644 (file)
--- a/verify-pack.c
+++ b/verify-pack.c
return verify_pack(g, verbose);
}
-static const char *verify_pack_usage = "git-verify-pack [-v] <pack>...";
+static const char verify_pack_usage[] = "git-verify-pack [-v] <pack>...";
int main(int ac, char **av)
{