From ea5aeb07e9ad92743eaaf216360340b70d4c3bbd Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Sat, 3 Jun 2006 23:44:40 -0700 Subject: [PATCH 1/5] fetch: do not report "same" unless -verbose. Signed-off-by: Junio C Hamano --- git-fetch.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/git-fetch.sh b/git-fetch.sh index 69bd810082..48818f8224 100755 --- a/git-fetch.sh +++ b/git-fetch.sh @@ -166,7 +166,10 @@ fast_forward_local () { mb=$(git-merge-base "$local" "$2") && case "$2,$mb" in $local,*) - echo >&2 "* $1: same as $3" + if test -n "$verbose" + then + echo >&2 "* $1: same as $3" + fi ;; *,$local) echo >&2 "* $1: fast forward to $3" From 895f10c3b596ef955c7f252717e5b4668530c569 Mon Sep 17 00:00:00 2001 From: Christian Couder Date: Sat, 3 Jun 2006 18:45:43 +0200 Subject: [PATCH 2/5] Builtin git-rev-parse. Signed-off-by: Christian Couder Signed-off-by: Junio C Hamano --- Makefile | 7 +++---- rev-parse.c => builtin-rev-parse.c | 3 ++- builtin.h | 1 + git.c | 3 ++- 4 files changed, 8 insertions(+), 6 deletions(-) rename rev-parse.c => builtin-rev-parse.c (98%) diff --git a/Makefile b/Makefile index b6fce394e9..004c2169c9 100644 --- a/Makefile +++ b/Makefile @@ -154,8 +154,7 @@ PROGRAMS = \ git-hash-object$X git-index-pack$X git-local-fetch$X \ git-mailinfo$X git-merge-base$X \ git-merge-index$X git-mktag$X git-mktree$X git-pack-objects$X git-patch-id$X \ - git-peek-remote$X git-prune-packed$X \ - git-receive-pack$X git-rev-parse$X \ + git-peek-remote$X git-prune-packed$X git-receive-pack$X \ git-send-pack$X git-shell$X \ git-show-index$X git-ssh-fetch$X \ git-ssh-upload$X git-unpack-file$X \ @@ -168,7 +167,7 @@ PROGRAMS = \ BUILT_INS = git-log$X git-whatchanged$X git-show$X \ git-count-objects$X git-diff$X git-push$X \ git-grep$X git-add$X git-rm$X git-rev-list$X \ - git-check-ref-format$X \ + git-check-ref-format$X git-rev-parse$X \ git-init-db$X git-tar-tree$X git-upload-tar$X git-format-patch$X \ git-ls-files$X git-ls-tree$X \ git-read-tree$X git-commit-tree$X \ @@ -222,7 +221,7 @@ LIB_OBJS = \ BUILTIN_OBJS = \ builtin-log.o builtin-help.o builtin-count.o builtin-diff.o builtin-push.o \ builtin-grep.o builtin-add.o builtin-rev-list.o builtin-check-ref-format.o \ - builtin-rm.o builtin-init-db.o \ + builtin-rm.o builtin-init-db.o builtin-rev-parse.o \ builtin-tar-tree.o builtin-upload-tar.o \ builtin-ls-files.o builtin-ls-tree.o \ builtin-read-tree.o builtin-commit-tree.o \ diff --git a/rev-parse.c b/builtin-rev-parse.c similarity index 98% rename from rev-parse.c rename to builtin-rev-parse.c index 4e2d9fbdf6..c353a481b0 100644 --- a/rev-parse.c +++ b/builtin-rev-parse.c @@ -7,6 +7,7 @@ #include "commit.h" #include "refs.h" #include "quote.h" +#include "builtin.h" #define DO_REVS 1 #define DO_NOREV 2 @@ -163,7 +164,7 @@ static int show_file(const char *arg) return 0; } -int main(int argc, char **argv) +int cmd_rev_parse(int argc, const char **argv, char **envp) { int i, as_is = 0, verify = 0; unsigned char sha1[20]; diff --git a/builtin.h b/builtin.h index 738ec3d945..ffa9340c37 100644 --- a/builtin.h +++ b/builtin.h @@ -43,5 +43,6 @@ extern int cmd_diff_index(int argc, const char **argv, char **envp); extern int cmd_diff_stages(int argc, const char **argv, char **envp); extern int cmd_diff_tree(int argc, const char **argv, char **envp); extern int cmd_cat_file(int argc, const char **argv, char **envp); +extern int cmd_rev_parse(int argc, const char **argv, char **envp); #endif diff --git a/git.c b/git.c index 10ea934bcf..bc463c98ea 100644 --- a/git.c +++ b/git.c @@ -69,7 +69,8 @@ static void handle_internal_command(int argc, const char **argv, char **envp) { "diff-index", cmd_diff_index }, { "diff-stages", cmd_diff_stages }, { "diff-tree", cmd_diff_tree }, - { "cat-file", cmd_cat_file } + { "cat-file", cmd_cat_file }, + { "rev-parse", cmd_rev_parse } }; int i; From abda1ef590d94a5e15e7ce3b685b5c092a790cfa Mon Sep 17 00:00:00 2001 From: "Horst H. von Brand" Date: Sat, 3 Jun 2006 16:27:26 -0400 Subject: [PATCH 3/5] Documentation: Spelling fixes Signed-off-by: Horst H. von Brand Signed-off-by: Junio C Hamano --- Documentation/config.txt | 16 ++++++++-------- Documentation/core-tutorial.txt | 6 +++--- Documentation/cvs-migration.txt | 4 ++-- Documentation/git-apply.txt | 2 +- Documentation/git-blame.txt | 2 +- Documentation/git-commit.txt | 2 +- Documentation/git-cvsserver.txt | 2 +- Documentation/git-daemon.txt | 4 ++-- Documentation/git-diff-index.txt | 2 +- Documentation/git-diff-tree.txt | 4 ++-- Documentation/git-diff.txt | 2 +- Documentation/git-fsck-objects.txt | 2 +- Documentation/git-grep.txt | 4 ++-- Documentation/git-merge-index.txt | 2 +- Documentation/git-patch-id.txt | 2 +- Documentation/git-read-tree.txt | 4 ++-- Documentation/git-repo-config.txt | 2 +- Documentation/git-reset.txt | 2 +- Documentation/git-rev-parse.txt | 4 ++-- Documentation/git-send-email.txt | 2 +- Documentation/git-send-pack.txt | 2 +- Documentation/git-sh-setup.txt | 2 +- Documentation/git-tools.txt | 2 +- Documentation/git-update-index.txt | 2 +- Documentation/hooks.txt | 4 ++-- Documentation/technical/pack-heuristics.txt | 2 +- Documentation/tutorial-2.txt | 2 +- Documentation/tutorial.txt | 8 ++++---- 28 files changed, 47 insertions(+), 47 deletions(-) diff --git a/Documentation/config.txt b/Documentation/config.txt index d1a4bec0d4..cd56afd021 100644 --- a/Documentation/config.txt +++ b/Documentation/config.txt @@ -2,7 +2,7 @@ CONFIGURATION FILE ------------------ The git configuration file contains a number of variables that affect -the git commands behaviour. They can be used by both the git plumbing +the git commands behavior. They can be used by both the git plumbing and the porcelains. The variables are divided to sections, where in the fully qualified variable name the variable itself is the last dot-separated segment and the section name is everything before the last @@ -53,7 +53,7 @@ core.gitProxy:: may be set multiple times and is matched in the given order; the first match wins. - Can be overriden by the 'GIT_PROXY_COMMAND' environment variable + Can be overridden by the 'GIT_PROXY_COMMAND' environment variable (which always applies universally, without the special "for" handling). @@ -115,12 +115,12 @@ http.sslCert:: http.sslKey:: File containing the SSL private key when fetching or pushing - over HTTPS. Can be overriden by the 'GIT_SSL_KEY' environment + over HTTPS. Can be overridden by the 'GIT_SSL_KEY' environment variable. http.sslCAInfo:: File containing the certificates to verify the peer with when - fetching or pushing over HTTPS. Can be overriden by the + fetching or pushing over HTTPS. Can be overridden by the 'GIT_SSL_CAINFO' environment variable. http.sslCAPath:: @@ -129,13 +129,13 @@ http.sslCAPath:: by the 'GIT_SSL_CAPATH' environment variable. http.maxRequests:: - How many HTTP requests to launch in parallel. Can be overriden + How many HTTP requests to launch in parallel. Can be overridden by the 'GIT_HTTP_MAX_REQUESTS' environment variable. Default is 5. http.lowSpeedLimit, http.lowSpeedTime:: If the HTTP transfer speed is less than 'http.lowSpeedLimit' for longer than 'http.lowSpeedTime' seconds, the transfer is aborted. - Can be overriden by the 'GIT_HTTP_LOW_SPEED_LIMIT' and + Can be overridden by the 'GIT_HTTP_LOW_SPEED_LIMIT' and 'GIT_HTTP_LOW_SPEED_TIME' environment variables. i18n.commitEncoding:: @@ -166,12 +166,12 @@ showbranch.default:: user.email:: Your email address to be recorded in any newly created commits. - Can be overriden by the 'GIT_AUTHOR_EMAIL' and 'GIT_COMMITTER_EMAIL' + Can be overridden by the 'GIT_AUTHOR_EMAIL' and 'GIT_COMMITTER_EMAIL' environment variables. See gitlink:git-commit-tree[1]. user.name:: Your full name to be recorded in any newly created commits. - Can be overriden by the 'GIT_AUTHOR_NAME' and 'GIT_COMMITTER_NAME' + Can be overridden by the 'GIT_AUTHOR_NAME' and 'GIT_COMMITTER_NAME' environment variables. See gitlink:git-commit-tree[1]. whatchanged.difftree:: diff --git a/Documentation/core-tutorial.txt b/Documentation/core-tutorial.txt index 5a831adf43..1185897f70 100644 --- a/Documentation/core-tutorial.txt +++ b/Documentation/core-tutorial.txt @@ -184,7 +184,7 @@ $ git-cat-file -t 557db03de997c86a4a028e1ebd3a1ceb225be238 ---------------- where the `-t` tells `git-cat-file` to tell you what the "type" of the -object is. git will tell you that you have a "blob" object (ie just a +object is. git will tell you that you have a "blob" object (i.e., just a regular file), and you can see the contents with ---------------- @@ -619,7 +619,7 @@ $ git tag -s ---------------- which will sign the current `HEAD` (but you can also give it another -argument that specifies the thing to tag, ie you could have tagged the +argument that specifies the thing to tag, i.e., you could have tagged the current `mybranch` point by using `git tag mybranch`). You normally only do signed tags for major releases or things @@ -1097,7 +1097,7 @@ commit object by downloading from `repo.git/objects/xx/xxx\...` using the object name of that commit object. Then it reads the commit object to find out its parent commits and the associate tree object; it repeats this process until it gets all the -necessary objects. Because of this behaviour, they are +necessary objects. Because of this behavior, they are sometimes also called 'commit walkers'. + The 'commit walkers' are sometimes also called 'dumb diff --git a/Documentation/cvs-migration.txt b/Documentation/cvs-migration.txt index fa94efde8d..826d0897e2 100644 --- a/Documentation/cvs-migration.txt +++ b/Documentation/cvs-migration.txt @@ -1,7 +1,7 @@ git for CVS users ================= -So you're a CVS user. That's ok, it's a treatable condition. The job of +So you're a CVS user. That's OK, it's a treatable condition. The job of this document is to put you on the road to recovery, by helping you convert an existing cvs repository to git, and by showing you how to use a git repository in a cvs-like fashion. @@ -159,7 +159,7 @@ other than `master`. [NOTE] ============ -Because of this behaviour, if the shared repository and the developer's +Because of this behavior, if the shared repository and the developer's repository both have branches named `origin`, then a push like the above attempts to update the `origin` branch in the shared repository from the developer's `origin` branch. The results may be unexpected, so it's diff --git a/Documentation/git-apply.txt b/Documentation/git-apply.txt index e93ea1f265..9cc7c74dea 100644 --- a/Documentation/git-apply.txt +++ b/Documentation/git-apply.txt @@ -113,7 +113,7 @@ OPTIONS When `git-apply` is used for statistics and not applying a patch, it defaults to `nowarn`. You can use different `