{"thread":{"id":"1225","subject":"[PATCH] checkout-cache: add usage string.","startedAt":"2005-07-14T03:25:07Z","lastAt":"2005-07-14T03:25:07Z","messageCount":1,"participants":["Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"6106","messageId":"7vmzoqkr1o.fsf@assigned-by-dhcp.cox.net","threadId":"1225","inReplyTo":null,"subject":"[PATCH] checkout-cache: add usage string.","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2005-07-14T03:25:07Z","receivedAt":"2005-07-14T03:25:07Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"This adds the usage string to checkout-cache and you can say\n\"--help\" to get it.\n\nSigned-off-by: Junio C Hamano <junkio@cox.net>\n---\n\n checkout-cache.c |    5 +++++\n 1 files changed, 5 insertions(+), 0 deletions(-)\n\n0d87d25f9a8ecf6ee8c4bc0c1575f3c03614c339\ndiff --git a/checkout-cache.c b/checkout-cache.c\n--- a/checkout-cache.c\n+++ b/checkout-cache.c\n@@ -75,6 +75,9 @@ static int checkout_all(void)\n \treturn 0;\n }\n \n+static const char *checkout_cache_usage =\n+\"git-checkout-cache [-u] [-q] [-a] [-f] [-n] [--prefix=<string>] [--] <file>...\";\n+\n int main(int argc, char **argv)\n {\n \tint i, force_filename = 0;\n@@ -123,6 +126,8 @@ int main(int argc, char **argv)\n \t\t\t\tstate.base_dir_len = strlen(state.base_dir);\n \t\t\t\tcontinue;\n \t\t\t}\n+\t\t\tif (arg[0] == '-')\n+\t\t\t\tusage(checkout_cache_usage);\n \t\t}\n \t\tif (state.base_dir_len) {\n \t\t\t/* when --prefix is specified we do not\n"}]}