* Re: [PATCH] diff: add ruby funcname pattern
From: Junio C Hamano @ 2008-08-02 3:50 UTC (permalink / raw)
To: Kevin Ballard; +Cc: Giuseppe Bilotta, git
In-Reply-To: <0C57339C-50EF-4199-A14B-AFF04C92EF87@sb.org>
Kevin Ballard <kevin@sb.org> writes:
>> "Giuseppe Bilotta" <giuseppe.bilotta@gmail.com> writes:
>>> ...
>>> I wasn't sure about the completeness of the regexp myself, which is
>> ...
> As a Ruby user, the regex for the funcname looks fine to me.
Thanks, will apply.
^ permalink raw reply
* [PATCH] bash completion: remove unused function _git_diff_tree
From: Lee Marlow @ 2008-08-02 4:47 UTC (permalink / raw)
To: Shawn O. Pearce; +Cc: git, Lee Marlow
completion for git diff-tree was removed in 5cfb4fe
Signed-off-by: Lee Marlow <lee.marlow@gmail.com>
---
contrib/completion/git-completion.bash | 5 -----
1 files changed, 0 insertions(+), 5 deletions(-)
diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash
index 30d8701..e32c1f1 100755
--- a/contrib/completion/git-completion.bash
+++ b/contrib/completion/git-completion.bash
@@ -721,11 +721,6 @@ _git_diff ()
__git_complete_file
}
-_git_diff_tree ()
-{
- __gitcomp "$(__git_refs)"
-}
-
_git_fetch ()
{
local cur="${COMP_WORDS[COMP_CWORD]}"
--
1.6.0.rc1.27.g9b6bf
^ permalink raw reply related
* Re: [PATCH] diff: add ruby funcname pattern
From: Giuseppe Bilotta @ 2008-08-02 5:41 UTC (permalink / raw)
To: Kevin Ballard; +Cc: Junio C Hamano, git
In-Reply-To: <0C57339C-50EF-4199-A14B-AFF04C92EF87@sb.org>
On Sat, Aug 2, 2008 at 2:31 AM, Kevin Ballard <kevin@sb.org> wrote:
>
> As a Ruby user, the regex for the funcname looks fine to me.
What is your opinion about the anonymous code blocks?
I've been thinking that another possibility could be to have two ruby
funcnames, a simpler one (the one I presented) that only has 'named'
blocks, and a more thorough one that also matches up anonymous blocks.
User could then choose which one to use in their code by having
gitattributes such as *.rb diff=ruby or *.rb diff=ruby-full (or
whatever else).
I'm not sure this would be a sensible policy though.
--
Giuseppe "Oblomov" Bilotta
^ permalink raw reply
* Re: [PATCH] diff: add ruby funcname pattern
From: Kevin Ballard @ 2008-08-02 5:47 UTC (permalink / raw)
To: Giuseppe Bilotta; +Cc: Junio C Hamano, git
In-Reply-To: <cb7bb73a0808012241s80a06fq1ac54a3350169f6c@mail.gmail.com>
On Aug 1, 2008, at 10:41 PM, Giuseppe Bilotta wrote:
> On Sat, Aug 2, 2008 at 2:31 AM, Kevin Ballard <kevin@sb.org> wrote:
>>
>> As a Ruby user, the regex for the funcname looks fine to me.
>
> What is your opinion about the anonymous code blocks?
>
> I've been thinking that another possibility could be to have two ruby
> funcnames, a simpler one (the one I presented) that only has 'named'
> blocks, and a more thorough one that also matches up anonymous blocks.
> User could then choose which one to use in their code by having
> gitattributes such as *.rb diff=ruby or *.rb diff=ruby-full (or
> whatever else).
>
> I'm not sure this would be a sensible policy though.
If you're going to get into anonymous code blocks, you're going to
have a really tough time deciding which blocks are interesting and
which aren't. And as you stated before, without a stack-based
approach, this could really fall apart, as anonymous blocks are
(almost) always going to be inside a method.
I think it's far simpler to stick with class/module/def.
-Kevin Ballard
--
Kevin Ballard
http://kevin.sb.org
kevin@sb.org
http://www.tildesoft.com
^ permalink raw reply
* Re: [PATCH] diff: add ruby funcname pattern
From: Giuseppe Bilotta @ 2008-08-02 6:06 UTC (permalink / raw)
To: Kevin Ballard; +Cc: Junio C Hamano, git
In-Reply-To: <C871A30D-F2AF-4385-ABD4-C57F474D7F01@sb.org>
On Sat, Aug 2, 2008 at 7:47 AM, Kevin Ballard <kevin@sb.org> wrote:
>
> If you're going to get into anonymous code blocks, you're going to have a
> really tough time deciding which blocks are interesting and which aren't.
> And as you stated before, without a stack-based approach, this could really
> fall apart, as anonymous blocks are (almost) always going to be inside a
> method.
I was just looking for a libxdiff issue tracker but I couldn't find
one, so I guess I'll ask the author directly about the possibility to
implement such a thing. The matchit plugin for vim seems to manage
(even user-defined) code blocks very well, even for multi-state blocks
(if ... else ... end), using regexps; so maybe a reimplementation in C
for libxdiff could be a solution. Of course, one wonders how much
slower such an approach would be as opposed to the current "look back
until the first matching line" solution ...
--
Giuseppe "Oblomov" Bilotta
^ permalink raw reply
* [PATCH] diff: chapter and part in funcname for tex
From: Giuseppe Bilotta @ 2008-08-02 6:35 UTC (permalink / raw)
To: git; +Cc: Junio C Hamano, Giuseppe Bilotta
This patch enhances the tex funcname by adding support for
chapter and part sectioning commands. It also matches
the starred version of the sectioning commands.
---
I know that technically speaking this should have been two
separate patches because they are two logically separate
changes, but they are really rather braindead so please
accept them as one :)
diff.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/diff.c b/diff.c
index c253015..776bce1 100644
--- a/diff.c
+++ b/diff.c
@@ -1380,7 +1380,7 @@ static struct builtin_funcname_pattern {
"^[ ]*\\(\\([ ]*"
"[A-Za-z_][A-Za-z_0-9]*\\)\\{2,\\}"
"[ ]*([^;]*\\)$" },
- { "tex", "^\\(\\\\\\(sub\\)*section{.*\\)$" },
+ { "tex", "^\\(\\\\\\(\\(sub\\)*section\\|chapter\\|part\\)\\*\\?{.*\\)$" },
{ "ruby", "^\\s*\\(\\(class\\|module\\|def\\)\\s.*\\)$" },
};
--
1.5.6.3
^ permalink raw reply related
* [PATCH] gitk: Updated German translation.
From: Christian Stimming @ 2008-08-02 8:03 UTC (permalink / raw)
To: git; +Cc: Michele Ballabio, Paul Mackerras
[-- Attachment #1: Type: text/plain, Size: 350 bytes --]
This is an update to gitk's German translation against current master of
gitk.git at git.kernel.org. To my surprise, my submitted patch as of
2008-05-24 hasn't been applied so far. I'm resending it (rebased on current
master) in the hope that by now someone will actually commit it and the
translation goes back to 100%. Thanks a lot!
Christian
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-gitk-Updated-German-translation.patch --]
[-- Type: text/x-diff; charset="us-ascii"; name="0001-gitk-Updated-German-translation.patch", Size: 5905 bytes --]
From 47f0b66d090a143a36d1d74592396b43dbbbbea2 Mon Sep 17 00:00:00 2001
From: Christian Stimming <stimming@tuhh.de>
Date: Sat, 24 May 2008 22:42:30 +0200
Subject: [PATCH] gitk: Updated German translation.
This includes suggestions by Stephan Beyer.
Signed-off-by: Christian Stimming <stimming@tuhh.de>
---
po/de.po | 106 ++++++++++++++++++++++++++++++++++++++------------------------
1 files changed, 65 insertions(+), 41 deletions(-)
diff --git a/po/de.po b/po/de.po
index b9867bf..04ee570 100644
--- a/po/de.po
+++ b/po/de.po
@@ -7,19 +7,37 @@ msgid ""
msgstr ""
"Project-Id-Version: git-gui\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2008-05-01 11:54+0200\n"
-"PO-Revision-Date: 2008-05-02 21:12+0200\n"
+"POT-Creation-Date: 2008-05-24 22:32+0200\n"
+"PO-Revision-Date: 2008-05-24 22:40+0200\n"
"Last-Translator: Christian Stimming <stimming@tuhh.de>\n"
"Language-Team: German\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-#: gitk:111
-msgid "Error executing git rev-list:"
-msgstr "Fehler beim Ausführen von git-rev-list:"
+#: gitk:102
+msgid "Couldn't get list of unmerged files:"
+msgstr "Liste der nicht-zusammengeführten Dateien nicht gefunden:"
+
+#: gitk:329
+msgid "No files selected: --merge specified but no files are unmerged."
+msgstr ""
+"Keine Dateien ausgewählt: --merge angegeben, es existieren aber keine nicht-"
+"zusammengeführten Dateien."
+
+#: gitk:332
+msgid ""
+"No files selected: --merge specified but no unmerged files are within file "
+"limit."
+msgstr ""
+"Keine Dateien ausgewähle: --merge angegeben, aber keine nicht-"
+"zusammengeführten Dateien sind in der Dateiauswahl."
-#: gitk:124
+#: gitk:354
+msgid "Error executing git log:"
+msgstr "Fehler beim Ausführen von git-log:"
+
+#: gitk:369
msgid "Reading"
msgstr "Lesen"
@@ -56,7 +74,11 @@ msgstr "Datei"
msgid "Update"
msgstr "Aktualisieren"
-#: gitk:664
+#: gitk:1722
+msgid "Reload"
+msgstr "Neu laden"
+
+#: gitk:1723
msgid "Reread references"
msgstr "Zweige neu laden"
@@ -112,7 +134,11 @@ msgstr "Tastenkürzel"
msgid "SHA1 ID: "
msgstr "SHA1:"
-#: gitk:791
+#: gitk:1831
+msgid "Row"
+msgstr "Zeile"
+
+#: gitk:1862
msgid "Find"
msgstr "Suche"
@@ -126,19 +152,19 @@ msgstr "vorige"
#: gitk:794
msgid "commit"
-msgstr "Version"
+msgstr "Version nach"
#: gitk:797 gitk:799 gitk:2356 gitk:2379 gitk:2403 gitk:4306 gitk:4369
msgid "containing:"
-msgstr "enthaltend:"
+msgstr "Beschreibung:"
#: gitk:800 gitk:1778 gitk:1783 gitk:2431
msgid "touching paths:"
-msgstr "Pfad betreffend:"
+msgstr "Dateien:"
#: gitk:801 gitk:2436
msgid "adding/removing string:"
-msgstr "Zeichenkette ändernd:"
+msgstr "Änderungen:"
#: gitk:810 gitk:812
msgid "Exact"
@@ -253,23 +279,25 @@ msgstr "Diesen auch hervorheben"
msgid "Highlight this only"
msgstr "Nur diesen hervorheben"
-#: gitk:1318
+#: gitk:2162
+msgid "External diff"
+msgstr "Externer Vergleich"
+
+#: gitk:2403
msgid ""
"\n"
"Gitk - a commit viewer for git\n"
"\n"
-"Copyright © 2005-2006 Paul Mackerras\n"
+"Copyright © 2005-2008 Paul Mackerras\n"
"\n"
"Use and redistribute under the terms of the GNU General Public License"
msgstr ""
"\n"
"Gitk - eine Visualisierung der Git Historie\n"
"\n"
-"Copyright © 2005-2006 Paul Mackerras\n"
+"Copyright © 2005-2008 Paul Mackerras\n"
"\n"
-"Benutzung und Weiterverbreitung gemäß den Bedingungen der GNU General Public "
-"License\n"
-" "
+"Benutzung und Weiterverbreitung gemäß den Bedingungen der GNU General Public License"
#: gitk:1326 gitk:1387 gitk:6582
msgid "Close"
@@ -450,11 +478,11 @@ msgstr "Name"
msgid "Remember this view"
msgstr "Diese Ansicht speichern"
-#: gitk:1928
-msgid "Commits to include (arguments to git rev-list):"
-msgstr "Versionen anzeigen (Argumente von git-rev-list):"
+#: gitk:3126
+msgid "Commits to include (arguments to git log):"
+msgstr "Versionen anzeigen (Argumente von git-log):"
-#: gitk:1935
+#: gitk:3133
msgid "Command to generate more commits to include:"
msgstr "Versionsliste durch folgendes Kommando erzeugen lassen:"
@@ -566,7 +594,11 @@ msgstr "Kinder"
msgid "Reset %s branch to here"
msgstr "Zweig »%s« hierher zurücksetzen"
-#: gitk:6050
+#: gitk:7204
+msgid "Detached head: can't reset"
+msgstr "Zweigspitze ist abgetrennt: Zurücksetzen nicht möglich"
+
+#: gitk:7236
msgid "Top"
msgstr "Oben"
@@ -798,7 +830,15 @@ msgstr "Naheliegende Überschriften anzeigen"
msgid "Limit diffs to listed paths"
msgstr "Vergleich nur für angezeigte Pfade"
-#: gitk:8045
+#: gitk:9264
+msgid "External diff tool"
+msgstr "Externes Vergleich-(Diff-)Programm"
+
+#: gitk:9266
+msgid "Choose..."
+msgstr "Wählen..."
+
+#: gitk:9271
msgid "Colors: press to choose"
msgstr "Farben: Klicken zum Wählen"
@@ -873,22 +913,6 @@ msgstr "Mehrdeutige Angabe »%s«: Sowohl Version als auch Dateiname existiert."
msgid "Bad arguments to gitk:"
msgstr "Falsche Kommandozeilen-Parameter für gitk:"
-#: gitk:8637
-msgid "Couldn't get list of unmerged files:"
-msgstr "Liste der nicht-zusammengeführten Dateien nicht gefunden:"
-
-#: gitk:8653
-msgid "No files selected: --merge specified but no files are unmerged."
-msgstr "Keine Dateien ausgewählt: --merge angegeben, es existieren aber keine nicht-zusammengeführten Dateien."
-
-#: gitk:8656
-msgid ""
-"No files selected: --merge specified but no unmerged files are within file "
-"limit."
-msgstr ""
-"Keine Dateien ausgewähle: --merge angegeben, aber keine nicht-"
-"zusammengeführten Dateien sind in der Dateiauswahl."
-
-#: gitk:8717
+#: gitk:9915
msgid "Command line"
msgstr "Kommandozeile"
--
1.5.5.1.316.g377d9
^ permalink raw reply related
* [PATCH] Builtin git-help.
From: Miklos Vajna @ 2008-08-02 8:08 UTC (permalink / raw)
To: Junio C Hamano
Cc: Christian Couder, Johannes Schindelin, Kevin Ballard,
Git Mailing List
In-Reply-To: <20080801144121.GU32057@genesis.frugalware.org>
This patch splits out git-help's functions to builtin-help.c and leaves
only functions used by other builtins in help.c.
First this removes git-help's functions from libgit which are not
interesting for other builtins, second this makes 'git help help' work
again.
Signed-off-by: Miklos Vajna <vmiklos@frugalware.org>
---
This is for 'next'.
Makefile | 3 +-
builtin-help.c | 462 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
help.c | 464 --------------------------------------------------------
help.h | 6 +
4 files changed, 470 insertions(+), 465 deletions(-)
create mode 100644 builtin-help.c
diff --git a/Makefile b/Makefile
index 8431ffd..562e453 100644
--- a/Makefile
+++ b/Makefile
@@ -519,6 +519,7 @@ BUILTIN_OBJS += builtin-for-each-ref.o
BUILTIN_OBJS += builtin-fsck.o
BUILTIN_OBJS += builtin-gc.o
BUILTIN_OBJS += builtin-grep.o
+BUILTIN_OBJS += builtin-help.o
BUILTIN_OBJS += builtin-init-db.o
BUILTIN_OBJS += builtin-log.o
BUILTIN_OBJS += builtin-ls-files.o
@@ -1090,7 +1091,7 @@ git$X: git.o $(BUILTIN_OBJS) $(GITLIBS)
$(QUIET_LINK)$(CC) $(ALL_CFLAGS) -o $@ git.o \
$(BUILTIN_OBJS) $(ALL_LDFLAGS) $(LIBS)
-help.o: help.c common-cmds.h GIT-CFLAGS
+builtin-help.o: builtin-help.c common-cmds.h GIT-CFLAGS
$(QUIET_CC)$(CC) -o $*.o -c $(ALL_CFLAGS) \
'-DGIT_HTML_PATH="$(htmldir_SQ)"' \
'-DGIT_MAN_PATH="$(mandir_SQ)"' \
diff --git a/builtin-help.c b/builtin-help.c
new file mode 100644
index 0000000..391f749
--- /dev/null
+++ b/builtin-help.c
@@ -0,0 +1,462 @@
+/*
+ * builtin-help.c
+ *
+ * Builtin help command
+ */
+#include "cache.h"
+#include "builtin.h"
+#include "exec_cmd.h"
+#include "common-cmds.h"
+#include "parse-options.h"
+#include "run-command.h"
+#include "help.h"
+
+static struct man_viewer_list {
+ struct man_viewer_list *next;
+ char name[FLEX_ARRAY];
+} *man_viewer_list;
+
+static struct man_viewer_info_list {
+ struct man_viewer_info_list *next;
+ const char *info;
+ char name[FLEX_ARRAY];
+} *man_viewer_info_list;
+
+enum help_format {
+ HELP_FORMAT_MAN,
+ HELP_FORMAT_INFO,
+ HELP_FORMAT_WEB,
+};
+
+static int show_all = 0;
+static enum help_format help_format = HELP_FORMAT_MAN;
+static struct option builtin_help_options[] = {
+ OPT_BOOLEAN('a', "all", &show_all, "print all available commands"),
+ OPT_SET_INT('m', "man", &help_format, "show man page", HELP_FORMAT_MAN),
+ OPT_SET_INT('w', "web", &help_format, "show manual in web browser",
+ HELP_FORMAT_WEB),
+ OPT_SET_INT('i', "info", &help_format, "show info page",
+ HELP_FORMAT_INFO),
+ OPT_END(),
+};
+
+static const char * const builtin_help_usage[] = {
+ "git help [--all] [--man|--web|--info] [command]",
+ NULL
+};
+
+static enum help_format parse_help_format(const char *format)
+{
+ if (!strcmp(format, "man"))
+ return HELP_FORMAT_MAN;
+ if (!strcmp(format, "info"))
+ return HELP_FORMAT_INFO;
+ if (!strcmp(format, "web") || !strcmp(format, "html"))
+ return HELP_FORMAT_WEB;
+ die("unrecognized help format '%s'", format);
+}
+
+static const char *get_man_viewer_info(const char *name)
+{
+ struct man_viewer_info_list *viewer;
+
+ for (viewer = man_viewer_info_list; viewer; viewer = viewer->next)
+ {
+ if (!strcasecmp(name, viewer->name))
+ return viewer->info;
+ }
+ return NULL;
+}
+
+static int check_emacsclient_version(void)
+{
+ struct strbuf buffer = STRBUF_INIT;
+ struct child_process ec_process;
+ const char *argv_ec[] = { "emacsclient", "--version", NULL };
+ int version;
+
+ /* emacsclient prints its version number on stderr */
+ memset(&ec_process, 0, sizeof(ec_process));
+ ec_process.argv = argv_ec;
+ ec_process.err = -1;
+ ec_process.stdout_to_stderr = 1;
+ if (start_command(&ec_process)) {
+ fprintf(stderr, "Failed to start emacsclient.\n");
+ return -1;
+ }
+ strbuf_read(&buffer, ec_process.err, 20);
+ close(ec_process.err);
+
+ /*
+ * Don't bother checking return value, because "emacsclient --version"
+ * seems to always exits with code 1.
+ */
+ finish_command(&ec_process);
+
+ if (prefixcmp(buffer.buf, "emacsclient")) {
+ fprintf(stderr, "Failed to parse emacsclient version.\n");
+ strbuf_release(&buffer);
+ return -1;
+ }
+
+ strbuf_remove(&buffer, 0, strlen("emacsclient"));
+ version = atoi(buffer.buf);
+
+ if (version < 22) {
+ fprintf(stderr,
+ "emacsclient version '%d' too old (< 22).\n",
+ version);
+ strbuf_release(&buffer);
+ return -1;
+ }
+
+ strbuf_release(&buffer);
+ return 0;
+}
+
+static void exec_woman_emacs(const char* path, const char *page)
+{
+ if (!check_emacsclient_version()) {
+ /* This works only with emacsclient version >= 22. */
+ struct strbuf man_page = STRBUF_INIT;
+
+ if (!path)
+ path = "emacsclient";
+ strbuf_addf(&man_page, "(woman \"%s\")", page);
+ execlp(path, "emacsclient", "-e", man_page.buf, NULL);
+ warning("failed to exec '%s': %s", path, strerror(errno));
+ }
+}
+
+static void exec_man_konqueror(const char* path, const char *page)
+{
+ const char *display = getenv("DISPLAY");
+ if (display && *display) {
+ struct strbuf man_page = STRBUF_INIT;
+ const char *filename = "kfmclient";
+
+ /* It's simpler to launch konqueror using kfmclient. */
+ if (path) {
+ const char *file = strrchr(path, '/');
+ if (file && !strcmp(file + 1, "konqueror")) {
+ char *new = xstrdup(path);
+ char *dest = strrchr(new, '/');
+
+ /* strlen("konqueror") == strlen("kfmclient") */
+ strcpy(dest + 1, "kfmclient");
+ path = new;
+ }
+ if (file)
+ filename = file;
+ } else
+ path = "kfmclient";
+ strbuf_addf(&man_page, "man:%s(1)", page);
+ execlp(path, filename, "newTab", man_page.buf, NULL);
+ warning("failed to exec '%s': %s", path, strerror(errno));
+ }
+}
+
+static void exec_man_man(const char* path, const char *page)
+{
+ if (!path)
+ path = "man";
+ execlp(path, "man", page, NULL);
+ warning("failed to exec '%s': %s", path, strerror(errno));
+}
+
+static void exec_man_cmd(const char *cmd, const char *page)
+{
+ struct strbuf shell_cmd = STRBUF_INIT;
+ strbuf_addf(&shell_cmd, "%s %s", cmd, page);
+ execl("/bin/sh", "sh", "-c", shell_cmd.buf, NULL);
+ warning("failed to exec '%s': %s", cmd, strerror(errno));
+}
+
+static void add_man_viewer(const char *name)
+{
+ struct man_viewer_list **p = &man_viewer_list;
+ size_t len = strlen(name);
+
+ while (*p)
+ p = &((*p)->next);
+ *p = xcalloc(1, (sizeof(**p) + len + 1));
+ strncpy((*p)->name, name, len);
+}
+
+static int supported_man_viewer(const char *name, size_t len)
+{
+ return (!strncasecmp("man", name, len) ||
+ !strncasecmp("woman", name, len) ||
+ !strncasecmp("konqueror", name, len));
+}
+
+static void do_add_man_viewer_info(const char *name,
+ size_t len,
+ const char *value)
+{
+ struct man_viewer_info_list *new = xcalloc(1, sizeof(*new) + len + 1);
+
+ strncpy(new->name, name, len);
+ new->info = xstrdup(value);
+ new->next = man_viewer_info_list;
+ man_viewer_info_list = new;
+}
+
+static int add_man_viewer_path(const char *name,
+ size_t len,
+ const char *value)
+{
+ if (supported_man_viewer(name, len))
+ do_add_man_viewer_info(name, len, value);
+ else
+ warning("'%s': path for unsupported man viewer.\n"
+ "Please consider using 'man.<tool>.cmd' instead.",
+ name);
+
+ return 0;
+}
+
+static int add_man_viewer_cmd(const char *name,
+ size_t len,
+ const char *value)
+{
+ if (supported_man_viewer(name, len))
+ warning("'%s': cmd for supported man viewer.\n"
+ "Please consider using 'man.<tool>.path' instead.",
+ name);
+ else
+ do_add_man_viewer_info(name, len, value);
+
+ return 0;
+}
+
+static int add_man_viewer_info(const char *var, const char *value)
+{
+ const char *name = var + 4;
+ const char *subkey = strrchr(name, '.');
+
+ if (!subkey)
+ return error("Config with no key for man viewer: %s", name);
+
+ if (!strcmp(subkey, ".path")) {
+ if (!value)
+ return config_error_nonbool(var);
+ return add_man_viewer_path(name, subkey - name, value);
+ }
+ if (!strcmp(subkey, ".cmd")) {
+ if (!value)
+ return config_error_nonbool(var);
+ return add_man_viewer_cmd(name, subkey - name, value);
+ }
+
+ warning("'%s': unsupported man viewer sub key.", subkey);
+ return 0;
+}
+
+static int git_help_config(const char *var, const char *value, void *cb)
+{
+ if (!strcmp(var, "help.format")) {
+ if (!value)
+ return config_error_nonbool(var);
+ help_format = parse_help_format(value);
+ return 0;
+ }
+ if (!strcmp(var, "man.viewer")) {
+ if (!value)
+ return config_error_nonbool(var);
+ add_man_viewer(value);
+ return 0;
+ }
+ if (!prefixcmp(var, "man."))
+ return add_man_viewer_info(var, value);
+
+ return git_default_config(var, value, cb);
+}
+
+struct cmdnames main_cmds, other_cmds;
+
+void list_common_cmds_help(void)
+{
+ int i, longest = 0;
+
+ for (i = 0; i < ARRAY_SIZE(common_cmds); i++) {
+ if (longest < strlen(common_cmds[i].name))
+ longest = strlen(common_cmds[i].name);
+ }
+
+ puts("The most commonly used git commands are:");
+ for (i = 0; i < ARRAY_SIZE(common_cmds); i++) {
+ printf(" %s ", common_cmds[i].name);
+ mput_char(' ', longest - strlen(common_cmds[i].name));
+ puts(common_cmds[i].help);
+ }
+}
+
+static int is_git_command(const char *s)
+{
+ return is_in_cmdlist(&main_cmds, s) ||
+ is_in_cmdlist(&other_cmds, s);
+}
+
+static const char *prepend(const char *prefix, const char *cmd)
+{
+ size_t pre_len = strlen(prefix);
+ size_t cmd_len = strlen(cmd);
+ char *p = xmalloc(pre_len + cmd_len + 1);
+ memcpy(p, prefix, pre_len);
+ strcpy(p + pre_len, cmd);
+ return p;
+}
+
+static const char *cmd_to_page(const char *git_cmd)
+{
+ if (!git_cmd)
+ return "git";
+ else if (!prefixcmp(git_cmd, "git"))
+ return git_cmd;
+ else if (is_git_command(git_cmd))
+ return prepend("git-", git_cmd);
+ else
+ return prepend("git", git_cmd);
+}
+
+static void setup_man_path(void)
+{
+ struct strbuf new_path;
+ const char *old_path = getenv("MANPATH");
+
+ strbuf_init(&new_path, 0);
+
+ /* We should always put ':' after our path. If there is no
+ * old_path, the ':' at the end will let 'man' to try
+ * system-wide paths after ours to find the manual page. If
+ * there is old_path, we need ':' as delimiter. */
+ strbuf_addstr(&new_path, GIT_MAN_PATH);
+ strbuf_addch(&new_path, ':');
+ if (old_path)
+ strbuf_addstr(&new_path, old_path);
+
+ setenv("MANPATH", new_path.buf, 1);
+
+ strbuf_release(&new_path);
+}
+
+static void exec_viewer(const char *name, const char *page)
+{
+ const char *info = get_man_viewer_info(name);
+
+ if (!strcasecmp(name, "man"))
+ exec_man_man(info, page);
+ else if (!strcasecmp(name, "woman"))
+ exec_woman_emacs(info, page);
+ else if (!strcasecmp(name, "konqueror"))
+ exec_man_konqueror(info, page);
+ else if (info)
+ exec_man_cmd(info, page);
+ else
+ warning("'%s': unknown man viewer.", name);
+}
+
+static void show_man_page(const char *git_cmd)
+{
+ struct man_viewer_list *viewer;
+ const char *page = cmd_to_page(git_cmd);
+
+ setup_man_path();
+ for (viewer = man_viewer_list; viewer; viewer = viewer->next)
+ {
+ exec_viewer(viewer->name, page); /* will return when unable */
+ }
+ exec_viewer("man", page);
+ die("no man viewer handled the request");
+}
+
+static void show_info_page(const char *git_cmd)
+{
+ const char *page = cmd_to_page(git_cmd);
+ setenv("INFOPATH", GIT_INFO_PATH, 1);
+ execlp("info", "info", "gitman", page, NULL);
+}
+
+static void get_html_page_path(struct strbuf *page_path, const char *page)
+{
+ struct stat st;
+ const char *html_path = system_path(GIT_HTML_PATH);
+
+ /* Check that we have a git documentation directory. */
+ if (stat(mkpath("%s/git.html", html_path), &st)
+ || !S_ISREG(st.st_mode))
+ die("'%s': not a documentation directory.", html_path);
+
+ strbuf_init(page_path, 0);
+ strbuf_addf(page_path, "%s/%s.html", html_path, page);
+}
+
+/*
+ * If open_html is not defined in a platform-specific way (see for
+ * example compat/mingw.h), we use the script web--browse to display
+ * HTML.
+ */
+#ifndef open_html
+void open_html(const char *path)
+{
+ execl_git_cmd("web--browse", "-c", "help.browser", path, NULL);
+}
+#endif
+
+static void show_html_page(const char *git_cmd)
+{
+ const char *page = cmd_to_page(git_cmd);
+ struct strbuf page_path; /* it leaks but we exec bellow */
+
+ get_html_page_path(&page_path, page);
+
+ open_html(page_path.buf);
+}
+
+int cmd_help(int argc, const char **argv, const char *prefix)
+{
+ int nongit;
+ const char *alias;
+ unsigned int longest = load_command_list("git-", &main_cmds, &other_cmds);
+
+ setup_git_directory_gently(&nongit);
+ git_config(git_help_config, NULL);
+
+ argc = parse_options(argc, argv, builtin_help_options,
+ builtin_help_usage, 0);
+
+ if (show_all) {
+ printf("usage: %s\n\n", git_usage_string);
+ list_commands("git commands", longest, &main_cmds, &other_cmds);
+ printf("%s\n", git_more_info_string);
+ return 0;
+ }
+
+ if (!argv[0]) {
+ printf("usage: %s\n\n", git_usage_string);
+ list_common_cmds_help();
+ printf("\n%s\n", git_more_info_string);
+ return 0;
+ }
+
+ alias = alias_lookup(argv[0]);
+ if (alias && !is_git_command(argv[0])) {
+ printf("`git %s' is aliased to `%s'\n", argv[0], alias);
+ return 0;
+ }
+
+ switch (help_format) {
+ case HELP_FORMAT_MAN:
+ show_man_page(argv[0]);
+ break;
+ case HELP_FORMAT_INFO:
+ show_info_page(argv[0]);
+ break;
+ case HELP_FORMAT_WEB:
+ show_html_page(argv[0]);
+ break;
+ }
+
+ return 0;
+}
diff --git a/help.c b/help.c
index 968f368..1afbac0 100644
--- a/help.c
+++ b/help.c
@@ -1,278 +1,8 @@
-/*
- * builtin-help.c
- *
- * Builtin help-related commands (help, usage, version)
- */
#include "cache.h"
#include "builtin.h"
#include "exec_cmd.h"
-#include "common-cmds.h"
-#include "parse-options.h"
-#include "run-command.h"
#include "help.h"
-static struct man_viewer_list {
- struct man_viewer_list *next;
- char name[FLEX_ARRAY];
-} *man_viewer_list;
-
-static struct man_viewer_info_list {
- struct man_viewer_info_list *next;
- const char *info;
- char name[FLEX_ARRAY];
-} *man_viewer_info_list;
-
-enum help_format {
- HELP_FORMAT_MAN,
- HELP_FORMAT_INFO,
- HELP_FORMAT_WEB,
-};
-
-static int show_all = 0;
-static enum help_format help_format = HELP_FORMAT_MAN;
-static struct option builtin_help_options[] = {
- OPT_BOOLEAN('a', "all", &show_all, "print all available commands"),
- OPT_SET_INT('m', "man", &help_format, "show man page", HELP_FORMAT_MAN),
- OPT_SET_INT('w', "web", &help_format, "show manual in web browser",
- HELP_FORMAT_WEB),
- OPT_SET_INT('i', "info", &help_format, "show info page",
- HELP_FORMAT_INFO),
- OPT_END(),
-};
-
-static const char * const builtin_help_usage[] = {
- "git help [--all] [--man|--web|--info] [command]",
- NULL
-};
-
-static enum help_format parse_help_format(const char *format)
-{
- if (!strcmp(format, "man"))
- return HELP_FORMAT_MAN;
- if (!strcmp(format, "info"))
- return HELP_FORMAT_INFO;
- if (!strcmp(format, "web") || !strcmp(format, "html"))
- return HELP_FORMAT_WEB;
- die("unrecognized help format '%s'", format);
-}
-
-static const char *get_man_viewer_info(const char *name)
-{
- struct man_viewer_info_list *viewer;
-
- for (viewer = man_viewer_info_list; viewer; viewer = viewer->next)
- {
- if (!strcasecmp(name, viewer->name))
- return viewer->info;
- }
- return NULL;
-}
-
-static int check_emacsclient_version(void)
-{
- struct strbuf buffer = STRBUF_INIT;
- struct child_process ec_process;
- const char *argv_ec[] = { "emacsclient", "--version", NULL };
- int version;
-
- /* emacsclient prints its version number on stderr */
- memset(&ec_process, 0, sizeof(ec_process));
- ec_process.argv = argv_ec;
- ec_process.err = -1;
- ec_process.stdout_to_stderr = 1;
- if (start_command(&ec_process)) {
- fprintf(stderr, "Failed to start emacsclient.\n");
- return -1;
- }
- strbuf_read(&buffer, ec_process.err, 20);
- close(ec_process.err);
-
- /*
- * Don't bother checking return value, because "emacsclient --version"
- * seems to always exits with code 1.
- */
- finish_command(&ec_process);
-
- if (prefixcmp(buffer.buf, "emacsclient")) {
- fprintf(stderr, "Failed to parse emacsclient version.\n");
- strbuf_release(&buffer);
- return -1;
- }
-
- strbuf_remove(&buffer, 0, strlen("emacsclient"));
- version = atoi(buffer.buf);
-
- if (version < 22) {
- fprintf(stderr,
- "emacsclient version '%d' too old (< 22).\n",
- version);
- strbuf_release(&buffer);
- return -1;
- }
-
- strbuf_release(&buffer);
- return 0;
-}
-
-static void exec_woman_emacs(const char* path, const char *page)
-{
- if (!check_emacsclient_version()) {
- /* This works only with emacsclient version >= 22. */
- struct strbuf man_page = STRBUF_INIT;
-
- if (!path)
- path = "emacsclient";
- strbuf_addf(&man_page, "(woman \"%s\")", page);
- execlp(path, "emacsclient", "-e", man_page.buf, NULL);
- warning("failed to exec '%s': %s", path, strerror(errno));
- }
-}
-
-static void exec_man_konqueror(const char* path, const char *page)
-{
- const char *display = getenv("DISPLAY");
- if (display && *display) {
- struct strbuf man_page = STRBUF_INIT;
- const char *filename = "kfmclient";
-
- /* It's simpler to launch konqueror using kfmclient. */
- if (path) {
- const char *file = strrchr(path, '/');
- if (file && !strcmp(file + 1, "konqueror")) {
- char *new = xstrdup(path);
- char *dest = strrchr(new, '/');
-
- /* strlen("konqueror") == strlen("kfmclient") */
- strcpy(dest + 1, "kfmclient");
- path = new;
- }
- if (file)
- filename = file;
- } else
- path = "kfmclient";
- strbuf_addf(&man_page, "man:%s(1)", page);
- execlp(path, filename, "newTab", man_page.buf, NULL);
- warning("failed to exec '%s': %s", path, strerror(errno));
- }
-}
-
-static void exec_man_man(const char* path, const char *page)
-{
- if (!path)
- path = "man";
- execlp(path, "man", page, NULL);
- warning("failed to exec '%s': %s", path, strerror(errno));
-}
-
-static void exec_man_cmd(const char *cmd, const char *page)
-{
- struct strbuf shell_cmd = STRBUF_INIT;
- strbuf_addf(&shell_cmd, "%s %s", cmd, page);
- execl("/bin/sh", "sh", "-c", shell_cmd.buf, NULL);
- warning("failed to exec '%s': %s", cmd, strerror(errno));
-}
-
-static void add_man_viewer(const char *name)
-{
- struct man_viewer_list **p = &man_viewer_list;
- size_t len = strlen(name);
-
- while (*p)
- p = &((*p)->next);
- *p = xcalloc(1, (sizeof(**p) + len + 1));
- strncpy((*p)->name, name, len);
-}
-
-static int supported_man_viewer(const char *name, size_t len)
-{
- return (!strncasecmp("man", name, len) ||
- !strncasecmp("woman", name, len) ||
- !strncasecmp("konqueror", name, len));
-}
-
-static void do_add_man_viewer_info(const char *name,
- size_t len,
- const char *value)
-{
- struct man_viewer_info_list *new = xcalloc(1, sizeof(*new) + len + 1);
-
- strncpy(new->name, name, len);
- new->info = xstrdup(value);
- new->next = man_viewer_info_list;
- man_viewer_info_list = new;
-}
-
-static int add_man_viewer_path(const char *name,
- size_t len,
- const char *value)
-{
- if (supported_man_viewer(name, len))
- do_add_man_viewer_info(name, len, value);
- else
- warning("'%s': path for unsupported man viewer.\n"
- "Please consider using 'man.<tool>.cmd' instead.",
- name);
-
- return 0;
-}
-
-static int add_man_viewer_cmd(const char *name,
- size_t len,
- const char *value)
-{
- if (supported_man_viewer(name, len))
- warning("'%s': cmd for supported man viewer.\n"
- "Please consider using 'man.<tool>.path' instead.",
- name);
- else
- do_add_man_viewer_info(name, len, value);
-
- return 0;
-}
-
-static int add_man_viewer_info(const char *var, const char *value)
-{
- const char *name = var + 4;
- const char *subkey = strrchr(name, '.');
-
- if (!subkey)
- return error("Config with no key for man viewer: %s", name);
-
- if (!strcmp(subkey, ".path")) {
- if (!value)
- return config_error_nonbool(var);
- return add_man_viewer_path(name, subkey - name, value);
- }
- if (!strcmp(subkey, ".cmd")) {
- if (!value)
- return config_error_nonbool(var);
- return add_man_viewer_cmd(name, subkey - name, value);
- }
-
- warning("'%s': unsupported man viewer sub key.", subkey);
- return 0;
-}
-
-static int git_help_config(const char *var, const char *value, void *cb)
-{
- if (!strcmp(var, "help.format")) {
- if (!value)
- return config_error_nonbool(var);
- help_format = parse_help_format(value);
- return 0;
- }
- if (!strcmp(var, "man.viewer")) {
- if (!value)
- return config_error_nonbool(var);
- add_man_viewer(value);
- return 0;
- }
- if (!prefixcmp(var, "man."))
- return add_man_viewer_info(var, value);
-
- return git_default_config(var, value, cb);
-}
-
/* most GUI terminals set COLUMNS (although some don't export it) */
static int term_columns(void)
{
@@ -295,14 +25,6 @@ static int term_columns(void)
return 80;
}
-static inline void mput_char(char c, unsigned int num)
-{
- while(num--)
- putchar(c);
-}
-
-struct cmdnames main_cmds, other_cmds;
-
void add_cmdname(struct cmdnames *cmds, const char *name, int len)
{
struct cmdname *ent = xmalloc(sizeof(*ent) + len + 1);
@@ -526,23 +248,6 @@ void list_commands(const char *title, unsigned int longest,
}
}
-void list_common_cmds_help(void)
-{
- int i, longest = 0;
-
- for (i = 0; i < ARRAY_SIZE(common_cmds); i++) {
- if (longest < strlen(common_cmds[i].name))
- longest = strlen(common_cmds[i].name);
- }
-
- puts("The most commonly used git commands are:");
- for (i = 0; i < ARRAY_SIZE(common_cmds); i++) {
- printf(" %s ", common_cmds[i].name);
- mput_char(' ', longest - strlen(common_cmds[i].name));
- puts(common_cmds[i].help);
- }
-}
-
int is_in_cmdlist(struct cmdnames *c, const char *s)
{
int i;
@@ -552,128 +257,6 @@ int is_in_cmdlist(struct cmdnames *c, const char *s)
return 0;
}
-static int is_git_command(const char *s)
-{
- return is_in_cmdlist(&main_cmds, s) ||
- is_in_cmdlist(&other_cmds, s);
-}
-
-static const char *prepend(const char *prefix, const char *cmd)
-{
- size_t pre_len = strlen(prefix);
- size_t cmd_len = strlen(cmd);
- char *p = xmalloc(pre_len + cmd_len + 1);
- memcpy(p, prefix, pre_len);
- strcpy(p + pre_len, cmd);
- return p;
-}
-
-static const char *cmd_to_page(const char *git_cmd)
-{
- if (!git_cmd)
- return "git";
- else if (!prefixcmp(git_cmd, "git"))
- return git_cmd;
- else if (is_git_command(git_cmd))
- return prepend("git-", git_cmd);
- else
- return prepend("git", git_cmd);
-}
-
-static void setup_man_path(void)
-{
- struct strbuf new_path;
- const char *old_path = getenv("MANPATH");
-
- strbuf_init(&new_path, 0);
-
- /* We should always put ':' after our path. If there is no
- * old_path, the ':' at the end will let 'man' to try
- * system-wide paths after ours to find the manual page. If
- * there is old_path, we need ':' as delimiter. */
- strbuf_addstr(&new_path, GIT_MAN_PATH);
- strbuf_addch(&new_path, ':');
- if (old_path)
- strbuf_addstr(&new_path, old_path);
-
- setenv("MANPATH", new_path.buf, 1);
-
- strbuf_release(&new_path);
-}
-
-static void exec_viewer(const char *name, const char *page)
-{
- const char *info = get_man_viewer_info(name);
-
- if (!strcasecmp(name, "man"))
- exec_man_man(info, page);
- else if (!strcasecmp(name, "woman"))
- exec_woman_emacs(info, page);
- else if (!strcasecmp(name, "konqueror"))
- exec_man_konqueror(info, page);
- else if (info)
- exec_man_cmd(info, page);
- else
- warning("'%s': unknown man viewer.", name);
-}
-
-static void show_man_page(const char *git_cmd)
-{
- struct man_viewer_list *viewer;
- const char *page = cmd_to_page(git_cmd);
-
- setup_man_path();
- for (viewer = man_viewer_list; viewer; viewer = viewer->next)
- {
- exec_viewer(viewer->name, page); /* will return when unable */
- }
- exec_viewer("man", page);
- die("no man viewer handled the request");
-}
-
-static void show_info_page(const char *git_cmd)
-{
- const char *page = cmd_to_page(git_cmd);
- setenv("INFOPATH", GIT_INFO_PATH, 1);
- execlp("info", "info", "gitman", page, NULL);
-}
-
-static void get_html_page_path(struct strbuf *page_path, const char *page)
-{
- struct stat st;
- const char *html_path = system_path(GIT_HTML_PATH);
-
- /* Check that we have a git documentation directory. */
- if (stat(mkpath("%s/git.html", html_path), &st)
- || !S_ISREG(st.st_mode))
- die("'%s': not a documentation directory.", html_path);
-
- strbuf_init(page_path, 0);
- strbuf_addf(page_path, "%s/%s.html", html_path, page);
-}
-
-/*
- * If open_html is not defined in a platform-specific way (see for
- * example compat/mingw.h), we use the script web--browse to display
- * HTML.
- */
-#ifndef open_html
-void open_html(const char *path)
-{
- execl_git_cmd("web--browse", "-c", "help.browser", path, NULL);
-}
-#endif
-
-static void show_html_page(const char *git_cmd)
-{
- const char *page = cmd_to_page(git_cmd);
- struct strbuf page_path; /* it leaks but we exec bellow */
-
- get_html_page_path(&page_path, page);
-
- open_html(page_path.buf);
-}
-
void help_unknown_cmd(const char *cmd)
{
fprintf(stderr, "git: '%s' is not a git-command. See 'git --help'.\n", cmd);
@@ -685,50 +268,3 @@ int cmd_version(int argc, const char **argv, const char *prefix)
printf("git version %s\n", git_version_string);
return 0;
}
-
-int cmd_help(int argc, const char **argv, const char *prefix)
-{
- int nongit;
- const char *alias;
- unsigned int longest = load_command_list("git-", &main_cmds, &other_cmds);
-
- setup_git_directory_gently(&nongit);
- git_config(git_help_config, NULL);
-
- argc = parse_options(argc, argv, builtin_help_options,
- builtin_help_usage, 0);
-
- if (show_all) {
- printf("usage: %s\n\n", git_usage_string);
- list_commands("git commands", longest, &main_cmds, &other_cmds);
- printf("%s\n", git_more_info_string);
- return 0;
- }
-
- if (!argv[0]) {
- printf("usage: %s\n\n", git_usage_string);
- list_common_cmds_help();
- printf("\n%s\n", git_more_info_string);
- return 0;
- }
-
- alias = alias_lookup(argv[0]);
- if (alias && !is_git_command(argv[0])) {
- printf("`git %s' is aliased to `%s'\n", argv[0], alias);
- return 0;
- }
-
- switch (help_format) {
- case HELP_FORMAT_MAN:
- show_man_page(argv[0]);
- break;
- case HELP_FORMAT_INFO:
- show_info_page(argv[0]);
- break;
- case HELP_FORMAT_WEB:
- show_html_page(argv[0]);
- break;
- }
-
- return 0;
-}
diff --git a/help.h b/help.h
index d614e54..3f1ae89 100644
--- a/help.h
+++ b/help.h
@@ -10,6 +10,12 @@ struct cmdnames {
} **names;
};
+static inline void mput_char(char c, unsigned int num)
+{
+ while(num--)
+ putchar(c);
+}
+
unsigned int load_command_list(const char *prefix,
struct cmdnames *main_cmds,
struct cmdnames *other_cmds);
--
1.6.0.rc0.14.g95f8.dirty
^ permalink raw reply related
* [PATCH] git-gui: Update German translation
From: Christian Stimming @ 2008-08-02 7:56 UTC (permalink / raw)
To: git; +Cc: Shawn Pearce
[-- Attachment #1: Type: text/plain, Size: 65 bytes --]
The subject says it all. Thanks for the new features.
Christian
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-git-gui-Update-German-translation.patch --]
[-- Type: text/x-diff; charset="us-ascii"; name="0001-git-gui-Update-German-translation.patch", Size: 5642 bytes --]
From 9d1e970ced1ca4bacfe27901d239cb148b0b87da Mon Sep 17 00:00:00 2001
From: Christian Stimming <stimming@tuhh.de>
Date: Sat, 2 Aug 2008 09:54:51 +0200
Subject: [PATCH] git-gui: Update German translation
---
po/de.po | 102 ++++++++++++++++++++++++++++++++++++++++++-------------------
1 files changed, 70 insertions(+), 32 deletions(-)
diff --git a/po/de.po b/po/de.po
index f20955c..fa43947 100644
--- a/po/de.po
+++ b/po/de.po
@@ -7,8 +7,8 @@ msgid ""
msgstr ""
"Project-Id-Version: git-gui\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2008-03-14 07:18+0100\n"
-"PO-Revision-Date: 2008-05-01 11:51+0200\n"
+"POT-Creation-Date: 2008-08-02 08:58+0200\n"
+"PO-Revision-Date: 2008-08-02 09:09+0200\n"
"Last-Translator: Christian Stimming <stimming@tuhh.de>\n"
"Language-Team: German\n"
"MIME-Version: 1.0\n"
@@ -134,18 +134,11 @@ msgstr "Konfliktauflösung nötig"
msgid "Starting gitk... please wait..."
msgstr "Gitk wird gestartet... bitte warten."
-#: git-gui.sh:1653
-#, tcl-format
-msgid ""
-"Unable to start gitk:\n"
-"\n"
-"%s does not exist"
-msgstr ""
-"Gitk kann nicht gestartet werden:\n"
-"\n"
-"%s existiert nicht"
+#: git-gui.sh:1698
+msgid "Couldn't find gitk in PATH"
+msgstr "Gitk kann im PATH nicht gefunden werden."
-#: git-gui.sh:1860 lib/choose_repository.tcl:36
+#: git-gui.sh:1948 lib/choose_repository.tcl:36
msgid "Repository"
msgstr "Projektarchiv"
@@ -294,7 +287,15 @@ msgstr "Aus der Bereitstellung herausnehmen"
msgid "Revert Changes"
msgstr "Änderungen verwerfen"
-#: git-gui.sh:2049 git-gui.sh:2368 git-gui.sh:2467
+#: git-gui.sh:2141 git-gui.sh:2702
+msgid "Show Less Context"
+msgstr "Weniger Zeilen anzeigen"
+
+#: git-gui.sh:2145 git-gui.sh:2706
+msgid "Show More Context"
+msgstr "Mehr Zeilen anzeigen"
+
+#: git-gui.sh:2151 git-gui.sh:2470 git-gui.sh:2569
msgid "Sign Off"
msgstr "Abzeichnen"
@@ -314,11 +315,7 @@ msgstr "Zusammenführen abbrechen..."
msgid "Push..."
msgstr "Versenden..."
-#: git-gui.sh:2092 lib/choose_repository.tcl:41
-msgid "Apple"
-msgstr "Apple"
-
-#: git-gui.sh:2095 git-gui.sh:2117 lib/about.tcl:14
+#: git-gui.sh:2197 git-gui.sh:2219 lib/about.tcl:14
#: lib/choose_repository.tcl:44 lib/choose_repository.tcl:50
#, tcl-format
msgid "About %s"
@@ -403,15 +400,11 @@ msgstr "Datei:"
msgid "Apply/Reverse Hunk"
msgstr "Kontext anwenden/umkehren"
-#: git-gui.sh:2595
-msgid "Show Less Context"
-msgstr "Weniger Zeilen anzeigen"
+#: git-gui.sh:2696
+msgid "Apply/Reverse Line"
+msgstr "Zeile anwenden/umkehren"
-#: git-gui.sh:2602
-msgid "Show More Context"
-msgstr "Mehr Zeilen anzeigen"
-
-#: git-gui.sh:2610
+#: git-gui.sh:2711
msgid "Refresh"
msgstr "Aktualisieren"
@@ -427,11 +420,19 @@ msgstr "Schriftgröße vergrößern"
msgid "Unstage Hunk From Commit"
msgstr "Kontext aus Bereitstellung herausnehmen"
-#: git-gui.sh:2648
+#: git-gui.sh:2748
+msgid "Unstage Line From Commit"
+msgstr "Zeile aus der Bereitstellung herausnehmen"
+
+#: git-gui.sh:2750
msgid "Stage Hunk For Commit"
msgstr "Kontext zur Bereitstellung hinzufügen"
-#: git-gui.sh:2667
+#: git-gui.sh:2751
+msgid "Stage Line For Commit"
+msgstr "Zeile zur Bereitstellung hinzufügen"
+
+#: git-gui.sh:2771
msgid "Initializing..."
msgstr "Initialisieren..."
@@ -493,7 +494,11 @@ msgstr "Version:"
msgid "Copy Commit"
msgstr "Version kopieren"
-#: lib/blame.tcl:384
+#: lib/blame.tcl:260
+msgid "Do Full Copy Detection"
+msgstr "Volle Kopie-Erkennung"
+
+#: lib/blame.tcl:388
#, tcl-format
msgid "Reading %s..."
msgstr "%s lesen..."
@@ -514,7 +519,19 @@ msgstr "Annotierungen für ursprünglichen Ort werden geladen..."
msgid "Annotation complete."
msgstr "Annotierung vollständig."
-#: lib/blame.tcl:746
+#: lib/blame.tcl:737
+msgid "Busy"
+msgstr "Verarbeitung läuft"
+
+#: lib/blame.tcl:738
+msgid "Annotation process is already running."
+msgstr "Annotierung läuft bereits."
+
+#: lib/blame.tcl:777
+msgid "Running thorough copy detection..."
+msgstr "Intensive Kopie-Erkennung läuft..."
+
+#: lib/blame.tcl:827
msgid "Loading annotation..."
msgstr "Annotierung laden..."
@@ -759,7 +776,12 @@ msgstr "Schließen"
msgid "Branch '%s' does not exist."
msgstr "Zweig »%s« existiert nicht."
-#: lib/checkout_op.tcl:206
+#: lib/checkout_op.tcl:193
+#, tcl-format
+msgid "Failed to configure simplified git-pull for '%s'."
+msgstr "Fehler beim Einrichten der vereinfachten git-pull für »%s«."
+
+#: lib/checkout_op.tcl:228
#, tcl-format
msgid ""
"Branch '%s' already exists.\n"
@@ -1485,6 +1507,14 @@ msgstr ""
msgid "Failed to stage selected hunk."
msgstr "Fehler beim Bereitstellen des gewählten Kontexts."
+#: lib/diff.tcl:386
+msgid "Failed to unstage selected line."
+msgstr "Fehler beim Herausnehmen der gewählten Zeile aus der Bereitstellung."
+
+#: lib/diff.tcl:394
+msgid "Failed to stage selected line."
+msgstr "Fehler beim Bereitstellen der gewählten Zeile."
+
#: lib/error.tcl:20 lib/error.tcl:114
msgid "error"
msgstr "Fehler"
@@ -1750,6 +1780,14 @@ msgid "Match Tracking Branches"
msgstr "Passend zu Übernahmezweig"
#: lib/option.tcl:126
+msgid "Blame Copy Only On Changed Files"
+msgstr "Kopie-Annotieren nur bei geänderten Dateien"
+
+#: lib/option.tcl:127
+msgid "Minimum Letters To Blame Copy On"
+msgstr "Mindestzahl Zeichen für Kopie-Annotieren"
+
+#: lib/option.tcl:128
msgid "Number of Diff Context Lines"
msgstr "Anzahl der Kontextzeilen beim Vergleich"
--
1.5.5.1.316.g377d9
^ permalink raw reply related
* Re: email address handling
From: Johannes Schindelin @ 2008-08-02 11:03 UTC (permalink / raw)
To: Junio C Hamano; +Cc: Andrew Morton, Linus Torvalds, git
In-Reply-To: <7v4p64sa07.fsf@gitster.siamese.dyndns.org>
Hi,
On Fri, 1 Aug 2008, Junio C Hamano wrote:
> Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
>
> > On Fri, 1 Aug 2008, Andrew Morton wrote:
> >
> >> I very very frequently copy and paste name+email address out of git
> >> output and into an MUA. Have done it thousands and thousands of times,
> >> and it has always worked. I'm sure that many others do the same thing.
>
> >
> > $ git log --pretty=email
> >
> > after this patch:
>
> You are quoting only Author: and not Signed-off-by: and Cc: that are used
> for e-mail purposes.
You might have realized that this was not a proper patch with a commit
message and a SOB?
As for Cc: I agree. But not for S-O-B: this is not an email header. And
I was very specific in only changing the behavior for "pretty=email".
At least _I_ was surprised that pretty=email did not behave as if it was
outputting email headers.
I agree with Linus for pretty=non-email, but not at all for pretty=email.
> I already said send-email is the right place to do this kind of thing,
> didn't I?
For the given scenario send-email is completely irrelevant.
Ciao,
Dscho
^ permalink raw reply
* Re: Is there any hope (format-patch)??
From: Matti Kaasinen @ 2008-08-02 11:04 UTC (permalink / raw)
To: git
Thanks Daniel,
some comments
> ------------------------------------------------------------------------
> On Fri, 1 Aug 2008, Matti Kaasinen wrote:
>
> >/ Hi!/
> >/ /
> >/ Is there any hope with following procedure:/
> >/ I took reporitory from linux git:/
> >/ # git clone/
> >/ git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git/
> >/ /
> >/ For getting patches to make recent version from v2.6.26-rc3 I executed:/
> >/ # git format-patch -o patchdir v2.6.26-rc3..origin/
>
> format-patch isn't going to work too well with non-linear history. When
> two people make nearby or overlapping changes which get merged later, and
> this gets turned into a linear sequence of changes, there's no
> possible patch that will accurately reflect the change which got ordered
> second.
>
> >/ Then I checked out v2.6.26-rc3 to a new branch and patched it with/
> >/ at91patch/maxim.org.za that was produced against v2.6.26-rc3. That worked out/
> >/ without complaints./
>
> It sounds like you really just want to do "merge origin" now, and skip the
> whole patch series thing.
>
Ok, I'll try how it works, when I get back to my desk. Well, I'm running
out of time and possibly I need to stay in the current version.
> You'll probably get some conflicts (or applying the patch directly to
> origin would have worked),
There came quite a lot of complaints from patching directly the origin.
Strange that some were complaints of trying to re-create files. So, I
just wonder if that patching really is needed. I suppose I should try to
ask that from maxim.org.za
> but they should be relatively easy to resolve.
>
Well, hope so - direct patching to origin gave quite lot of complaints.
-Matti
^ permalink raw reply
* Re: email address handling
From: Johannes Schindelin @ 2008-08-02 11:31 UTC (permalink / raw)
To: Linus Torvalds; +Cc: Andrew Morton, Theodore Tso, Junio C Hamano, git
In-Reply-To: <alpine.LFD.1.10.0808011608150.6819@nehalem.linux-foundation.org>
Hi,
On Fri, 1 Aug 2008, Linus Torvalds wrote:
> The thing is, you can actually get git to output the crazy names. Just
> do
>
> git show --pretty=email 37a4c940749670671adab211a2d9c9fed9f3f757
>
> and now you get the email-prettified thing for at least the author.
Ah, there lies the rub (you forgot that the original complaint was about
a comma, and pretty=email does not handle those):
-- snipsnap --
pretty.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/pretty.c b/pretty.c
index 33ef34a..9db0333 100644
--- a/pretty.c
+++ b/pretty.c
@@ -79,7 +79,8 @@ int non_ascii(int ch)
static int is_rfc2047_special(char ch)
{
- return (non_ascii(ch) || (ch == '=') || (ch == '?') || (ch == '_'));
+ return (non_ascii(ch) || (ch == '=') || (ch == '?') || (ch == '_') ||
+ (ch == ',') || (ch == '"') || (ch == '\''));
}
static void add_rfc2047(struct strbuf *sb, const char *line, int len,
@@ -89,7 +90,7 @@ static void add_rfc2047(struct strbuf *sb, const char *line, int len,
for (i = 0; i < len; i++) {
int ch = line[i];
- if (non_ascii(ch))
+ if (is_rfc2047_special(ch))
goto needquote;
if ((i + 1 < len) && (ch == '=' && line[i+1] == '?'))
goto needquote;
^ permalink raw reply related
* Re: [PATCH] diff: add ruby funcname pattern
From: Johannes Schindelin @ 2008-08-02 11:39 UTC (permalink / raw)
To: Giuseppe Bilotta; +Cc: Kevin Ballard, Junio C Hamano, git
In-Reply-To: <cb7bb73a0808012306y5672dad9nd0a21f861f181e5b@mail.gmail.com>
Hi,
On Sat, 2 Aug 2008, Giuseppe Bilotta wrote:
> On Sat, Aug 2, 2008 at 7:47 AM, Kevin Ballard <kevin@sb.org> wrote:
> >
> > If you're going to get into anonymous code blocks, you're going to have a
> > really tough time deciding which blocks are interesting and which aren't.
> > And as you stated before, without a stack-based approach, this could really
> > fall apart, as anonymous blocks are (almost) always going to be inside a
> > method.
>
> I was just looking for a libxdiff issue tracker but I couldn't find one,
> so I guess I'll ask the author directly about the possibility to
> implement such a thing.
The funcname thing was introduced by us, in Git. I do not know if Davide
picked the changes up; at least for the merge stuff he seemed to be pretty
reluctant.
> The matchit plugin for vim seems to manage (even user-defined) code
> blocks very well, even for multi-state blocks (if ... else ... end),
> using regexps; so maybe a reimplementation in C for libxdiff could be a
> solution.
Bzzt. You say vi manages it with regexps, and then you go on and say that
you therefore do _not_ want to use a regexp?
BTW having funcname calculation in C was shot down by Junio as being too
inflexible, as the user cannot add new languages without recompiling.
That's why we have regexps now.
Ciao,
Dscho
^ permalink raw reply
* Re: [PATCH] diff: add ruby funcname pattern
From: Giuseppe Bilotta @ 2008-08-02 11:50 UTC (permalink / raw)
To: Johannes Schindelin; +Cc: Kevin Ballard, Junio C Hamano, git
In-Reply-To: <alpine.DEB.1.00.0808021336050.9611@pacific.mpi-cbg.de.mpi-cbg.de>
Hello,
On Sat, Aug 2, 2008 at 1:39 PM, Johannes Schindelin
<Johannes.Schindelin@gmx.de> wrote:
> The funcname thing was introduced by us, in Git. I do not know if Davide
> picked the changes up; at least for the merge stuff he seemed to be pretty
> reluctant.
Ah, it's a Git-only thing? didn't know about that. I guess that
knowing that git's libxdiff is already hacked up from the original
means I can think more freely about hacking it up some more, if I can
come up with a proper solution 8-)
>> The matchit plugin for vim seems to manage (even user-defined) code
>> blocks very well, even for multi-state blocks (if ... else ... end),
>> using regexps; so maybe a reimplementation in C for libxdiff could be a
>> solution.
>
> Bzzt. You say vi manages it with regexps, and then you go on and say that
> you therefore do _not_ want to use a regexp?
>
> BTW having funcname calculation in C was shot down by Junio as being too
> inflexible, as the user cannot add new languages without recompiling.
> That's why we have regexps now.
Sorry, I think there's a misunderstanding here ... I have all
intentions to use regexps. What I was planning on reimplementing in C
was the way matchit uses the regexps to determine the blocks (because,
obviously, it being a vim script means it's coded in vim's own
langauge instead of C). The actual definitions for the start and end
of the block would still be done via regexps. 8-)
--
Giuseppe "Oblomov" Bilotta
^ permalink raw reply
* [PATCH] diff: chapter and part in funcname for tex
From: Giuseppe Bilotta @ 2008-08-02 11:55 UTC (permalink / raw)
To: git; +Cc: Junio C Hamano, Giuseppe Bilotta
In-Reply-To: <1217658945-29908-1-git-send-email-giuseppe.bilotta@gmail.com>
This patch enhances the tex funcname by adding support for
chapter and part sectioning commands. It also matches
the starred version of the sectioning commands.
Signed-off-by: Giuseppe Bilotta <giuseppe.bilotta@gmail.com>
---
Resend, with Signed-off-by: line
diff.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/diff.c b/diff.c
index c253015..776bce1 100644
--- a/diff.c
+++ b/diff.c
@@ -1380,7 +1380,7 @@ static struct builtin_funcname_pattern {
"^[ ]*\\(\\([ ]*"
"[A-Za-z_][A-Za-z_0-9]*\\)\\{2,\\}"
"[ ]*([^;]*\\)$" },
- { "tex", "^\\(\\\\\\(sub\\)*section{.*\\)$" },
+ { "tex", "^\\(\\\\\\(\\(sub\\)*section\\|chapter\\|part\\)\\*\\?{.*\\)$" },
{ "ruby", "^\\s*\\(\\(class\\|module\\|def\\)\\s.*\\)$" },
};
--
1.5.6.3
^ permalink raw reply related
* Re: [PATCH] Respect crlf attribute even if core.autocrlf has not been set
From: Eyvind Bernhardsen @ 2008-08-02 12:51 UTC (permalink / raw)
To: Dmitry Potapov
Cc: Johannes Schindelin, Avery Pennarun, Joshua Jensen,
Junio C Hamano, git
In-Reply-To: <20080730214521.GC7008@dpotapov.dyndns.org>
On 30. juli. 2008, at 23.45, Dmitry Potapov wrote:
> On Tue, Jul 29, 2008 at 11:17:23PM +0200, Eyvind Bernhardsen wrote:
>>
>> My point was that autocrlf penalises Windows users just as much as it
>> does Linux users, so why should it be turned on by default on
>> Windows?
>
> Because it does make sense on Windows (I mentioned some reasons for
> that
> in my previous email), and it does NOT make any sense on Linux unless
> you copy files from Windows.
It doesn't make any more sense on Windows than it does on Linux,
unless the user is careless about CRLFs and the repository will be
shared with Linux users. If you have to work with undisciplined
Windows users but don't actually use Windows yourself, it might _seem_
to make sense, but that is an illusion.
>>> And the main argument for having that in this way is that people
>>> with LF
>>> text files should be unnecessary penalized for Windows being
>>> different.
>>
>> I know, but my point is that I don't like to be unnecessarily
>> penalised any more when I am using Windows than when I'm using Linux
>> or OS X.
>
> It seems you still have not realized that from the very day when you
> started to use Windows, you are penalized for that day-in, day-out.
> Let's take something simple. For instance, the hello-world program:
> cat <<=== > hello.c
> #include <stdio.h>
> int main() {
> printf ("Hello world!\n");
> return 0;
> }
> ===
>
> You can compile it on Linux and Windows (using Microsoft Visual C).
> Now, if you run it on Linux, it will print 13 symbols (exactly
> as many as there are symbols in the printf string) while on Windows
> you will get 14 bytes. It means that printf and as many other C
> function on Windows does conversion and penalize you already!
But I don't use printf to store files. What does printf have to do
with anything?
Btw, I'm not actually a "natural" Windows user; I have a Mac on my
desktop, and I prefer Linux to Windows on my own PCs. I often use
Windows at work, though, and I'm trying to make Git work as well as
possible when I do.
>> I would like the default to be "no conversion", and for
>> conversion to be enabled not based on platform, but as a policy
>> decision on the repositories where it actually matters.
>
> If Microsoft C library did not do any conversion, I suspect we would
> have this CRLF conversion at all!
Surely, but unfortunately, I don't live in happy fairy land.
>> You can have anything you like in _your_ repository, of course, but
>> if
>> you're not publishing it anywhere, who cares what your line endings
>> are? Your line endings only matter when you publish.
>
> You can publish only what you have. So, it must decided before.
Yes! Someone should decide that the repository should only have LFs
in it, then flag it as such so that Git can respect that decision.
>> That's why I
>> want a setting that is propagated: so that when you clone a
>> repository
>> with a LF-only policy, Git knows what to do.
>
> LF-only policy is the only sane policy for any text files. It has
> nothing
> to do with clone.
Gah! So close, but so far. What about a repository which already has
CRLFs in it? You're telling me that it shouldn't have CRLFs in it,
which is almost entirely unhelpful.
>> I think the real penalty is that with autocrlf enabled, Git no longer
>> stores exactly what I committed.
>
> And what is wrong with that? In any case, Git deltifies and compress
> your files. Why does it not bother you? So, what matters here is
> whether you are able to get back exactly what you put or not. That's
> why Git has this safecrlf option! Of course, it is guarantee to get
> exactly the same back only if you have the same autocrlf setting,
> but if you have different autocrlf settings, it means that you want
> *different* representation of text files!
My point is that if I commit two files with different line endings, I
want Git to store them that way. Works on Linux by default, doesn't
work on Windows by default. Deltification and compression are
irrelevant since they don't change the content. autocrlf does.
You only want to normalise text files if you (a) have undisciplined
committers, and (b) need to share the repository between Windows and
Unix. Right now, the default configuration of Git assumes that all
Windows users are undisciplined, and that they will always be sharing
repositories with Unix users.
>>> Of course, those who are very careful and have good editors can set
>>> autocrlf=false even on Windows...
>>
>> Right, or who know that the repository they're using will only be
>> shared with other Windows users.
>
> WRONG! Using storing CRLF in text files is a completely idiotic idea.
> Those who do so asked for troubles, so they should not complain!
But some text files need CRLFs, the autocrlf mechanism even caters for
them. And it's not like the extra CR actually hurts anything; I use
Git on Windows with "autocrlf=false", and I've yet to see any problems
with it. The reason I've changed from the default "autocrlf=true" is
that I've seen plenty of problems with that.
>> Internally, Git doesn't really care, does it?
>
> It DOES!!! Such things like merges and diffs and many other every day
> commands do care about end-of-lines and the ONLY end-of-line they
> recognize is '\n'. In fact, there are more than 400 places in Git
> where
> '\n' is used. Of course, not all of them may be qualified as internals
> but many of them do.
Buh? That's crazy talk. The only time CRLFs cause trouble with git
is when autocrlf is enabled. Try this:
git init
echo -n "testing\r\ntesting 2\r\n" > testing
git add testing
git commit
git config --bool --add core.autocrlf true
touch testing
git diff
File with CRLF in the repository, file with CRLF in the working
directory, so where does the difference come from? The same thing
happens with "autocrlf=input", and the problem is obviously a lot
bigger when you're trying to merge.
Now I've shown you when autocrlf is a problem, you show me a case
where CRLFs cause trouble with autocrlf=false.
> So, as long as Git internally consider only LF as the end-of-line.
Bah. To the extent it "cares", Git just sees CR as an extra white
space character before the end-of-line LF, and you know it.
>> Heh. Where I work, we hacked CVS for Windows to get away from that
>> behaviour :)
>
> Maybe, you used Cygwin version of CVS, which had LF, but those Windows
> versions of CVS I used produced CRLF on Windows.
No, we just compiled our own, precisely because we didn't want CVS to
mangle our data, even on Windows. The CVS repositories are used by
Linux and Windows clients, and some developers had their working
directories on cross-platform network shares, so eol conversion just
caused unnecessary problems.
>> Well, what I want is to be able to say "it is necessary to do eol
>> conversion in this repository",
>
> You always can do that in _your_ repository:
> git config core.autocrlf ...
I can, except that (a) any CRLFs already in the repository will cause
trouble, and (b) everyone who clones from me has to make the same
setting manually, or they won't follow the same convention.
>> allowing the default to be "don't do
>> eol conversion" on Windows, too. For a setting like that to be
>> useful, it has to be propagated when the repository is cloned.
>
> Why? Other people may have other preferences.
Yes. Other people may have other preferences which will lead them to
push CRLFs to my repository. That is why the setting should be
propagated.
>> I want it to be versioned because you might want to change it without
>> messing with the content that's already in the repository. This is
>> actually my main motivation, since I have lots of CRLF-infused CVS
>> history to deal with.
>
> Well, you can try to use .gitattributes, but I believe it would be far
> more reasonable to clean this mess with line-ending than finding a
> way to continue insanity with different ending in different text
> files.
But I'd rather not change the historical data in every repository. So
yes, I think it's a good idea to clean up the line endings, but I
would like to do it in a way that allows me to check out an old
version with mixed line endings while still ensuring that newly
committed files are normalised.
>> It should apply on Linux as well as Windows because there is always
>> the chance that a user will manage to commit a CRLF on Linux (a
>> colleague of mine once complained that CVS on Linux doesn't do eol
>> conversion; he edited files on Windows, but checked them in on
>> Linux).
>
> For those who need it, Git provides autocrlf=input. But the question
> here is what should be default. I don't think that those who copies
> files directly from Windows to Linux are majority. OTOH, I don't
> mind autocrlf=input as default. If it can be turned off, it is fine
> with me :)
Yeah, if autocrlf is set, it probably makes sense to use it, i.e.
anyone who doesn't want line ending conversion at all can set
"autocrlf=false".
>> It would probably be okay to have a setting that turns all
>> conversion off, but wouldn't that be kind of rude?
>
> How so?
You're explicitly saying "I don't care if I commit CRLFs into a
repository that requests only LFs". So you're probably only saying it
because you know you won't commit CRLFs anyway, but since the cost is
so low, why not make sure?
--
Eyvind Bernhardsen
^ permalink raw reply
* [PATCH] git-svn.perl: Strip ChangeLog bits.
From: Jan Nieuwenhuizen @ 2008-08-02 13:42 UTC (permalink / raw)
To: git
Some projects write ChangeLog entries and use those for svn
commit messages. Converting such a repository makes for
a most uninteresting git log --pretty=oneline output.
482cfc6... 2008-08-01 Kohei Yoshida <kyoshida@novell.com>
90c16d7... 2008-08-01 Fong Lin <pflin@novell.com> * patches/dev300/cws-npow
505fc23... 2008-08-01 Kohei Yoshida <kyoshida@novell.com>
4729379... 2008-08-01 Kohei Yoshida <kyoshida@novell.com>
9e34b85... 2008-07-31 Kohei Yoshida <kyoshida@novell.com>
ee1855a... 2008-07-31 Jan Nieuwenhuizen <janneke@gnu.org>
518b921... 2008-07-31 Miklos Vajna <vmiklos@frugalware.org>
The --cut-changelog-bits fixes this
44e7784... patches/dev300/apply: added upstream issue numbers to some of my p
1a19026... patches/dev300/cws-npower11.diff: Add vba events stuff.
7422531... patches/test/calc-external-defined-names.diff: more progress; make
66c5975... scratch/sc-xlsutil/src/formula.py:
307fa53... patches/dev300/chart-subtitle-xls-export.diff: preserve the subtitl
0d127af... patches/dev300/layout-simple-dialogs-toolkit.diff: Remove duplicate
843d41e... patches/dev300/apply: Remove gcc401-stlport45-include.diff from Fru
partly. I tried removing the file name bits too, but that makeslog
entries that touch multiple files almost useless.
Signed-off-by: Jan Nieuwenhuizen <Jan Nieuwenhuizen janneke@gnu.org>
---
git-svn.perl | 11 ++++++++++-
1 files changed, 10 insertions(+), 1 deletions(-)
diff --git a/git-svn.perl b/git-svn.perl
index cf6dbbc..651739a 100755
--- a/git-svn.perl
+++ b/git-svn.perl
@@ -66,7 +66,7 @@ my ($_stdin, $_help, $_edit,
$_version, $_fetch_all, $_no_rebase,
$_merge, $_strategy, $_dry_run, $_local,
$_prefix, $_no_checkout, $_url, $_verbose,
- $_git_format);
+ $_git_format, $_cut_changelog_bits);
$Git::SVN::_follow_parent = 1;
my %remote_opts = ( 'username=s' => \$Git::SVN::Prompt::_username,
'config-dir=s' => \$Git::SVN::Ra::config_dir,
@@ -109,9 +109,11 @@ my %cmd = (
fetch => [ \&cmd_fetch, "Download new revisions from SVN",
{ 'revision|r=s' => \$_revision,
'fetch-all|all' => \$_fetch_all,
+ 'cut-changelog-bits' => \$_cut_changelog_bits,
%fc_opts } ],
clone => [ \&cmd_clone, "Initialize and fetch revisions",
{ 'revision|r=s' => \$_revision,
+ 'cut-changelog-bits' => \$_cut_changelog_bits,
%fc_opts, %init_opts } ],
init => [ \&cmd_init, "Initialize a repo for tracking" .
" (requires URL argument)",
@@ -2463,6 +2465,13 @@ sub make_log_entry {
close $un or croak $!;
$log_entry{date} = parse_svn_date($log_entry{date});
+ if (defined $_cut_changelog_bits) {
+ $log_entry{log} =~ s/(^|\n)\s*((\n|\s)*(199[0-9]|
20[0-1][0-9])(-[0-9]{2}){2}\s+.*<.*>\s*\n\s+)?/$1/g;
+ $log_entry{log} =~ s/(^|\n)\* /\n$1/g;
+ $log_entry{log} =~ s/^[\n\s]*//;
+ $log_entry{log} =~ s/\n\s*/ /g if length ($log_entry{log}) < 81;
+ $log_entry{log} .= "\n";
+ }
$log_entry{log} .= "\n";
my $author = $log_entry{author} = check_author($log_entry{author});
my ($name, $email) = defined $::users{$author} ? @{$::users{$author}}
--
1.6.0.rc0.44.g67270
--
Jan Nieuwenhuizen <janneke@gnu.org> | GNU LilyPond - The music typesetter
http://www.xs4all.nl/~jantien | http://www.lilypond.org
^ permalink raw reply related
* [PATCH not ready]: allow cvsimport to use compression when talking to remote cvs server
From: Arkadiusz Miskiewicz @ 2008-08-02 14:05 UTC (permalink / raw)
To: git
This patch adds ability to git cvsimport use compression
when talking to remote cvs pserver (in normal cvs client using compression
makes things a lot faster so it should help here, too).
Unfortunately it doesn't work due to: new IO::Uncompress::RawInflate()
hanging at constructor. No idea why constructor wants to do read()
over a socket. Maybe whole IO::Compress stuff isn't ready to work over
sockets (that's the question to perl gurus).
Fell free to make it working/improve it. I have no idea how to make it work
at this moment.
--- git-cvsimport.org 2008-08-02 12:00:25.342934972 +0200
+++ git-cvsimport 2008-08-02 16:01:33.588363079 +0200
@@ -27,6 +27,15 @@
use POSIX qw(strftime dup2 ENOENT);
use IPC::Open2;
+my $compress_support = 1;
+eval "use IO::Compress::RawDeflate; use IO::Uncompress::RawInflate";
+$compress_support = 0 if ($@);
+if ($compress_support) {
+ use IO::Compress::RawDeflate;
+ use IO::Uncompress::RawInflate;
+}
+
+
$SIG{'PIPE'}="IGNORE";
$ENV{'TZ'}="UTC";
@@ -312,7 +321,9 @@
my @cvs = ($cvs, 'server');
my ($local, $user, $host);
$local = $repo =~ s/:local://;
- if (!$local) {
+ if ($local) {
+ $compress_support = 0;
+ } else {
$repo =~ s/:ext://;
$local = !($repo =~ s/^(?:([^\@:]+)\@)?([^:]+)://);
($user, $host) = ($1, $2);
@@ -356,6 +367,12 @@
die "validReply: $res\n" if $res ne "ok";
$self->{'socketo'}->write("UseUnchanged\n") if $rep =~ /\bUseUnchanged\b/;
+ if ($compress_support and $rep =~ /\bGzip-stream\b/) {
+ my $level = 3; # make it cmd line option
+ $self->{'socketo'}->write("Gzip-stream $level\n");
+ $self->{'socketo'} = new IO::Compress::RawDeflate $self->{'socketo'},
Level => $level or die("Setting up gzip compression failed:
$IO::Compress::RawDeflate::RawDeflateError\n");
+ $self->{'socketi'} = new IO::Uncompress::RawInflate $self->{'socketi'},
Transparent => 0 or die("Setting up gzip uncompression failed:
$IO::Uncompress::RawInflate::RawInflateError\n");
+ }
$self->{'repo'} = $repo;
}
--
Arkadiusz Miśkiewicz PLD/Linux Team
arekm / maven.pl http://ftp.pld-linux.org/
^ permalink raw reply
* Re: [PATCH] diff: add ruby funcname pattern
From: Lee Marlow @ 2008-08-02 15:37 UTC (permalink / raw)
To: Giuseppe Bilotta; +Cc: Kevin Ballard, Junio C Hamano, git
In-Reply-To: <C871A30D-F2AF-4385-ABD4-C57F474D7F01@sb.org>
On Fri, Aug 1, 2008 at 11:47 PM, Kevin Ballard <kevin@sb.org> wrote:
> On Aug 1, 2008, at 10:41 PM, Giuseppe Bilotta wrote:
>
>> On Sat, Aug 2, 2008 at 2:31 AM, Kevin Ballard <kevin@sb.org> wrote:
>
> I think it's far simpler to stick with class/module/def.
>
I agree with Kevin.
It's simpler and I'm not sure what value it would bring to show
anonymous code blocks. The funcname is just to provide some
additional context around the diff hunk, so you know where you are.
What would be shown for an anonymous code block or proc in the diff?
The module/class/method seems to provide the most useful context.
-Lee
^ permalink raw reply
* [PATCH] gitweb: ref markers link to named shortlogs
From: Giuseppe Bilotta @ 2008-08-02 15:39 UTC (permalink / raw)
To: git; +Cc: Jakub Narebski, Petr Baudis, Giuseppe Bilotta
This patch turns ref markers for tags and heads into links to
shortlog/refname. Appropriate changes are made in the CSS to prevent ref
markers to be annoyingly blue and underlined.
Signed-off-by: Giuseppe Bilotta <giuseppe.bilotta@gmail.com>
---
gitweb/gitweb.css | 5 +++++
gitweb/gitweb.perl | 5 ++++-
2 files changed, 9 insertions(+), 1 deletions(-)
diff --git a/gitweb/gitweb.css b/gitweb/gitweb.css
index aa0eeca..2b43eea 100644
--- a/gitweb/gitweb.css
+++ b/gitweb/gitweb.css
@@ -481,6 +481,11 @@ span.refs span {
border-color: #ffccff #ff00ee #ff00ee #ffccff;
}
+span.refs span a {
+ text-decoration: none;
+ color: inherit;
+}
+
span.refs span.ref {
background-color: #aaaaff;
border-color: #ccccff #0033cc #0033cc #ccccff;
diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
index 90cd99b..7f391fa 100755
--- a/gitweb/gitweb.perl
+++ b/gitweb/gitweb.perl
@@ -1093,6 +1093,7 @@ sub format_log_line_html {
sub format_ref_marker {
my ($refs, $id) = @_;
my $markers = '';
+ my $htmltext;
if (defined $refs->{$id}) {
foreach my $ref (@{$refs->{$id}}) {
@@ -1101,13 +1102,15 @@ sub format_ref_marker {
if ($ref =~ m!^(.*?)s?/(.*)$!) {
$type = $1;
$name = $2;
+ $htmltext = $cgi->a({-href => href(action=>"shortlog", hash=>$name)}, $name);
} else {
$type = "ref";
$name = $ref;
+ $htmltext = esc_html($name);
}
$markers .= " <span class=\"$type\" title=\"$ref\">" .
- esc_html($name) . "</span>";
+ $htmltext . "</span>";
}
}
--
1.5.6.3
^ permalink raw reply related
* git svn and the post-receive hook
From: Pascal Obry @ 2008-08-02 16:05 UTC (permalink / raw)
To: git list
At the moment it seems to me that the post-receive hook is not called
when tracking a remove Subversion repository.
I think it would be nice to call the post-receive hook at the end of:
$ git svn rebase
Why I need this?
I'd like to check for example that if a file has been added to the
remote Subversion repository then it is properly added into a MANIFEST
file. I'd also like to check some style rules. This would help to detect
some problems when one has no way to add hooks on the Subversion repository.
I have zero experience with Perl so I do not feel like hacking this myself.
What do you think?
Is this already possible (I may have missed something)?
Thanks,
Pascal.
--
--|------------------------------------------------------
--| Pascal Obry Team-Ada Member
--| 45, rue Gabriel Peri - 78114 Magny Les Hameaux FRANCE
--|------------------------------------------------------
--| http://www.obry.net
--| "The best way to travel is by means of imagination"
--|
--| gpg --keyserver wwwkeys.pgp.net --recv-key C1082595
^ permalink raw reply
* Re: email address handling
From: Linus Torvalds @ 2008-08-02 16:20 UTC (permalink / raw)
To: Johannes Schindelin; +Cc: Andrew Morton, Theodore Tso, Junio C Hamano, git
In-Reply-To: <alpine.DEB.1.00.0808021321500.9611@pacific.mpi-cbg.de.mpi-cbg.de>
On Sat, 2 Aug 2008, Johannes Schindelin wrote:
>
> Ah, there lies the rub (you forgot that the original complaint was about
> a comma, and pretty=email does not handle those):
Indeed.
I wonder where that is_rfc2047_special() function came from. The list of
"special" characters is totally bogus.
The real RFC has comma, but it has a lot of other characters too:
especials = "(" / ")" / "<" / ">" / "@" / "," / ";" / ":" /
"<" / "> / "/" / "[" / "]" / "?" / "." / "="
because basically the rfc2047 encoding has to be a superset of the 822
(and later 2822) encodings.
Linus
^ permalink raw reply
* Re: email address handling
From: Junio C Hamano @ 2008-08-02 16:36 UTC (permalink / raw)
To: Linus Torvalds; +Cc: Johannes Schindelin, Andrew Morton, Theodore Tso, git
In-Reply-To: <alpine.LFD.1.10.0808020916370.3318@nehalem.linux-foundation.org>
Linus Torvalds <torvalds@linux-foundation.org> writes:
> On Sat, 2 Aug 2008, Johannes Schindelin wrote:
>>
>> Ah, there lies the rub (you forgot that the original complaint was about
>> a comma, and pretty=email does not handle those):
>
> Indeed.
>
> I wonder where that is_rfc2047_special() function came from.
It came from the earlier patch from Dscho I rejected yesterday ;-)
^ permalink raw reply
* Re: email address handling
From: Junio C Hamano @ 2008-08-02 16:40 UTC (permalink / raw)
To: Linus Torvalds; +Cc: Johannes Schindelin, Andrew Morton, Theodore Tso, git
In-Reply-To: <alpine.LFD.1.10.0808020916370.3318@nehalem.linux-foundation.org>
Linus Torvalds <torvalds@linux-foundation.org> writes:
> On Sat, 2 Aug 2008, Johannes Schindelin wrote:
>>
>> Ah, there lies the rub (you forgot that the original complaint was about
>> a comma, and pretty=email does not handle those):
>
> Indeed.
>
> I wonder where that is_rfc2047_special() function came from. The list of
> "special" characters is totally bogus.
This function is about quoting inside dq pair, so the function does not
look at the set you listed. It is about quoting non-ascii chars using the
?charset?Q? or ?charset?B? notation.
If we want to use double quotes that should be done elsewhere, not in that
function.
^ permalink raw reply
* Re: email address handling
From: Junio C Hamano @ 2008-08-02 16:42 UTC (permalink / raw)
To: Linus Torvalds; +Cc: Johannes Schindelin, Andrew Morton, Theodore Tso, git
In-Reply-To: <7vabfvpdyk.fsf@gitster.siamese.dyndns.org>
Junio C Hamano <gitster@pobox.com> writes:
> Linus Torvalds <torvalds@linux-foundation.org> writes:
>
>> On Sat, 2 Aug 2008, Johannes Schindelin wrote:
>>>
>>> Ah, there lies the rub (you forgot that the original complaint was about
>>> a comma, and pretty=email does not handle those):
>>
>> Indeed.
>>
>> I wonder where that is_rfc2047_special() function came from. The list of
>> "special" characters is totally bogus.
>
> This function is about quoting inside dq pair, so the function does not
s/is about/is NOT about/;
Sorry, I should grab coffee before continuing.
> look at the set you listed. It is about quoting non-ascii chars using the
> ?charset?Q? or ?charset?B? notation.
>
> If we want to use double quotes that should be done elsewhere, not in that
> function.
^ 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