* Re: [PATCH] Add git-imap-send.
From: Mark Wooding @ 2006-03-10 0:38 UTC (permalink / raw)
To: git
In-Reply-To: <Pine.LNX.4.63.0603091445280.21440@wbgn013.biozentrum.uni-wuerzburg.de>
Johannes Schindelin <Johannes.Schindelin@gmx.de> wrote:
> I would be astonished if memcmp has to be timing proof for *all*
> applications, just to keep crypto people happy. I don't *want* a
> slow-down in my super-duper 3d shooter.
Oh, obviously that would be lunatic! ;-) Just making the point that it's
not /completely/ obvious that early stopping is what everyone wants...
-- [mdw]
^ permalink raw reply
* Re: [PATCH] allow double click on current HEAD id after git-pull
From: Carl Worth @ 2006-03-10 0:25 UTC (permalink / raw)
To: Junio C Hamano; +Cc: Petr Baudis, Olaf Hering, git
In-Reply-To: <7vy7zj2oom.fsf@assigned-by-dhcp.cox.net>
[-- Attachment #1: Type: text/plain, Size: 544 bytes --]
On Thu, 09 Mar 2006 15:17:29 -0800, Junio C Hamano wrote:
> Well I kind of like ending a sentence with a full stop. Isn't
> this something you can do by confuguiring your cut&paste?
If the cut-and-paste configuration is limited to just word characters
vs. word-separating characters, then no. At least not and also
preserve the ability to select numbers of the form 1.25 .
I don't know if an extra space like the above is good style, but it is
what I have sometimes caught myself doing when ending a sentence with
a URL, for example.
-Carl
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply
* Re: bug?: stgit creates (unneccessary?) conflicts when pulling
From: Junio C Hamano @ 2006-03-09 23:20 UTC (permalink / raw)
To: Catalin Marinas; +Cc: git, Shawn Pearce
In-Reply-To: <b0943d9e0603091400o2cd0291h@mail.gmail.com>
"Catalin Marinas" <catalin.marinas@gmail.com> writes:
> Trying to implement this, I've just noticed that git-read-tree has a
> --aggressive option which takes care of the file removals. Adding this
> option lowered the pushing time in StGIT from ~2 min to under 2
> seconds (merges between 2.6.14 and the latest kernel). There's
> probably no need to deal with file removals in pg--merge-all anymore.
Yup, it was originally done to improve the performance of
resolve merge strategy, but I am glad somebody else has found
use for it.
^ permalink raw reply
* Re: [PATCH] allow double click on current HEAD id after git-pull
From: Junio C Hamano @ 2006-03-09 23:17 UTC (permalink / raw)
To: Petr Baudis; +Cc: junkio, Olaf Hering, git
In-Reply-To: <20060309210250.GY31278@pasky.or.cz>
Petr Baudis <pasky@suse.cz> writes:
> Dear diary, on Sat, Feb 11, 2006 at 12:26:30PM CET, I got a letter
> where Olaf Hering <olh@suse.de> said that...
>> Double click on to current HEAD commit id is not possible,
>> the dot has to go.
>>
>> olaf@pomegranate:~/kernel/git/linux-2.6> git-pull
>> Unpacking 194 objects
>> 100% (194/194) done
>> * refs/heads/origin: fast forward to branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
>> Updating from 5bc159e6cb7ca8d173195919ee935885c129011e to 25bf368b3d98668c5d5f38e2201d8bca16e52680.
> ^
>
> Junio, is there any particular reason why this hasn't been applied?
Well I kind of like ending a sentence with a full stop. Isn't
this something you can do by confuguiring your cut&paste?
But I do not have a _very_ strong feeling either way. If
majority of the list wants it that way I do not mind.
^ permalink raw reply
* Re: bug?: stgit creates (unneccessary?) conflicts when pulling
From: Catalin Marinas @ 2006-03-09 22:00 UTC (permalink / raw)
To: Shawn Pearce; +Cc: git
In-Reply-To: <20060301155043.GA3706@spearce.org>
On 01/03/06, Shawn Pearce <spearce@spearce.org> wrote:
> Speaking of making StGIT faster: earlier we were talking about how
> git-diff|git-apply is faster than a 3 way git-read-tree on large
> merges when there are many structural changes in the tree due to
> the smaller number of process spawns required.
>
> You might want to take a look at pg--merge-all: This is sort of based
> on git-merge-recursive, but I've gotten it down to just a handful
> of process spawns, aside from the stupidity of git-checkout-index.
Trying to implement this, I've just noticed that git-read-tree has a
--aggressive option which takes care of the file removals. Adding this
option lowered the pushing time in StGIT from ~2 min to under 2
seconds (merges between 2.6.14 and the latest kernel). There's
probably no need to deal with file removals in pg--merge-all anymore.
--
Catalin
^ permalink raw reply
* Re: [PATCH] allow double click on current HEAD id after git-pull
From: Petr Baudis @ 2006-03-09 21:02 UTC (permalink / raw)
To: junkio; +Cc: Olaf Hering, git
In-Reply-To: <20060211112630.GA12421@suse.de>
Dear diary, on Sat, Feb 11, 2006 at 12:26:30PM CET, I got a letter
where Olaf Hering <olh@suse.de> said that...
> Double click on to current HEAD commit id is not possible,
> the dot has to go.
>
> olaf@pomegranate:~/kernel/git/linux-2.6> git-pull
> Unpacking 194 objects
> 100% (194/194) done
> * refs/heads/origin: fast forward to branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
> Updating from 5bc159e6cb7ca8d173195919ee935885c129011e to 25bf368b3d98668c5d5f38e2201d8bca16e52680.
^
Junio, is there any particular reason why this hasn't been applied?
Thanks,
--
Petr "Pasky" Baudis
Stuff: http://pasky.or.cz/
Of the 3 great composers Mozart tells us what it's like to be human,
Beethoven tells us what it's like to be Beethoven and Bach tells us
what it's like to be the universe. -- Douglas Adams
^ permalink raw reply
* Re: git-ls-files --unmerged implies --stages: ?
From: Junio C Hamano @ 2006-03-09 18:50 UTC (permalink / raw)
To: Matthias Urlichs; +Cc: git
In-Reply-To: <pan.2006.03.09.15.19.03.286472@smurf.noris.de>
Matthias Urlichs <smurf@smurf.noris.de> writes:
> I wonder why git-ls-files --unmerged implies --stages. One nice use case
> for this command is to edit all the conflicting files after a failed
> merge, i.e.
>
> $ vi $(git-ls-files --unmerged)
>
> except I need a pipe to throw out all the cruft in there.
I typically use git diff --name-only for this (yes I probably
need to uniq them out), but you can certainly talk me into
introducing --unmerged --name-only. If nobody objects, even
making --unmerged independent from --stages might be a sensible
thing to do -- if we do so you would need --unmerged --stages to
get the current behaviour.
^ permalink raw reply
* Re: [PATCH] Allow git-repack to optionally run git-prune-packed.
From: Junio C Hamano @ 2006-03-09 18:50 UTC (permalink / raw)
To: Alex Riesen; +Cc: git, Alex Riesen
In-Reply-To: <81b0412b0603090648w4a3e4e4bwceb0ad19a2a4d15f@mail.gmail.com>
"Alex Riesen" <raa.lkml@gmail.com> writes:
> On 3/9/06, Martin Atukunda <matlads@dsmagic.com> wrote:
>> Your suggestion has merit, though it's different from the behaviour I
>> desired. I _sometimes_ need the pruning, and it felt appropriate to make
>> it an option as opposed to default behaviour.
>>
>> What do you think?
>
> I think that my patch didn't change the default. git-prune-packed is called
> only if -d is given, which is not the default.
I am inclined to say I prefer Alex' one.
^ permalink raw reply
* Re: [PATCH] Add git-imap-send.
From: Junio C Hamano @ 2006-03-09 18:49 UTC (permalink / raw)
To: Linus Torvalds; +Cc: git
In-Reply-To: <Pine.LNX.4.64.0603091017530.18022@g5.osdl.org>
Linus Torvalds <torvalds@osdl.org> writes:
>> > ... They won't be used in the eventual result, but
>> > just the fact that they are loaded from memory can mean that your program
>> > takes a SIGSEGV, for example, becaue it turns out "string" was just a
>> > single NUL byte at the end of a page, and there's nothing after it.
>>
>> Funny. I've seen this exact bug in memcmp and strcmp in earlier
>> SunOS (pre Solaris) libc when I was working on something like
>> Valgrind in my previous life.
>
> Well, Valgrind actually can complain for no good reason.
To clarify, it was _not_ Valgrind I was mucking with. And the
optimization used in the system library was wrong -- it stepped
over the page boundary without checking. I found that it was
fixed in later releases (that was all before Sun started
calling their system Solaris).
^ permalink raw reply
* Re: [PATCH] clone: add refs/remotes/* to Pull: targets when cloning
From: Junio C Hamano @ 2006-03-09 18:23 UTC (permalink / raw)
To: Eric Wong; +Cc: git
In-Reply-To: <20060309115535.GB13369@localdomain>
Eric Wong <normalperson@yhbt.net> writes:
> diff --git a/git-clone.sh b/git-clone.sh
> index 4ed861d..a8ab7fd 100755
> --- a/git-clone.sh
> +++ b/git-clone.sh
> @@ -249,6 +249,12 @@ Pull: $head_points_at:$origin" &&
> test "$origin" = "$head" ||
> echo "Pull: ${head}:${head}"
> done >>"$GIT_DIR/remotes/origin"
> + (test -d "$GIT_DIR"/refs/remotes && cd "$GIT_DIR" &&
> + find "refs/remotes" -type f -print | sed -e 's|^refs/||') |
> + while read ref
> + do
> + echo "Pull: $ref:$ref"
> + done >>"$GIT_DIR/remotes/origin"
> esac
I am not sure I agree with what you are doing here. I thought
the idea behind refs/remotes is to migrate away from copying all
the remote heads into refs/heads (so that Linus does not need to
see my "next" and "pu" under his refs/heads), and putting
foreign SCM tracking branches used by SVN and CVS importers in
there instead of in refs/heads naturally falls out from that
pattern.
Now I do not propose to change the current clone that
contaminates the local branch namespace by copying remote
refs/heads into local refs/heads in the middle of v1.3.0
development without laying out a transition plan, but I think
that is a sensible future direction. Instead of copying
everything from refs/heads to refs/heads, we only copy what
remote HEAD points at to refs/heads/master to initialize the
local clone, and copy everything from refs/heads to
refs/remotes, _and_ set up Pull: lines to do the same tracking.
The part of the code you are touching corresponds to the last
part.
We would probably be better off not doing this right now. When
we are sure everybody thinks it is a better approach to use
refs/remotes for remote branch tracking, we would need to change
the part you did not change (I think the clone-pack part is the
hardest to change since it has a built-in "copy refs to matching
locations" logic) alongside with the part you touched with this
patch to make things consistent. At that time also you would
need to remove several lines above the part you touched so that
we do not use local refs/heads/* for tracking.
How does that sound?
^ permalink raw reply
* Re: [PATCH] Add git-imap-send.
From: Linus Torvalds @ 2006-03-09 18:21 UTC (permalink / raw)
To: Junio C Hamano; +Cc: git, Mike McCormack
In-Reply-To: <7vmzfz5w2k.fsf@assigned-by-dhcp.cox.net>
On Thu, 9 Mar 2006, Junio C Hamano wrote:
>
> Linus Torvalds <torvalds@osdl.org> writes:
>
> > it's entirely possible that it will load bytes from "string" _past_ the
> > end of the string because of an unrolled inner loop that does things
> > multiple bytes at a time. They won't be used in the eventual result, but
> > just the fact that they are loaded from memory can mean that your program
> > takes a SIGSEGV, for example, becaue it turns out "string" was just a
> > single NUL byte at the end of a page, and there's nothing after it.
>
> Funny. I've seen this exact bug in memcmp and strcmp in earlier
> SunOS (pre Solaris) libc when I was working on something like
> Valgrind in my previous life.
Well, Valgrind actually can complain for no good reason.
System libraries often take advantage of knowing how the CPU and the
system memory layout works. For example, just from knowing that pages are
always aligned to a certain (largish) boundary, you can know that it's
perfectly safe to do certain optimizations and prefetch past the end of an
object, as long as it's in the same page (and the easiest way to verify
that is to just do it when something is aligned).
So Valgrind will sometimes complain about perfectly bug-free code, just
because the bug-free code accesses outside the "strictly allowable"
region because it knows it can.
Valgrind can be taught about system libraries like that, but especially if
it's an early port to a new architecture or OS, valgrind will often
complain unnecessarily.
Linus
^ permalink raw reply
* Re: [PATCH] Add git-imap-send.
From: Junio C Hamano @ 2006-03-09 18:09 UTC (permalink / raw)
To: Linus Torvalds; +Cc: git, Mike McCormack
In-Reply-To: <Pine.LNX.4.64.0603090836030.18022@g5.osdl.org>
Linus Torvalds <torvalds@osdl.org> writes:
> it's entirely possible that it will load bytes from "string" _past_ the
> end of the string because of an unrolled inner loop that does things
> multiple bytes at a time. They won't be used in the eventual result, but
> just the fact that they are loaded from memory can mean that your program
> takes a SIGSEGV, for example, becaue it turns out "string" was just a
> single NUL byte at the end of a page, and there's nothing after it.
Funny. I've seen this exact bug in memcmp and strcmp in earlier
SunOS (pre Solaris) libc when I was working on something like
Valgrind in my previous life.
^ permalink raw reply
* Re: [PATCH 0/3] Make the output of 'git' nicer
From: Ryan Anderson @ 2006-03-09 17:32 UTC (permalink / raw)
To: Fredrik Kuivinen; +Cc: git, junkio
In-Reply-To: <20060309161722.GA4484@c165.ib.student.liu.se>
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
* Re: Pulling tags from git.git
From: Andreas Ericsson @ 2006-03-09 17:24 UTC (permalink / raw)
To: Florian Weimer; +Cc: git
In-Reply-To: <87zmk0dq75.fsf@mid.deneb.enyo.de>
Florian Weimer wrote:
> * Andreas Ericsson:
>
> [lightweight tags]
>
>
>>I'm fairly sure we shouldn't. The default update-hook prevents them
>>(if enabled), and I can't for the life of me think of why anyone would
>>want to distribute such tags.
>
>
> The current implementation is rather counter-intuitive because it's
> much easier to create lightweight tags, and you wonder why they aren't
> replicated by fetches (but some other tags are).
Well, you wouldn't want to go through the trouble of writing a
tag-message for a temporary tag, but signing and writing a short note
for a tag that you intend those who share your workload to have is not
that much of a bother imo.
--
Andreas Ericsson andreas.ericsson@op5.se
OP5 AB www.op5.se
Tel: +46 8-230225 Fax: +46 8-230231
^ permalink raw reply
* Re: [PATCH] fetch/parse-remote: refs/remotes/* support
From: Junio C Hamano @ 2006-03-09 17:23 UTC (permalink / raw)
To: Eric Wong; +Cc: git
In-Reply-To: <20060309115452.GA13369@localdomain>
> @@ -103,6 +103,9 @@ append_fetch_head () {
> refs/tags/*)
> note_="$(expr "$remote_name_" : 'refs/tags/\(.*\)')"
> note_="tag '$note_' of " ;;
> + refs/remotes/*)
> + note_="$(expr "$remote_name_" : 'refs/remotes/\(.*\)')"
> + note_="remote branch '$note_' of " ;;
> *)
> note_="$remote_name of " ;;
> esac
I vaguely recall that if you touch this part of the code you
would also need to check if fmt-merge-msg does sensible thing
for it.
^ permalink raw reply
* Re: [PATCH 1/3] Nicer output from 'git'
From: Jan-Benedict Glaw @ 2006-03-09 17:14 UTC (permalink / raw)
To: Fredrik Kuivinen; +Cc: git, junkio
In-Reply-To: <20060309162419.GB4484@c165.ib.student.liu.se>
[-- 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
* Re: [PATCH] Add git-imap-send.
From: Linus Torvalds @ 2006-03-09 16:41 UTC (permalink / raw)
To: Johannes Schindelin; +Cc: Junio C Hamano, Mike McCormack, git
In-Reply-To: <Pine.LNX.4.63.0603091227560.20277@wbgn013.biozentrum.uni-wuerzburg.de>
On Thu, 9 Mar 2006, Johannes Schindelin wrote:
> >
> > > + if (!memcmp( "imaps:", val, 6 )) {
> > > + if (!memcmp( "imap:", val, 5 ))
> >
> > Is val always longer than 5 or 6 bytes here?
>
> That does not matter, since they are strings, and the memcmp should not
> look further if they are shorter (because the comparison to '\0' failed
> already).
No.
It's true that any sane memcmp() will stop when it notices a difference,
and it's also true that the return value semantics of memcmp() means that
it has to walk beginning-to-end.
HOWEVER. The key phrase is "_when_ it notices a difference".
It's quite common for optimized memcmp()'s to do things like loading
several words from both the source and the destinations, and testing them
together, and only start doing the byte-by-byte comparison when the "big"
comparison has failed.
So when you do a
if (!memcmp(string, mystring, mystringlength))
...
it's entirely possible that it will load bytes from "string" _past_ the
end of the string because of an unrolled inner loop that does things
multiple bytes at a time. They won't be used in the eventual result, but
just the fact that they are loaded from memory can mean that your program
takes a SIGSEGV, for example, becaue it turns out "string" was just a
single NUL byte at the end of a page, and there's nothing after it.
IOW, it's a bad optimization.
Use "strncmp()" instead. Yes, it can be slower, exactly because it has to
check more, but it checks more exactly because memcmp() can cause
undefined behaviour by running off the end of a string.
Linus
^ permalink raw reply
* Re: Pulling tags from git.git
From: Florian Weimer @ 2006-03-09 7:37 UTC (permalink / raw)
To: git
In-Reply-To: <440D7A7D.8070507@op5.se>
* Andreas Ericsson:
[lightweight tags]
> I'm fairly sure we shouldn't. The default update-hook prevents them
> (if enabled), and I can't for the life of me think of why anyone would
> want to distribute such tags.
The current implementation is rather counter-intuitive because it's
much easier to create lightweight tags, and you wonder why they aren't
replicated by fetches (but some other tags are).
^ permalink raw reply
* [PATCH 2/3] Fix some inconsistencies in the docs
From: Fredrik Kuivinen @ 2006-03-09 16:24 UTC (permalink / raw)
To: git; +Cc: junkio
In-Reply-To: <20060309161722.GA4484@c165.ib.student.liu.se>
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
* [PATCH 3/3] Remove trailing dot after short description
From: Fredrik Kuivinen @ 2006-03-09 16:24 UTC (permalink / raw)
To: git; +Cc: junkio
In-Reply-To: <20060309161722.GA4484@c165.ib.student.liu.se>
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
* [PATCH 1/3] Nicer output from 'git'
From: Fredrik Kuivinen @ 2006-03-09 16:24 UTC (permalink / raw)
To: git; +Cc: junkio
In-Reply-To: <20060309161722.GA4484@c165.ib.student.liu.se>
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
* [PATCH 0/3] Make the output of 'git' nicer
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
* git-ls-files --unmerged implies --stages: ?
From: Matthias Urlichs @ 2006-03-09 15:19 UTC (permalink / raw)
To: git
Hi,
I wonder why git-ls-files --unmerged implies --stages. One nice use case
for this command is to edit all the conflicting files after a failed
merge, i.e.
$ vi $(git-ls-files --unmerged)
except I need a pipe to throw out all the cruft in there.
Does anybody depend on that implication, or do I need to add a "no-stages"
option, or am I blind and there's a better way to do this?
--
Matthias Urlichs
^ permalink raw reply
* "fatal: protocol error: bad line length character": ??
From: Matthias Urlichs @ 2006-03-09 15:15 UTC (permalink / raw)
To: git
Anybody seen this? The problem is benign, but ...
$ git push HOST master
updating 'refs/heads/master'
from f18c5d41ede0c4179d6821d2cc7ef7feaaca2f99
to d9205cd53bb97febbff8b43cbc93e60f735e32dd
Generating pack...
Done counting 5 objects.
Deltifying 5 objects.
100% (5/5) done
Total 5, written 5 (delta 0), reused 0 (delta 0)
Unpacking 5 objects
fatal: protocol error: bad line length character
refs/heads/master: f18c5d41ede0c4179d6821d2cc7ef7feaaca2f99 -> d9205cd53bb97febbff8b43cbc93e60f735e32dd
$ git push HOST master
Everything up-to-date
$
^ permalink raw reply
* Re: [PATCH] Allow git-repack to optionally run git-prune-packed.
From: Alex Riesen @ 2006-03-09 14:48 UTC (permalink / raw)
To: Alex Riesen, git
In-Reply-To: <20060309102419.GA9961@igloo.ds.co.ug>
On 3/9/06, Martin Atukunda <matlads@dsmagic.com> wrote:
> Your suggestion has merit, though it's different from the behaviour I
> desired. I _sometimes_ need the pruning, and it felt appropriate to make
> it an option as opposed to default behaviour.
>
> What do you think?
>
I think that my patch didn't change the default. git-prune-packed is called
only if -d is given, which is not the default.
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox