git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] Adding Correct Useage Notification and -h Help flag

From
JPJames Purser <purserj@winnsw.com.au>
Date
Jun 14, 2005, 01:47 UTC
Message-ID
<1118713641.8712.10.camel@localhost.localdomain>
okay this is my first patch so take it easy on me.

I have added both a Correct Useage notification when git is called on its own without any other parameters and a -h help flag which lists available scripts for the git command.

Signed-off-by: James Purser <purserj@k-sit.com>
-- 
James Purser
Winnet Developer
+61 2 4223 4131
http://www.winnet.com.au


Added a couple of lines to the git wrapper. Includes Correct Useage and available scripts

---
commit bfe72d41d70f9e4c0a6ab0ec6cf49347f980f4de
tree a8eed80ea2ac00ffee0b4f12ed4c931ca7761000
parent 940c1bb0181cb20454bf3573134175f86983a0ce
author James Purser <purserj@k-sit.com> Tue, 14 Jun 2005 11:40:20 +1000
committer James Purser <purserj@k-sit.com> Tue, 14 Jun 2005 11:40:20 +1000

 git |   31 ++++++++++++++++++++++++++++---
 1 files changed, 28 insertions(+), 3 deletions(-)

diff --git a/git b/git
--- a/git
+++ b/git
@@ -1,4 +1,29 @@
 #!/bin/sh
-cmd="git-$1-script"
-shift
-exec $cmd "$@"
+if [ "$1" = "" ]
+then
+	echo "Correct Useage: git [-h] [SCRIPT]";
+else 
+	if [ "$1" = "-h" ]
+	then
+		echo "This is a basic script wrapper for certain git functions. The available commands are:
+
+git apply-patch
+git commit
+git cvsimport
+git deltafy
+git diff
+git fetch
+git log
+git merge-one-file
+git prune
+git pull
+git status
+git tag
+";	
+	else
+		cmd="git-$1-script";
+		shift;
+		exec $cmd "$@";
+	fi
+fi
+
Next: Junio C Hamano
Message 1 of 6 in “Adding Correct Useage Notification and -h Help flag”
  1. Adding Correct Useage Notification and -h Help flagJames Purser, Jun 14, 2005
  2. Junio C HamanoJun 14, 2005
  3. James PurserJun 14, 2005
  4. James PurserJun 14, 2005
  5. Junio C HamanoJun 14, 2005
  6. James PurserJun 14, 2005

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.