* [PATCH 0/3] Make the output of 'git' nicer
@ 2006-03-09 16:17 Fredrik Kuivinen
2006-03-09 16:24 ` [PATCH 1/3] Nicer output from 'git' Fredrik Kuivinen
` (3 more replies)
0 siblings, 4 replies; 6+ messages in thread
From: Fredrik Kuivinen @ 2006-03-09 16:17 UTC (permalink / raw)
To: git; +Cc: junkio
Hi,
This series makes the output of 'git' easier to read (IMHO). With this
patch the output will look like this:
Usage: git [--version] [--exec-path[=GIT_EXEC_PATH]] [--help] COMMAND [ ARGS ]
The most commonly used git commands are:
add Add files to the index file
apply Apply patch on a git index file and a work tree
bisect Find the change that introduced a bug
branch Create a new branch, or remove an old one
checkout Checkout and switch to a branch
cherry-pick Apply the change introduced by an existing commit
clone Clones a repository
commit Record your changes
diff Show changes between commits, commit and working tree, etc
fetch Download objects and a head from another repository
grep Print lines matching a pattern
init-db Creates an empty git repository
log Show commit logs
merge Grand Unified Merge Driver
mv Move or rename a file, directory or symlink
prune Prunes all unreachable objects from the object database
pull Pull and merge from another repository
push Update remote refs along with associated objects
rebase Rebase local commits to new upstream head
reset Reset current HEAD to the specified state
revert Revert an existing commit
rm Remove files from the working tree and from the index
show-branch Show branches and their commits
status Show working tree status
tag Create a tag object signed with GPG
verify-tag Check the GPG signature of tag
whatchanged Show logs with difference each commit introduces
(use 'git help -a' to get a list of all installed git commands)
- Fredrik
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 1/3] Nicer output from 'git'
2006-03-09 16:17 [PATCH 0/3] Make the output of 'git' nicer Fredrik Kuivinen
@ 2006-03-09 16:24 ` Fredrik Kuivinen
2006-03-09 17:14 ` Jan-Benedict Glaw
2006-03-09 16:24 ` [PATCH 2/3] Fix some inconsistencies in the docs Fredrik Kuivinen
` (2 subsequent siblings)
3 siblings, 1 reply; 6+ messages in thread
From: Fredrik Kuivinen @ 2006-03-09 16:24 UTC (permalink / raw)
To: git; +Cc: junkio
Signed-off-by: Fredrik Kuivinen <freku045@student.liu.se>
---
.gitignore | 1 +
Documentation/git.txt | 11 ++++++-----
Makefile | 7 +++++--
generate-cmdlist.sh | 22 ++++++++++++++++++++++
git.c | 50 +++++++++++++++++++++++++++++++++++++------------
5 files changed, 72 insertions(+), 19 deletions(-)
diff --git a/.gitignore b/.gitignore
index abbc509..8e94cbd 100644
--- a/.gitignore
+++ b/.gitignore
@@ -121,6 +121,7 @@ git-write-tree
git-core-*/?*
test-date
test-delta
+common-cmds.h
*.tar.gz
*.dsc
*.deb
diff --git a/Documentation/git.txt b/Documentation/git.txt
index 2d0ca9d..8610d36 100644
--- a/Documentation/git.txt
+++ b/Documentation/git.txt
@@ -20,15 +20,16 @@ brings your stuff to the plumbing).
OPTIONS
-------
--version::
- prints the git suite version that the 'git' program came from.
+ Prints the git suite version that the 'git' program came from.
--help::
- prints the synopsis and a list of available commands.
- If a git command is named this option will bring up the
- man-page for that command.
+ Prints the synopsis and a list of the most commonly used
+ commands. If a git command is named this option will bring up
+ the man-page for that command. If the option '--all' or '-a' is
+ given then all available commands are printed.
--exec-path::
- path to wherever your core git programs are installed.
+ Path to wherever your core git programs are installed.
This can also be controlled by setting the GIT_EXEC_PATH
environment variable. If no path is given 'git' will print
the current setting and then exit.
diff --git a/Makefile b/Makefile
index 1c555da..dc9a742 100644
--- a/Makefile
+++ b/Makefile
@@ -452,10 +452,13 @@ all:
strip: $(PROGRAMS) git$X
$(STRIP) $(STRIP_OPTS) $(PROGRAMS) git$X
-git$X: git.c $(LIB_FILE)
+git$X: git.c common-cmds.h $(LIB_FILE)
$(CC) -DGIT_VERSION='"$(GIT_VERSION)"' \
$(ALL_CFLAGS) -o $@ $(filter %.c,$^) $(LIB_FILE) $(LIBS)
+common-cmds.h: Documentation/git-*.txt
+ ./generate-cmdlist.sh > $@
+
$(patsubst %.sh,%,$(SCRIPT_SH)) : % : %.sh
rm -f $@
sed -e '1s|#!.*/sh|#!$(SHELL_PATH_SQ)|' \
@@ -612,7 +615,7 @@ rpm: dist
clean:
rm -f *.o mozilla-sha1/*.o arm/*.o ppc/*.o compat/*.o $(LIB_FILE)
rm -f $(ALL_PROGRAMS) git$X
- rm -f *.spec *.pyc *.pyo */*.pyc */*.pyo
+ rm -f *.spec *.pyc *.pyo */*.pyc */*.pyo common-cmds.h
rm -rf $(GIT_TARNAME)
rm -f $(GIT_TARNAME).tar.gz git-core_$(GIT_VERSION)-*.tar.gz
$(MAKE) -C Documentation/ clean
diff --git a/generate-cmdlist.sh b/generate-cmdlist.sh
new file mode 100755
index 0000000..02091b5
--- /dev/null
+++ b/generate-cmdlist.sh
@@ -0,0 +1,22 @@
+#!/bin/sh
+
+echo "/* Automatically generated by $0 */
+struct cmdname_help
+{
+ char name[16];
+ char help[64];
+};
+
+struct cmdname_help common_cmds[] = {"
+
+# Please keep this list sorted
+for i in "add" "apply" "bisect" "branch" "checkout" "cherry-pick" "clone" \
+"commit" "diff" "fetch" "grep" "init-db" "log" "merge" "mv" \
+"prune" "pull" "push" "rebase" "reset" "revert" "rm" "show-branch" \
+"status" "tag" "verify-tag" "whatchanged"
+do
+ sed -n "/NAME/,/git-$i/H;
+ \$ {x; s/.*git-$i - \\(.*\\)/{\"$i\", \"\1\"},/; p}" \
+ "Documentation/git-$i.txt"
+done
+echo "};"
diff --git a/git.c b/git.c
index 164d3e9..2cbb471 100644
--- a/git.c
+++ b/git.c
@@ -11,6 +11,7 @@
#include <sys/ioctl.h>
#include "git-compat-util.h"
#include "exec_cmd.h"
+#include "common-cmds.h"
#include "cache.h"
#include "commit.h"
@@ -171,11 +172,29 @@ static void list_commands(const char *ex
putchar('\n');
}
+static void list_common_cmds_help()
+{
+ int i, longest = 0;
+
+ for(i = 0; i < sizeof(common_cmds)/sizeof(struct cmdname_help); i++) {
+ if(strlen(common_cmds[i].name) > longest)
+ longest = strlen(common_cmds[i].name);
+ }
+
+ puts("The most commonly used git commands are:");
+ for(i = 0; i < sizeof(common_cmds)/sizeof(struct cmdname_help); i++) {
+ printf(" %s", common_cmds[i].name);
+ mput_char(' ', longest - strlen(common_cmds[i].name) + 4);
+ puts(common_cmds[i].help);
+ }
+ puts("(use 'git help -a' to get a list of all installed git commands)");
+}
+
#ifdef __GNUC__
-static void cmd_usage(const char *exec_path, const char *fmt, ...)
- __attribute__((__format__(__printf__, 2, 3), __noreturn__));
+static void cmd_usage(int show_all, const char *exec_path, const char *fmt, ...)
+ __attribute__((__format__(__printf__, 3, 4), __noreturn__));
#endif
-static void cmd_usage(const char *exec_path, const char *fmt, ...)
+static void cmd_usage(int show_all, const char *exec_path, const char *fmt, ...)
{
if (fmt) {
va_list ap;
@@ -189,11 +208,14 @@ static void cmd_usage(const char *exec_p
else
puts(git_usage);
- putchar('\n');
-
- if(exec_path)
- list_commands(exec_path, "git-*");
-
+ if(exec_path) {
+ putchar('\n');
+ if(show_all)
+ list_commands(exec_path, "git-*");
+ else
+ list_common_cmds_help();
+ }
+
exit(1);
}
@@ -244,8 +266,12 @@ static int cmd_help(int argc, const char
{
const char *help_cmd = argv[1];
if (!help_cmd)
- cmd_usage(git_exec_path(), NULL);
- show_man_page(help_cmd);
+ cmd_usage(0, git_exec_path(), NULL);
+ else if(!strcmp(help_cmd, "--all") ||
+ !strcmp(help_cmd, "-a"))
+ cmd_usage(1, git_exec_path(), NULL);
+ else
+ show_man_page(help_cmd);
return 0;
}
@@ -420,7 +446,7 @@ int main(int argc, const char **argv, ch
puts(git_exec_path());
exit(0);
}
- cmd_usage(NULL, NULL);
+ cmd_usage(0, NULL, NULL);
}
argv[0] = cmd;
@@ -443,7 +469,7 @@ int main(int argc, const char **argv, ch
execv_git_cmd(argv);
if (errno == ENOENT)
- cmd_usage(exec_path, "'%s' is not a git-command", cmd);
+ cmd_usage(0, exec_path, "'%s' is not a git-command", cmd);
fprintf(stderr, "Failed to run command '%s': %s\n",
git_command, strerror(errno));
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 2/3] Fix some inconsistencies in the docs
2006-03-09 16:17 [PATCH 0/3] Make the output of 'git' nicer Fredrik Kuivinen
2006-03-09 16:24 ` [PATCH 1/3] Nicer output from 'git' Fredrik Kuivinen
@ 2006-03-09 16:24 ` Fredrik Kuivinen
2006-03-09 16:24 ` [PATCH 3/3] Remove trailing dot after short description Fredrik Kuivinen
2006-03-09 17:32 ` [PATCH 0/3] Make the output of 'git' nicer Ryan Anderson
3 siblings, 0 replies; 6+ messages in thread
From: Fredrik Kuivinen @ 2006-03-09 16:24 UTC (permalink / raw)
To: git; +Cc: junkio
Signed-off-by: Fredrik Kuivinen <freku045@student.liu.se>
---
Documentation/git-grep.txt | 2 +-
Documentation/git-mv.txt | 2 +-
Documentation/git-tag.txt | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/Documentation/git-grep.txt b/Documentation/git-grep.txt
index bf4b592..fbd2394 100644
--- a/Documentation/git-grep.txt
+++ b/Documentation/git-grep.txt
@@ -3,7 +3,7 @@ git-grep(1)
NAME
----
-git-grep - print lines matching a pattern
+git-grep - Print lines matching a pattern
SYNOPSIS
diff --git a/Documentation/git-mv.txt b/Documentation/git-mv.txt
index d242b39..21a8664 100644
--- a/Documentation/git-mv.txt
+++ b/Documentation/git-mv.txt
@@ -3,7 +3,7 @@ git-mv(1)
NAME
----
-git-mv - Script used to move or rename a file, directory or symlink.
+git-mv - Move or rename a file, directory or symlink.
SYNOPSIS
diff --git a/Documentation/git-tag.txt b/Documentation/git-tag.txt
index e1c76c6..45476c2 100644
--- a/Documentation/git-tag.txt
+++ b/Documentation/git-tag.txt
@@ -3,7 +3,7 @@ git-tag(1)
NAME
----
-git-tag - Create a tag object signed with GPG
+git-tag - Create a tag object signed with GPG
SYNOPSIS
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 3/3] Remove trailing dot after short description
2006-03-09 16:17 [PATCH 0/3] Make the output of 'git' nicer Fredrik Kuivinen
2006-03-09 16:24 ` [PATCH 1/3] Nicer output from 'git' Fredrik Kuivinen
2006-03-09 16:24 ` [PATCH 2/3] Fix some inconsistencies in the docs Fredrik Kuivinen
@ 2006-03-09 16:24 ` Fredrik Kuivinen
2006-03-09 17:32 ` [PATCH 0/3] Make the output of 'git' nicer Ryan Anderson
3 siblings, 0 replies; 6+ messages in thread
From: Fredrik Kuivinen @ 2006-03-09 16:24 UTC (permalink / raw)
To: git; +Cc: junkio
Signed-off-by: Fredrik Kuivinen <freku045@student.liu.se>
---
Documentation/git-add.txt | 2 +-
Documentation/git-applypatch.txt | 2 +-
Documentation/git-branch.txt | 2 +-
Documentation/git-check-ref-format.txt | 2 +-
Documentation/git-checkout.txt | 2 +-
Documentation/git-cherry-pick.txt | 2 +-
Documentation/git-cherry.txt | 2 +-
Documentation/git-clone-pack.txt | 2 +-
Documentation/git-clone.txt | 2 +-
Documentation/git-count-objects.txt | 2 +-
Documentation/git-daemon.txt | 2 +-
Documentation/git-describe.txt | 2 +-
Documentation/git-diff-stages.txt | 2 +-
Documentation/git-diff.txt | 2 +-
Documentation/git-fetch-pack.txt | 2 +-
Documentation/git-fetch.txt | 2 +-
Documentation/git-format-patch.txt | 2 +-
Documentation/git-get-tar-commit-id.txt | 2 +-
Documentation/git-hash-object.txt | 2 +-
Documentation/git-http-push.txt | 2 +-
Documentation/git-lost-found.txt | 2 +-
Documentation/git-ls-remote.txt | 2 +-
Documentation/git-ls-tree.txt | 2 +-
Documentation/git-mailinfo.txt | 2 +-
Documentation/git-mailsplit.txt | 2 +-
Documentation/git-mv.txt | 2 +-
Documentation/git-name-rev.txt | 2 +-
Documentation/git-pack-objects.txt | 2 +-
Documentation/git-pack-redundant.txt | 2 +-
Documentation/git-patch-id.txt | 2 +-
Documentation/git-peek-remote.txt | 2 +-
Documentation/git-pull.txt | 2 +-
Documentation/git-push.txt | 2 +-
Documentation/git-rebase.txt | 2 +-
Documentation/git-relink.txt | 2 +-
Documentation/git-repo-config.txt | 2 +-
Documentation/git-request-pull.txt | 2 +-
Documentation/git-reset.txt | 2 +-
Documentation/git-rev-parse.txt | 2 +-
Documentation/git-revert.txt | 2 +-
Documentation/git-rm.txt | 2 +-
Documentation/git-send-pack.txt | 2 +-
Documentation/git-sh-setup.txt | 2 +-
Documentation/git-shortlog.txt | 2 +-
Documentation/git-show-branch.txt | 2 +-
Documentation/git-show.txt | 2 +-
Documentation/git-status.txt | 2 +-
Documentation/git-stripspace.txt | 2 +-
Documentation/git-unpack-objects.txt | 2 +-
Documentation/git-upload-pack.txt | 2 +-
Documentation/git-verify-pack.txt | 2 +-
Documentation/git-verify-tag.txt | 2 +-
Documentation/git-whatchanged.txt | 2 +-
53 files changed, 53 insertions(+), 53 deletions(-)
diff --git a/Documentation/git-add.txt b/Documentation/git-add.txt
index 5b7c354..ae24547 100644
--- a/Documentation/git-add.txt
+++ b/Documentation/git-add.txt
@@ -3,7 +3,7 @@ git-add(1)
NAME
----
-git-add - Add files to the index file.
+git-add - Add files to the index file
SYNOPSIS
--------
diff --git a/Documentation/git-applypatch.txt b/Documentation/git-applypatch.txt
index 5b9037d..2b1ff14 100644
--- a/Documentation/git-applypatch.txt
+++ b/Documentation/git-applypatch.txt
@@ -3,7 +3,7 @@ git-applypatch(1)
NAME
----
-git-applypatch - Apply one patch extracted from an e-mail.
+git-applypatch - Apply one patch extracted from an e-mail
SYNOPSIS
diff --git a/Documentation/git-branch.txt b/Documentation/git-branch.txt
index b1bc827..4cd0cb9 100644
--- a/Documentation/git-branch.txt
+++ b/Documentation/git-branch.txt
@@ -3,7 +3,7 @@ git-branch(1)
NAME
----
-git-branch - Create a new branch, or remove an old one.
+git-branch - Create a new branch, or remove an old one
SYNOPSIS
--------
diff --git a/Documentation/git-check-ref-format.txt b/Documentation/git-check-ref-format.txt
index f7f84c6..7dc1bdb 100644
--- a/Documentation/git-check-ref-format.txt
+++ b/Documentation/git-check-ref-format.txt
@@ -3,7 +3,7 @@ git-check-ref-format(1)
NAME
----
-git-check-ref-format - Make sure ref name is well formed.
+git-check-ref-format - Make sure ref name is well formed
SYNOPSIS
--------
diff --git a/Documentation/git-checkout.txt b/Documentation/git-checkout.txt
index df9a618..556e733 100644
--- a/Documentation/git-checkout.txt
+++ b/Documentation/git-checkout.txt
@@ -3,7 +3,7 @@ git-checkout(1)
NAME
----
-git-checkout - Checkout and switch to a branch.
+git-checkout - Checkout and switch to a branch
SYNOPSIS
--------
diff --git a/Documentation/git-cherry-pick.txt b/Documentation/git-cherry-pick.txt
index 4f323fa..bfa950c 100644
--- a/Documentation/git-cherry-pick.txt
+++ b/Documentation/git-cherry-pick.txt
@@ -3,7 +3,7 @@ git-cherry-pick(1)
NAME
----
-git-cherry-pick - Apply the change introduced by an existing commit.
+git-cherry-pick - Apply the change introduced by an existing commit
SYNOPSIS
--------
diff --git a/Documentation/git-cherry.txt b/Documentation/git-cherry.txt
index af87966..9a5e371 100644
--- a/Documentation/git-cherry.txt
+++ b/Documentation/git-cherry.txt
@@ -3,7 +3,7 @@ git-cherry(1)
NAME
----
-git-cherry - Find commits not merged upstream.
+git-cherry - Find commits not merged upstream
SYNOPSIS
--------
diff --git a/Documentation/git-clone-pack.txt b/Documentation/git-clone-pack.txt
index 39906fc..09f43ee 100644
--- a/Documentation/git-clone-pack.txt
+++ b/Documentation/git-clone-pack.txt
@@ -3,7 +3,7 @@ git-clone-pack(1)
NAME
----
-git-clone-pack - Clones a repository by receiving packed objects.
+git-clone-pack - Clones a repository by receiving packed objects
SYNOPSIS
diff --git a/Documentation/git-clone.txt b/Documentation/git-clone.txt
index 684e4bd..9ac54c2 100644
--- a/Documentation/git-clone.txt
+++ b/Documentation/git-clone.txt
@@ -3,7 +3,7 @@ git-clone(1)
NAME
----
-git-clone - Clones a repository.
+git-clone - Clones a repository
SYNOPSIS
diff --git a/Documentation/git-count-objects.txt b/Documentation/git-count-objects.txt
index 36888d9..47216f4 100644
--- a/Documentation/git-count-objects.txt
+++ b/Documentation/git-count-objects.txt
@@ -3,7 +3,7 @@ git-count-objects(1)
NAME
----
-git-count-objects - Reports on unpacked objects.
+git-count-objects - Reports on unpacked objects
SYNOPSIS
--------
diff --git a/Documentation/git-daemon.txt b/Documentation/git-daemon.txt
index 2cc6075..924a676 100644
--- a/Documentation/git-daemon.txt
+++ b/Documentation/git-daemon.txt
@@ -3,7 +3,7 @@ git-daemon(1)
NAME
----
-git-daemon - A really simple server for git repositories.
+git-daemon - A really simple server for git repositories
SYNOPSIS
--------
diff --git a/Documentation/git-describe.txt b/Documentation/git-describe.txt
index 0efe82a..7a253ea 100644
--- a/Documentation/git-describe.txt
+++ b/Documentation/git-describe.txt
@@ -3,7 +3,7 @@ git-describe(1)
NAME
----
-git-describe - Show the most recent tag that is reachable from a commit.
+git-describe - Show the most recent tag that is reachable from a commit
SYNOPSIS
diff --git a/Documentation/git-diff-stages.txt b/Documentation/git-diff-stages.txt
index 28c60fc..3273918 100644
--- a/Documentation/git-diff-stages.txt
+++ b/Documentation/git-diff-stages.txt
@@ -3,7 +3,7 @@ git-diff-stages(1)
NAME
----
-git-diff-stages - Compares content and mode of blobs between stages in an unmerged index file.
+git-diff-stages - Compares content and mode of blobs between stages in an unmerged index file
SYNOPSIS
diff --git a/Documentation/git-diff.txt b/Documentation/git-diff.txt
index ca41634..890931c 100644
--- a/Documentation/git-diff.txt
+++ b/Documentation/git-diff.txt
@@ -3,7 +3,7 @@ git-diff(1)
NAME
----
-git-diff - Show changes between commits, commit and working tree, etc.
+git-diff - Show changes between commits, commit and working tree, etc
SYNOPSIS
diff --git a/Documentation/git-fetch-pack.txt b/Documentation/git-fetch-pack.txt
index 913b75b..bff9aa6 100644
--- a/Documentation/git-fetch-pack.txt
+++ b/Documentation/git-fetch-pack.txt
@@ -3,7 +3,7 @@ git-fetch-pack(1)
NAME
----
-git-fetch-pack - Receive missing objects from another repository.
+git-fetch-pack - Receive missing objects from another repository
SYNOPSIS
diff --git a/Documentation/git-fetch.txt b/Documentation/git-fetch.txt
index a67dc34..a9e86fd 100644
--- a/Documentation/git-fetch.txt
+++ b/Documentation/git-fetch.txt
@@ -3,7 +3,7 @@ git-fetch(1)
NAME
----
-git-fetch - Download objects and a head from another repository.
+git-fetch - Download objects and a head from another repository
SYNOPSIS
diff --git a/Documentation/git-format-patch.txt b/Documentation/git-format-patch.txt
index 9ac0636..7c467c5 100644
--- a/Documentation/git-format-patch.txt
+++ b/Documentation/git-format-patch.txt
@@ -3,7 +3,7 @@ git-format-patch(1)
NAME
----
-git-format-patch - Prepare patches for e-mail submission.
+git-format-patch - Prepare patches for e-mail submission
SYNOPSIS
diff --git a/Documentation/git-get-tar-commit-id.txt b/Documentation/git-get-tar-commit-id.txt
index 30b1fbf..48805b6 100644
--- a/Documentation/git-get-tar-commit-id.txt
+++ b/Documentation/git-get-tar-commit-id.txt
@@ -3,7 +3,7 @@ git-get-tar-commit-id(1)
NAME
----
-git-get-tar-commit-id - Extract commit ID from an archive created using git-tar-tree.
+git-get-tar-commit-id - Extract commit ID from an archive created using git-tar-tree
SYNOPSIS
diff --git a/Documentation/git-hash-object.txt b/Documentation/git-hash-object.txt
index 0924931..04e8d00 100644
--- a/Documentation/git-hash-object.txt
+++ b/Documentation/git-hash-object.txt
@@ -3,7 +3,7 @@ git-hash-object(1)
NAME
----
-git-hash-object - Computes object ID and optionally creates a blob from a file.
+git-hash-object - Computes object ID and optionally creates a blob from a file
SYNOPSIS
diff --git a/Documentation/git-http-push.txt b/Documentation/git-http-push.txt
index c7066d6..7e1f894 100644
--- a/Documentation/git-http-push.txt
+++ b/Documentation/git-http-push.txt
@@ -3,7 +3,7 @@ git-http-push(1)
NAME
----
-git-http-push - Push missing objects using HTTP/DAV.
+git-http-push - Push missing objects using HTTP/DAV
SYNOPSIS
diff --git a/Documentation/git-lost-found.txt b/Documentation/git-lost-found.txt
index 03156f2..f52a9d7 100644
--- a/Documentation/git-lost-found.txt
+++ b/Documentation/git-lost-found.txt
@@ -3,7 +3,7 @@ git-lost-found(1)
NAME
----
-git-lost-found - Recover lost refs that luckily have not yet been pruned.
+git-lost-found - Recover lost refs that luckily have not yet been pruned
SYNOPSIS
--------
diff --git a/Documentation/git-ls-remote.txt b/Documentation/git-ls-remote.txt
index 66fe60f..ae4c1a2 100644
--- a/Documentation/git-ls-remote.txt
+++ b/Documentation/git-ls-remote.txt
@@ -3,7 +3,7 @@ git-ls-remote(1)
NAME
----
-git-ls-remote - Look at references other repository has.
+git-ls-remote - Look at references other repository has
SYNOPSIS
diff --git a/Documentation/git-ls-tree.txt b/Documentation/git-ls-tree.txt
index b92a8b2..5bf6d8b 100644
--- a/Documentation/git-ls-tree.txt
+++ b/Documentation/git-ls-tree.txt
@@ -3,7 +3,7 @@ git-ls-tree(1)
NAME
----
-git-ls-tree - Lists the contents of a tree object.
+git-ls-tree - Lists the contents of a tree object
SYNOPSIS
diff --git a/Documentation/git-mailinfo.txt b/Documentation/git-mailinfo.txt
index 8890754..ea0a065 100644
--- a/Documentation/git-mailinfo.txt
+++ b/Documentation/git-mailinfo.txt
@@ -3,7 +3,7 @@ git-mailinfo(1)
NAME
----
-git-mailinfo - Extracts patch from a single e-mail message.
+git-mailinfo - Extracts patch from a single e-mail message
SYNOPSIS
diff --git a/Documentation/git-mailsplit.txt b/Documentation/git-mailsplit.txt
index e0703e9..209e36b 100644
--- a/Documentation/git-mailsplit.txt
+++ b/Documentation/git-mailsplit.txt
@@ -3,7 +3,7 @@ git-mailsplit(1)
NAME
----
-git-mailsplit - Totally braindamaged mbox splitter program.
+git-mailsplit - Totally braindamaged mbox splitter program
SYNOPSIS
--------
diff --git a/Documentation/git-mv.txt b/Documentation/git-mv.txt
index 21a8664..207c43a 100644
--- a/Documentation/git-mv.txt
+++ b/Documentation/git-mv.txt
@@ -3,7 +3,7 @@ git-mv(1)
NAME
----
-git-mv - Move or rename a file, directory or symlink.
+git-mv - Move or rename a file, directory or symlink
SYNOPSIS
diff --git a/Documentation/git-name-rev.txt b/Documentation/git-name-rev.txt
index e37b0b8..6870708 100644
--- a/Documentation/git-name-rev.txt
+++ b/Documentation/git-name-rev.txt
@@ -3,7 +3,7 @@ git-name-rev(1)
NAME
----
-git-name-rev - Find symbolic names for given revs.
+git-name-rev - Find symbolic names for given revs
SYNOPSIS
diff --git a/Documentation/git-pack-objects.txt b/Documentation/git-pack-objects.txt
index 567dabf..4991f88 100644
--- a/Documentation/git-pack-objects.txt
+++ b/Documentation/git-pack-objects.txt
@@ -3,7 +3,7 @@ git-pack-objects(1)
NAME
----
-git-pack-objects - Create a packed archive of objects.
+git-pack-objects - Create a packed archive of objects
SYNOPSIS
diff --git a/Documentation/git-pack-redundant.txt b/Documentation/git-pack-redundant.txt
index a81cb97..8fb0659 100644
--- a/Documentation/git-pack-redundant.txt
+++ b/Documentation/git-pack-redundant.txt
@@ -3,7 +3,7 @@ git-pack-redundant(1)
NAME
----
-git-pack-redundant - Program used to find redundant pack files.
+git-pack-redundant - Program used to find redundant pack files
SYNOPSIS
diff --git a/Documentation/git-patch-id.txt b/Documentation/git-patch-id.txt
index c8bd197..723b8cc 100644
--- a/Documentation/git-patch-id.txt
+++ b/Documentation/git-patch-id.txt
@@ -3,7 +3,7 @@ git-patch-id(1)
NAME
----
-git-patch-id - Generate a patch ID.
+git-patch-id - Generate a patch ID
SYNOPSIS
--------
diff --git a/Documentation/git-peek-remote.txt b/Documentation/git-peek-remote.txt
index 915d3f8..a00060c 100644
--- a/Documentation/git-peek-remote.txt
+++ b/Documentation/git-peek-remote.txt
@@ -3,7 +3,7 @@ git-peek-remote(1)
NAME
----
-git-peek-remote - Lists the references in a remote repository.
+git-peek-remote - Lists the references in a remote repository
SYNOPSIS
diff --git a/Documentation/git-pull.txt b/Documentation/git-pull.txt
index 20175f4..51577fc 100644
--- a/Documentation/git-pull.txt
+++ b/Documentation/git-pull.txt
@@ -3,7 +3,7 @@ git-pull(1)
NAME
----
-git-pull - Pull and merge from another repository.
+git-pull - Pull and merge from another repository
SYNOPSIS
diff --git a/Documentation/git-push.txt b/Documentation/git-push.txt
index 6f4a48a..d5b5ca1 100644
--- a/Documentation/git-push.txt
+++ b/Documentation/git-push.txt
@@ -3,7 +3,7 @@ git-push(1)
NAME
----
-git-push - Update remote refs along with associated objects.
+git-push - Update remote refs along with associated objects
SYNOPSIS
diff --git a/Documentation/git-rebase.txt b/Documentation/git-rebase.txt
index f037d12..4d5b546 100644
--- a/Documentation/git-rebase.txt
+++ b/Documentation/git-rebase.txt
@@ -3,7 +3,7 @@ git-rebase(1)
NAME
----
-git-rebase - Rebase local commits to new upstream head.
+git-rebase - Rebase local commits to new upstream head
SYNOPSIS
--------
diff --git a/Documentation/git-relink.txt b/Documentation/git-relink.txt
index 6240535..aca6012 100644
--- a/Documentation/git-relink.txt
+++ b/Documentation/git-relink.txt
@@ -3,7 +3,7 @@ git-relink(1)
NAME
----
-git-relink - Hardlink common objects in local repositories.
+git-relink - Hardlink common objects in local repositories
SYNOPSIS
--------
diff --git a/Documentation/git-repo-config.txt b/Documentation/git-repo-config.txt
index 00efde5..26759a8 100644
--- a/Documentation/git-repo-config.txt
+++ b/Documentation/git-repo-config.txt
@@ -3,7 +3,7 @@ git-repo-config(1)
NAME
----
-git-repo-config - Get and set options in .git/config.
+git-repo-config - Get and set options in .git/config
SYNOPSIS
diff --git a/Documentation/git-request-pull.txt b/Documentation/git-request-pull.txt
index 2463ec9..478a5fd 100644
--- a/Documentation/git-request-pull.txt
+++ b/Documentation/git-request-pull.txt
@@ -3,7 +3,7 @@ git-request-pull(1)
NAME
----
-git-request-pull - Generates a summary of pending changes.
+git-request-pull - Generates a summary of pending changes
SYNOPSIS
--------
diff --git a/Documentation/git-reset.txt b/Documentation/git-reset.txt
index b4e737e..b7b9798 100644
--- a/Documentation/git-reset.txt
+++ b/Documentation/git-reset.txt
@@ -3,7 +3,7 @@ git-reset(1)
NAME
----
-git-reset - Reset current HEAD to the specified state.
+git-reset - Reset current HEAD to the specified state
SYNOPSIS
--------
diff --git a/Documentation/git-rev-parse.txt b/Documentation/git-rev-parse.txt
index 29b5789..8b95df0 100644
--- a/Documentation/git-rev-parse.txt
+++ b/Documentation/git-rev-parse.txt
@@ -3,7 +3,7 @@ git-rev-parse(1)
NAME
----
-git-rev-parse - Pick out and massage parameters.
+git-rev-parse - Pick out and massage parameters
SYNOPSIS
diff --git a/Documentation/git-revert.txt b/Documentation/git-revert.txt
index e27c680..71f7815 100644
--- a/Documentation/git-revert.txt
+++ b/Documentation/git-revert.txt
@@ -3,7 +3,7 @@ git-revert(1)
NAME
----
-git-revert - Revert an existing commit.
+git-revert - Revert an existing commit
SYNOPSIS
--------
diff --git a/Documentation/git-rm.txt b/Documentation/git-rm.txt
index d8a5afa..c9c3088 100644
--- a/Documentation/git-rm.txt
+++ b/Documentation/git-rm.txt
@@ -3,7 +3,7 @@ git-rm(1)
NAME
----
-git-rm - Remove files from the working tree and from the index.
+git-rm - Remove files from the working tree and from the index
SYNOPSIS
--------
diff --git a/Documentation/git-send-pack.txt b/Documentation/git-send-pack.txt
index 577f06a..08e0705 100644
--- a/Documentation/git-send-pack.txt
+++ b/Documentation/git-send-pack.txt
@@ -3,7 +3,7 @@ git-send-pack(1)
NAME
----
-git-send-pack - Push missing objects packed.
+git-send-pack - Push missing objects packed
SYNOPSIS
diff --git a/Documentation/git-sh-setup.txt b/Documentation/git-sh-setup.txt
index 6ef59ac..6742c9b 100644
--- a/Documentation/git-sh-setup.txt
+++ b/Documentation/git-sh-setup.txt
@@ -3,7 +3,7 @@ git-sh-setup(1)
NAME
----
-git-sh-setup - Common git shell script setup code.
+git-sh-setup - Common git shell script setup code
SYNOPSIS
--------
diff --git a/Documentation/git-shortlog.txt b/Documentation/git-shortlog.txt
index bf8db8b..54fb922 100644
--- a/Documentation/git-shortlog.txt
+++ b/Documentation/git-shortlog.txt
@@ -3,7 +3,7 @@ git-shortlog(1)
NAME
----
-git-shortlog - Summarize 'git log' output.
+git-shortlog - Summarize 'git log' output
SYNOPSIS
diff --git a/Documentation/git-show-branch.txt b/Documentation/git-show-branch.txt
index e474cd0..d3b6e62 100644
--- a/Documentation/git-show-branch.txt
+++ b/Documentation/git-show-branch.txt
@@ -3,7 +3,7 @@ git-show-branch(1)
NAME
----
-git-show-branch - Show branches and their commits.
+git-show-branch - Show branches and their commits
SYNOPSIS
--------
diff --git a/Documentation/git-show.txt b/Documentation/git-show.txt
index 9c359a4..2b4df3f 100644
--- a/Documentation/git-show.txt
+++ b/Documentation/git-show.txt
@@ -3,7 +3,7 @@ git-show(1)
NAME
----
-git-show - Show one commit with difference it introduces.
+git-show - Show one commit with difference it introduces
SYNOPSIS
diff --git a/Documentation/git-status.txt b/Documentation/git-status.txt
index 753fc08..e446f48 100644
--- a/Documentation/git-status.txt
+++ b/Documentation/git-status.txt
@@ -3,7 +3,7 @@ git-status(1)
NAME
----
-git-status - Show working tree status.
+git-status - Show working tree status
SYNOPSIS
diff --git a/Documentation/git-stripspace.txt b/Documentation/git-stripspace.txt
index 528a1b6..3a03dd0 100644
--- a/Documentation/git-stripspace.txt
+++ b/Documentation/git-stripspace.txt
@@ -3,7 +3,7 @@ git-stripspace(1)
NAME
----
-git-stripspace - Filter out empty lines.
+git-stripspace - Filter out empty lines
SYNOPSIS
diff --git a/Documentation/git-unpack-objects.txt b/Documentation/git-unpack-objects.txt
index 31ea34d..1828062 100644
--- a/Documentation/git-unpack-objects.txt
+++ b/Documentation/git-unpack-objects.txt
@@ -3,7 +3,7 @@ git-unpack-objects(1)
NAME
----
-git-unpack-objects - Unpack objects from a packed archive.
+git-unpack-objects - Unpack objects from a packed archive
SYNOPSIS
diff --git a/Documentation/git-upload-pack.txt b/Documentation/git-upload-pack.txt
index 3d8f8ef..4795e98 100644
--- a/Documentation/git-upload-pack.txt
+++ b/Documentation/git-upload-pack.txt
@@ -3,7 +3,7 @@ git-upload-pack(1)
NAME
----
-git-upload-pack - Send missing objects packed.
+git-upload-pack - Send missing objects packed
SYNOPSIS
diff --git a/Documentation/git-verify-pack.txt b/Documentation/git-verify-pack.txt
index d032280..4962d69 100644
--- a/Documentation/git-verify-pack.txt
+++ b/Documentation/git-verify-pack.txt
@@ -3,7 +3,7 @@ git-verify-pack(1)
NAME
----
-git-verify-pack - Validate packed git archive files.
+git-verify-pack - Validate packed git archive files
SYNOPSIS
diff --git a/Documentation/git-verify-tag.txt b/Documentation/git-verify-tag.txt
index b8a73c4..0f9bdb5 100644
--- a/Documentation/git-verify-tag.txt
+++ b/Documentation/git-verify-tag.txt
@@ -3,7 +3,7 @@ git-verify-tag(1)
NAME
----
-git-verify-tag - Check the GPG signature of tag.
+git-verify-tag - Check the GPG signature of tag
SYNOPSIS
--------
diff --git a/Documentation/git-whatchanged.txt b/Documentation/git-whatchanged.txt
index 6c150b0..f02f939 100644
--- a/Documentation/git-whatchanged.txt
+++ b/Documentation/git-whatchanged.txt
@@ -3,7 +3,7 @@ git-whatchanged(1)
NAME
----
-git-whatchanged - Show logs with difference each commit introduces.
+git-whatchanged - Show logs with difference each commit introduces
SYNOPSIS
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH 1/3] Nicer output from 'git'
2006-03-09 16:24 ` [PATCH 1/3] Nicer output from 'git' Fredrik Kuivinen
@ 2006-03-09 17:14 ` Jan-Benedict Glaw
0 siblings, 0 replies; 6+ messages in thread
From: Jan-Benedict Glaw @ 2006-03-09 17:14 UTC (permalink / raw)
To: Fredrik Kuivinen; +Cc: git, junkio
[-- Attachment #1: Type: text/plain, Size: 1668 bytes --]
On Thu, 2006-03-09 17:24:19 +0100, Fredrik Kuivinen <freku045@student.liu.se> wrote:
> --- /dev/null
> +++ b/generate-cmdlist.sh
> @@ -0,0 +1,22 @@
> +#!/bin/sh
> +
> +echo "/* Automatically generated by $0 */
> +struct cmdname_help
> +{
> + char name[16];
> + char help[64];
> +};
> +
> +struct cmdname_help common_cmds[] = {"
I'd use a here document for this.
> +# Please keep this list sorted
> +for i in "add" "apply" "bisect" "branch" "checkout" "cherry-pick" "clone" \
> +"commit" "diff" "fetch" "grep" "init-db" "log" "merge" "mv" \
> +"prune" "pull" "push" "rebase" "reset" "revert" "rm" "show-branch" \
> +"status" "tag" "verify-tag" "whatchanged"
You can omit all the quotes here--these words won't change by any
means of variable substitution or whitespace rearrangement...
> +static void list_common_cmds_help()
> +{
> + int i, longest = 0;
> +
> + for(i = 0; i < sizeof(common_cmds)/sizeof(struct cmdname_help); i++) {
This smells like a good candidate for ARRAY_SIZE()?
> + if(strlen(common_cmds[i].name) > longest)
> + longest = strlen(common_cmds[i].name);
> + }
Maybe make len a size_t instead of int?
> + puts("The most commonly used git commands are:");
> + for(i = 0; i < sizeof(common_cmds)/sizeof(struct cmdname_help); i++) {
ARRAY_SIZE()
MfG, JBG
--
Jan-Benedict Glaw jbglaw@lug-owl.de . +49-172-7608481 _ O _
"Eine Freie Meinung in einem Freien Kopf | Gegen Zensur | Gegen Krieg _ _ O
für einen Freien Staat voll Freier Bürger" | im Internet! | im Irak! O O O
ret = do_actions((curr | FREE_SPEECH) & ~(NEW_COPYRIGHT_LAW | DRM | TCPA));
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 0/3] Make the output of 'git' nicer
2006-03-09 16:17 [PATCH 0/3] Make the output of 'git' nicer Fredrik Kuivinen
` (2 preceding siblings ...)
2006-03-09 16:24 ` [PATCH 3/3] Remove trailing dot after short description Fredrik Kuivinen
@ 2006-03-09 17:32 ` Ryan Anderson
3 siblings, 0 replies; 6+ messages in thread
From: Ryan Anderson @ 2006-03-09 17:32 UTC (permalink / raw)
To: Fredrik Kuivinen; +Cc: git, junkio
On Thu, Mar 09, 2006 at 05:17:22PM +0100, Fredrik Kuivinen wrote:
> Hi,
>
> This series makes the output of 'git' easier to read (IMHO). With this
> patch the output will look like this:
You'll probably want to add "show" to that list.
--
Ryan Anderson
sometimes Pug Majere
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2006-03-09 17:33 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-03-09 16:17 [PATCH 0/3] Make the output of 'git' nicer Fredrik Kuivinen
2006-03-09 16:24 ` [PATCH 1/3] Nicer output from 'git' Fredrik Kuivinen
2006-03-09 17:14 ` Jan-Benedict Glaw
2006-03-09 16:24 ` [PATCH 2/3] Fix some inconsistencies in the docs Fredrik Kuivinen
2006-03-09 16:24 ` [PATCH 3/3] Remove trailing dot after short description Fredrik Kuivinen
2006-03-09 17:32 ` [PATCH 0/3] Make the output of 'git' nicer Ryan Anderson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).