From dd4c59121ff8277d49a64a8f105936878a9fd7af Mon Sep 17 00:00:00 2001 From: Alp Toker Date: Fri, 14 Jul 2006 11:31:50 -0700 Subject: [PATCH 1/5] documentation (urls.txt) typofix --- Documentation/urls.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/urls.txt b/Documentation/urls.txt index 93378d2378..9d2ad469ec 100644 --- a/Documentation/urls.txt +++ b/Documentation/urls.txt @@ -15,7 +15,7 @@ to name the remote repository: - ssh://+++[user@+++]host.xz/~/path/to/repo.git =============================================================== -SSH Is the default transport protocol and also supports an +SSH is the default transport protocol and also supports an scp-like syntax. Both syntaxes support username expansion, as does the native git protocol. The following three are identical to the last three above, respectively: From d5b9e6cfa7a20932ca17649c9172619c9d961db4 Mon Sep 17 00:00:00 2001 From: Matthias Lederhofer Date: Fri, 14 Jul 2006 18:37:06 +0200 Subject: [PATCH 2/5] argv created by handle_alias should be NULL terminated Signed-off-by: Matthias Lederhofer Signed-off-by: Junio C Hamano --- git.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/git.c b/git.c index 102735af6c..ee5a0e86a7 100644 --- a/git.c +++ b/git.c @@ -133,13 +133,12 @@ static int handle_alias(int *argcp, const char ***argv) fflush(stderr); } + new_argv = realloc(new_argv, sizeof(char*) * + (count + *argcp + 1)); /* insert after command name */ - if (*argcp > 1) { - new_argv = realloc(new_argv, sizeof(char*) * - (count + *argcp)); - memcpy(new_argv + count, *argv + 1, - sizeof(char*) * *argcp); - } + memcpy(new_argv + count, *argv + 1, + sizeof(char*) * *argcp); + new_argv[count+*argcp] = NULL; *argv = new_argv; *argcp += count - 1; From 7eae7b993ec3c1f5dfeb78d79673627b48d5f772 Mon Sep 17 00:00:00 2001 From: Sergey Vlasov Date: Fri, 14 Jul 2006 19:06:57 +0400 Subject: [PATCH 3/5] Fix "git-fetch --tags" exit status when nothing has been changed After commit 55b7835e1b81a6debc7648149d2b8a4c5c64ddba git-fetch --tags exits with status 1 when no tags have been changed, which breaks calling git-fetch from scripts. Signed-off-by: Sergey Vlasov Signed-off-by: Junio C Hamano --- git-fetch.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/git-fetch.sh b/git-fetch.sh index ff1769952b..ee99280a2a 100755 --- a/git-fetch.sh +++ b/git-fetch.sh @@ -153,7 +153,7 @@ fast_forward_local () { then if now_=$(cat "$GIT_DIR/$1") && test "$now_" = "$2" then - [ "$verbose" ] && echo >&2 "* $1: same as $3" + [ "$verbose" ] && echo >&2 "* $1: same as $3" ||: else echo >&2 "* $1: updating with $3" git-update-ref -m "$rloga: updating tag" "$1" "$2" From c7543ce0be5609df8123f88ac75a06c1bda98f0e Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Fri, 14 Jul 2006 16:32:38 -0700 Subject: [PATCH 4/5] Documentation/Makefile: product depends on asciidoc.conf Signed-off-by: Junio C Hamano --- Documentation/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/Makefile b/Documentation/Makefile index 2b0efe7921..6dbe45b506 100644 --- a/Documentation/Makefile +++ b/Documentation/Makefile @@ -46,6 +46,7 @@ all: html man html: $(DOC_HTML) +$(DOC_HTML) $(DOC_MAN1) $(DOC_MAN7): asciidoc.conf man: man1 man7 man1: $(DOC_MAN1) From a3e65d74ee7ec9e6f49de7688a1cdac052910bd4 Mon Sep 17 00:00:00 2001 From: Jonas Fonseca Date: Fri, 14 Jul 2006 16:36:00 -0700 Subject: [PATCH 5/5] Documentation/urls.txt: Use substitution to escape square brackets This changes "[user@]" to use {startsb} and {endsb} to insert [ and ], similar to how {caret} is used in git-rev-parse.txt. [jc: Removed a well-intentioned comment that broke the final formatting from the original patch. While we are at it, updated the paragraph that claims to be equivalent to the section that was updated earlier without making matching changes.] Signed-off-by: Jonas Fonseca Signed-off-by: Junio C Hamano --- Documentation/asciidoc.conf | 2 ++ Documentation/urls.txt | 17 +++++++++-------- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/Documentation/asciidoc.conf b/Documentation/asciidoc.conf index 7ce71510de..8196d787ab 100644 --- a/Documentation/asciidoc.conf +++ b/Documentation/asciidoc.conf @@ -9,6 +9,8 @@ [attributes] caret=^ +startsb=[ +endsb=] ifdef::backend-docbook[] [gitlink-inlinemacro] diff --git a/Documentation/urls.txt b/Documentation/urls.txt index 9d2ad469ec..26ecba53fb 100644 --- a/Documentation/urls.txt +++ b/Documentation/urls.txt @@ -10,20 +10,21 @@ to name the remote repository: - https://host.xz/path/to/repo.git/ - git://host.xz/path/to/repo.git/ - git://host.xz/~user/path/to/repo.git/ -- ssh://+++[user@+++]host.xz/path/to/repo.git/ -- ssh://+++[user@+++]host.xz/~user/path/to/repo.git/ -- ssh://+++[user@+++]host.xz/~/path/to/repo.git +- ssh://{startsb}user@{endsb}host.xz/path/to/repo.git/ +- ssh://{startsb}user@{endsb}host.xz/~user/path/to/repo.git/ +- ssh://{startsb}user@{endsb}host.xz/~/path/to/repo.git =============================================================== -SSH is the default transport protocol and also supports an -scp-like syntax. Both syntaxes support username expansion, +SSH is the default transport protocol. You can optionally specify +which user to log-in as, and an alternate, scp-like syntax is also +supported. Both syntaxes support username expansion, as does the native git protocol. The following three are identical to the last three above, respectively: =============================================================== -- host.xz:/path/to/repo.git/ -- host.xz:~user/path/to/repo.git/ -- host.xz:path/to/repo.git +- {startsb}user@{endsb}host.xz:/path/to/repo.git/ +- {startsb}user@{endsb}host.xz:~user/path/to/repo.git/ +- {startsb}user@{endsb}host.xz:path/to/repo.git =============================================================== To sync with a local directory, use: