On Monday 18 April 2005 10:59 am, Steven Cole wrote: > Petr Baudis wrote: > > Dear diary, on Mon, Apr 18, 2005 at 06:42:26AM CEST, I got a letter > > where Steven Cole <[EMAIL PROTECTED]> told me that... > [snippage] > > > >>This patch will provide the comment lines in the shell script associated > >>with the command, cleaned up a bit for presentation. > >> > >>BUGS: This will also print any comments in the entire file, which may > >>not be desired. If a command name and shell script filename > >>do not follow the usual convention, this won't work, e.g. ci for commit. > > > > > > Hey, those BUGS are the only slightly non-trivial thing on the whole > > thing! I could do this patch myself... ;-) Also, you don't want to print > > the first newline and the Copyright notices.
Here is perhaps a better way to provide detailed help for each git command. A command.help file for each command can be written in the style of a man page. The modfication to the main git script will be trivial. Here are the two commands I've done so far. What do folks think about this approach? Steven [EMAIL PROTECTED] git-pasky]$ ./git help add NAME add - Add new file or files to a GIT repository. SYNOPSIS add FILE... DESCRIPTION Takes a list of file names at the command line, and schedules them for addition to the GIT repository at the next commit. AUTHOR Written by Petr Baudis. REPORTING BUGS Report bugs to <git@vger.kernel.org> COPYRIGHT Copyright (c) Petr Baudis, 2005 BUGS Those files are omitted from show-diff output! SEE ALSO The source code for this command is gitadd.sh. [EMAIL PROTECTED] git-pasky]$ ./git help addremote NAME addremote - Add new "remote" to the GIT repository. SYNOPSIS addremote RNAME RSYNC_URL DESCRIPTION Takes the remote's name and rsync URL. After you add a remote, you can "git pull" it whenever you want and it will keep your dircache in sync with it. Its latest commit is accessible as .git/heads/remotename (or - more conveniently - as $(commit-id remotename)). For example, to make a diff between Linus (after you added him) and your current tree, do git pull linus git diff $(commit-id linus) AUTHOR Written by Petr Baudis. REPORTING BUGS Report bugs to <git@vger.kernel.org> COPYRIGHT Copyright (c) Petr Baudis, 2005 TODO gitdiff.sh et al should accept remote names as ids. SEE ALSO The source code for this command is gitaddremote.sh. - To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html