Thread (34 messages) flat view 34 messages, 3 authors, 2016-06-15
STALE3741d

[PATCH 15/24] Show usage string for 'git show-index -h'

From: Jonathan Nieder <hidden>
Date: 2016-06-15 22:47:41
Subsystem: the rest · Maintainer: Linus Torvalds

Signed-off-by: Jonathan Nieder <redacted>
---
 show-index.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/show-index.c b/show-index.c
index 45bb535..63f9da5 100644
--- a/show-index.c
+++ b/show-index.c
@@ -1,6 +1,9 @@
 #include "cache.h"
 #include "pack.h"
 
+static const char show_index_usage[] =
+"git show-index < <packed archive index>";
+
 int main(int argc, char **argv)
 {
 	int i;
@@ -8,6 +11,8 @@ int main(int argc, char **argv)
 	unsigned int version;
 	static unsigned int top_index[256];
 
+	if (argc != 1)
+		usage(show_index_usage);
 	if (fread(top_index, 2 * 4, 1, stdin) != 1)
 		die("unable to read header");
 	if (top_index[0] == htonl(PACK_IDX_SIGNATURE)) {
-- 
1.6.5.2
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help