Git development
 help / color / mirror / Atom feed
* [PATCH 0/5] Updates for git-http-backend
From: Mark Lodato @ 2009-10-25 18:05 UTC (permalink / raw)
  To: git; +Cc: Junio C Hamano, Shawn O. Pearce, Mark Lodato

This patch series applies to pu.  It adds a GIT_PROJECT_ROOT environment
variable, which makes git-http-backend much easier to configure, and it
updates the documentation to add more useful examples and to clarify some
things.

I originally posted this same series as a single patch in one of the replies
to Return of Smart HTTP.  Here, I'm posting it as a set of proper series of
patch, each of which is a unit and has a proper signed-off-by line.

Mark Lodato (5):
  http-backend: add GIT_PROJECT_ROOT environment var
  http-backend: reword some documentation
  http-backend: use mod_alias instead of mod_rewrite
  http-backend: add example for gitweb on same URL
  http-backend: more explict LocationMatch

 Documentation/git-http-backend.txt |   94 +++++++++++++++++++++++-------------
 http-backend.c                     |   25 ++++++++-
 2 files changed, 83 insertions(+), 36 deletions(-)

^ permalink raw reply

* [PATCH 1/5] http-backend: add GIT_PROJECT_ROOT environment var
From: Mark Lodato @ 2009-10-25 18:05 UTC (permalink / raw)
  To: git; +Cc: Junio C Hamano, Shawn O. Pearce, Mark Lodato
In-Reply-To: <1256493935-8680-1-git-send-email-lodatom@gmail.com>

Add a new environment variable, GIT_PROJECT_ROOT, to override the
method of using PATH_TRANSLATED to find the git repository on disk.
This makes it much easier to configure the web server, especially when
the web server's DocumentRoot does not contain the git repositories,
which is the usual case.

Signed-off-by: Mark Lodato <lodatom@gmail.com>
---
 Documentation/git-http-backend.txt |   39 +++++++++++++++--------------------
 http-backend.c                     |   25 ++++++++++++++++++++--
 2 files changed, 39 insertions(+), 25 deletions(-)

diff --git a/Documentation/git-http-backend.txt b/Documentation/git-http-backend.txt
index 022a243..99dbbfb 100644
--- a/Documentation/git-http-backend.txt
+++ b/Documentation/git-http-backend.txt
@@ -41,29 +41,24 @@ http.receivepack::
 
 URL TRANSLATION
 ---------------
-'git-http-backend' relies on the invoking web server to perform
-URL to path translation, and store the repository path into the
-PATH_TRANSLATED environment variable.  Most web servers will do
-this translation automatically, resolving the suffix after the
-CGI name relative to the server's document root.
+To determine the location of the repository on disk, 'git-http-backend'
+concatenates the environment variables PATH_INFO, which is set
+automatically by the web server, and GIT_PROJECT_ROOT, which must be set
+manually in the web server configuration.  If GIT_PROJECT_ROOT is not
+set, 'git-http-backend' reads PATH_TRANSLATED, which is also set
+automatically by the web server.
 
 EXAMPLES
 --------
 
 Apache 2.x::
-	To serve all Git repositories contained within the '/git/'
-	subdirectory of the DocumentRoot, ensure mod_cgi and
-	mod_alias are enabled, and create a ScriptAlias to the CGI:
+	Ensure mod_cgi, mod_alias, and mod_env are enabled, set
+	GIT_PROJECT_ROOT (or DocumentRoot) appropriately, and
+	create a ScriptAlias to the CGI:
 +
 ----------------------------------------------------------------
-ScriptAlias /git/ /usr/libexec/git-core/git-http-backend/git/
-
-<Directory /usr/libexec/git-core>
-	Options None
-</Directory>
-<Files /usr/libexec/git-core/git-http-backend>
-	Options ExecCGI
-</Files>
+SetEnv GIT_PROJECT_ROOT /var/www/git
+ScriptAlias /git/ /usr/libexec/git-core/git-http-backend/
 ----------------------------------------------------------------
 +
 To enable anonymous read access but authenticated write access,
@@ -78,16 +73,16 @@ require authorization with a LocationMatch directive:
 </LocationMatch>
 ----------------------------------------------------------------
 +
-To require authentication for both reads and writes, use a Directory
+To require authentication for both reads and writes, use a Location
 directive around the repository, or one of its parent directories:
 +
 ----------------------------------------------------------------
-<Directory /var/www/git/private>
+<Location /git/private>
 	AuthType Basic
 	AuthName "Private Git Access"
 	Require group committers
 	...
-</Directory>
+</Location>
 ----------------------------------------------------------------
 
 Accelerated static Apache 2.x::
@@ -97,9 +92,9 @@ Accelerated static Apache 2.x::
 	file contents from the file system directly to the network:
 +
 ----------------------------------------------------------------
-DocumentRoot /var/www
+SetEnv GIT_PROJECT_ROOT /var/www/git
 
-ScriptAlias /git/        /usr/libexec/git-core/git-http-backend/git/
+ScriptAlias /git/        /usr/libexec/git-core/git-http-backend/
 Alias       /git_static/ /var/www/git/
 
 RewriteEngine on
@@ -114,7 +109,7 @@ ENVIRONMENT
 'git-http-backend' relies upon the CGI environment variables set
 by the invoking web server, including:
 
-* PATH_TRANSLATED
+* PATH_INFO (if GIT_PROJECT_ROOT is set, otherwise PATH_TRANSLATED)
 * REMOTE_USER
 * REMOTE_ADDR
 * CONTENT_TYPE
diff --git a/http-backend.c b/http-backend.c
index 67030b5..8e5c0a2 100644
--- a/http-backend.c
+++ b/http-backend.c
@@ -528,6 +528,26 @@ static NORETURN void die_webcgi(const char *err, va_list params)
 	exit(0);
 }
 
+static char* getdir(void)
+{
+	struct strbuf buf = STRBUF_INIT;
+	char *pathinfo = getenv("PATH_INFO");
+	char *root = getenv("GIT_PROJECT_ROOT");
+	char *path = getenv("PATH_TRANSLATED");
+
+	if (root && *root) {
+		if (!pathinfo || !*pathinfo)
+			die("GIT_PROJECT_ROOT is set but PATH_INFO is not");
+		strbuf_addstr(&buf, root);
+		strbuf_addstr(&buf, pathinfo);
+		return strbuf_detach(&buf, NULL);
+	} else if (path && *path) {
+		return xstrdup(path);
+	} else
+		die("No GIT_PROJECT_ROOT or PATH_TRANSLATED from server");
+	return NULL;
+}
+
 static struct service_cmd {
 	const char *method;
 	const char *pattern;
@@ -550,7 +570,7 @@ static struct service_cmd {
 int main(int argc, char **argv)
 {
 	char *method = getenv("REQUEST_METHOD");
-	char *dir = getenv("PATH_TRANSLATED");
+	char *dir;
 	struct service_cmd *cmd = NULL;
 	char *cmd_arg = NULL;
 	int i;
@@ -562,8 +582,7 @@ int main(int argc, char **argv)
 		die("No REQUEST_METHOD from server");
 	if (!strcmp(method, "HEAD"))
 		method = "GET";
-	if (!dir)
-		die("No PATH_TRANSLATED from server");
+	dir = getdir();
 
 	for (i = 0; i < ARRAY_SIZE(services); i++) {
 		struct service_cmd *c = &services[i];
-- 
1.6.5.1

^ permalink raw reply related

* [PATCH 2/5] http-backend: reword some documentation
From: Mark Lodato @ 2009-10-25 18:05 UTC (permalink / raw)
  To: git; +Cc: Junio C Hamano, Shawn O. Pearce, Mark Lodato
In-Reply-To: <1256493935-8680-2-git-send-email-lodatom@gmail.com>

Clarify some of the git-http-backend documentation, particularly:

* In the Description, state that smart/dumb HTTP fetch and smart HTTP
  push are supported, state that authenticated clients allow push, and
  remove the note that this is only suited for read-only updates.

* At the start of Examples, state explicitly what URL is mapping to what
  location on disk.

Signed-off-by: Mark Lodato <lodatom@gmail.com>
---
 Documentation/git-http-backend.txt |   12 ++++++++----
 1 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/Documentation/git-http-backend.txt b/Documentation/git-http-backend.txt
index 99dbbfb..0b5e951 100644
--- a/Documentation/git-http-backend.txt
+++ b/Documentation/git-http-backend.txt
@@ -14,13 +14,15 @@ DESCRIPTION
 -----------
 A simple CGI program to serve the contents of a Git repository to Git
 clients accessing the repository over http:// and https:// protocols.
+The program supports clients fetching using both the smart HTTP protcol
+and the backwards-compatible dumb HTTP protocol, as well as clients
+pushing using the smart HTTP protocol.
 
 By default, only the `upload-pack` service is enabled, which serves
 'git-fetch-pack' and 'git-ls-remote' clients, which are invoked from
-'git-fetch', 'git-pull', and 'git-clone'.
-
-This is ideally suited for read-only updates, i.e., pulling from
-git repositories.
+'git-fetch', 'git-pull', and 'git-clone'.  If the client is authenticated,
+the `receive-pack` service is enabled, which serves 'git-send-pack'
+clients, which is invoked from 'git-push'.
 
 SERVICES
 --------
@@ -50,6 +52,8 @@ automatically by the web server.
 
 EXAMPLES
 --------
+All of the following examples map 'http://$hostname/git/foo/bar.git'
+to '/var/www/git/foo/bar.git'.
 
 Apache 2.x::
 	Ensure mod_cgi, mod_alias, and mod_env are enabled, set
-- 
1.6.5.1

^ permalink raw reply related

* [PATCH 4/5] http-backend: add example for gitweb on same URL
From: Mark Lodato @ 2009-10-25 18:05 UTC (permalink / raw)
  To: git; +Cc: Junio C Hamano, Shawn O. Pearce, Mark Lodato
In-Reply-To: <1256493935-8680-4-git-send-email-lodatom@gmail.com>

In the git-http-backend documentation, add an example of how to set up
gitweb and git-http-backend on the same URL by using a series of
mod_alias commands.

Signed-off-by: Mark Lodato <lodatom@gmail.com>
---
 Documentation/git-http-backend.txt |   33 +++++++++++++++++++++++++++++++++
 1 files changed, 33 insertions(+), 0 deletions(-)

diff --git a/Documentation/git-http-backend.txt b/Documentation/git-http-backend.txt
index e67519d..2989c9f 100644
--- a/Documentation/git-http-backend.txt
+++ b/Documentation/git-http-backend.txt
@@ -88,6 +88,23 @@ directive around the repository, or one of its parent directories:
 	...
 </Location>
 ----------------------------------------------------------------
++
+To serve gitweb at the same url, use a ScriptAliasMatch to only
+those URLs that 'git-http-backend' can handle, and forward the
+rest to gitweb:
++
+----------------------------------------------------------------
+ScriptAliasMatch \
+	"(?x)^/git/(.*/(HEAD | \
+			info/refs | \
+			objects/(info/[^/]+ | \
+				 [0-9a-f]{2}/[0-9a-f]{38} | \
+				 pack/pack-[0-9a-f]{40}\.(pack|idx)) | \
+			git-(upload|receive)-pack))$" \
+	/usr/libexec/git-core/git-http-backend/$1
+
+ScriptAlias /git/ /var/www/cgi-bin/gitweb.cgi/
+----------------------------------------------------------------
 
 Accelerated static Apache 2.x::
 	Similar to the above, but Apache can be used to return static
@@ -102,6 +119,22 @@ AliasMatch ^/git/(.*/objects/[0-9a-f]{2}/[0-9a-f]{38})$          /var/www/git/$1
 AliasMatch ^/git/(.*/objects/pack/pack-[0-9a-f]{40}.(pack|idx))$ /var/www/git/$1
 ScriptAlias /git/ /usr/libexec/git-core/git-http-backend/
 ----------------------------------------------------------------
++
+This can be combined with the gitweb configuration:
++
+----------------------------------------------------------------
+SetEnv GIT_PROJECT_ROOT /var/www/git
+
+AliasMatch ^/git/(.*/objects/[0-9a-f]{2}/[0-9a-f]{38})$          /var/www/git/$1
+AliasMatch ^/git/(.*/objects/pack/pack-[0-9a-f]{40}.(pack|idx))$ /var/www/git/$1
+ScriptAliasMatch \
+	"(?x)^/git/(.*/(HEAD | \
+			info/refs | \
+			objects/info/[^/]+ | \
+			git-(upload|receive)-pack))$" \
+	/usr/libexec/git-core/git-http-backend/$1
+ScriptAlias /git/ /var/www/cgi-bin/gitweb.cgi/
+----------------------------------------------------------------
 
 
 ENVIRONMENT
-- 
1.6.5.1

^ permalink raw reply related

* [PATCH 3/5] http-backend: use mod_alias instead of mod_rewrite
From: Mark Lodato @ 2009-10-25 18:05 UTC (permalink / raw)
  To: git; +Cc: Junio C Hamano, Shawn O. Pearce, Mark Lodato
In-Reply-To: <1256493935-8680-3-git-send-email-lodatom@gmail.com>

In the git-http-backend documentation, use mod_alias exlusively, instead
of using a combination of mod_alias and mod_rewrite.  This makes the
example slightly shorted and a bit more clear.

Signed-off-by: Mark Lodato <lodatom@gmail.com>
---
 Documentation/git-http-backend.txt |   10 +++-------
 1 files changed, 3 insertions(+), 7 deletions(-)

diff --git a/Documentation/git-http-backend.txt b/Documentation/git-http-backend.txt
index 0b5e951..e67519d 100644
--- a/Documentation/git-http-backend.txt
+++ b/Documentation/git-http-backend.txt
@@ -98,13 +98,9 @@ Accelerated static Apache 2.x::
 ----------------------------------------------------------------
 SetEnv GIT_PROJECT_ROOT /var/www/git
 
-ScriptAlias /git/        /usr/libexec/git-core/git-http-backend/
-Alias       /git_static/ /var/www/git/
-
-RewriteEngine on
-RewriteRule ^/git/(.*/objects/[0-9a-f]{2}/[0-9a-f]{38})$    /git_static/$1 [PT]
-RewriteRule ^/git/(.*/objects/pack/pack-[0-9a-f]{40}.pack)$ /git_static/$1 [PT]
-RewriteRule ^/git/(.*/objects/pack/pack-[0-9a-f]{40}.idx)$  /git_static/$1 [PT]
+AliasMatch ^/git/(.*/objects/[0-9a-f]{2}/[0-9a-f]{38})$          /var/www/git/$1
+AliasMatch ^/git/(.*/objects/pack/pack-[0-9a-f]{40}.(pack|idx))$ /var/www/git/$1
+ScriptAlias /git/ /usr/libexec/git-core/git-http-backend/
 ----------------------------------------------------------------
 
 
-- 
1.6.5.1

^ permalink raw reply related

* [PATCH 5/5] http-backend: more explict LocationMatch
From: Mark Lodato @ 2009-10-25 18:05 UTC (permalink / raw)
  To: git; +Cc: Junio C Hamano, Shawn O. Pearce, Mark Lodato
In-Reply-To: <1256493935-8680-5-git-send-email-lodatom@gmail.com>

In the git-http-backend examples, only match git-receive-pack within
/git/.

Signed-off-by: Mark Lodato <lodatom@gmail.com>
---
 Documentation/git-http-backend.txt |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/Documentation/git-http-backend.txt b/Documentation/git-http-backend.txt
index 2989c9f..f17251a 100644
--- a/Documentation/git-http-backend.txt
+++ b/Documentation/git-http-backend.txt
@@ -69,7 +69,7 @@ To enable anonymous read access but authenticated write access,
 require authorization with a LocationMatch directive:
 +
 ----------------------------------------------------------------
-<LocationMatch ".*/git-receive-pack$">
+<LocationMatch "^/git/.*/git-receive-pack$">
 	AuthType Basic
 	AuthName "Git Access"
 	Require group committers
-- 
1.6.5.1

^ permalink raw reply related

* Re: [PATCH 3/3] format-patch documentation: Fix formatting
From: Björn Gustavsson @ 2009-10-25 18:47 UTC (permalink / raw)
  To: git; +Cc: gitster
In-Reply-To: <4AE47546.6040804@gmail.com>

Björn Gustavsson wrote:
> Format git commands and options consistently using back quotes
> (i.e. a fixed font in the resulting HTML document).

I missed a few places. Here is an additional patch to be applied
on top of the original patch.

I'll send out a new combined patch later, but I'll wait for comments
on the series first.

/Björn

diff --git a/Documentation/diff-options.txt b/Documentation/diff-options.txt
index 86d3d80..14265b8 100644
--- a/Documentation/diff-options.txt
+++ b/Documentation/diff-options.txt
@@ -43,19 +43,19 @@ endif::git-format-patch[]
 
 --stat[=width[,name-width]]::
 	Generate a diffstat.  You can override the default
-	output width for 80-column terminal by "--stat=width".
+	output width for 80-column terminal by `--stat=width`.
 	The width of the filename part can be controlled by
 	giving another width to it separated by a comma.
 
 --numstat::
-	Similar to \--stat, but shows number of added and
+	Similar to `\--stat`, but shows number of added and
 	deleted lines in decimal notation and pathname without
 	abbreviation, to make it more machine friendly.  For
 	binary files, outputs two `-` instead of saying
 	`0 0`.
 
 --shortstat::
-	Output only the last line of the --stat format containing total
+	Output only the last line of the `--stat` format containing total
 	number of modified files, as well as number of added and deleted
 	lines.
 
@@ -63,8 +63,8 @@ endif::git-format-patch[]
 	Output the distribution of relative amount of changes (number of lines added or
 	removed) for each sub-directory. Directories with changes below
 	a cut-off percent (3% by default) are not shown. The cut-off percent
-	can be set with "--dirstat=limit". Changes in a child directory is not
-	counted for the parent directory, unless "--cumulative" is used.
+	can be set with `--dirstat=limit`. Changes in a child directory is not
+	counted for the parent directory, unless `--cumulative` is used.
 
 --dirstat-by-file[=limit]::
 	Same as `--dirstat`, but counts changed files instead of lines.
diff --git a/Documentation/git-format-patch.txt b/Documentation/git-format-patch.txt
index 79d77f7..f1fd0df 100644
--- a/Documentation/git-format-patch.txt
+++ b/Documentation/git-format-patch.txt
@@ -160,7 +160,7 @@ will want to ensure that threading is disabled for `git send-email`.
 	Instead of the standard '[PATCH]' prefix in the subject
 	line, instead use '[<Subject-Prefix>]'. This
 	allows for useful naming of a patch series, and can be
-	combined with the --numbered option.
+	combined with the `--numbered` option.
 
 --cc=<email>::
 	Add a `Cc:` header to the email headers. This is in addition

^ permalink raw reply related

* [PATCH] push: always load default config
From: Jeff King @ 2009-10-25 19:15 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git

This is needed because we want to use the
advice.pushnonfastforward variable.

Previously, we would load the config on demand only when we
needed to look at push.default.  Which meant that "git push"
would load it, but "git push remote" would not, leading to
differing behavior.

Signed-off-by: Jeff King <peff@peff.net>
---
 builtin-push.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/builtin-push.c b/builtin-push.c
index b5cd2cd..7338176 100644
--- a/builtin-push.c
+++ b/builtin-push.c
@@ -66,7 +66,6 @@ static void setup_push_tracking(void)
 
 static void setup_default_push_refspecs(void)
 {
-	git_config(git_default_config, NULL);
 	switch (push_default) {
 	default:
 	case PUSH_DEFAULT_MATCHING:
@@ -174,6 +173,8 @@ int cmd_push(int argc, const char **argv, const char *prefix)
 	int rc;
 	const char *repo = NULL;	/* default repository */
 
+	git_config(git_default_config, NULL);
+
 	struct option options[] = {
 		OPT_BIT('q', "quiet", &flags, "be quiet", TRANSPORT_PUSH_QUIET),
 		OPT_BIT('v', "verbose", &flags, "be verbose", TRANSPORT_PUSH_VERBOSE),
-- 
1.6.4.2.269.g75194.dirty

^ permalink raw reply related

* Re: [PATCH 0/2] Speedup fetch with large numbers of refs
From: Julian Phillips @ 2009-10-25 20:48 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git
In-Reply-To: <7vd44cymcv.fsf@alter.siamese.dyndns.org>

On Sun, 25 Oct 2009, Junio C Hamano wrote:

> Hmm, t5515 does not seem to pass with this series for me.

Ah, sorry.  All the tests did (and still do) pass on my mac ...
I'll send an updated version once I get them to pass on Linux too.

-- 
Julian

  ---
George Orwell was an optimist.

^ permalink raw reply

* [PATCH v2 0/2] Speedup fetch with large numbers of refs
From: Julian Phillips @ 2009-10-25 21:28 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git

This is the same as v1, except that this time the tests pass on Linux
as well as on MacOS.

Julian Phillips (2):
  remote: Make ref_remove_duplicates faster for large numbers of refs
  fetch: Speed up fetch of large numbers of refs

 builtin-fetch.c |   17 ++++++++++++++---
 remote.c        |   42 +++++++++++++++++++++++-------------------
 2 files changed, 37 insertions(+), 22 deletions(-)

^ permalink raw reply

* [PATCH v2 1/2] remote: Make ref_remove_duplicates faster for large numbers of refs
From: Julian Phillips @ 2009-10-25 21:28 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git
In-Reply-To: <20091025212449.48498.23208.julian@quantumfyre.co.uk>

The ref_remove_duplicates function was very slow at dealing with very
large numbers of refs.  This is because it was using a linear search
through all remaining refs to find any duplicates of the current ref.

Rewriting it to use a string list to keep track of which refs have
already been seen and removing duplicates when they are found is much
more efficient.

Signed-off-by: Julian Phillips <julian@quantumfyre.co.uk>
---
 remote.c |   42 +++++++++++++++++++++++-------------------
 1 files changed, 23 insertions(+), 19 deletions(-)

diff --git a/remote.c b/remote.c
index 73d33f2..1380b20 100644
--- a/remote.c
+++ b/remote.c
@@ -6,6 +6,7 @@
 #include "revision.h"
 #include "dir.h"
 #include "tag.h"
+#include "string-list.h"
 
 static struct refspec s_tag_refspec = {
 	0,
@@ -734,29 +735,32 @@ int for_each_remote(each_remote_fn fn, void *priv)
 
 void ref_remove_duplicates(struct ref *ref_map)
 {
-	struct ref **posn;
-	struct ref *next;
-	for (; ref_map; ref_map = ref_map->next) {
+	struct string_list refs = { NULL, 0, 0, 0 };
+	struct string_list_item *item = NULL;
+	struct ref *prev = NULL, *next = NULL;
+	for (; ref_map; ref_map = next) {
+		next = ref_map->next;
 		if (!ref_map->peer_ref)
 			continue;
-		posn = &ref_map->next;
-		while (*posn) {
-			if ((*posn)->peer_ref &&
-			    !strcmp((*posn)->peer_ref->name,
-				    ref_map->peer_ref->name)) {
-				if (strcmp((*posn)->name, ref_map->name))
-					die("%s tracks both %s and %s",
-					    ref_map->peer_ref->name,
-					    (*posn)->name, ref_map->name);
-				next = (*posn)->next;
-				free((*posn)->peer_ref);
-				free(*posn);
-				*posn = next;
-			} else {
-				posn = &(*posn)->next;
-			}
+
+		item = string_list_lookup(ref_map->peer_ref->name, &refs);
+		if (item) {
+			if (strcmp(((struct ref *)item->util)->name,
+				   ref_map->name))
+				die("%s tracks both %s and %s",
+				    ref_map->peer_ref->name,
+				    ((struct ref *)item->util)->name,
+				    ref_map->name);
+			prev->next = ref_map->next;
+			free(ref_map->peer_ref);
+			free(ref_map);
 		}
+
+		item = string_list_insert(ref_map->peer_ref->name, &refs);
+		item->util = ref_map;
+		prev = ref_map;
 	}
+	string_list_clear(&refs, 0);
 }
 
 int remote_has_url(struct remote *remote, const char *url)
-- 
1.6.5.rc2

^ permalink raw reply related

* [PATCH v2 2/2] fetch: Speed up fetch of large numbers of refs
From: Julian Phillips @ 2009-10-25 21:28 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git
In-Reply-To: <20091025212449.48498.23208.julian@quantumfyre.co.uk>

When there are large numbers of refs, calling read_ref for each ref is
inefficent (and infact downright slow) - so instead use for_each_ref
to build up a string list of all the refs that we currently have,
which significantly improves the volume.

Signed-off-by: Julian Phillips <julian@quantumfyre.co.uk>
---
 builtin-fetch.c |   17 ++++++++++++++---
 1 files changed, 14 insertions(+), 3 deletions(-)

diff --git a/builtin-fetch.c b/builtin-fetch.c
index acb08e4..0f53cbd 100644
--- a/builtin-fetch.c
+++ b/builtin-fetch.c
@@ -489,7 +489,8 @@ static int add_existing(const char *refname, const unsigned char *sha1,
 			int flag, void *cbdata)
 {
 	struct string_list *list = (struct string_list *)cbdata;
-	string_list_insert(refname, list);
+	struct string_list_item *item = string_list_insert(refname, list);
+	item->util = (void *)sha1;
 	return 0;
 }
 
@@ -606,9 +607,14 @@ static void check_not_current_branch(struct ref *ref_map)
 static int do_fetch(struct transport *transport,
 		    struct refspec *refs, int ref_count)
 {
+	struct string_list existing_refs = { NULL, 0, 0, 0 };
+	struct string_list_item *peer_item = NULL;
 	struct ref *ref_map;
 	struct ref *rm;
 	int autotags = (transport->remote->fetch_tags == 1);
+
+	for_each_ref(add_existing, &existing_refs);
+
 	if (transport->remote->fetch_tags == 2 && tags != TAGS_UNSET)
 		tags = TAGS_SET;
 	if (transport->remote->fetch_tags == -1)
@@ -631,8 +637,13 @@ static int do_fetch(struct transport *transport,
 		check_not_current_branch(ref_map);
 
 	for (rm = ref_map; rm; rm = rm->next) {
-		if (rm->peer_ref)
-			read_ref(rm->peer_ref->name, rm->peer_ref->old_sha1);
+		if (rm->peer_ref) {
+			peer_item = string_list_lookup(rm->peer_ref->name,
+						       &existing_refs);
+			if (peer_item)
+				hashcpy(rm->peer_ref->old_sha1,
+					peer_item->util);
+		}
 	}
 
 	if (tags == TAGS_DEFAULT && autotags)
-- 
1.6.5.rc2

^ permalink raw reply related

* Re: git hang with corrupted .pack
From: Junio C Hamano @ 2009-10-26  2:35 UTC (permalink / raw)
  To: Alex Riesen
  Cc: Junio C Hamano, Nicolas Pitre, Shawn O. Pearce, Andy Isaacson,
	git
In-Reply-To: <81b0412b0910200814v269e91fbkd7841308685e1c54@mail.gmail.com>

Alex Riesen <raa.lkml@gmail.com> writes:

> On Thu, Oct 15, 2009 at 09:39, Junio C Hamano <gitster@pobox.com> wrote:
>> Nicolas Pitre <nico@fluxnic.net> writes:
>>
>>> I confirm this test without the fix reproduces the infinite loop (and
>>> does stall the test suite).
>>
>> Thanks, both of you.
>
> I seem to have problems with this change (on Cygwin). Sometimes
> accessing an object in a pack fails in unpack_compressed_entry.
> When it happens, both avail_in and avail_out of the stream are 0,
> and the reported status is Z_BUF_ERROR.

Could you test the patch in

    http://mid.gmane.org/7vd44gm089.fsf@alter.siamese.dyndns.org

without your workaround?

-- >8 --
Subject: Fix incorrect error check while reading deflated pack data

I looked at the issue again, and came to the conclusion that we need quite
different fix for the two inflate callsites, as they do quite different
things.

-- >8 --
Subject: Fix incorrect error check while reading deflated pack data

The loop in get_size_from_delta() feeds a deflated delta data from the
pack stream _until_ we get inflated result of 20 bytes[*] or we reach the
end of stream.

    Side note. This magic number 20 does not have anything to do with the
    size of the hash we use, but comes from 1a3b55c (reduce delta head
    inflated size, 2006-10-18).

The loop reads like this:

    do {
        in = use_pack();
        stream.next_in = in;
        st = git_inflate(&stream, Z_FINISH);
        curpos += stream.next_in - in;
    } while ((st == Z_OK || st == Z_BUF_ERROR) &&
             stream.total_out < sizeof(delta_head));

This git_inflate() can return:

 - Z_STREAM_END, if use_pack() fed it enough input and the delta itself
   was smaller than 20 bytes;

 - Z_OK, when some progress has been made;

 - Z_BUF_ERROR, if no progress is possible, because we either ran out of
   input (due to corrupt pack), or we ran out of output before we saw the
   end of the stream.

The fix b3118bd (sha1_file: Fix infinite loop when pack is corrupted,
2009-10-14) attempted was against a corruption that appears to be a valid
stream that produces a result larger than the output buffer, but we are
not even trying to read the stream to the end in this loop.  If avail_out
becomes zero, total_out will be the same as sizeof(delta_head) so the loop
will terminate without the "fix".  There is no fix from b3118bd needed for
this loop, in other words.

The loop in unpack_compressed_entry() is quite a different story.  It
feeds a deflated stream (either delta or base) and allows the stream to
produce output up to what we expect but no more.

    do {
        in = use_pack();
        stream.next_in = in;
        st = git_inflate(&stream, Z_FINISH);
        curpos += stream.next_in - in;
    } while (st == Z_OK || st == Z_BUF_ERROR)

This _does_ risk falling into an endless interation, as we can exhaust
avail_out if the length we expect is smaller than what the stream wants to
produce (due to pack corruption).  In such a case, avail_out will become
zero and inflate() will return Z_BUF_ERROR, while avail_in may (or may
not) be zero.

But this is not a right fix:

    do {
        in = use_pack();
        stream.next_in = in;
        st = git_inflate(&stream, Z_FINISH);
+       if (st == Z_BUF_ERROR && (stream.avail_in || !stream.avail_out)
+               break; /* wants more input??? */
        curpos += stream.next_in - in;
    } while (st == Z_OK || st == Z_BUF_ERROR)

as Z_BUF_ERROR from inflate() may be telling us that avail_in has also run
out before reading the end of stream marker.  In such a case, both avail_in
and avail_out would be zero, and the loop should iterate to allow the end
of stream marker to be seen by inflate from the input stream.

The right fix for this loop is likely to be to increment the initial
avail_out by one (we allocate one extra byte to terminate it with NUL
anyway, so there is no risk to overrun the buffer), and break out if we
see that avail_out has become zero, in order to detect that the stream
wants to produce more than what we expect.  After the loop, we have a
check that exactly tests this condition:

    if ((st != Z_STREAM_END) || stream.total_out != size) {
        free(buffer);
        return NULL;
    }

So here is a patch (without my previous botched attempts) to fix this
issue.  The first hunk reverts the corresponding hunk from b3118bd, and
the second hunk is the same fix proposed earlier. 

---
 sha1_file.c |    8 +++-----
 1 files changed, 3 insertions(+), 5 deletions(-)

diff --git a/sha1_file.c b/sha1_file.c
index 4cc8939..63981fb 100644
--- a/sha1_file.c
+++ b/sha1_file.c
@@ -1357,8 +1357,6 @@ unsigned long get_size_from_delta(struct packed_git *p,
 		in = use_pack(p, w_curs, curpos, &stream.avail_in);
 		stream.next_in = in;
 		st = git_inflate(&stream, Z_FINISH);
-		if (st == Z_BUF_ERROR && (stream.avail_in || !stream.avail_out))
-			break;
 		curpos += stream.next_in - in;
 	} while ((st == Z_OK || st == Z_BUF_ERROR) &&
 		 stream.total_out < sizeof(delta_head));
@@ -1589,15 +1587,15 @@ static void *unpack_compressed_entry(struct packed_git *p,
 	buffer[size] = 0;
 	memset(&stream, 0, sizeof(stream));
 	stream.next_out = buffer;
-	stream.avail_out = size;
+	stream.avail_out = size + 1;
 
 	git_inflate_init(&stream);
 	do {
 		in = use_pack(p, w_curs, curpos, &stream.avail_in);
 		stream.next_in = in;
 		st = git_inflate(&stream, Z_FINISH);
-		if (st == Z_BUF_ERROR && (stream.avail_in || !stream.avail_out))
-			break;
+		if (!stream.avail_out)
+			break; /* the payload is larger than it should be */
 		curpos += stream.next_in - in;
 	} while (st == Z_OK || st == Z_BUF_ERROR);
 	git_inflate_end(&stream);

^ permalink raw reply related

* [ANNOUNCE] GIT 1.6.5.2
From: Junio C Hamano @ 2009-10-26  5:19 UTC (permalink / raw)
  To: git

The latest maintenance release GIT 1.6.5.2 is available at the
usual places:

  http://www.kernel.org/pub/software/scm/git/

  git-1.6.5.2.tar.{gz,bz2}			(source tarball)
  git-htmldocs-1.6.5.2.tar.{gz,bz2}		(preformatted docs)
  git-manpages-1.6.5.2.tar.{gz,bz2}		(preformatted docs)

The RPM binary packages for a few architectures are found in:

  RPMS/$arch/git-*-1.6.5.2-1.fc9.$arch.rpm	(RPM)

GIT v1.6.5.2 Release Notes
==========================

Fixes since v1.6.5.1
--------------------

 * Installation of templates triggered a bug in busybox when using tar
   implementation from it.

 * "git add -i" incorrectly ignored paths that are already in the index
   if they matched .gitignore patterns.

 * "git describe --always" should have produced some output even there
   were no tags in the repository, but it didn't.

 * "git ls-files" when showing tracked files incorrectly paid attention
   to the exclude patterns.

Other minor documentation updates are included.

----------------------------------------------------------------

Changes since v1.6.5.1 are as follows:

Andreas Schwab (1):
      Work around option parsing bug in the busybox tar implementation

Carlos R. Mafra (1):
      Makefile: clean block-sha1/ directory instead of mozilla-sha1/

Jeff King (2):
      ls-files: excludes should not impact tracked files
      document push's new quiet option

Joe Perches (1):
      git-send-email.perl: fold multiple entry "Cc:" and multiple single line "RCPT TO:"s

Johannes Sixt (2):
      Remove a left-over file from t/t5100
      Mark files in t/t5100 as UTF-8

Jonathan Nieder (1):
      Documentation: describe check-ref-format --branch

Junio C Hamano (4):
      Fix incorrect error check while reading deflated pack data
      Do not fail "describe --always" in a tag-less repository
      Fix list of released versions in the toc document
      GIT 1.6.5.2

Markus Heidelberg (1):
      t7800-difftool: fix the effectless GIT_DIFFTOOL_PROMPT test

Matt Kraai (1):
      Documentation/git-gc.txt: change "references" to "reference"

Nanako Shiraishi (2):
      git push: remove incomplete options list from help text
      git push: say that --tag can't be used with --all or --mirror in help text

Nasser Grainawi (1):
      Document `delta` attribute in "git help attributes".

Pauli Virtanen (1):
      git-add--interactive: never skip files included in index

^ permalink raw reply

* Re: git hang with corrupted .pack
From: Alex Riesen @ 2009-10-26  7:07 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: Nicolas Pitre, Shawn O. Pearce, Andy Isaacson, git
In-Reply-To: <7vr5sqq3vm.fsf@alter.siamese.dyndns.org>

On Mon, Oct 26, 2009 at 03:35, Junio C Hamano <gitster@pobox.com> wrote:
>
> Could you test the patch in
>
>    http://mid.gmane.org/7vd44gm089.fsf@alter.siamese.dyndns.org
>
> without your workaround?
>
> -- >8 --
> Subject: Fix incorrect error check while reading deflated pack data
>

I did. It works as intended since about 3 days. It also helped my home
server (a 32bit Linux system), which also experienced the problem.

Thanks!

^ permalink raw reply

* Re: What's cooking in git.git (Oct 2009, #04; Wed, 21)
From: Junio C Hamano @ 2009-10-26  7:14 UTC (permalink / raw)
  To: Clemens Buchacher; +Cc: Junio C Hamano, git
In-Reply-To: <20091025160213.GA8532@localhost>

Clemens Buchacher <drizzd@aon.at> writes:

> On Wed, Oct 21, 2009 at 11:52:30PM -0700, Junio C Hamano wrote:
>
>> * ks/precompute-completion (2009-10-05) 1 commit.
>>   (merged to 'next' on 2009-10-14 at adf722a)
>>  + Speedup bash completion loading
>> 
>> Are people happy with this?
>
> I'm looking forward to this on Windows, where loading the completion script
> can take about 10 seconds.

Thanks.

Are you giving this comment after you actually tried it on Windows and
found it satisfactory, or is it just based on the general description of
"this should make it faster"?

I need to know, to sift acks/kudos based on facts that I can use to decide
when to release it to 'master', from wishful thinking that I shouldn't,
especially after seeing an obvious issue like the one reported by Stephen
Boyd a few days ago (http://mid.gname.com/4AE0190E.8020803@gmail.com/).

^ permalink raw reply

* Re: [PATCH/RFC] builtin-checkout: suggest creating local branch when appropriate to do so
From: Junio C Hamano @ 2009-10-26  7:14 UTC (permalink / raw)
  To: Uri Okrent
  Cc: Jeff King, Daniel Barkalow, Johannes Sixt, Thomas Rast,
	Johannes Schindelin, Euguess, Mikael Magnusson, Matthieu Moy,
	Jay Soffian, git
In-Reply-To: <4AE48F88.1030108@gmail.com>

Uri Okrent <uokrent@gmail.com> writes:

> Junio C Hamano wrote:
>> In this sequence:
>>
>>     1$ git checkout $commit_name_that_is_not_a_local_branch
>>     2$ git commit; hack; hack; hack;...
>>     3$ git checkout $branch_name
>> [...]
>> Step #3 is where the state built in the detached HEAD "branch" vanishes
>> into lost-found.
>>
>> The experts argued that #3 is where it is dangerous...
>
> If step 3 is where the danger lies, wouldn't it then be most appropriate to put
> the warning message there?

You already get reminded that you were on a detached HEAD in step #3.

The primary point of the message you are replying to was that I do not
agree with the view that step #3 is the most problematic step.  The
existing reminder would help people who read it and are capable of
realizing "ah, I started it on a throw-away branch but ended up with
something I would rather keep" and doing "git branch topic HEAD@{1}".  

It will not help people who haven't got enough clue yet to know what a
detached HEAD is, or you can refer to your previous point with HEAD@{1}
notation.  We do give brief advice at step #1 to alleviate this issue.

^ permalink raw reply

* Re: What's cooking in git.git (Oct 2009, #04; Wed, 21)
From: Clemens Buchacher @ 2009-10-26  8:29 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git, Stephen Boyd
In-Reply-To: <7vzl7eocd6.fsf@alter.siamese.dyndns.org>

On Mon, Oct 26, 2009 at 12:14:45AM -0700, Junio C Hamano wrote:

> Are you giving this comment after you actually tried it on Windows and
> found it satisfactory, or is it just based on the general description of
> "this should make it faster"?

I just tried and it went down from several seconds to about half a second.
On slower machines I expect the difference to be even more noticable.

> I need to know, to sift acks/kudos based on facts that I can use to decide
> when to release it to 'master', from wishful thinking that I shouldn't,
> especially after seeing an obvious issue like the one reported by Stephen
> Boyd a few days ago (http://mid.gname.com/4AE0190E.8020803@gmail.com/).

I cannot follow that link. If you're referring to the "completion of
commands available only in build environment" issue, that could also be
considered a feature, because it allows completion of user-defined scripts.

Why does your PATH include the build directory during make, Stephen?

Clemens

^ permalink raw reply

* Re: What's cooking in git.git (Oct 2009, #04; Wed, 21)
From: Stephen Boyd @ 2009-10-26  9:01 UTC (permalink / raw)
  To: Clemens Buchacher; +Cc: Junio C Hamano, git
In-Reply-To: <20091026082931.GA6192@localhost>

Clemens Buchacher wrote:
>> I need to know, to sift acks/kudos based on facts that I can use to decide
>> when to release it to 'master', from wishful thinking that I shouldn't,
>> especially after seeing an obvious issue like the one reported by Stephen
>> Boyd a few days ago (http://mid.gname.com/4AE0190E.8020803@gmail.com/).
>
> I cannot follow that link. If you're referring to the "completion of
> commands available only in build environment" issue, that could also be
> considered a feature, because it allows completion of user-defined scripts.
>
> Why does your PATH include the build directory during make, Stephen?

The Makefile says:

git-completion.bash: git-completion.bash.in git-completion.bash.generate
        # Generate completions for binaries we have just built
        PATH="$(shell pwd)/../..:$$PATH" ./git-completion.bash.generate

Having user-defined scripts is a good point. Generating the completion
like this removes the possibility of such scripts from appearing in the
completion. Unless users are putting their own "git-*" scripts in their
build directory (sounds odd to me).

Personally, I'd rather keep it dynamic but I can see how it's useful to
get the 10x speedup. It would be really cool if we could have the best
of both worlds, where I keep my dynamic loading, but others can build
the completion and get the speedup.

^ permalink raw reply

* Re: What's cooking in git.git (Oct 2009, #04; Wed, 21)
From: Clemens Buchacher @ 2009-10-26 10:07 UTC (permalink / raw)
  To: Stephen Boyd; +Cc: Junio C Hamano, git
In-Reply-To: <4AE56552.70407@gmail.com>

On Mon, Oct 26, 2009 at 02:01:06AM -0700, Stephen Boyd wrote:

> Clemens Buchacher wrote:
>
> > Why does your PATH include the build directory during make, Stephen?
> 
> The Makefile says:
> 
> git-completion.bash: git-completion.bash.in git-completion.bash.generate
>         # Generate completions for binaries we have just built
>         PATH="$(shell pwd)/../..:$$PATH" ./git-completion.bash.generate

Right, of course. I guess ignoring *.sh and *.perl is reasonable then.

> Personally, I'd rather keep it dynamic but I can see how it's useful to
> get the 10x speedup. It would be really cool if we could have the best
> of both worlds, where I keep my dynamic loading, but others can build
> the completion and get the speedup.

Should not be too hard to do using a configuration variable like
core.completion = dynamic.

Clemens

^ permalink raw reply

* Re: [ANNOUNCE] Stacked Git 0.15
From: Catalin Marinas @ 2009-10-26 10:32 UTC (permalink / raw)
  To: Jakub Narebski; +Cc: Git Mailing List, Karl Wiberg
In-Reply-To: <b0943d9e0910251013v19fb39b7we412e7f734c2755f@mail.gmail.com>

2009/10/25 Catalin Marinas <catalin.marinas@gmail.com>:
> 2009/10/25 Jakub Narebski <jnareb@gmail.com>:
>> Catalin Marinas <catalin.marinas@gmail.com> writes:
>>
>>> StGit is a Python application providing functionality similar to Quilt
>>> (i.e. pushing/popping patches to/from a stack) on top of Git. These
>>> operations are performed using Git commands, and the patches are
>>> stored as Git commit objects, allowing easy merging of the StGit
>>> patches into other repositories using standard Git functionality.
>>>
>>>   Download:         http://download.gna.org/stgit/stgit-0.15.tar.gz
>>>   Main repository:  git://repo.or.cz/stgit.git
>>>   Project homepage: http://www.procode.org/stgit/
>>>   Mailing list:     git@vger.kernel.org (please use "StGit" in the subject)
>>>   Bug tracker:      https://gna.org/bugs/?group=stgit
>>
>> Is there RPM or SRPM (src.rpm) available somewhere? Or does tarball
>> include *.spec file, or an rpm target?
>
> Late last night when running my release script I realised that
> setup.py no longer accepts the --prefix=/usr option I used for RPMs.
> I'll try to build one in the next couple of days (I wasn't even sure
> anyone was using it).

The problem was a bit more complicated than this. Some files are
generated by the Makefile rather than setup.py so using the latter
directly fails to build anything.

So it's time for 0.15.1 this week with the fix below (in my "proposed"
branch). I cc'ed Karl as well in case he has time to have a quick
look.

Fix setup.py to generate the needed files

From: Catalin Marinas <catalin.marinas@gmail.com>

StGit was relying on Makefile to generate some files but this breaks
using setup.py directly for targets like rpm.

Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
---
 Makefile  |   20 +++++---------------
 setup.cfg |    2 +-
 setup.py  |   17 ++++++++++++++---
 3 files changed, 20 insertions(+), 19 deletions(-)

diff --git a/Makefile b/Makefile
index 0fa5c6a..5f88f7d 100644
--- a/Makefile
+++ b/Makefile
@@ -4,20 +4,10 @@ PYTHON	?= python

 TEST_PATCHES ?= ..

-all: build
+all:
 	$(PYTHON) setup.py build

-build: stgit/commands/cmdlist.py stgit-completion.bash
-
-ALL_PY = $(shell find stgit -name '*.py')
-
-stgit/commands/cmdlist.py: $(ALL_PY)
-	$(PYTHON) stg-build --py-cmd-list > $@
-
-stgit-completion.bash: $(ALL_PY)
-	$(PYTHON) stg-build --bash-completion > $@
-
-install: build
+install:
 	$(PYTHON) setup.py install --prefix=$(prefix) --root=$(DESTDIR) --force

 doc:
@@ -29,10 +19,10 @@ install-doc:
 install-html:
 	$(MAKE) -C Documentation install-html

-test: build
+test:
 	cd t && $(MAKE) all

-test_patches: build
+test_patches:
 	for patch in $$(stg series --noprefix $(TEST_PATCHES)); do \
 		stg goto $$patch && $(MAKE) test || break; \
 	done
@@ -53,5 +43,5 @@ tags:
 TAGS:
 	ctags -e -R stgit/*

-.PHONY: all build install doc install-doc install-html test test_patches \
+.PHONY: all install doc install-doc install-html test test_patches \
 	clean tags TAGS
diff --git a/setup.cfg b/setup.cfg
index 4359033..1eb8e9b 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -1,2 +1,2 @@
 [install]
-prefix: ~
+prefix: /usr
diff --git a/setup.py b/setup.py
index 3f5ccb2..12ed1db 100755
--- a/setup.py
+++ b/setup.py
@@ -4,6 +4,7 @@ import sys, glob, os
 from distutils.core import setup

 from stgit import version
+from stgit import commands, completion

 def __version_to_list(version):
     """Convert a version string to a list of numbers or strings
@@ -63,14 +64,24 @@ def __run_setup():
             ])

 # Check the minimum versions required
-if sys.argv[1] in ['install', 'build']:
-    __check_python_version()
-    __check_git_version()
+__check_python_version()
+__check_git_version()

 # ensure readable template files
 old_mask = os.umask(0022)

 version.write_builtin_version()
+
+# generate the python command list
+f = file('stgit/commands/cmdlist.py', 'w')
+commands.py_commands(commands.get_commands(allow_cached = False), f)
+f.close()
+
+# generate the bash completion script
+f = file('stgit-completion.bash', 'w')
+completion.write_completion(f)
+f.close()
+
 __run_setup()

 # restore the old mask



-- 
Catalin

^ permalink raw reply related

* Re: Any way to "flatten" a series of changes in git
From: Daniele Segato @ 2009-10-26 13:42 UTC (permalink / raw)
  To: Howard Miller; +Cc: Jacob Helwig, Bill Lear, git
In-Reply-To: <26ae428a0910221358r47434b4uf7ec71f9376b9f75@mail.gmail.com>

On Thu, Oct 22, 2009 at 9:58 PM, Howard Miller
<howard@e-learndesign.co.uk> wrote:
>> git merge --squash topic

>> rebase --interactive it excellent for cleaning up history, especially [...]

> Brilliant, thanks everybody!! I'll go and back up my database and have
> a play with these options.


I don't think you need it.
when you rebase or squash git don't throw away your commits

when I do things like that I usually create a new branch to do my tests

if I'm happy with the result I can do

git checkout myRealBranch
git reset --hard myTestBranch
# do the push/svn dcommit/whatever

if I'm not happy I can start all over again just doing:

git checkout MyTestBranch
git reset --hard myRealBranch

regards,
Daniele

^ permalink raw reply

* [PATCH] gitk: Add Japanese translation
From: Mizar @ 2009-10-26 13:49 UTC (permalink / raw)
  To: git

[-- Attachment #1: Type: text/plain, Size: 581 bytes --]

私はgitkの日本語訳をしてみました。その訳を添付します。
I tried to Japanese translation of gitk. Attached to its translation.
いくつかのメッセージはまだ翻訳されていません。
Some messages are not translated yet.
そして、いくつかの変な翻訳が見つかるかもしれません。
And, you may find some strange translations.
より良い日本語訳の案がある人はお知らせください。
People have a better idea of Japanese translation, please let us know.

My temporary work place: http://github.com/mizar/gitk

[-- Attachment #2: patch0.patch --]
[-- Type: application/octet-stream, Size: 26975 bytes --]

diff --git a/po/ja.po b/po/ja.po
new file mode 100644
index 0000000..5aaf5f5
--- /dev/null
+++ b/po/ja.po
@@ -0,0 +1,1236 @@
+# Japanese translations for gitk package.
+# Copyright (C) 2005-2009 Paul Mackerras
+# This file is distributed under the same license as the gitk package.
+#
+# Mizar <mizar.jp@gmail.com>, 2009.
+msgid ""
+msgstr ""
+"Project-Id-Version: gitk\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2009-10-19 02:45+0900\n"
+"PO-Revision-Date: 2009-10-19 17:03+0900\n"
+"Last-Translator: Mizar <mizar.jp@gmail.com>\n"
+"Language-Team: Japanese\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=1; plural=0;\n"
+
+#: gitk:113
+msgid "Couldn't get list of unmerged files:"
+msgstr "マージされていないファイルの一覧を取得できません:"
+
+#: gitk:269
+msgid "Error parsing revisions:"
+msgstr "リビジョン解析エラー:"
+
+#: gitk:324
+msgid "Error executing --argscmd command:"
+msgstr "--argscmd コマンド実行エラー:"
+
+#: gitk:337
+msgid "No files selected: --merge specified but no files are unmerged."
+msgstr "ファイル未選択: --merge が指定されましたが、マージされていないファイルはありません。"
+
+#: gitk:340
+msgid ""
+"No files selected: --merge specified but no unmerged files are within file "
+"limit."
+msgstr "ファイル未選択: --merge が指定されましたが、"
+"ファイル制限内にマージされていないファイルはありません。"
+
+#: gitk:362 gitk:509
+msgid "Error executing git log:"
+msgstr "git log 実行エラー:"
+
+#: gitk:380 gitk:525
+msgid "Reading"
+msgstr "読み込み中"
+
+#: gitk:440 gitk:4131
+msgid "Reading commits..."
+msgstr "コミット読み込み中..."
+
+#: gitk:443 gitk:1561 gitk:4134
+msgid "No commits selected"
+msgstr "コミットが選択されていません"
+
+#: gitk:1437
+msgid "Can't parse git log output:"
+msgstr "git log の出力を解析できません:"
+
+#: gitk:1657
+msgid "No commit information available"
+msgstr "有効なコミットの情報がありません"
+
+#: gitk:1793 gitk:1817 gitk:3924 gitk:8822 gitk:10358 gitk:10534
+msgid "OK"
+msgstr "OK"
+
+#: gitk:1819 gitk:3926 gitk:8419 gitk:8493 gitk:8603 gitk:8652 gitk:8824
+#: gitk:10359 gitk:10535
+msgid "Cancel"
+msgstr "キャンセル"
+
+#: gitk:1919
+msgid "Update"
+msgstr "更新"
+
+#: gitk:1920
+msgid "Reload"
+msgstr "リロード"
+
+#: gitk:1921
+msgid "Reread references"
+msgstr "参照を再読み込み"
+
+#: gitk:1922
+msgid "List references"
+msgstr "参照リストを表示"
+
+#: gitk:1924
+msgid "Start git gui"
+msgstr "git gui の開始"
+
+#: gitk:1926
+msgid "Quit"
+msgstr "終了"
+
+#: gitk:1918
+msgid "File"
+msgstr "ファイル"
+
+#: gitk:1930
+msgid "Preferences"
+msgstr "設定"
+
+#: gitk:1929
+msgid "Edit"
+msgstr "編集"
+
+#: gitk:1934
+msgid "New view..."
+msgstr "新規ビュー..."
+
+#: gitk:1935
+msgid "Edit view..."
+msgstr "ビュー編集..."
+
+#: gitk:1936
+msgid "Delete view"
+msgstr "ビュー削除"
+
+#: gitk:1938
+msgid "All files"
+msgstr "全てのファイル"
+
+#: gitk:1933 gitk:3678
+msgid "View"
+msgstr "ビュー"
+
+#: gitk:1943 gitk:1953 gitk:2655
+msgid "About gitk"
+msgstr "gitk について"
+
+#: gitk:1944 gitk:1958
+msgid "Key bindings"
+msgstr "キーバインディング"
+
+#: gitk:1942 gitk:1957
+msgid "Help"
+msgstr "ヘルプ"
+
+#: gitk:2018
+msgid "SHA1 ID: "
+msgstr "SHA1 ID: "
+
+#: gitk:2049
+msgid "Row"
+msgstr "行"
+
+#: gitk:2080
+msgid "Find"
+msgstr "検索"
+
+#: gitk:2081
+msgid "next"
+msgstr "次"
+
+#: gitk:2082
+msgid "prev"
+msgstr "前"
+
+#: gitk:2083
+msgid "commit"
+msgstr "コミット"
+
+#: gitk:2086 gitk:2088 gitk:4292 gitk:4315 gitk:4339 gitk:6280 gitk:6352
+#: gitk:6436
+msgid "containing:"
+msgstr "含む:"
+
+#: gitk:2089 gitk:3163 gitk:3168 gitk:4367
+msgid "touching paths:"
+msgstr "パスの一部:"
+
+#: gitk:2090 gitk:4372
+msgid "adding/removing string:"
+msgstr "追加/除去する文字列:"
+
+#: gitk:2099 gitk:2101
+msgid "Exact"
+msgstr "A-Z/a-zを区別"
+
+#: gitk:2101 gitk:4447 gitk:6248
+msgid "IgnCase"
+msgstr "A-Z/a-zを区別しない"
+
+#: gitk:2101 gitk:4341 gitk:4445 gitk:6244
+msgid "Regexp"
+msgstr "正規表現"
+
+#: gitk:2103 gitk:2104 gitk:4466 gitk:4496 gitk:4503 gitk:6372 gitk:6440
+msgid "All fields"
+msgstr "全ての項目"
+
+#: gitk:2104 gitk:4464 gitk:4496 gitk:6311
+msgid "Headline"
+msgstr "ヘッドライン"
+
+#: gitk:2105 gitk:4464 gitk:6311 gitk:6440 gitk:6874
+msgid "Comments"
+msgstr "コメント"
+
+#: gitk:2105 gitk:4464 gitk:4468 gitk:4503 gitk:6311 gitk:6809 gitk:8071
+#: gitk:8086
+msgid "Author"
+msgstr "作成者"
+
+#: gitk:2105 gitk:4464 gitk:6311 gitk:6811
+msgid "Committer"
+msgstr "コミットした人"
+
+#: gitk:2134
+msgid "Search"
+msgstr "検索"
+
+#: gitk:2141
+msgid "Diff"
+msgstr "Diff"
+
+#: gitk:2143
+msgid "Old version"
+msgstr "旧バージョン"
+
+#: gitk:2145
+msgid "New version"
+msgstr "新バージョン"
+
+#: gitk:2147
+msgid "Lines of context"
+msgstr "文脈行数"
+
+#: gitk:2157
+msgid "Ignore space change"
+msgstr "空白の違いを無視"
+
+#: gitk:2215
+msgid "Patch"
+msgstr "パッチ"
+
+#: gitk:2217
+msgid "Tree"
+msgstr "ツリー"
+
+#: gitk:2361 gitk:2378
+msgid "Diff this -> selected"
+msgstr "diff これ -> 選択"
+
+#: gitk:2362 gitk:2379
+msgid "Diff selected -> this"
+msgstr "diff 選択 -> これ"
+
+#: gitk:2363 gitk:2380
+msgid "Make patch"
+msgstr "パッチ作成"
+
+#: gitk:2364 gitk:8477
+msgid "Create tag"
+msgstr "タグ生成"
+
+#: gitk:2365 gitk:8583
+msgid "Write commit to file"
+msgstr "コミットをファイルに書き込む"
+
+#: gitk:2366 gitk:8640
+msgid "Create new branch"
+msgstr "新規ブランチ生成"
+
+#: gitk:2367
+msgid "Cherry-pick this commit"
+msgstr "このコミットをチェリーピックする"
+
+#: gitk:2368
+msgid "Reset HEAD branch to here"
+msgstr "ブランチのHEADをここにリセットする"
+
+#: gitk:2369
+msgid "Mark this commit"
+msgstr "このコミットにマークをつける"
+
+#: gitk:2370
+msgid "Return to mark"
+msgstr "マークを付けた所に戻る"
+
+#: gitk:2371
+msgid "Find descendant of this and mark"
+msgstr "この子孫を見つけてマークする"
+
+#: gitk:2372
+msgid "Compare with marked commit"
+msgstr "マークを付けたコミットと比較する"
+
+#: gitk:2386
+msgid "Check out this branch"
+msgstr "このブランチをチェックアウトする"
+
+#: gitk:2387
+msgid "Remove this branch"
+msgstr "このブランチを除去する"
+
+#: gitk:2394
+msgid "Highlight this too"
+msgstr "これもハイライトさせる"
+
+#: gitk:2395
+msgid "Highlight this only"
+msgstr "これだけをハイライトさせる"
+
+#: gitk:2396
+msgid "External diff"
+msgstr "外部diffツール"
+
+#: gitk:2397
+msgid "Blame parent commit"
+msgstr ""
+
+#: gitk:2404
+msgid "Show origin of this line"
+msgstr ""
+
+#: gitk:2405
+msgid "Run git gui blame on this line"
+msgstr ""
+
+#: gitk:2657
+msgid ""
+"\n"
+"Gitk - a commit viewer for git\n"
+"\n"
+"Copyright © 2005-2008 Paul Mackerras\n"
+"\n"
+"Use and redistribute under the terms of the GNU General Public License"
+msgstr ""
+"\n"
+"Gitk - gitコミットビューア\n"
+"\n"
+"Copyright (c) 2005-2008 Paul Mackerras\n"
+"\n"
+"使用および再配布はGNU General Public License に従ってください"
+
+#: gitk:2665 gitk:2727 gitk:9005
+msgid "Close"
+msgstr "閉じる"
+
+#: gitk:2684
+msgid "Gitk key bindings"
+msgstr "Gitk キーバインディング"
+
+#: gitk:2687
+msgid "Gitk key bindings:"
+msgstr "Gitk キーバインディング:"
+
+#: gitk:2689
+#, tcl-format
+msgid "<%s-Q>\t\tQuit"
+msgstr "<%s-Q>\t\t終了"
+
+#: gitk:2690
+msgid "<Home>\t\tMove to first commit"
+msgstr "<Home>\t\t最初のコミットに移動"
+
+#: gitk:2691
+msgid "<End>\t\tMove to last commit"
+msgstr "<End>\t\t最後のコミットに移動"
+
+#: gitk:2692
+msgid "<Up>, p, i\tMove up one commit"
+msgstr "<Up>, p, i\t一つ上のコミットに移動"
+
+#: gitk:2693
+msgid "<Down>, n, k\tMove down one commit"
+msgstr "<Down>, n, k\t一つ下のコミットに移動"
+
+#: gitk:2694
+msgid "<Left>, z, j\tGo back in history list"
+msgstr "<Left>, z, j\t履歴の前に戻る"
+
+#: gitk:2695
+msgid "<Right>, x, l\tGo forward in history list"
+msgstr "<Right>, x, l\t履歴の次へ進む"
+
+#: gitk:2696
+msgid "<PageUp>\tMove up one page in commit list"
+msgstr "<PageUp>\tコミットリストの一つ上のページに移動"
+
+#: gitk:2697
+msgid "<PageDown>\tMove down one page in commit list"
+msgstr "<PageDown>\tコミットリストの一つ下のページに移動"
+
+#: gitk:2698
+#, tcl-format
+msgid "<%s-Home>\tScroll to top of commit list"
+msgstr "<%s-Home>\tコミットリストの一番上にスクロールする"
+
+#: gitk:2699
+#, tcl-format
+msgid "<%s-End>\tScroll to bottom of commit list"
+msgstr "<%s-End>\tコミットリストの一番下にスクロールする"
+
+#: gitk:2700
+#, tcl-format
+msgid "<%s-Up>\tScroll commit list up one line"
+msgstr "<%s-Up>\tコミットリストの一つ下の行にスクロールする"
+
+#: gitk:2701
+#, tcl-format
+msgid "<%s-Down>\tScroll commit list down one line"
+msgstr "<%s-Down>\tコミットリストの一つ下の行にスクロールする"
+
+#: gitk:2702
+#, tcl-format
+msgid "<%s-PageUp>\tScroll commit list up one page"
+msgstr "<%s-PageUp>\tコミットリストの上のページにスクロールする"
+
+#: gitk:2703
+#, tcl-format
+msgid "<%s-PageDown>\tScroll commit list down one page"
+msgstr "<%s-PageDown>\tコミットリストの下のページにスクロールする"
+
+#: gitk:2704
+msgid "<Shift-Up>\tFind backwards (upwards, later commits)"
+msgstr "<Shift-Up>\t後ろを検索 (上方・後のコミット)"
+
+#: gitk:2705
+msgid "<Shift-Down>\tFind forwards (downwards, earlier commits)"
+msgstr "<Shift-Down>\t前を検索(下方・前のコミット)"
+
+#: gitk:2706
+msgid "<Delete>, b\tScroll diff view up one page"
+msgstr "<Delete>, b\tdiff画面を上のページにスクロールする"
+
+#: gitk:2707
+msgid "<Backspace>\tScroll diff view up one page"
+msgstr "<Backspace>\tdiff画面を上のページにスクロールする"
+
+#: gitk:2708
+msgid "<Space>\t\tScroll diff view down one page"
+msgstr "<Space>\t\tdiff画面を下のページにスクロールする"
+
+#: gitk:2709
+msgid "u\t\tScroll diff view up 18 lines"
+msgstr "u\t\tdiff画面を上に18行スクロールする"
+
+#: gitk:2710
+msgid "d\t\tScroll diff view down 18 lines"
+msgstr "d\t\tdiff画面を下に18行スクロールする"
+
+#: gitk:2711
+#, tcl-format
+msgid "<%s-F>\t\tFind"
+msgstr "<%s-F>\t\t検索"
+
+#: gitk:2712
+#, tcl-format
+msgid "<%s-G>\t\tMove to next find hit"
+msgstr "<%s-G>\t\t次を検索して移動"
+
+#: gitk:2713
+msgid "<Return>\tMove to next find hit"
+msgstr "<Return>\t次を検索して移動"
+
+#: gitk:2714
+msgid "/\t\tFocus the search box"
+msgstr "/\t\t検索ボックスにフォーカス"
+
+#: gitk:2715
+msgid "?\t\tMove to previous find hit"
+msgstr "?\t\t前を検索して移動"
+
+#: gitk:2716
+msgid "f\t\tScroll diff view to next file"
+msgstr "f\t\t次のファイルにdiff画面をスクロールする"
+
+#: gitk:2717
+#, tcl-format
+msgid "<%s-S>\t\tSearch for next hit in diff view"
+msgstr "<%s-S>\t\tdiff画面の次を検索"
+
+#: gitk:2718
+#, tcl-format
+msgid "<%s-R>\t\tSearch for previous hit in diff view"
+msgstr "<%s-R>\t\tdiff画面の前を検索"
+
+#: gitk:2719
+#, tcl-format
+msgid "<%s-KP+>\tIncrease font size"
+msgstr "<%s-KP+>\t文字サイズを拡大"
+
+#: gitk:2720
+#, tcl-format
+msgid "<%s-plus>\tIncrease font size"
+msgstr "<%s-plus>\t文字サイズを拡大"
+
+#: gitk:2721
+#, tcl-format
+msgid "<%s-KP->\tDecrease font size"
+msgstr "<%s-KP->\t文字サイズを縮小"
+
+#: gitk:2722
+#, tcl-format
+msgid "<%s-minus>\tDecrease font size"
+msgstr "<%s-minus>\t文字サイズを縮小"
+
+#: gitk:2723
+msgid "<F5>\t\tUpdate"
+msgstr "<F5>\t\t更新"
+
+#: gitk:3178 gitk:3187
+#, tcl-format
+msgid "Error creating temporary directory %s:"
+msgstr "一時ディレクトリ %s 生成時エラー:"
+
+#: gitk:3200
+#, tcl-format
+msgid "Error getting \"%s\" from %s:"
+msgstr ""
+
+#: gitk:3263
+msgid "command failed:"
+msgstr "コマンド失敗:"
+
+#: gitk:3409
+msgid "No such commit"
+msgstr "そのようなコミットはありません"
+
+#: gitk:3423
+msgid "git gui blame: command failed:"
+msgstr "git gui blame: コマンド失敗:"
+
+#: gitk:3454
+#, tcl-format
+msgid "Couldn't read merge head: %s"
+msgstr ""
+
+#: gitk:3462
+#, tcl-format
+msgid "Error reading index: %s"
+msgstr "インデックス読み込みエラー: %s"
+
+#: gitk:3487
+#, tcl-format
+msgid "Couldn't start git blame: %s"
+msgstr "git blame を始められません: %s"
+
+#: gitk:3490 gitk:6279
+msgid "Searching"
+msgstr "検索中"
+
+#: gitk:3522
+#, tcl-format
+msgid "Error running git blame: %s"
+msgstr "git blame 実行エラー: %s"
+
+#: gitk:3550
+#, tcl-format
+msgid "That line comes from commit %s,  which is not in this view"
+msgstr ""
+
+#: gitk:3564
+msgid "External diff viewer failed:"
+msgstr "外部diffビューアが失敗:"
+
+#: gitk:3682
+msgid "Gitk view definition"
+msgstr "Gitk ビュー定義"
+
+#: gitk:3686
+msgid "Remember this view"
+msgstr "このビューを記憶する"
+
+#: gitk:3687
+msgid "References (space separated list):"
+msgstr "参照(スペース区切りのリスト):"
+
+#: gitk:3688
+msgid "Branches & tags:"
+msgstr "ブランチ&タグ:"
+
+#: gitk:3689
+msgid "All refs"
+msgstr "全ての参照"
+
+#: gitk:3690
+msgid "All (local) branches"
+msgstr "全ての(ローカルな)ブランチ"
+
+#: gitk:3691
+msgid "All tags"
+msgstr "全てのタグ"
+
+#: gitk:3692
+msgid "All remote-tracking branches"
+msgstr "全てのリモート追跡ブランチ"
+
+#: gitk:3693
+msgid "Commit Info (regular expressions):"
+msgstr "コミット情報(正規表現):"
+
+#: gitk:3694
+msgid "Author:"
+msgstr "作成者:"
+
+#: gitk:3695
+msgid "Committer:"
+msgstr "コミットした人:"
+
+#: gitk:3696
+msgid "Commit Message:"
+msgstr "コミットメッセージ:"
+
+#: gitk:3697
+msgid "Matches all Commit Info criteria"
+msgstr "コミット情報の全ての条件に一致"
+
+#: gitk:3698
+msgid "Changes to Files:"
+msgstr "変更したファイル:"
+
+#: gitk:3699
+msgid "Fixed String"
+msgstr "固定文字列"
+
+#: gitk:3700
+msgid "Regular Expression"
+msgstr "正規表現"
+
+#: gitk:3701
+msgid "Search string:"
+msgstr "検索文字列:"
+
+#: gitk:3702
+msgid ""
+"Commit Dates (\"2 weeks ago\", \"2009-03-17 15:27:38\", \"March 17, 2009 "
+"15:27:38\"):"
+msgstr "コミット日時 (\"2 weeks ago\", \"2009-03-17 15:27:38\", \"March 17, 2009 "
+"15:27:38\"):"
+
+#: gitk:3703
+msgid "Since:"
+msgstr "期間の始め:"
+
+#: gitk:3704
+msgid "Until:"
+msgstr "期間の終わり:"
+
+#: gitk:3705
+msgid "Limit and/or skip a number of revisions (positive integer):"
+msgstr ""
+
+#: gitk:3706
+msgid "Number to show:"
+msgstr ""
+
+#: gitk:3707
+msgid "Number to skip:"
+msgstr ""
+
+#: gitk:3708
+msgid "Miscellaneous options:"
+msgstr "その他のオプション:"
+
+#: gitk:3709
+msgid "Strictly sort by date"
+msgstr "厳密に日付順で並び替え"
+
+#: gitk:3710
+msgid "Mark branch sides"
+msgstr ""
+
+#: gitk:3711
+msgid "Limit to first parent"
+msgstr ""
+
+#: gitk:3712
+msgid "Simple history"
+msgstr "簡易な履歴"
+
+#: gitk:3713
+msgid "Additional arguments to git log:"
+msgstr "git log への追加の引数:"
+
+#: gitk:3714
+msgid "Enter files and directories to include, one per line:"
+msgstr "含まれるファイル・ディレクトリを一行ごとに入力:"
+
+#: gitk:3715
+msgid "Command to generate more commits to include:"
+msgstr ""
+
+#: gitk:3837
+msgid "Gitk: edit view"
+msgstr "Gitk: ビュー編集"
+
+#: gitk:3845
+msgid "-- criteria for selecting revisions"
+msgstr "― リビジョンの選択条件"
+
+#: gitk:3850
+msgid "View Name:"
+msgstr "ビュー名:"
+
+#: gitk:3925
+msgid "Apply (F5)"
+msgstr "適用 (F5)"
+
+#: gitk:3963
+msgid "Error in commit selection arguments:"
+msgstr "コミット選択引数のエラー:"
+
+#: gitk:4016 gitk:4068 gitk:4516 gitk:4530 gitk:5791 gitk:11232 gitk:11233
+msgid "None"
+msgstr "無し"
+
+#: gitk:4464 gitk:6311 gitk:8073 gitk:8088
+msgid "Date"
+msgstr ""
+
+#: gitk:4464 gitk:6311
+msgid "CDate"
+msgstr ""
+
+#: gitk:4613 gitk:4618
+msgid "Descendant"
+msgstr "子孫"
+
+#: gitk:4614
+msgid "Not descendant"
+msgstr "非子孫"
+
+#: gitk:4621 gitk:4626
+msgid "Ancestor"
+msgstr "祖先"
+
+#: gitk:4622
+msgid "Not ancestor"
+msgstr "非祖先"
+
+#: gitk:4912
+msgid "Local changes checked in to index but not committed"
+msgstr ""
+
+#: gitk:4948
+msgid "Local uncommitted changes, not checked in to index"
+msgstr ""
+
+#: gitk:6629
+msgid "many"
+msgstr "多数"
+
+#: gitk:6813
+msgid "Tags:"
+msgstr "タグ:"
+
+#: gitk:6830 gitk:6836 gitk:8066
+msgid "Parent"
+msgstr "親"
+
+#: gitk:6841
+msgid "Child"
+msgstr "子"
+
+#: gitk:6850
+msgid "Branch"
+msgstr "ブランチ"
+
+#: gitk:6853
+msgid "Follows"
+msgstr "下位"
+
+#: gitk:6856
+msgid "Precedes"
+msgstr "上位"
+
+#: gitk:7354
+#, tcl-format
+msgid "Error getting diffs: %s"
+msgstr ""
+
+#: gitk:7894
+msgid "Goto:"
+msgstr ""
+
+#: gitk:7896
+msgid "SHA1 ID:"
+msgstr "SHA1 ID:"
+
+#: gitk:7915
+#, tcl-format
+msgid "Short SHA1 id %s is ambiguous"
+msgstr "短縮 SHA1 ID %s は曖昧です"
+
+#: gitk:7922
+#, tcl-format
+msgid "Revision %s is not known"
+msgstr "リビジョン %s は不明です"
+
+#: gitk:7932
+#, tcl-format
+msgid "SHA1 id %s is not known"
+msgstr "SHA1 id %s は不明です"
+
+#: gitk:7934
+#, tcl-format
+msgid "Revision %s is not in the current view"
+msgstr "リビジョン %s は現在のビューにはありません"
+
+#: gitk:8076
+msgid "Children"
+msgstr "子供達"
+
+#: gitk:8133
+#, tcl-format
+msgid "Reset %s branch to here"
+msgstr "%s ブランチをここにリセットする"
+
+#: gitk:8135
+msgid "Detached head: can't reset"
+msgstr ""
+
+#: gitk:8244 gitk:8250
+msgid "Skipping merge commit "
+msgstr ""
+
+#: gitk:8259 gitk:8264
+msgid "Error getting patch ID for "
+msgstr ""
+
+#: gitk:8260 gitk:8265
+msgid " - stopping\n"
+msgstr " - 停止\n"
+
+#: gitk:8270 gitk:8273 gitk:8281 gitk:8294 gitk:8303
+msgid "Commit "
+msgstr "コミット "
+
+#: gitk:8274
+msgid ""
+" is the same patch as\n"
+"       "
+msgstr ""
+
+#: gitk:8282
+msgid ""
+" differs from\n"
+"       "
+msgstr ""
+
+#: gitk:8284
+msgid ""
+"Diff of commits:\n"
+"\n"
+msgstr ""
+
+#: gitk:8295 gitk:8304
+#, tcl-format
+msgid " has %s children - stopping\n"
+msgstr ""
+
+#: gitk:8324
+#, tcl-format
+msgid "Error writing commit to file: %s"
+msgstr ""
+
+#: gitk:8330
+#, tcl-format
+msgid "Error diffing commits: %s"
+msgstr ""
+
+#: gitk:8360
+msgid "Top"
+msgstr ""
+
+#: gitk:8361
+msgid "From"
+msgstr "From"
+
+#: gitk:8366
+msgid "To"
+msgstr "To"
+
+#: gitk:8390
+msgid "Generate patch"
+msgstr "パッチ生成"
+
+#: gitk:8392
+msgid "From:"
+msgstr "From:"
+
+#: gitk:8401
+msgid "To:"
+msgstr "To:"
+
+#: gitk:8410
+msgid "Reverse"
+msgstr "逆"
+
+#: gitk:8412 gitk:8597
+msgid "Output file:"
+msgstr "出力ファイル:"
+
+#: gitk:8418
+msgid "Generate"
+msgstr "生成"
+
+#: gitk:8456
+msgid "Error creating patch:"
+msgstr "パッチ生成エラー:"
+
+#: gitk:8479 gitk:8585 gitk:8642
+msgid "ID:"
+msgstr "ID:"
+
+#: gitk:8488
+msgid "Tag name:"
+msgstr "タグ名:"
+
+#: gitk:8492 gitk:8651
+msgid "Create"
+msgstr "生成"
+
+#: gitk:8509
+msgid "No tag name specified"
+msgstr "タグの名称が指定されていません"
+
+#: gitk:8513
+#, tcl-format
+msgid "Tag \"%s\" already exists"
+msgstr "タグ \"%s\" は既に存在します"
+
+#: gitk:8519
+msgid "Error creating tag:"
+msgstr "タグ生成エラー:"
+
+#: gitk:8594
+msgid "Command:"
+msgstr "コマンド:"
+
+#: gitk:8602
+msgid "Write"
+msgstr "書き込み"
+
+#: gitk:8620
+msgid "Error writing commit:"
+msgstr ""
+
+#: gitk:8647
+msgid "Name:"
+msgstr "名前:"
+
+#: gitk:8670
+msgid "Please specify a name for the new branch"
+msgstr "新しいブランチの名前を指定してください"
+
+#: gitk:8675
+#, tcl-format
+msgid "Branch '%s' already exists. Overwrite?"
+msgstr "ブランチ '%s' は既に存在します。上書きしますか?"
+
+#: gitk:8741
+#, tcl-format
+msgid "Commit %s is already included in branch %s -- really re-apply it?"
+msgstr "コミット %s は既にブランチ %s に含まれています ― 本当にこれを再適用しますか?"
+
+#: gitk:8746
+msgid "Cherry-picking"
+msgstr "チェリーピック中"
+
+#: gitk:8755
+#, tcl-format
+msgid ""
+"Cherry-pick failed because of local changes to file '%s'.\n"
+"Please commit, reset or stash your changes and try again."
+msgstr ""
+"ファイル '%s' のローカルな変更のためにチェリーピックは失敗しました。\n"
+"あなたの変更に commit, reset, stash のいずれかを行ってからやり直してください。"
+
+#: gitk:8761
+msgid ""
+"Cherry-pick failed because of merge conflict.\n"
+"Do you wish to run git citool to resolve it?"
+msgstr ""
+"マージの衝突によってチェリーピックは失敗しました。\n"
+"この解決のために git citool を実行したいですか?"
+
+#: gitk:8777
+msgid "No changes committed"
+msgstr ""
+
+#: gitk:8803
+msgid "Confirm reset"
+msgstr ""
+
+#: gitk:8805
+#, tcl-format
+msgid "Reset branch %s to %s?"
+msgstr "ブランチ %s を %s にリセットしますか?"
+
+#: gitk:8809
+msgid "Reset type:"
+msgstr "Reset タイプ:"
+
+#: gitk:8813
+msgid "Soft: Leave working tree and index untouched"
+msgstr "Soft: 作業ツリーもインデックスもそのままにする"
+
+#: gitk:8816
+msgid "Mixed: Leave working tree untouched, reset index"
+msgstr "Mixed: 作業ツリーをそのままにして、インデックスをリセット"
+
+#: gitk:8819
+msgid ""
+"Hard: Reset working tree and index\n"
+"(discard ALL local changes)"
+msgstr ""
+"Hard: 作業ツリーやインデックスをリセット\n"
+"(「全ての」ローカルな変更を破棄)"
+
+#: gitk:8836
+msgid "Resetting"
+msgstr "リセット中"
+
+#: gitk:8893
+msgid "Checking out"
+msgstr "チェックアウト"
+
+#: gitk:8946
+msgid "Cannot delete the currently checked-out branch"
+msgstr ""
+
+#: gitk:8952
+#, tcl-format
+msgid ""
+"The commits on branch %s aren't on any other branch.\n"
+"Really delete branch %s?"
+msgstr ""
+"ブランチ %s 上のコミットは他のブランチに存在しません。\n"
+"本当にブランチ %s を削除しますか?"
+
+#: gitk:8983
+#, tcl-format
+msgid "Tags and heads: %s"
+msgstr "タグとHEAD: %s"
+
+#: gitk:8998
+msgid "Filter"
+msgstr "フィルター"
+
+#: gitk:9293
+msgid ""
+"Error reading commit topology information; branch and preceding/following "
+"tag information will be incomplete."
+msgstr ""
+
+#: gitk:10279
+msgid "Tag"
+msgstr "タグ"
+
+#: gitk:10279
+msgid "Id"
+msgstr "ID"
+
+#: gitk:10327
+msgid "Gitk font chooser"
+msgstr "Gitk フォント選択"
+
+#: gitk:10344
+msgid "B"
+msgstr "B"
+
+#: gitk:10347
+msgid "I"
+msgstr "I"
+
+#: gitk:10443
+msgid "Gitk preferences"
+msgstr "Gitk 設定"
+
+#: gitk:10445
+msgid "Commit list display options"
+msgstr "コミットリスト表示オプション"
+
+#: gitk:10448
+msgid "Maximum graph width (lines)"
+msgstr "最大グラフ幅(線の本数)"
+
+#: gitk:10452
+#, tcl-format
+msgid "Maximum graph width (% of pane)"
+msgstr "最大グラフ幅(ペインに対する%)"
+
+#: gitk:10456
+msgid "Show local changes"
+msgstr "ローカルな変更を表示"
+
+#: gitk:10459
+msgid "Auto-select SHA1"
+msgstr "SHA1 の自動選択"
+
+#: gitk:10463
+msgid "Diff display options"
+msgstr "diff表示オプション"
+
+#: gitk:10465
+msgid "Tab spacing"
+msgstr "タブ空白幅"
+
+#: gitk:10468
+msgid "Display nearby tags"
+msgstr "近くのタグを表示する"
+
+#: gitk:10471
+msgid "Hide remote refs"
+msgstr "リモート参照を隠す"
+
+#: gitk:10474
+msgid "Limit diffs to listed paths"
+msgstr ""
+
+#: gitk:10477
+msgid "Support per-file encodings"
+msgstr "ファイルごとのエンコーディングのサポート"
+
+#: gitk:10483 gitk:10548
+msgid "External diff tool"
+msgstr "外部diffツール"
+
+#: gitk:10485
+msgid "Choose..."
+msgstr "選択..."
+
+#: gitk:10490
+msgid "Colors: press to choose"
+msgstr "色: ボタンを押して選択"
+
+#: gitk:10493
+msgid "Background"
+msgstr "背景"
+
+#: gitk:10494 gitk:10524
+msgid "background"
+msgstr "背景"
+
+#: gitk:10497
+msgid "Foreground"
+msgstr "前景"
+
+#: gitk:10498
+msgid "foreground"
+msgstr "前景"
+
+#: gitk:10501
+msgid "Diff: old lines"
+msgstr "Diff: 旧バージョン"
+
+#: gitk:10502
+msgid "diff old lines"
+msgstr "diff 旧バージョン"
+
+#: gitk:10506
+msgid "Diff: new lines"
+msgstr "Diff: 新バージョン"
+
+#: gitk:10507
+msgid "diff new lines"
+msgstr "diff 新バージョン"
+
+#: gitk:10511
+msgid "Diff: hunk header"
+msgstr "Diff: hunkヘッダ"
+
+#: gitk:10513
+msgid "diff hunk header"
+msgstr "diff hunkヘッダ"
+
+#: gitk:10517
+msgid "Marked line bg"
+msgstr "マーク行の背景"
+
+#: gitk:10519
+msgid "marked line background"
+msgstr "マーク行の背景"
+
+#: gitk:10523
+msgid "Select bg"
+msgstr "選択の背景"
+
+#: gitk:10527
+msgid "Fonts: press to choose"
+msgstr "フォント: ボタンを押して選択"
+
+#: gitk:10529
+msgid "Main font"
+msgstr "主フォント"
+
+#: gitk:10530
+msgid "Diff display font"
+msgstr "Diff表示用フォント"
+
+#: gitk:10531
+msgid "User interface font"
+msgstr "UI用フォント"
+
+#: gitk:10558
+#, tcl-format
+msgid "Gitk: choose color for %s"
+msgstr "Gitk: 「%s」 の色を選択"
+
+#: gitk:11009
+msgid ""
+"Sorry, gitk cannot run with this version of Tcl/Tk.\n"
+" Gitk requires at least Tcl/Tk 8.4."
+msgstr ""
+"申し訳ありませんが、このバージョンの Tcl/Tk では gitk を実行できません。\n"
+" Gitk は少なくとも Tcl/Tk 8.4 を必要とします。"
+
+#: gitk:11137
+msgid "Cannot find a git repository here."
+msgstr "ここでgitリポジトリを見つけられません。"
+
+#: gitk:11141
+#, tcl-format
+msgid "Cannot find the git directory \"%s\"."
+msgstr "gitディレクトリ \"%s\" を見つけられません。"
+
+#: gitk:11188
+#, tcl-format
+msgid "Ambiguous argument '%s': both revision and filename"
+msgstr "あいまいな引数 '%s': リビジョンとファイル名の両方に解釈できます"
+
+#: gitk:11200
+msgid "Bad arguments to gitk:"
+msgstr "gitkへの不正な引数:"
+
+#: gitk:11285
+msgid "Command line"
+msgstr "コマンドライン"

^ permalink raw reply related

* Re: [ANNOUNCE] Stacked Git 0.15
From: Karl Wiberg @ 2009-10-26 13:49 UTC (permalink / raw)
  To: Catalin Marinas; +Cc: Jakub Narebski, Git Mailing List
In-Reply-To: <b0943d9e0910260332x1ca40f97r351e94f5baeb1c6b@mail.gmail.com>

On 2009-10-26 10:32:07 +0000, Catalin Marinas wrote:

> The problem was a bit more complicated than this. Some files are
> generated by the Makefile rather than setup.py so using the latter
> directly fails to build anything.
>
> So it's time for 0.15.1 this week with the fix below (in my
> "proposed" branch). I cc'ed Karl as well in case he has time to have
> a quick look.

I don't have any objections, except ...

> diff --git a/Makefile b/Makefile
> index 0fa5c6a..5f88f7d 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -4,20 +4,10 @@ PYTHON	?= python
> 
>  TEST_PATCHES ?= ..
> 
> -all: build
> +all:
>  	$(PYTHON) setup.py build
> 
> -build: stgit/commands/cmdlist.py stgit-completion.bash
> -
> -ALL_PY = $(shell find stgit -name '*.py')
> -
> -stgit/commands/cmdlist.py: $(ALL_PY)
> -	$(PYTHON) stg-build --py-cmd-list > $@
> -
> -stgit-completion.bash: $(ALL_PY)
> -	$(PYTHON) stg-build --bash-completion > $@
> -
> -install: build
> +install:
>  	$(PYTHON) setup.py install --prefix=$(prefix) --root=$(DESTDIR) --force
> 
>  doc:
> @@ -29,10 +19,10 @@ install-doc:
>  install-html:
>  	$(MAKE) -C Documentation install-html
> 
> -test: build
> +test:
>  	cd t && $(MAKE) all

... don't we need to run "setup.py build" here in order to not change
the behavior?

-- 
Karl Wiberg, kha@treskal.com
    www.treskal.com/kalle

^ permalink raw reply

* Re: git hang with corrupted .pack
From: Shawn O. Pearce @ 2009-10-26 14:23 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: Alex Riesen, Nicolas Pitre, Andy Isaacson, git
In-Reply-To: <7vr5sqq3vm.fsf@alter.siamese.dyndns.org>

Junio C Hamano <gitster@pobox.com> wrote:
> Alex Riesen <raa.lkml@gmail.com> writes:
> > I seem to have problems with this change (on Cygwin). Sometimes
> > accessing an object in a pack fails in unpack_compressed_entry.
> > When it happens, both avail_in and avail_out of the stream are 0,
> > and the reported status is Z_BUF_ERROR.
...
> Subject: Fix incorrect error check while reading deflated pack data

Wow.  
 
> The right fix for this loop is likely to be to increment the initial
> avail_out by one (we allocate one extra byte to terminate it with NUL
> anyway, so there is no risk to overrun the buffer), and break out if we
> see that avail_out has become zero, in order to detect that the stream
> wants to produce more than what we expect.  After the loop, we have a
> check that exactly tests this condition:
> 
>     if ((st != Z_STREAM_END) || stream.total_out != size) {
>         free(buffer);
>         return NULL;
>     }
> 
> So here is a patch (without my previous botched attempts) to fix this
> issue.  The first hunk reverts the corresponding hunk from b3118bd, and
> the second hunk is the same fix proposed earlier. 

ACK.  This looks right to me too.  I forgot about that end-of-stream
marker on the input buffer, and my testing failed to have a stream
where the end-of-stream marker was in the next back window, so this
"fix" wasn't triggering.

*sigh*  Thanks for digging into this and fixing it while I was away.

-- 
Shawn.

^ permalink raw reply


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox