Git development
 help / color / mirror / Atom feed
* Re: [PATCH] Add commit.editor configuration variable
From: Johannes Schindelin @ 2007-07-19  9:54 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: Shawn O. Pearce, Adam Roben, git
In-Reply-To: <7v1wf451fc.fsf@assigned-by-dhcp.cox.net>

Hi,

On Wed, 18 Jul 2007, Junio C Hamano wrote:

> "Shawn O. Pearce" <spearce@spearce.org> writes:
> 
> > We only launch an editor for three reasons: commit messages, tag
> > messages and git-rebase -i.  If we were to ever add a new editor
> > using thingy, odds are the user would want the same editor by
> > default for that too.
> >
> > So please, core.editor, and also use it in git-rebase--interactive.
> 
> Ah, add "git-am -i" to the mix.  Potentially, git-notes would
> use it as well.

Now with so many commands in the lot, how about putting the code into 
git-sh-setup, into a function "get_editor()"?

Ciao,
Dscho

^ permalink raw reply

* Re: [RFC PATCH] Re: Empty directories...
From: David Kastrup @ 2007-07-19  9:54 UTC (permalink / raw)
  To: git
In-Reply-To: <85zm1tue6a.fsf@lola.goethe.zz>

David Kastrup <dak@gnu.org> writes:

> Junio C Hamano <gitster@pobox.com> writes:
>
>> Another issue I thought about was what you would do in the step
>> 3 in the following:
>>
>>  1. David says "mkdir D; git add D"; you add S_IFDIR entry in
>>     the index at D;
>>
>>  2. David says "date >D/F; git add D/F"; presumably you drop D
>>     from the index (to keep the index more backward compatible)
>>     and add S_IFREG entry at D/F.
>
> I don't think that one should drop D here.  Operation 1 _is_ not
> backward compatible, so if you want to revert it, you should
> explicitly remove D.  And we can't "keep" the index backward
> compatible if it isn't so after step 1.
>
>>  3. David says "git rm D/F".
>>
>> Have we stopped keeping track of the "empty directory" at this
>> point?
>
> The case I am worrying about is rather
>
> mkdir D
> mkdir D/E
> touch D/E/file
> git add D
> [*]
> git rm D/E/file
>
> From a user perspective, E should be registered still.  Compare this
> with
>
> mkdir D
> mkdir D/E
> touch D/E/file
> git add D/E/file
> [*]
> git rm D/E/file

Let's take this through the motions with my last proposal: at the
first [*], the index now contains

D/.        [dir]
D/E/.      [dir]
D/E/file   [file]

After git rm D/E/file, it contains

D/.        [dir]
D/E/.      [dir]

Compared with the second, where we just have in the index

D/E/file   [file]

and it is gone again after the remove.

After commiting in the first case, we have in the repository
D          [tree]
D/.        [dir]
D/E        [tree]
D/E/.      [dir]
D/E/file   [file]

Now we do
git rm D/E, and the index contains

D/E/.      [remove dir]
D/E/file   [remove file]

If we commit now,
D/E        [tree]
becomes empty and is removed.  All that stays is

D          [tree]
D/.        [dir]

So we still have [tree] items only in the repository, not in the
index, and there is no such thing as an empty tree.  But directories
have a presence in index and repository.  They are not containers of
files, that role is retained by trees.  Rather they are siblings of
the files in their associated tree.

As a note aside: if one wanted to track directory permissions, one
would track them in the [dir] entries, not in the [tree] entries.
Trees remain abstract structuring entities in the repository that
don't have an outside representation.  Directories will be
auto-created and deleted as necessary in the work directory to
facilitate having a place for checking tree elements out and in.

This means that
git add D/E/file
would _not_ track permissions of D and E (nor their existence).

However, Linus is right that permissions are something to be discussed
separately.  But separating [tree] and [dir] makes for a plausible and
understandable way of treating them.

-- 
David Kastrup

^ permalink raw reply

* Re: [REVISED PATCH 2/6] Introduce commit notes
From: Adam Hayek @ 2007-07-19  9:57 UTC (permalink / raw)
  To: Junio C Hamano, git
In-Reply-To: <7vodi83fg7.fsf@assigned-by-dhcp.cox.net>

On 7/19/07, Junio C Hamano <gitster@pobox.com> wrote:
> Side note: I also think adding "extension section" to tree
> object is not a good idea to begin with.  The data nor length of
> such a section cannot participate in hash computation to derive
> the tree's object name so that we can still compare two tree
> objects (with and without such extension) that have the same
> contents by only looking at their object names.  But having
> contents that are not counted as parts of the object's name goes
> against the reliability and safety of git.

Excuse me for being brand new to this list and to git itself, but if
the issue is where to put "extra" data to go along with a given object
there should be a relatively simple way to do it.  If your object's
hash/name is X, take the string ("%s-extra", X), hash that, and use
the resulting hash as the name of the file to store whatever extra
data you have.  There would be the issue of when and how to move this
new file when the original file is moved, but old versions of git at
least wouldn't break, they'd just never know about the extra data in
the separate file.  Of course you could do endless variations of this
to store whatever classes of extra data separately.

^ permalink raw reply

* Re: [PATCH (REVISED)] Add core.editor configuration variable
From: Johannes Schindelin @ 2007-07-19 10:00 UTC (permalink / raw)
  To: Andy Parkins; +Cc: git, Adam Roben, Junio C Hamano
In-Reply-To: <200707190848.54655.andyparkins@gmail.com>

Hi,

On Thu, 19 Jul 2007, Andy Parkins wrote:

> On Thursday 2007 July 19, Adam Roben wrote:
> 
> >    Well, it turns out we already do launch an editor in other places,
> > namely "git am -i" and "git send-email --compose". So, this patch takes
> > care of those cases as well.
> 
> Perhaps I'm being overly pedantic, but it seems odd to put options that are 
> relevant only to porcelain under the "core" section.
> 
> core.pager is in the same category - but that's already in.
> 
> Would porcelain.editor be a better name for this variable?

>From my point of view you can put into "myWonderfulGit.editor".  It does 
not matter.

So why not just leave it in "core", also because -- strictly speaking -- 
those commands in git.git are not really your regular porcelain. They are 
tested with almost every commit, and therefore have a much better chance 
not to be broken inadvertently by changes to the core.

Ciao,
Dscho

^ permalink raw reply

* Re: [REVISED PATCH 2/6] Introduce commit notes
From: Olivier Galibert @ 2007-07-19 10:34 UTC (permalink / raw)
  To: Linus Torvalds
  Cc: Johannes Schindelin, Junio C Hamano, Alberto Bertogli, git,
	Johan Herland
In-Reply-To: <alpine.LFD.0.999.0707181949490.27353@woody.linux-foundation.org>

On Wed, Jul 18, 2007 at 08:28:27PM -0700, Linus Torvalds wrote:
> And yes, the "search for zero bytes" is not *guaranteed* to find any 
> beginning at all, if you have lots of short names, *and* lots of zero 
> bytes in the SHA1's. But while short names may be common, zero bytes in 
> SHA1's are not so much (since you should expect to see a very even 
> distribution of bytes, and as such most SHA1's by far should have no zero 
> bytes at all!)

The probability of a sha1 to have a zero is approximatively 0.075.
That's 1 in 13, more or less.

  OG.

^ permalink raw reply

* Re: Proposal about --help options and man calls
From: Steven Grimm @ 2007-07-19 10:42 UTC (permalink / raw)
  To: David Kastrup; +Cc: git
In-Reply-To: <85ejj5wats.fsf@lola.goethe.zz>

David Kastrup wrote:
> So I set GIT_PAGER to cat and hoped that it would get git to behave. 

FYI, you can also set GIT_PAGER to an empty value to completely disable 
paging. However, "cat" does the same thing -- it is special cased in 
pager.c to do the same thing as an empty value.

Hmm, I guess that could stand to be documented. Patch forthcoming.

-Steve

^ permalink raw reply

* [PATCH] Document how to tell git to not launch a pager
From: Steven Grimm @ 2007-07-19 10:43 UTC (permalink / raw)
  To: git

Signed-off-by: Steven Grimm <koreth@midwinter.com>
---
 Documentation/git.txt |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/Documentation/git.txt b/Documentation/git.txt
index 3fbfd45..4c4d174 100644
--- a/Documentation/git.txt
+++ b/Documentation/git.txt
@@ -417,7 +417,9 @@ other
 	See gitlink:git-merge[1]
 
 'GIT_PAGER'::
-	This environment variable overrides `$PAGER`.
+	This environment variable overrides `$PAGER`. If it is set
+	to an empty string or to the value "cat", git will not launch
+	a pager.
 
 'GIT_FLUSH'::
 	If this environment variable is set to "1", then commands such
-- 
1.5.3.rc2.4.g726f9

^ permalink raw reply related

* Re: [PATCH (REVISED)] Add core.editor configuration variable
From: Andy Parkins @ 2007-07-19 10:48 UTC (permalink / raw)
  To: git; +Cc: Johannes Schindelin, Adam Roben, Junio C Hamano
In-Reply-To: <Pine.LNX.4.64.0707191058090.14781@racer.site>

On Thursday 2007 July 19, Johannes Schindelin wrote:
> Hi,
>
> On Thu, 19 Jul 2007, Andy Parkins wrote:
> > On Thursday 2007 July 19, Adam Roben wrote:
> > >    Well, it turns out we already do launch an editor in other places,
> > > namely "git am -i" and "git send-email --compose". So, this patch takes
> > > care of those cases as well.
> >
> > Perhaps I'm being overly pedantic, but it seems odd to put options that
> > are relevant only to porcelain under the "core" section.
> >
> > core.pager is in the same category - but that's already in.
> >
> > Would porcelain.editor be a better name for this variable?
>
> From my point of view you can put into "myWonderfulGit.editor".  It does
> not matter.

By that argument, why do we bother with subsections at all.  In fact why not 
call the variable "xhxhxjjjll.yqlaoospsp"?

They are meant to help the human remembering it.

> So why not just leave it in "core", also because -- strictly speaking --

That's what I said for pager - since it's already there.  However, since the 
editor isn't already in, it's not a question of _leaving_ it anywhere.  
Better that it goes in the right place when it is first introduced.

> those commands in git.git are not really your regular porcelain. They are
> tested with almost every commit, and therefore have a much better chance

So is every other porcelain command - almost by definition, porcelain commands 
are the ones we use.

> not to be broken inadvertently by changes to the core.

I don't understand the point you're making here.  Are you saying that we can 
rely on porcelain not to change or the core not to change?  I'm also 
wondering about these "inadvertent" changes that are getting made to git 
core - I've not noticed them before :-)



Andy
-- 
Dr Andy Parkins, M Eng (hons), MIET
andyparkins@gmail.com

^ permalink raw reply

* Re: [RFC PATCH] Re: Empty directories...
From: Tomash Brechko @ 2007-07-19 10:51 UTC (permalink / raw)
  To: Git Mailing List
In-Reply-To: <vpqvecgvmjh.fsf@bauges.imag.fr>

Dear Git fellows,

A year or so ago I too would strongly advocate the need of tracking
empty directories, permissions et al., it seemed so "natural" and
"plain obvious" to me back then.  But since that time I learned to
appreciate the "contents tracking" approach, and now view directories
(paths in general) only as the means for Git to know where to put the
contents on checkout.  This, BTW, is consistent with how Git figures
container copies/renames.

No doubt mighty Git developers can add support for empty directories,
manage to stay backward compatible, think out consistent user
interface etc.  But there's no end to how much information one may
want to store in Git to make it "_file system_ contents tracking
software".  Starting with empty directories, one may argue then that
certain installation trees also need particular file ownership, so
lets store user/group names like tar does.  It was mentioned already
in this thread that in addition to 'rwx' we also would have to store
ACLs (some OSes have only one of these concepts, some both), SELinux
security contexts, perhaps other arbitrary file attributes that may be
part of file system state.

Wouldn't it be better to preserve Git as a contents tracking system,
and add some tools on top of it that can translate file system state
into textual (or binary) form, so it can be stored in current Git?
And then use this textual representation to restore actual file system
attributes/layout on checkout?  And the only change in Git itself
would be some more hooks, for instance one hook before checking out
over the old work tree, and one after the checkout.  Or one can simply
wrap certain Git commands to implement such hooks.

In any case, no one is going to be against the new feature if it won't
break anything for those of us who find the pure contents tracking the
right thing.  And storing empty directories by default may not be
natural for everyone.  So before going into technical details of how
this can possibly be implemented, could someone answer the following:

1 Is Git going to track directories _always_?  Looks like not, because
  in this thread there seems to be a distinction between 'git add DIR'
  and 'git add DIR/FILE', i.e. not everyone is sure if in the last
  case Git should track DIR or not.

2 If Git will track only explicitly mentioned directories, then what
  about recursive operations?  Will it add only files by default, or
  directories too?  Perhaps there will be some --add-dirs option to
  'git add'.

3 Since in certain recursive operations one will want to affect
  directories too, how .gitignore will look?  Most files have a notion
  of extension, so me may say '*.o', but with directories things a bit
  more complicated.  One would want to say "exclude DIR2 only if under
  DIR1 at any hierarchy depth", i.e. exclude paths matching
  qr%DIR1/(.+/)?DIR1/%, and shell wildcards aren't that expressive,
  '*' doesn't cross hierarchy.  Note that we live without this now,
  but this will be the next "natural" demand once directories become
  first class citizens.


This list is surely incomplete.  The point is that before we go into
technical details, let's consider what exactly we are going to
implement, how this will affect current usage model, how (empty)
directory handling will extend to future similar demands, etc.  My
fear is that once some patch is around, it's very tempting to accept
it.  And once it is in, it's almost impossible to remove the feature
later.


Regards,

-- 
   Tomash Brechko

^ permalink raw reply

* Re: [REVISED PATCH 2/6] Introduce commit notes
From: Andy Parkins @ 2007-07-19 10:58 UTC (permalink / raw)
  To: git
  Cc: Junio C Hamano, Linus Torvalds, Johannes Schindelin,
	Alberto Bertogli, Johan Herland
In-Reply-To: <7vodi83fg7.fsf@assigned-by-dhcp.cox.net>

On Thursday 2007 July 19, Junio C Hamano wrote:

> I've long time ago concluded that if we care about reliability
> (and we do very much), a bisectable tree without breaking
> backward compatibility is impossible.  I was hoping to find a
> "hole" in tree object format so that I can place an extended

In the case of the notes system, is there not a big hole available because the 
layout is under tight control?

100644 blob 24631df5c6fceef7f0859903397d81f99a723197    __notes_index
040000 tree dd3f40129c8731b1bdce1d3939de3cdc24a87783    00
040000 tree 2b25612b5d8ee9ef469e72bbf74eab0ec00ae87f    01

In fact, this technique would work for normal tree objects too, except that 
you'd have to be willing to pick some blob name that would always be the 
first entry in every tree object, and would never clash with a real file in 
the tree.  Speaking off the top of my head, anything with "/" in it would be 
an invalid name so

100644 blob 24631df5c6fceef7f0859903397d81f99a723197    /tree_index
040000 tree dd3f40129c8731b1bdce1d3939de3cdc24a87783    00
040000 tree 2b25612b5d8ee9ef469e72bbf74eab0ec00ae87f    01

Would be an easy one to special case, and would be guaranteed not to clash 
with a file in the tree.

Just an idea.  I would imagine it's as daft as all my others :-)



Andy
-- 
Dr Andy Parkins, M Eng (hons), MIET
andyparkins@gmail.com

^ permalink raw reply

* Re: [PATCH] Document how to tell git to not launch a pager
From: martin f krafft @ 2007-07-19 11:02 UTC (permalink / raw)
  To: git
In-Reply-To: <20070719104351.GA17182@midwinter.com>

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

also sprach Steven Grimm <koreth@midwinter.com> [2007.07.19.1243 +0200]:
>  'GIT_PAGER'::
> -	This environment variable overrides `$PAGER`.
> +	This environment variable overrides `$PAGER`. If it is set
> +	to an empty string or to the value "cat", git will not launch
> +	a pager.

+1 on the patch, but I also wonder why use of a pager is default in
git anyway. At least I find it to be contrary to what I am used to
on the Unix command line.

For reference, there was an argument about this in
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=424978, which
includes a long IRC log in German, unfortunately, where a bunch of
people agreed with my proposal *not* to use a pager by default,
since it makes it difficult to use information from the output to
assemble the next command on the command line. Every terminal in use
nowadays can easily scroll and even search back 250 lines with the
added benefit of not randomly clearing the screen when you quit
$PAGER.

I am sure there is a reason for the choice of using a pager by
default. Could we please either rethink this reason and possibly
make it non-default, or alternatively add the reason to the FAQ?

-- 
martin;              (greetings from the heart of the sun.)
  \____ echo mailto: !#^."<*>"|tr "<*> mailto:" net@madduck
 
spamtraps: madduck.bogus@madduck.net
 
no micro$oft components were used
in the creation or posting of this email.
therefore, it is 100% virus free
and does not use html by default (yuck!).

[-- Attachment #2: Digital signature (GPG/PGP) --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply

* Re: [REVISED PATCH 2/6] Introduce commit notes
From: Johannes Schindelin @ 2007-07-19 11:10 UTC (permalink / raw)
  To: Andy Parkins
  Cc: git, Junio C Hamano, Linus Torvalds, Alberto Bertogli,
	Johan Herland
In-Reply-To: <200707191158.37713.andyparkins@gmail.com>

Hi,

On Thu, 19 Jul 2007, Andy Parkins wrote:

> On Thursday 2007 July 19, Junio C Hamano wrote:
> 
> > I've long time ago concluded that if we care about reliability
> > (and we do very much), a bisectable tree without breaking
> > backward compatibility is impossible.  I was hoping to find a
> > "hole" in tree object format so that I can place an extended
> 
> In the case of the notes system, is there not a big hole available 
> because the layout is under tight control?

No.  It is a tree object, referenced from a ref.  You can always check it 
out, modify it, and check it in.  If only by mistake.

Ciao,
Dscho

^ permalink raw reply

* Re: [PATCH] Document how to tell git to not launch a pager
From: Johannes Schindelin @ 2007-07-19 11:13 UTC (permalink / raw)
  To: martin f krafft; +Cc: git
In-Reply-To: <20070719110224.GA4293@piper.oerlikon.madduck.net>

Hi,

On Thu, 19 Jul 2007, martin f krafft wrote:

> [...] I also wonder why use of a pager is default in git anyway. At 
> least I find it to be contrary to what I am used to on the Unix command 
> line.

It was evidently liked unilaterally amongst the big whigs in the git 
community.  Me too, I like it (which says nothing about my hair style).  
Often it annoys me tremendously that all the other programs like make, ls, 
etc. do not have this nice "-p" flag.

Ciao,
Dscho

^ permalink raw reply

* Re: [PATCH (REVISED)] Add core.editor configuration variable
From: Johannes Schindelin @ 2007-07-19 11:15 UTC (permalink / raw)
  To: Andy Parkins; +Cc: git, Adam Roben, Junio C Hamano
In-Reply-To: <200707191148.46228.andyparkins@gmail.com>

Hi,

On Thu, 19 Jul 2007, Andy Parkins wrote:

> On Thursday 2007 July 19, Johannes Schindelin wrote:
> >
> > On Thu, 19 Jul 2007, Andy Parkins wrote:
> >
> > > Would porcelain.editor be a better name for this variable?
> >
> > From my point of view you can put into "myWonderfulGit.editor".  It 
> > does not matter.
> 
> By that argument, why do we bother with subsections at all.  In fact why 
> not call the variable "xhxhxjjjll.yqlaoospsp"?

No.  I said, and I quote here, "From my point of view".

> They are meant to help the human remembering it.
> 
> > So why not just leave it in "core", also because -- strictly speaking 
> > --
> 
> That's what I said for pager - since it's already there.  However, since 
> the editor isn't already in, it's not a question of _leaving_ it 
> anywhere.  Better that it goes in the right place when it is first 
> introduced.

And how would having "core.pager" but "porcelain.editor" be easier to 
remember?  Nah, not really.

Ciao,
Dscho

^ permalink raw reply

* Re: [RFC PATCH] Re: Empty directories...
From: David Kastrup @ 2007-07-19 11:31 UTC (permalink / raw)
  To: git
In-Reply-To: <20070719105105.GA4929@moonlight.home>

Tomash Brechko <tomash.brechko@gmail.com> writes:

> Dear Git fellows,
>
> A year or so ago I too would strongly advocate the need of tracking
> empty directories, permissions et al., it seemed so "natural" and
> "plain obvious" to me back then.  But since that time I learned to
> appreciate the "contents tracking" approach, and now view
> directories (paths in general) only as the means for Git to know
> where to put the contents on checkout.  This, BTW, is consistent
> with how Git figures container copies/renames.

I'll answer to this based on my proposal of adding "A/B/. [dir]" as a
separate entity to index and repository, keeping "[tree]" out of
indices, and don't allow an empty "[tree]" into repositories.

This is a very natural abstraction.

> But there's no end to how much information one may want to store in
> Git to make it "_file system_ contents tracking software".  Starting
> with empty directories, one may argue then that certain installation
> trees also need particular file ownership, so lets store user/group
> names like tar does.  It was mentioned already in this thread that
> in addition to 'rwx' we also would have to store ACLs (some OSes
> have only one of these concepts, some both), SELinux security
> contexts, perhaps other arbitrary file attributes that may be part
> of file system state.

A [dir] entry may be eventually be made to track any of this, like a
[file] entry could.  If one wished to do this.

> Wouldn't it be better to preserve Git as a contents tracking system,
> and add some tools on top of it that can translate file system state
> into textual (or binary) form, so it can be stored in current Git?
> And then use this textual representation to restore actual file
> system attributes/layout on checkout?  And the only change in Git
> itself would be some more hooks, for instance one hook before
> checking out over the old work tree, and one after the checkout.  Or
> one can simply wrap certain Git commands to implement such hooks.

This is not good since "tracking" means "tracking".  With your model,
the metainformation would be dissociated from the information.
Renames and moves would make ground beef of the metadata.

> In any case, no one is going to be against the new feature if it
> won't break anything for those of us who find the pure contents
> tracking the right thing.

My proposal would allow setting an option to track or not track
directories implicitly by default.

> And storing empty directories by default may not be natural for
> everyone.  So before going into technical details of how this can
> possibly be implemented, could someone answer the following:

I'll answer assuming the proposed model.

> 1 Is Git going to track directories _always_?  Looks like not, because
>   in this thread there seems to be a distinction between 'git add DIR'
>   and 'git add DIR/FILE', i.e. not everyone is sure if in the last
>   case Git should track DIR or not.

Let's have a variable

core.adddirs

If you set core.adddirs to false, git will not enter directories into
the index for addition.  Consequently, they will not end up in the
repository.  If you git-rm a directory, the index will contain a
notice to delete the directory along with deletion notices for all
registered other elements of the directory.  Committing this means
that the directory will no longer be separately controlled by git,
even if for some reason the repository has other files remaining in
the tree.

Something like the Linux kernel repository which may be accessed by
ancient git versions would naturally contain "core.adddirs: false" in
its default configuration file, and this would be passed around when
cloning.  So directory elements would stay out of it.

> 2 If Git will track only explicitly mentioned directories, then what
>   about recursive operations?  Will it add only files by default, or
>   directories too?  Perhaps there will be some --add-dirs option to
>   'git add'.

There could be a commandline override for "core.adddirs".

> 3 Since in certain recursive operations one will want to affect
>   directories too, how .gitignore will look?  Most files have a notion
>   of extension, so me may say '*.o', but with directories things a bit
>   more complicated.  One would want to say "exclude DIR2 only if under
>   DIR1 at any hierarchy depth", i.e. exclude paths matching
>   qr%DIR1/(.+/)?DIR1/%, and shell wildcards aren't that expressive,
>   '*' doesn't cross hierarchy.  Note that we live without this now,
>   but this will be the next "natural" demand once directories become
>   first class citizens.

Huh?  I don't get this.  It's like "we can't allow people to buy
chocolate, or they'll demand next to have nuclear weapons delivered at
their house".  Deal with the demands as they come up.  If a directory
has a tree-local name ".", it can be dealt with in patterns if really
needed.  I don't see much of a necessity however.

Although it would be natural to have
core.adddirs: false
be equivalent to
core.excludefile: .

And so it might be possible to actually not need a separate
core.adddirs option at all, technically.

-- 
David Kastrup

^ permalink raw reply

* [PATCH] Force listingblocks to be monospaced in manpages
From: Jonas Fonseca @ 2007-07-19 11:37 UTC (permalink / raw)
  To: Julian Phillips; +Cc: Junio C Hamano, Fredrik Tolf, git
In-Reply-To: <Pine.LNX.4.64.0707190157430.1964@beast.quantumfyre.co.uk>

For the html output we can use a stylesheet to make sure that the
listingblocks are presented in a monospaced font.  For the manpages do
it manually by inserting a ".ft C" before and ".ft" after the block in
question.

In addition, also add an empty line after all verbatim blocks.

Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
---

  Julian Phillips <julian@quantumfyre.co.uk> wrote Thu, Jul 19, 2007:
  > On Wed, 18 Jul 2007, Junio C Hamano wrote:
  > 
  > >I tried with your patch, both with asciidoc7 and asciidoc8.  Did
  > >you really mean "&#x2302;" above?  Replacing them with "."  gave
  > >me a series of these changes (diff between output before and
  > >after your patch with the "s/\&#x2302;/./g" fixup):
  > 
  > I did mean it.  I originally just had .ft, but I was getting \&.ft in the 
  > manpage, which then just came out as .ft in the console.
  
  This is because AsciiDoc does the escaping. I think it would be cleaner
  to do this thing when converting from DocBook to roff like we already
  do for other things.

  While fixing the above, a fix for separating verbatim blocks from any
  following blocks is easy to apply.

diff --git a/Documentation/callouts.xsl b/Documentation/callouts.xsl
index 6a361a2..44ab77d 100644
--- a/Documentation/callouts.xsl
+++ b/Documentation/callouts.xsl
@@ -27,4 +27,93 @@
   </xsl:if>
 </xsl:template>
 
+<!-- * Yes, address, synopsis, and funcsynopsisinfo are verbatim environments. -->
+<xsl:template match="literallayout|programlisting|screen|
+                     address|synopsis|funcsynopsisinfo">
+  <xsl:param name="indent">
+    <!-- * Only indent this verbatim if $man.indent.verbatims is -->
+    <!-- * non-zero and it is not a child of a *synopsis element -->
+    <xsl:if test="not($man.indent.verbatims = 0) and
+                  not(substring(local-name(..),
+                  string-length(local-name(..))-7) = 'synopsis')">
+      <xsl:text>Yes</xsl:text>
+    </xsl:if>
+  </xsl:param>
+
+  <xsl:choose>
+    <!-- * Check to see if this verbatim item is within a parent element that -->
+    <!-- * allows mixed content. -->
+    <!-- * -->
+    <!-- * If it is within a mixed-content parent, then a line space is -->
+    <!-- * already added before it by the mixed-block template, so we don't -->
+    <!-- * need to add one here. -->
+    <!-- * -->
+    <!-- * If it is not within a mixed-content parent, then we need to add a -->
+    <!-- * line space before it. -->
+    <xsl:when test="parent::caption|parent::entry|parent::para|
+                    parent::td|parent::th" /> <!-- do nothing -->
+    <xsl:otherwise>
+      <xsl:text>&#10;</xsl:text>
+      <xsl:text>.sp&#10;</xsl:text>
+    </xsl:otherwise>
+  </xsl:choose>
+  <xsl:if test="$indent = 'Yes'">
+    <!-- * start indented section -->
+    <xsl:text>.RS</xsl:text>
+    <xsl:if test="not($man.indent.width = '')">
+      <xsl:text> </xsl:text>
+      <xsl:value-of select="$man.indent.width"/>
+    </xsl:if>
+    <xsl:text>&#10;</xsl:text>
+  </xsl:if>
+  <xsl:choose>
+    <xsl:when test="self::funcsynopsisinfo">
+      <!-- * All Funcsynopsisinfo content is by default rendered in bold, -->
+      <!-- * because the man(7) man page says this: -->
+      <!-- * -->
+      <!-- *   For functions, the arguments are always specified using -->
+      <!-- *   italics, even in the SYNOPSIS section, where the rest of -->
+      <!-- *   the function is specified in bold -->
+      <!-- * -->
+      <!-- * Look through the contents of the man/man2 and man3 directories -->
+      <!-- * on your system, and you'll see that most existing pages do follow -->
+      <!-- * this "bold everything in function synopsis" rule. -->
+      <!-- * -->
+      <!-- * Users who don't want the bold output can choose to adjust the -->
+      <!-- * man.font.funcsynopsisinfo parameter on their own. So even if you -->
+      <!-- * don't personally like the way it looks, please don't change the -->
+      <!-- * default to be non-bold - because it's a convention that's -->
+      <!-- * followed is the vast majority of existing man pages that document -->
+      <!-- * functions, and we need to follow it by default, like it or no. -->
+      <xsl:text>.ft </xsl:text>
+      <xsl:value-of select="$man.font.funcsynopsisinfo"/>
+      <xsl:text>&#10;</xsl:text>
+      <xsl:text>.nf&#10;</xsl:text>
+      <xsl:apply-templates/>
+      <xsl:text>&#10;</xsl:text>
+      <xsl:text>.fi&#10;</xsl:text>
+      <xsl:text>.ft&#10;</xsl:text>
+    </xsl:when>
+    <xsl:otherwise>
+      <!-- * Other verbatims do not need to get bolded -->
+      <xsl:text>.nf&#10;</xsl:text>
+      <xsl:text>.ft C&#10;</xsl:text>
+      <xsl:apply-templates/>
+      <xsl:text>&#10;</xsl:text>
+      <xsl:text>.ft&#10;</xsl:text>
+      <xsl:text>&#10;</xsl:text>
+      <xsl:text>&#10;.fi&#10;</xsl:text>
+    </xsl:otherwise>
+  </xsl:choose>
+  <xsl:if test="$indent = 'Yes'">
+    <!-- * end indented section -->
+    <xsl:text>.RE&#10;</xsl:text>
+  </xsl:if>
+  <!-- * if first following sibling node of this verbatim -->
+  <!-- * environment is a text node, output a line of space before it -->
+  <xsl:if test="following-sibling::node()[1][name(.) = '']">
+    <xsl:text>.sp&#10;</xsl:text>
+  </xsl:if>
+</xsl:template>
+
 </xsl:stylesheet>
-- 
Jonas Fonseca

^ permalink raw reply related

* Re: [PATCH] Document how to tell git to not launch a pager
From: Julian Phillips @ 2007-07-19 11:38 UTC (permalink / raw)
  To: Johannes Schindelin; +Cc: martin f krafft, git
In-Reply-To: <Pine.LNX.4.64.0707191211010.14781@racer.site>

On Thu, 19 Jul 2007, Johannes Schindelin wrote:

> Hi,
>
> On Thu, 19 Jul 2007, martin f krafft wrote:
>
>> [...] I also wonder why use of a pager is default in git anyway. At
>> least I find it to be contrary to what I am used to on the Unix command
>> line.
>
> It was evidently liked unilaterally amongst the big whigs in the git
> community.  Me too, I like it (which says nothing about my hair style).
> Often it annoys me tremendously that all the other programs like make, ls,
> etc. do not have this nice "-p" flag.

I love it. It's currently playing merry havoc with my Subversion usage at 
work though.  I've got so used to git never chucking things off the top of 
the screen that I keep forgetting to run 'svn ... | less'.

Also searching in a console isn't anywhere near as easy.

-- 
Julian

  ---
Sometimes a man who deserves to be looked down upon because he is a
fool is despised only because he is a lawyer.
 		-- Montesquieu

^ permalink raw reply

* Re: [PATCH] Force listingblocks to be monospaced in manpages
From: Julian Phillips @ 2007-07-19 11:44 UTC (permalink / raw)
  To: Jonas Fonseca; +Cc: Junio C Hamano, Fredrik Tolf, git
In-Reply-To: <20070719113743.GA27553@diku.dk>

On Thu, 19 Jul 2007, Jonas Fonseca wrote:

> For the html output we can use a stylesheet to make sure that the
> listingblocks are presented in a monospaced font.  For the manpages do
> it manually by inserting a ".ft C" before and ".ft" after the block in
> question.
>
> In addition, also add an empty line after all verbatim blocks.
>
> Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
> ---
>
>  Julian Phillips <julian@quantumfyre.co.uk> wrote Thu, Jul 19, 2007:
>  > On Wed, 18 Jul 2007, Junio C Hamano wrote:
>  >
>  > >I tried with your patch, both with asciidoc7 and asciidoc8.  Did
>  > >you really mean "&#x2302;" above?  Replacing them with "."  gave
>  > >me a series of these changes (diff between output before and
>  > >after your patch with the "s/\&#x2302;/./g" fixup):
>  >
>  > I did mean it.  I originally just had .ft, but I was getting \&.ft in the
>  > manpage, which then just came out as .ft in the console.
>
>  This is because AsciiDoc does the escaping. I think it would be cleaner
>  to do this thing when converting from DocBook to roff like we already
>  do for other things.

No.  Docbook does the escaping (as it says here: 
http://docbook.sourceforge.net/release/xsl/current/RELEASE-NOTES.html#V1.72.0
).  I tried your approach first, but 1) I idn't want to copy that much 
from the docbook xsl, as then we won't get updates/changes/fixes etc, 2) I 
still had to use &#x2302; _anyway_.

Just compare the chunk that you have copied from the docbook xsl to the 
version from 1.72.0 and you will find that all the '.'s have become 
&#x2302;s ...

-- 
Julian

  ---
"It's when they say 2 + 2 = 5 that I begin to argue."
-- Eric Pepke

^ permalink raw reply

* Re: [PATCH] Document how to tell git to not launch a pager
From: martin f krafft @ 2007-07-19 11:49 UTC (permalink / raw)
  To: Johannes Schindelin; +Cc: git
In-Reply-To: <Pine.LNX.4.64.0707191211010.14781@racer.site>

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

also sprach Johannes Schindelin <Johannes.Schindelin@gmx.de> [2007.07.19.1313 +0200]:
> It was evidently liked unilaterally amongst the big whigs in the git 
> community.  Me too, I like it (which says nothing about my hair style).  
> Often it annoys me tremendously that all the other programs like make, ls, 
> etc. do not have this nice "-p" flag.

Thanks for the explanation. I'll come back and pick up this
discussion once I became a big whig in the git community. Now
I'll add the FAQ to the wiki.

http://git.or.cz/gitwiki/GitFaq#head-9dfc528b189148e801031d161201645af532a580

-- 
martin;              (greetings from the heart of the sun.)
  \____ echo mailto: !#^."<*>"|tr "<*> mailto:" net@madduck
 
spamtraps: madduck.bogus@madduck.net
 
"das internet wurde konzipiert, um einem atomschlag standzuhalten.
 leider hatte kein militärstratege mit der deutschen telekom
 gerechnet..."
                                                      -- attila radnai 

[-- Attachment #2: Digital signature (GPG/PGP) --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply

* Re: [PATCH] Document how to tell git to not launch a pager
From: David Kastrup @ 2007-07-19 12:01 UTC (permalink / raw)
  To: git
In-Reply-To: <Pine.LNX.4.64.0707191235490.32611@reaper.quantumfyre.co.uk>

Julian Phillips <julian@quantumfyre.co.uk> writes:

> On Thu, 19 Jul 2007, Johannes Schindelin wrote:
>
>> Hi,
>>
>> On Thu, 19 Jul 2007, martin f krafft wrote:
>>
>>> [...] I also wonder why use of a pager is default in git anyway. At
>>> least I find it to be contrary to what I am used to on the Unix command
>>> line.
>>
>> It was evidently liked unilaterally amongst the big whigs in the git
>> community.  Me too, I like it (which says nothing about my hair style).
>> Often it annoys me tremendously that all the other programs like make, ls,
>> etc. do not have this nice "-p" flag.
>
> I love it. It's currently playing merry havoc with my Subversion usage
> at work though.  I've got so used to git never chucking things off the
> top of the screen that I keep forgetting to run 'svn ... | less'.
>
> Also searching in a console isn't anywhere near as easy.

Is that the reason why users of screen get punished by default?

-- 
David Kastrup

^ permalink raw reply

* Re: CVS -> SVN -> Git
From: Markus Schiltknecht @ 2007-07-19 12:02 UTC (permalink / raw)
  To: Martin Langhoff; +Cc: esr, Michael Haggerty, Julian Phillips, git, dev
In-Reply-To: <46a038f90707151805j454b57fbvb4d7ed526e1e64ce@mail.gmail.com>

Hi,

Martin Langhoff wrote:
> cvs2svn has all the "wtf-did-cvs-mean-by-that" algorithms that are
> very hard to write and maintain, and it seems to be the best one at
> that. Of course, it also writes SVN repos -- but I'm sure that's the
> easiest part.
> 
>     We don't need no meta VCS for any of this.

Sure, we certainly need a meta format of some sort (not a full blown 
VCS, agreed, but somehow we need to represent commits, tags and 
branches). And IMO, the subversion based format is not a good one, 
because it treats branches and tags very different from most other 
systems (and from what it should be from a users perspective: an atomic 
operation).

We (Michael, Oswald and me) have discussed joining efforts of my cvs to 
monotone converter, but I quickly dropped that idea because the cvs2svn 
converter is too subversion specific. If cvs2svn wants to become a 
universal cvs importer, it needs to get rid of those assumptions (and do 
more work to unify tagging and branching).

Regards

Markus

^ permalink raw reply

* Re: [RFC PATCH] Re: Empty directories...
From: Johannes Schindelin @ 2007-07-19 12:16 UTC (permalink / raw)
  To: Tomash Brechko; +Cc: Git Mailing List
In-Reply-To: <20070719105105.GA4929@moonlight.home>

Hi,

On Thu, 19 Jul 2007, Tomash Brechko wrote:

> A year or so ago I too would strongly advocate the need of tracking 
> empty directories, permissions et al., it seemed so "natural" and "plain 
> obvious" to me back then.  But since that time I learned to appreciate 
> the "contents tracking" approach, and now view directories (paths in 
> general) only as the means for Git to know where to put the contents on 
> checkout.  This, BTW, is consistent with how Git figures container 
> copies/renames.

Thank you.  It is my impression, too, that after a while it becomes 
obvious what is good and what is not.

FWIW I just whipped up a proof-of-concept patch (so at least _I_ cannot be 
accused of chickening out of writing code):

This adds the command line option "--add-empty-dirs" to "git add", which 
does the only sane thing: putting a placeholder into that directory, and 
adding that.  Since ".gitignore" is already a reserved file name in git, 
it is used as the name of this place holder.

---

	It is probably not fool-proof yet, needs documentation and a test 
	case.  But I am really sick and tired of this discussion.

 builtin-add.c |   25 +++++++++++++++++++++----
 dir.c         |   16 +++++++++++++++-
 dir.h         |    3 ++-
 3 files changed, 38 insertions(+), 6 deletions(-)

diff --git a/builtin-add.c b/builtin-add.c
index 7345479..1294840 100644
--- a/builtin-add.c
+++ b/builtin-add.c
@@ -47,7 +47,7 @@ static void prune_directory(struct dir_struct *dir, const char **pathspec, int p
 }
 
 static void fill_directory(struct dir_struct *dir, const char **pathspec,
-		int ignored_too)
+		int ignored_too, int substitute_empty_dirs)
 {
 	const char *path, *base;
 	int baselen;
@@ -63,6 +63,7 @@ static void fill_directory(struct dir_struct *dir, const char **pathspec,
 		if (!access(excludes_file, R_OK))
 			add_excludes_from_file(dir, excludes_file);
 	}
+	dir->substitute_empty_directories = substitute_empty_dirs;
 
 	/*
 	 * Calculate common prefix for the pathspec, and
@@ -143,7 +144,8 @@ static const char ignore_warning[] =
 int cmd_add(int argc, const char **argv, const char *prefix)
 {
 	int i, newfd;
-	int verbose = 0, show_only = 0, ignored_too = 0;
+	int verbose = 0, show_only = 0, ignored_too = 0,
+		substitute_empty_dirs = 0;
 	const char **pathspec;
 	struct dir_struct dir;
 	int add_interactive = 0;
@@ -191,6 +193,10 @@ int cmd_add(int argc, const char **argv, const char *prefix)
 			take_worktree_changes = 1;
 			continue;
 		}
+		if (!strcmp(arg, "--add-empty-dirs")) {
+			substitute_empty_dirs = 1;
+			continue;
+		}
 		usage(builtin_add_usage);
 	}
 
@@ -206,7 +212,7 @@ int cmd_add(int argc, const char **argv, const char *prefix)
 	}
 	pathspec = get_pathspec(prefix, argv + i);
 
-	fill_directory(&dir, pathspec, ignored_too);
+	fill_directory(&dir, pathspec, ignored_too, substitute_empty_dirs);
 
 	if (show_only) {
 		const char *sep = "", *eof = "";
@@ -231,8 +237,19 @@ int cmd_add(int argc, const char **argv, const char *prefix)
 		exit(1);
 	}
 
-	for (i = 0; i < dir.nr; i++)
+	for (i = 0; i < dir.nr; i++) {
+		const char *name = dir.entries[i]->name;
+		const char *slash;
+		if (substitute_empty_dirs && (slash = strrchr(name, '/')) &&
+				!strcmp(slash, "/.gitignore") &&
+				access(name, R_OK)) {
+			int fd = open(name, O_WRONLY | O_CREAT | O_EXCL, 0666);
+			if (fd < 0)
+				return error("Could not create %s", name);
+			close(fd);
+		}
 		add_file_to_cache(dir.entries[i]->name, verbose);
+	}
 
  finish:
 	if (active_cache_changed) {
diff --git a/dir.c b/dir.c
index 8d8faf5..b0b4628 100644
--- a/dir.c
+++ b/dir.c
@@ -456,11 +456,11 @@ static int read_directory_recursive(struct dir_struct *dir, const char *path, co
 {
 	DIR *fdir = opendir(path);
 	int contents = 0;
+	char fullname[PATH_MAX + 1];
 
 	if (fdir) {
 		int exclude_stk;
 		struct dirent *de;
-		char fullname[PATH_MAX + 1];
 		memcpy(fullname, base, baselen);
 
 		exclude_stk = push_exclude_per_directory(dir, base, baselen);
@@ -536,6 +536,20 @@ exit_early:
 		pop_exclude_per_directory(dir, exclude_stk);
 	}
 
+	if (!contents && dir->substitute_empty_directories) {
+		const char *name = ".gitignore";
+		int len = strlen(name);
+		/* Ignore overly long pathnames! */
+		if (len + baselen + 8 > sizeof(fullname))
+			return 0;
+		memcpy(fullname + baselen, name, len+1);
+		if (simplify_away(fullname, baselen + len, simplify)
+				|| excluded(dir, fullname))
+			return 0;
+		dir_add_name(dir, fullname, baselen + len);
+		return 1;
+	}
+
 	return contents;
 }
 
diff --git a/dir.h b/dir.h
index ec0e8ab..0099718 100644
--- a/dir.h
+++ b/dir.h
@@ -34,7 +34,8 @@ struct dir_struct {
 		     show_other_directories:1,
 		     hide_empty_directories:1,
 		     no_gitlinks:1,
-		     collect_ignored:1;
+		     collect_ignored:1,
+		     substitute_empty_directories:1;
 	struct dir_entry **entries;
 	struct dir_entry **ignored;
 

^ permalink raw reply related

* [PATCH] Internationalization of git-gui
From: Christian Stimming @ 2007-07-19 10:56 UTC (permalink / raw)
  To: git

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

This is an initial patch of how internationalization (i18n) in git  
could be done, starting with the git-gui application (because I need  
that one in German to convince my workplace of switching to git).

Does this implementation look okay? If yes, I'd happily i18n'ize the  
rest of git-gui and provide a full German translation as well.

Thanks,

Christian Stimming

[-- Attachment #2: 0001-Initialize-msgcat-gettext.patch --]
[-- Type: text/x-patch, Size: 851 bytes --]

>From ea66070d95061e623cb5430fe88efea653e511e0 Mon Sep 17 00:00:00 2001
From: Christian Stimming <stimming@tuhh.de>
Date: Thu, 19 Jul 2007 12:48:08 +0200
Subject: [PATCH] Initialize msgcat (gettext).

---
 git-gui/git-gui.sh |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/git-gui/git-gui.sh b/git-gui/git-gui.sh
index 2077261..c56a3f1 100755
--- a/git-gui/git-gui.sh
+++ b/git-gui/git-gui.sh
@@ -108,6 +108,12 @@ if {$idx ne {}} {
 }
 unset -nocomplain oguirel idx fd
 
+## Internationalization (i18n) through gettext. See
+## http://www.gnu.org/software/gettext/manual/html_node/Tcl.html
+package require msgcat
+::msgcat::mcload [file join $oguilib msgs]
+proc _ {s} {return [::msgcat::mc $s]}
+
 ######################################################################
 ##
 ## read only globals
-- 
1.5.3.rc2.4.g726f9


[-- Attachment #3: 0002-Mark-strings-for-translation.patch --]
[-- Type: text/x-patch, Size: 16181 bytes --]

>From 154d29786bdda205357595e22b3385d7cdb77453 Mon Sep 17 00:00:00 2001
From: Christian Stimming <stimming@tuhh.de>
Date: Thu, 19 Jul 2007 12:49:09 +0200
Subject: [PATCH] Mark strings for translation

---
 git-gui/git-gui.sh |  154 ++++++++++++++++++++++++++--------------------------
 1 files changed, 77 insertions(+), 77 deletions(-)

diff --git a/git-gui/git-gui.sh b/git-gui/git-gui.sh
index c56a3f1..45b7ef1 100755
--- a/git-gui/git-gui.sh
+++ b/git-gui/git-gui.sh
@@ -1618,18 +1618,18 @@ set ui_comm {}
 # -- Menu Bar
 #
 menu .mbar -tearoff 0
-.mbar add cascade -label Repository -menu .mbar.repository
-.mbar add cascade -label Edit -menu .mbar.edit
+.mbar add cascade -label [_ Repository] -menu .mbar.repository
+.mbar add cascade -label [_ Edit] -menu .mbar.edit
 if {[is_enabled branch]} {
-	.mbar add cascade -label Branch -menu .mbar.branch
+	.mbar add cascade -label [_ Branch] -menu .mbar.branch
 }
 if {[is_enabled multicommit] || [is_enabled singlecommit]} {
-	.mbar add cascade -label Commit -menu .mbar.commit
+	.mbar add cascade -label [_ Commit] -menu .mbar.commit
 }
 if {[is_enabled transport]} {
-	.mbar add cascade -label Merge -menu .mbar.merge
-	.mbar add cascade -label Fetch -menu .mbar.fetch
-	.mbar add cascade -label Push -menu .mbar.push
+	.mbar add cascade -label [_ Merge] -menu .mbar.merge
+	.mbar add cascade -label [_ Fetch] -menu .mbar.fetch
+	.mbar add cascade -label [_ Push] -menu .mbar.push
 }
 . configure -menu .mbar
 
@@ -1638,75 +1638,75 @@ if {[is_enabled transport]} {
 menu .mbar.repository
 
 .mbar.repository add command \
-	-label {Browse Current Branch} \
+	-label [_ {Browse Current Branch}] \
 	-command {browser::new $current_branch}
 trace add variable current_branch write ".mbar.repository entryconf [.mbar.repository index last] -label \"Browse \$current_branch\" ;#"
 .mbar.repository add separator
 
 .mbar.repository add command \
-	-label {Visualize Current Branch} \
+	-label [_ {Visualize Current Branch}]  \
 	-command {do_gitk $current_branch}
 trace add variable current_branch write ".mbar.repository entryconf [.mbar.repository index last] -label \"Visualize \$current_branch\" ;#"
 .mbar.repository add command \
-	-label {Visualize All Branches} \
+	-label [_ {Visualize All Branches}] \
 	-command {do_gitk --all}
 .mbar.repository add separator
 
 if {[is_enabled multicommit]} {
-	.mbar.repository add command -label {Database Statistics} \
+	.mbar.repository add command -label [_ {Database Statistics}] \
 		-command do_stats
 
-	.mbar.repository add command -label {Compress Database} \
+	.mbar.repository add command -label [_ {Compress Database}] \
 		-command do_gc
 
-	.mbar.repository add command -label {Verify Database} \
+	.mbar.repository add command -label [_ {Verify Database}] \
 		-command do_fsck_objects
 
 	.mbar.repository add separator
 
 	if {[is_Cygwin]} {
 		.mbar.repository add command \
-			-label {Create Desktop Icon} \
+			-label [_ {Create Desktop Icon}] \
 			-command do_cygwin_shortcut
 	} elseif {[is_Windows]} {
 		.mbar.repository add command \
-			-label {Create Desktop Icon} \
+			-label [_ {Create Desktop Icon}] \
 			-command do_windows_shortcut
 	} elseif {[is_MacOSX]} {
 		.mbar.repository add command \
-			-label {Create Desktop Icon} \
+			-label [_ {Create Desktop Icon}] \
 			-command do_macosx_app
 	}
 }
 
-.mbar.repository add command -label Quit \
+.mbar.repository add command -label [_ Quit] \
 	-command do_quit \
 	-accelerator $M1T-Q
 
 # -- Edit Menu
 #
 menu .mbar.edit
-.mbar.edit add command -label Undo \
+.mbar.edit add command -label [_ Undo] \
 	-command {catch {[focus] edit undo}} \
 	-accelerator $M1T-Z
-.mbar.edit add command -label Redo \
+.mbar.edit add command -label [_ Redo] \
 	-command {catch {[focus] edit redo}} \
 	-accelerator $M1T-Y
 .mbar.edit add separator
-.mbar.edit add command -label Cut \
+.mbar.edit add command -label [_ Cut] \
 	-command {catch {tk_textCut [focus]}} \
 	-accelerator $M1T-X
-.mbar.edit add command -label Copy \
+.mbar.edit add command -label [_ Copy] \
 	-command {catch {tk_textCopy [focus]}} \
 	-accelerator $M1T-C
-.mbar.edit add command -label Paste \
+.mbar.edit add command -label [_ Paste] \
 	-command {catch {tk_textPaste [focus]; [focus] see insert}} \
 	-accelerator $M1T-V
-.mbar.edit add command -label Delete \
+.mbar.edit add command -label [_ Delete] \
 	-command {catch {[focus] delete sel.first sel.last}} \
 	-accelerator Del
 .mbar.edit add separator
-.mbar.edit add command -label {Select All} \
+.mbar.edit add command -label [_ {Select All}] \
 	-command {catch {[focus] tag add sel 0.0 end}} \
 	-accelerator $M1T-A
 
@@ -1715,29 +1715,29 @@ menu .mbar.edit
 if {[is_enabled branch]} {
 	menu .mbar.branch
 
-	.mbar.branch add command -label {Create...} \
+	.mbar.branch add command -label [_ {Create...}] \
 		-command branch_create::dialog \
 		-accelerator $M1T-N
 	lappend disable_on_lock [list .mbar.branch entryconf \
 		[.mbar.branch index last] -state]
 
-	.mbar.branch add command -label {Checkout...} \
+	.mbar.branch add command -label [_ {Checkout...}] \
 		-command branch_checkout::dialog \
 		-accelerator $M1T-O
 	lappend disable_on_lock [list .mbar.branch entryconf \
 		[.mbar.branch index last] -state]
 
-	.mbar.branch add command -label {Rename...} \
+	.mbar.branch add command -label [_ {Rename...}] \
 		-command branch_rename::dialog
 	lappend disable_on_lock [list .mbar.branch entryconf \
 		[.mbar.branch index last] -state]
 
-	.mbar.branch add command -label {Delete...} \
+	.mbar.branch add command -label [_ {Delete...}] \
 		-command branch_delete::dialog
 	lappend disable_on_lock [list .mbar.branch entryconf \
 		[.mbar.branch index last] -state]
 
-	.mbar.branch add command -label {Reset...} \
+	.mbar.branch add command -label [_ {Reset...}] \
 		-command merge::reset_hard
 	lappend disable_on_lock [list .mbar.branch entryconf \
 		[.mbar.branch index last] -state]
@@ -1749,7 +1749,7 @@ if {[is_enabled multicommit] || [is_enabled singlecommit]} {
 	menu .mbar.commit
 
 	.mbar.commit add radiobutton \
-		-label {New Commit} \
+		-label [_ {New Commit}] \
 		-command do_select_commit_type \
 		-variable selected_commit_type \
 		-value new
@@ -1757,7 +1757,7 @@ if {[is_enabled multicommit] || [is_enabled singlecommit]} {
 		[list .mbar.commit entryconf [.mbar.commit index last] -state]
 
 	.mbar.commit add radiobutton \
-		-label {Amend Last Commit} \
+		-label [_ {Amend Last Commit}] \
 		-command do_select_commit_type \
 		-variable selected_commit_type \
 		-value amend
@@ -1766,40 +1766,40 @@ if {[is_enabled multicommit] || [is_enabled singlecommit]} {
 
 	.mbar.commit add separator
 
-	.mbar.commit add command -label Rescan \
+	.mbar.commit add command -label [_ Rescan] \
 		-command do_rescan \
 		-accelerator F5
 	lappend disable_on_lock \
 		[list .mbar.commit entryconf [.mbar.commit index last] -state]
 
-	.mbar.commit add command -label {Add To Commit} \
+	.mbar.commit add command -label [_ {Add To Commit}] \
 		-command do_add_selection
 	lappend disable_on_lock \
 		[list .mbar.commit entryconf [.mbar.commit index last] -state]
 
-	.mbar.commit add command -label {Add Existing To Commit} \
+	.mbar.commit add command -label [_ {Add Existing To Commit}] \
 		-command do_add_all \
 		-accelerator $M1T-I
 	lappend disable_on_lock \
 		[list .mbar.commit entryconf [.mbar.commit index last] -state]
 
-	.mbar.commit add command -label {Unstage From Commit} \
+	.mbar.commit add command -label [_ {Unstage From Commit}] \
 		-command do_unstage_selection
 	lappend disable_on_lock \
 		[list .mbar.commit entryconf [.mbar.commit index last] -state]
 
-	.mbar.commit add command -label {Revert Changes} \
+	.mbar.commit add command -label [_ {Revert Changes}] \
 		-command do_revert_selection
 	lappend disable_on_lock \
 		[list .mbar.commit entryconf [.mbar.commit index last] -state]
 
 	.mbar.commit add separator
 
-	.mbar.commit add command -label {Sign Off} \
+	.mbar.commit add command -label [_ {Sign Off}] \
 		-command do_signoff \
 		-accelerator $M1T-S
 
-	.mbar.commit add command -label Commit \
+	.mbar.commit add command -label [_ Commit] \
 		-command do_commit \
 		-accelerator $M1T-Return
 	lappend disable_on_lock \
@@ -1810,11 +1810,11 @@ if {[is_enabled multicommit] || [is_enabled singlecommit]} {
 #
 if {[is_enabled branch]} {
 	menu .mbar.merge
-	.mbar.merge add command -label {Local Merge...} \
+	.mbar.merge add command -label [_ {Local Merge...}] \
 		-command merge::dialog
 	lappend disable_on_lock \
 		[list .mbar.merge entryconf [.mbar.merge index last] -state]
-	.mbar.merge add command -label {Abort Merge...} \
+	.mbar.merge add command -label [_ {Abort Merge...}] \
 		-command merge::reset_hard
 	lappend disable_on_lock \
 		[list .mbar.merge entryconf [.mbar.merge index last] -state]
@@ -1827,28 +1827,28 @@ if {[is_enabled transport]} {
 	menu .mbar.fetch
 
 	menu .mbar.push
-	.mbar.push add command -label {Push...} \
+	.mbar.push add command -label [_ {Push...}] \
 		-command do_push_anywhere \
 		-accelerator $M1T-P
-	.mbar.push add command -label {Delete...} \
+	.mbar.push add command -label [_ {Delete...}] \
 		-command remote_branch_delete::dialog
 }
 
 if {[is_MacOSX]} {
 	# -- Apple Menu (Mac OS X only)
 	#
-	.mbar add cascade -label Apple -menu .mbar.apple
+	.mbar add cascade -label [_ Apple] -menu .mbar.apple
 	menu .mbar.apple
 
-	.mbar.apple add command -label "About [appname]" \
+	.mbar.apple add command -label [format [_ "About %s"] [appname]] \
 		-command do_about
-	.mbar.apple add command -label "Options..." \
+	.mbar.apple add command -label [_ "Options..."] \
 		-command do_options
 } else {
 	# -- Edit Menu
 	#
 	.mbar.edit add separator
-	.mbar.edit add command -label {Options...} \
+	.mbar.edit add command -label [_ {Options...}] \
 		-command do_options
 
 	# -- Tools Menu
@@ -1870,9 +1870,9 @@ if {[is_MacOSX]} {
 			rescan ui_ready
 		}
 	}
-	.mbar add cascade -label Tools -menu .mbar.tools
+	.mbar add cascade -label [_ Tools] -menu .mbar.tools
 	menu .mbar.tools
-	.mbar.tools add command -label "Migrate" \
+	.mbar.tools add command -label [_ "Migrate"] \
 		-command do_miga
 	lappend disable_on_lock \
 		[list .mbar.tools entryconf [.mbar.tools index last] -state]
@@ -1881,11 +1881,11 @@ if {[is_MacOSX]} {
 
 # -- Help Menu
 #
-.mbar add cascade -label Help -menu .mbar.help
+.mbar add cascade -label [_ Help] -menu .mbar.help
 menu .mbar.help
 
 if {![is_MacOSX]} {
-	.mbar.help add command -label "About [appname]" \
+	.mbar.help add command -label [format [_ "About %s"] [appname]] \
 		-command do_about
 }
 
@@ -1922,7 +1922,7 @@ if {[file isfile $doc_path]} {
 }
 
 if {$browser ne {}} {
-	.mbar.help add command -label {Online Documentation} \
+	.mbar.help add command -label [_ {Online Documentation}] \
 		-command [list exec $browser $doc_url &]
 }
 unset browser doc_path doc_url
@@ -2167,12 +2167,12 @@ label $ui_coml \
 proc trace_commit_type {varname args} {
 	global ui_coml commit_type
 	switch -glob -- $commit_type {
-	initial       {set txt {Initial Commit Message:}}
-	amend         {set txt {Amended Commit Message:}}
-	amend-initial {set txt {Amended Initial Commit Message:}}
-	amend-merge   {set txt {Amended Merge Commit Message:}}
-	merge         {set txt {Merge Commit Message:}}
-	*             {set txt {Commit Message:}}
+	initial       {set txt [_ {Initial Commit Message:}]}
+	amend         {set txt [_ {Amended Commit Message:}]}
+	amend-initial {set txt [_ {Amended Initial Commit Message:}]}
+	amend-merge   {set txt [_ {Amended Merge Commit Message:}]}
+	merge         {set txt [_ {Merge Commit Message:}]}
+	*             {set txt [_ {Commit Message:}]}
 	}
 	$ui_coml conf -text $txt
 }
@@ -2201,23 +2201,23 @@ pack .vpane.lower.commarea.buffer -side left -fill y
 set ctxm .vpane.lower.commarea.buffer.ctxm
 menu $ctxm -tearoff 0
 $ctxm add command \
-	-label {Cut} \
+	-label [_ {Cut}] \
 	-command {tk_textCut $ui_comm}
 $ctxm add command \
-	-label {Copy} \
+	-label [_ {Copy}] \
 	-command {tk_textCopy $ui_comm}
 $ctxm add command \
-	-label {Paste} \
+	-label [_ {Paste}] \
 	-command {tk_textPaste $ui_comm}
 $ctxm add command \
-	-label {Delete} \
+	-label [_ {Delete}] \
 	-command {$ui_comm delete sel.first sel.last}
 $ctxm add separator
 $ctxm add command \
-	-label {Select All} \
+	-label [_ {Select All}] \
 	-command {focus $ui_comm;$ui_comm tag add sel 0.0 end}
 $ctxm add command \
-	-label {Copy All} \
+	-label [_ {Copy All}] \
 	-command {
 		$ui_comm tag add sel 0.0 end
 		tk_textCopy $ui_comm
@@ -2225,7 +2225,7 @@ $ctxm add command \
 	}
 $ctxm add separator
 $ctxm add command \
-	-label {Sign Off} \
+	-label [_ {Sign Off}] \
 	-command do_signoff
 bind_button3 $ui_comm "tk_popup $ctxm %X %Y"
 
@@ -2275,7 +2275,7 @@ pack .vpane.lower.diff.header.path -fill x
 set ctxm .vpane.lower.diff.header.ctxm
 menu $ctxm -tearoff 0
 $ctxm add command \
-	-label {Copy} \
+	-label [_ {Copy}] \
 	-command {
 		clipboard clear
 		clipboard append \
@@ -2343,19 +2343,19 @@ $ui_diff tag raise sel
 set ctxm .vpane.lower.diff.body.ctxm
 menu $ctxm -tearoff 0
 $ctxm add command \
-	-label {Refresh} \
+	-label [_ {Refresh}] \
 	-command reshow_diff
 lappend diff_actions [list $ctxm entryconf [$ctxm index last] -state]
 $ctxm add command \
-	-label {Copy} \
+	-label [_ {Copy}] \
 	-command {tk_textCopy $ui_diff}
 lappend diff_actions [list $ctxm entryconf [$ctxm index last] -state]
 $ctxm add command \
-	-label {Select All} \
+	-label [_ {Select All}] \
 	-command {focus $ui_diff;$ui_diff tag add sel 0.0 end}
 lappend diff_actions [list $ctxm entryconf [$ctxm index last] -state]
 $ctxm add command \
-	-label {Copy All} \
+	-label [_ {Copy All}] \
 	-command {
 		$ui_diff tag add sel 0.0 end
 		tk_textCopy $ui_diff
@@ -2364,44 +2364,44 @@ $ctxm add command \
 lappend diff_actions [list $ctxm entryconf [$ctxm index last] -state]
 $ctxm add separator
 $ctxm add command \
-	-label {Apply/Reverse Hunk} \
+	-label [_ {Apply/Reverse Hunk}] \
 	-command {apply_hunk $cursorX $cursorY}
 set ui_diff_applyhunk [$ctxm index last]
 lappend diff_actions [list $ctxm entryconf $ui_diff_applyhunk -state]
 $ctxm add separator
 $ctxm add command \
-	-label {Decrease Font Size} \
+	-label [_ {Decrease Font Size}] \
 	-command {incr_font_size font_diff -1}
 lappend diff_actions [list $ctxm entryconf [$ctxm index last] -state]
 $ctxm add command \
-	-label {Increase Font Size} \
+	-label [_ {Increase Font Size}] \
 	-command {incr_font_size font_diff 1}
 lappend diff_actions [list $ctxm entryconf [$ctxm index last] -state]
 $ctxm add separator
 $ctxm add command \
-	-label {Show Less Context} \
+	-label [_ {Show Less Context}] \
 	-command {if {$repo_config(gui.diffcontext) >= 1} {
 		incr repo_config(gui.diffcontext) -1
 		reshow_diff
 	}}
 lappend diff_actions [list $ctxm entryconf [$ctxm index last] -state]
 $ctxm add command \
-	-label {Show More Context} \
+	-label [_ {Show More Context}] \
 	-command {if {$repo_config(gui.diffcontext) < 99} {
 		incr repo_config(gui.diffcontext)
 		reshow_diff
 	}}
 lappend diff_actions [list $ctxm entryconf [$ctxm index last] -state]
 $ctxm add separator
-$ctxm add command -label {Options...} \
+$ctxm add command -label [_ {Options...}] \
 	-command do_options
 bind_button3 $ui_diff "
 	set cursorX %x
 	set cursorY %y
 	if {\$ui_index eq \$current_diff_side} {
-		$ctxm entryconf $ui_diff_applyhunk -label {Unstage Hunk From Commit}
+		$ctxm entryconf $ui_diff_applyhunk -label [_ {Unstage Hunk From Commit}]
 	} else {
-		$ctxm entryconf $ui_diff_applyhunk -label {Stage Hunk For Commit}
+		$ctxm entryconf $ui_diff_applyhunk -label [_ {Stage Hunk For Commit}]
 	}
 	tk_popup $ctxm %X %Y
 "
-- 
1.5.3.rc2.4.g726f9


[-- Attachment #4: 0003-Enclose-strings-in-quotes-not-in-braces-so-that-xg.patch --]
[-- Type: text/x-patch, Size: 12418 bytes --]

>From 3ff00ecdabb82448b95ad3b9e738441236c0eb11 Mon Sep 17 00:00:00 2001
From: Christian Stimming <stimming@tuhh.de>
Date: Thu, 19 Jul 2007 12:49:11 +0200
Subject: [PATCH] Enclose strings in quotes, not in braces, so that xgettext finds them

---
 git-gui/git-gui.sh |  104 ++++++++++++++++++++++++++--------------------------
 1 files changed, 52 insertions(+), 52 deletions(-)

diff --git a/git-gui/git-gui.sh b/git-gui/git-gui.sh
index 45b7ef1..5eef35d 100755
--- a/git-gui/git-gui.sh
+++ b/git-gui/git-gui.sh
@@ -1638,43 +1638,43 @@ if {[is_enabled transport]} {
 menu .mbar.repository
 
 .mbar.repository add command \
-	-label [_ {Browse Current Branch}] \
+	-label [_ "Browse Current Branch"] \
 	-command {browser::new $current_branch}
 trace add variable current_branch write ".mbar.repository entryconf [.mbar.repository index last] -label \"Browse \$current_branch\" ;#"
 .mbar.repository add separator
 
 .mbar.repository add command \
-	-label [_ {Visualize Current Branch}]  \
+	-label [_ "Visualize Current Branch"]  \
 	-command {do_gitk $current_branch}
 trace add variable current_branch write ".mbar.repository entryconf [.mbar.repository index last] -label \"Visualize \$current_branch\" ;#"
 .mbar.repository add command \
-	-label [_ {Visualize All Branches}] \
+	-label [_ "Visualize All Branches"] \
 	-command {do_gitk --all}
 .mbar.repository add separator
 
 if {[is_enabled multicommit]} {
-	.mbar.repository add command -label [_ {Database Statistics}] \
+	.mbar.repository add command -label [_ "Database Statistics"] \
 		-command do_stats
 
-	.mbar.repository add command -label [_ {Compress Database}] \
+	.mbar.repository add command -label [_ "Compress Database"] \
 		-command do_gc
 
-	.mbar.repository add command -label [_ {Verify Database}] \
+	.mbar.repository add command -label [_ "Verify Database"] \
 		-command do_fsck_objects
 
 	.mbar.repository add separator
 
 	if {[is_Cygwin]} {
 		.mbar.repository add command \
-			-label [_ {Create Desktop Icon}] \
+			-label [_ "Create Desktop Icon"] \
 			-command do_cygwin_shortcut
 	} elseif {[is_Windows]} {
 		.mbar.repository add command \
-			-label [_ {Create Desktop Icon}] \
+			-label [_ "Create Desktop Icon"] \
 			-command do_windows_shortcut
 	} elseif {[is_MacOSX]} {
 		.mbar.repository add command \
-			-label [_ {Create Desktop Icon}] \
+			-label [_ "Create Desktop Icon"] \
 			-command do_macosx_app
 	}
 }
@@ -1706,7 +1706,7 @@ menu .mbar.edit
 	-command {catch {[focus] delete sel.first sel.last}} \
 	-accelerator Del
 .mbar.edit add separator
-.mbar.edit add command -label [_ {Select All}] \
+.mbar.edit add command -label [_ "Select All"] \
 	-command {catch {[focus] tag add sel 0.0 end}} \
 	-accelerator $M1T-A
 
@@ -1715,29 +1715,29 @@ menu .mbar.edit
 if {[is_enabled branch]} {
 	menu .mbar.branch
 
-	.mbar.branch add command -label [_ {Create...}] \
+	.mbar.branch add command -label [_ "Create..."] \
 		-command branch_create::dialog \
 		-accelerator $M1T-N
 	lappend disable_on_lock [list .mbar.branch entryconf \
 		[.mbar.branch index last] -state]
 
-	.mbar.branch add command -label [_ {Checkout...}] \
+	.mbar.branch add command -label [_ "Checkout..."] \
 		-command branch_checkout::dialog \
 		-accelerator $M1T-O
 	lappend disable_on_lock [list .mbar.branch entryconf \
 		[.mbar.branch index last] -state]
 
-	.mbar.branch add command -label [_ {Rename...}] \
+	.mbar.branch add command -label [_ "Rename..."] \
 		-command branch_rename::dialog
 	lappend disable_on_lock [list .mbar.branch entryconf \
 		[.mbar.branch index last] -state]
 
-	.mbar.branch add command -label [_ {Delete...}] \
+	.mbar.branch add command -label [_ "Delete..."] \
 		-command branch_delete::dialog
 	lappend disable_on_lock [list .mbar.branch entryconf \
 		[.mbar.branch index last] -state]
 
-	.mbar.branch add command -label [_ {Reset...}] \
+	.mbar.branch add command -label [_ "Reset..."] \
 		-command merge::reset_hard
 	lappend disable_on_lock [list .mbar.branch entryconf \
 		[.mbar.branch index last] -state]
@@ -1749,7 +1749,7 @@ if {[is_enabled multicommit] || [is_enabled singlecommit]} {
 	menu .mbar.commit
 
 	.mbar.commit add radiobutton \
-		-label [_ {New Commit}] \
+		-label [_ "New Commit"] \
 		-command do_select_commit_type \
 		-variable selected_commit_type \
 		-value new
@@ -1757,7 +1757,7 @@ if {[is_enabled multicommit] || [is_enabled singlecommit]} {
 		[list .mbar.commit entryconf [.mbar.commit index last] -state]
 
 	.mbar.commit add radiobutton \
-		-label [_ {Amend Last Commit}] \
+		-label [_ "Amend Last Commit"] \
 		-command do_select_commit_type \
 		-variable selected_commit_type \
 		-value amend
@@ -1772,30 +1772,30 @@ if {[is_enabled multicommit] || [is_enabled singlecommit]} {
 	lappend disable_on_lock \
 		[list .mbar.commit entryconf [.mbar.commit index last] -state]
 
-	.mbar.commit add command -label [_ {Add To Commit}] \
+	.mbar.commit add command -label [_ "Add To Commit"] \
 		-command do_add_selection
 	lappend disable_on_lock \
 		[list .mbar.commit entryconf [.mbar.commit index last] -state]
 
-	.mbar.commit add command -label [_ {Add Existing To Commit}] \
+	.mbar.commit add command -label [_ "Add Existing To Commit"] \
 		-command do_add_all \
 		-accelerator $M1T-I
 	lappend disable_on_lock \
 		[list .mbar.commit entryconf [.mbar.commit index last] -state]
 
-	.mbar.commit add command -label [_ {Unstage From Commit}] \
+	.mbar.commit add command -label [_ "Unstage From Commit"] \
 		-command do_unstage_selection
 	lappend disable_on_lock \
 		[list .mbar.commit entryconf [.mbar.commit index last] -state]
 
-	.mbar.commit add command -label [_ {Revert Changes}] \
+	.mbar.commit add command -label [_ "Revert Changes"] \
 		-command do_revert_selection
 	lappend disable_on_lock \
 		[list .mbar.commit entryconf [.mbar.commit index last] -state]
 
 	.mbar.commit add separator
 
-	.mbar.commit add command -label [_ {Sign Off}] \
+	.mbar.commit add command -label [_ "Sign Off"] \
 		-command do_signoff \
 		-accelerator $M1T-S
 
@@ -1810,11 +1810,11 @@ if {[is_enabled multicommit] || [is_enabled singlecommit]} {
 #
 if {[is_enabled branch]} {
 	menu .mbar.merge
-	.mbar.merge add command -label [_ {Local Merge...}] \
+	.mbar.merge add command -label [_ "Local Merge..."] \
 		-command merge::dialog
 	lappend disable_on_lock \
 		[list .mbar.merge entryconf [.mbar.merge index last] -state]
-	.mbar.merge add command -label [_ {Abort Merge...}] \
+	.mbar.merge add command -label [_ "Abort Merge..."] \
 		-command merge::reset_hard
 	lappend disable_on_lock \
 		[list .mbar.merge entryconf [.mbar.merge index last] -state]
@@ -1827,10 +1827,10 @@ if {[is_enabled transport]} {
 	menu .mbar.fetch
 
 	menu .mbar.push
-	.mbar.push add command -label [_ {Push...}] \
+	.mbar.push add command -label [_ "Push..."] \
 		-command do_push_anywhere \
 		-accelerator $M1T-P
-	.mbar.push add command -label [_ {Delete...}] \
+	.mbar.push add command -label [_ "Delete..."] \
 		-command remote_branch_delete::dialog
 }
 
@@ -1848,7 +1848,7 @@ if {[is_MacOSX]} {
 	# -- Edit Menu
 	#
 	.mbar.edit add separator
-	.mbar.edit add command -label [_ {Options...}] \
+	.mbar.edit add command -label [_ "Options..."] \
 		-command do_options
 
 	# -- Tools Menu
@@ -1922,7 +1922,7 @@ if {[file isfile $doc_path]} {
 }
 
 if {$browser ne {}} {
-	.mbar.help add command -label [_ {Online Documentation}] \
+	.mbar.help add command -label [_ "Online Documentation"] \
 		-command [list exec $browser $doc_url &]
 }
 unset browser doc_path doc_url
@@ -2167,12 +2167,12 @@ label $ui_coml \
 proc trace_commit_type {varname args} {
 	global ui_coml commit_type
 	switch -glob -- $commit_type {
-	initial       {set txt [_ {Initial Commit Message:}]}
-	amend         {set txt [_ {Amended Commit Message:}]}
-	amend-initial {set txt [_ {Amended Initial Commit Message:}]}
-	amend-merge   {set txt [_ {Amended Merge Commit Message:}]}
-	merge         {set txt [_ {Merge Commit Message:}]}
-	*             {set txt [_ {Commit Message:}]}
+	initial       {set txt [_ "Initial Commit Message:"]}
+	amend         {set txt [_ "Amended Commit Message:"]}
+	amend-initial {set txt [_ "Amended Initial Commit Message:"]}
+	amend-merge   {set txt [_ "Amended Merge Commit Message:"]}
+	merge         {set txt [_ "Merge Commit Message:"]}
+	*             {set txt [_ "Commit Message:"]}
 	}
 	$ui_coml conf -text $txt
 }
@@ -2201,23 +2201,23 @@ pack .vpane.lower.commarea.buffer -side left -fill y
 set ctxm .vpane.lower.commarea.buffer.ctxm
 menu $ctxm -tearoff 0
 $ctxm add command \
-	-label [_ {Cut}] \
+	-label [_ Cut] \
 	-command {tk_textCut $ui_comm}
 $ctxm add command \
-	-label [_ {Copy}] \
+	-label [_ Copy] \
 	-command {tk_textCopy $ui_comm}
 $ctxm add command \
-	-label [_ {Paste}] \
+	-label [_ Paste] \
 	-command {tk_textPaste $ui_comm}
 $ctxm add command \
-	-label [_ {Delete}] \
+	-label [_ Delete] \
 	-command {$ui_comm delete sel.first sel.last}
 $ctxm add separator
 $ctxm add command \
-	-label [_ {Select All}] \
+	-label [_ "Select All"] \
 	-command {focus $ui_comm;$ui_comm tag add sel 0.0 end}
 $ctxm add command \
-	-label [_ {Copy All}] \
+	-label [_ "Copy All"] \
 	-command {
 		$ui_comm tag add sel 0.0 end
 		tk_textCopy $ui_comm
@@ -2225,7 +2225,7 @@ $ctxm add command \
 	}
 $ctxm add separator
 $ctxm add command \
-	-label [_ {Sign Off}] \
+	-label [_ "Sign Off"] \
 	-command do_signoff
 bind_button3 $ui_comm "tk_popup $ctxm %X %Y"
 
@@ -2275,7 +2275,7 @@ pack .vpane.lower.diff.header.path -fill x
 set ctxm .vpane.lower.diff.header.ctxm
 menu $ctxm -tearoff 0
 $ctxm add command \
-	-label [_ {Copy}] \
+	-label [_ Copy] \
 	-command {
 		clipboard clear
 		clipboard append \
@@ -2343,19 +2343,19 @@ $ui_diff tag raise sel
 set ctxm .vpane.lower.diff.body.ctxm
 menu $ctxm -tearoff 0
 $ctxm add command \
-	-label [_ {Refresh}] \
+	-label [_ Refresh] \
 	-command reshow_diff
 lappend diff_actions [list $ctxm entryconf [$ctxm index last] -state]
 $ctxm add command \
-	-label [_ {Copy}] \
+	-label [_ Copy] \
 	-command {tk_textCopy $ui_diff}
 lappend diff_actions [list $ctxm entryconf [$ctxm index last] -state]
 $ctxm add command \
-	-label [_ {Select All}] \
+	-label [_ "Select All"] \
 	-command {focus $ui_diff;$ui_diff tag add sel 0.0 end}
 lappend diff_actions [list $ctxm entryconf [$ctxm index last] -state]
 $ctxm add command \
-	-label [_ {Copy All}] \
+	-label [_ "Copy All"] \
 	-command {
 		$ui_diff tag add sel 0.0 end
 		tk_textCopy $ui_diff
@@ -2364,36 +2364,36 @@ $ctxm add command \
 lappend diff_actions [list $ctxm entryconf [$ctxm index last] -state]
 $ctxm add separator
 $ctxm add command \
-	-label [_ {Apply/Reverse Hunk}] \
+	-label [_ "Apply/Reverse Hunk"] \
 	-command {apply_hunk $cursorX $cursorY}
 set ui_diff_applyhunk [$ctxm index last]
 lappend diff_actions [list $ctxm entryconf $ui_diff_applyhunk -state]
 $ctxm add separator
 $ctxm add command \
-	-label [_ {Decrease Font Size}] \
+	-label [_ "Decrease Font Size"] \
 	-command {incr_font_size font_diff -1}
 lappend diff_actions [list $ctxm entryconf [$ctxm index last] -state]
 $ctxm add command \
-	-label [_ {Increase Font Size}] \
+	-label [_ "Increase Font Size"] \
 	-command {incr_font_size font_diff 1}
 lappend diff_actions [list $ctxm entryconf [$ctxm index last] -state]
 $ctxm add separator
 $ctxm add command \
-	-label [_ {Show Less Context}] \
+	-label [_ "Show Less Context"] \
 	-command {if {$repo_config(gui.diffcontext) >= 1} {
 		incr repo_config(gui.diffcontext) -1
 		reshow_diff
 	}}
 lappend diff_actions [list $ctxm entryconf [$ctxm index last] -state]
 $ctxm add command \
-	-label [_ {Show More Context}] \
+	-label [_ "Show More Context"] \
 	-command {if {$repo_config(gui.diffcontext) < 99} {
 		incr repo_config(gui.diffcontext)
 		reshow_diff
 	}}
 lappend diff_actions [list $ctxm entryconf [$ctxm index last] -state]
 $ctxm add separator
-$ctxm add command -label [_ {Options...}] \
+$ctxm add command -label [_ "Options..."] \
 	-command do_options
 bind_button3 $ui_diff "
 	set cursorX %x
-- 
1.5.3.rc2.4.g726f9


[-- Attachment #5: 0004-Initial-German-translation-for-testing-of-i18n.patch --]
[-- Type: text/x-patch, Size: 5071 bytes --]

>From 9b7ef0f5d5627e65e5ab354cf99c8939770416d9 Mon Sep 17 00:00:00 2001
From: Christian Stimming <stimming@tuhh.de>
Date: Thu, 19 Jul 2007 12:50:19 +0200
Subject: [PATCH] Initial German translation for testing of i18n.

---
 git-gui/po/de.po |  249 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 249 insertions(+), 0 deletions(-)
 create mode 100644 git-gui/po/de.po

diff --git a/git-gui/po/de.po b/git-gui/po/de.po
new file mode 100644
index 0000000..7a74329
--- /dev/null
+++ b/git-gui/po/de.po
@@ -0,0 +1,249 @@
+# Translation of git-gui to German.
+# Copyright (C) 2007 Linux Thorvalds
+# This file is distributed under the same license as the git package.
+# Christian Stimming <stimming@tuhh.de>, 2007
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: git-gui\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2007-07-18 18:27+0200\n"
+"PO-Revision-Date: 2007-07-19 11:45+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"
+
+#: git-gui.sh:1622
+msgid "Repository"
+msgstr ""
+
+#: git-gui.sh:1623
+msgid "Edit"
+msgstr "Bearbeiten"
+
+#: git-gui.sh:1625
+msgid "Branch"
+msgstr ""
+
+#: git-gui.sh:1628 git-gui.sh:1803
+msgid "Commit"
+msgstr ""
+
+#: git-gui.sh:1631
+msgid "Merge"
+msgstr ""
+
+#: git-gui.sh:1632
+msgid "Fetch"
+msgstr ""
+
+#: git-gui.sh:1633
+msgid "Push"
+msgstr ""
+
+#: git-gui.sh:1642
+msgid "Browse Current Branch"
+msgstr ""
+
+#: git-gui.sh:1648
+msgid "Visualize Current Branch"
+msgstr ""
+
+#: git-gui.sh:1652
+msgid "Visualize All Branches"
+msgstr ""
+
+#: git-gui.sh:1657
+msgid "Database Statistics"
+msgstr ""
+
+#: git-gui.sh:1660
+msgid "Compress Database"
+msgstr ""
+
+#: git-gui.sh:1663
+msgid "Verify Database"
+msgstr ""
+
+#: git-gui.sh:1670 git-gui.sh:1674 git-gui.sh:1678
+msgid "Create Desktop Icon"
+msgstr ""
+
+#: git-gui.sh:1683
+msgid "Quit"
+msgstr "Beenden"
+
+#: git-gui.sh:1690
+msgid "Undo"
+msgstr "Rückgängig"
+
+#: git-gui.sh:1693
+msgid "Redo"
+msgstr ""
+
+#: git-gui.sh:1697 git-gui.sh:2205
+msgid "Cut"
+msgstr "Ausschneiden"
+
+#: git-gui.sh:1700 git-gui.sh:2208 git-gui.sh:2279 git-gui.sh:2351
+msgid "Copy"
+msgstr "Kopieren"
+
+#: git-gui.sh:1703 git-gui.sh:2211
+msgid "Paste"
+msgstr "Einfügen"
+
+#: git-gui.sh:1706 git-gui.sh:2214
+msgid "Delete"
+msgstr "Löschen"
+
+#: git-gui.sh:1710 git-gui.sh:2218 git-gui.sh:2355
+msgid "Select All"
+msgstr ""
+
+#: git-gui.sh:1719
+msgid "Create..."
+msgstr ""
+
+#: git-gui.sh:1725
+msgid "Checkout..."
+msgstr ""
+
+#: git-gui.sh:1731
+msgid "Rename..."
+msgstr ""
+
+#: git-gui.sh:1736 git-gui.sh:1834
+msgid "Delete..."
+msgstr "Löschen..."
+
+#: git-gui.sh:1741
+msgid "Reset..."
+msgstr ""
+
+#: git-gui.sh:1753
+msgid "New Commit"
+msgstr ""
+
+#: git-gui.sh:1761
+msgid "Amend Last Commit"
+msgstr ""
+
+#: git-gui.sh:1770
+msgid "Rescan"
+msgstr "Neu laden"
+
+#: git-gui.sh:1776
+msgid "Add To Commit"
+msgstr ""
+
+#: git-gui.sh:1781
+msgid "Add Existing To Commit"
+msgstr ""
+
+#: git-gui.sh:1787
+msgid "Unstage From Commit"
+msgstr ""
+
+#: git-gui.sh:1792
+msgid "Revert Changes"
+msgstr ""
+
+#: git-gui.sh:1799 git-gui.sh:2229
+msgid "Sign Off"
+msgstr ""
+
+#: git-gui.sh:1814
+msgid "Local Merge..."
+msgstr ""
+
+#: git-gui.sh:1818
+msgid "Abort Merge..."
+msgstr ""
+
+#: git-gui.sh:1831
+msgid "Push..."
+msgstr ""
+
+#: git-gui.sh:1841
+msgid "Apple"
+msgstr "Apple"
+
+#: git-gui.sh:1844 git-gui.sh:1889
+#, tcl-format
+msgid "About %s"
+msgstr ""
+
+#: git-gui.sh:1846 git-gui.sh:1852 git-gui.sh:2397
+msgid "Options..."
+msgstr ""
+
+#: git-gui.sh:1874
+msgid "Tools"
+msgstr "Werkzeuge"
+
+#: git-gui.sh:1876
+msgid "Migrate"
+msgstr ""
+
+#: git-gui.sh:1885
+msgid "Help"
+msgstr "Hilfe"
+
+#: git-gui.sh:1926
+msgid "Online Documentation"
+msgstr ""
+
+#: git-gui.sh:2171
+msgid "Initial Commit Message:"
+msgstr ""
+
+#: git-gui.sh:2172
+msgid "Amended Commit Message:"
+msgstr ""
+
+#: git-gui.sh:2173
+msgid "Amended Initial Commit Message:"
+msgstr ""
+
+#: git-gui.sh:2174
+msgid "Amended Merge Commit Message:"
+msgstr ""
+
+#: git-gui.sh:2175
+msgid "Merge Commit Message:"
+msgstr ""
+
+#: git-gui.sh:2176
+msgid "Commit Message:"
+msgstr ""
+
+#: git-gui.sh:2221 git-gui.sh:2359
+msgid "Copy All"
+msgstr "Alle kopieren"
+
+#: git-gui.sh:2347
+msgid "Refresh"
+msgstr "Aktualisieren"
+
+#: git-gui.sh:2368
+msgid "Apply/Reverse Hunk"
+msgstr ""
+
+#: git-gui.sh:2374
+msgid "Decrease Font Size"
+msgstr "Schriftgröße verkleinern"
+
+#: git-gui.sh:2378
+msgid "Increase Font Size"
+msgstr "Schriftgröße vergrößern"
+
+#: git-gui.sh:2383
+msgid "Show Less Context"
+msgstr ""
+
+#: git-gui.sh:2390
+msgid "Show More Context"
+msgstr ""
-- 
1.5.3.rc2.4.g726f9


[-- Attachment #6: 0005-Makefile-rules-for-message-catalog-generation-and-in.patch --]
[-- Type: text/x-patch, Size: 2073 bytes --]

>From a91dc11906f6ced938dc79bded2fa46fcc147524 Mon Sep 17 00:00:00 2001
From: Christian Stimming <stimming@tuhh.de>
Date: Thu, 19 Jul 2007 12:50:32 +0200
Subject: [PATCH] Makefile rules for message catalog generation and installation.

---
 git-gui/Makefile |   17 ++++++++++++++++-
 1 files changed, 16 insertions(+), 1 deletions(-)

diff --git a/git-gui/Makefile b/git-gui/Makefile
index 1bac6fe..f6a6ce3 100644
--- a/git-gui/Makefile
+++ b/git-gui/Makefile
@@ -103,6 +103,19 @@ $(patsubst %.sh,%,$(SCRIPT_SH)) : % : %.sh
 $(GITGUI_BUILT_INS): git-gui
 	$(QUIET_BUILT_IN)rm -f $@ && ln git-gui $@
 
+XGETTEXT   ?= xgettext
+msgsdir    ?= $(libdir)/msgs
+msgsdir_SQ  = $(subst ','\'',$(msgsdir))
+PO_TEMPLATE = po/git-gui.pot
+ALL_LINGUAS = de
+
+$(PO_TEMPLATE): $(SCRIPT_SH) $(ALL_LIBFILES)
+	$(XGETTEXT) -k_ -LTcl -o $@ $(SCRIPT_SH) $(ALL_LIBFILES)
+update-po:: $(PO_TEMPLATE)
+	( cd po ; for A in *.po ; do echo Updating $${A} ; msgmerge -U $${A} ../$(PO_TEMPLATE) ; done )
+catalogs:: $(PO_TEMPLATE)
+	( cd po ; for A in $(ALL_LINGUAS) ; do echo Generating catalog $${A} ; msgfmt --statistics --tcl $${A}.po -l $${A} -d . ; done )
+
 lib/tclIndex: $(ALL_LIBFILES)
 	$(QUIET_INDEX)if echo \
 	  $(foreach p,$(PRELOAD_FILES),source $p\;) \
@@ -136,7 +149,7 @@ GIT-GUI-VARS: .FORCE-GIT-GUI-VARS
 		echo 1>$@ "$$VARS"; \
 	fi
 
-all:: $(ALL_PROGRAMS) lib/tclIndex
+all:: $(ALL_PROGRAMS) lib/tclIndex catalogs
 
 install: all
 	$(QUIET)$(INSTALL_D0)'$(DESTDIR_SQ)$(gitexecdir_SQ)' $(INSTALL_D1)
@@ -145,6 +158,8 @@ install: all
 	$(QUIET)$(INSTALL_D0)'$(DESTDIR_SQ)$(libdir_SQ)' $(INSTALL_D1)
 	$(QUIET)$(INSTALL_R0)lib/tclIndex $(INSTALL_R1) '$(DESTDIR_SQ)$(libdir_SQ)'
 	$(QUIET)$(foreach p,$(ALL_LIBFILES), $(INSTALL_R0)$p $(INSTALL_R1) '$(DESTDIR_SQ)$(libdir_SQ)' &&) true
+	$(QUIET)$(INSTALL_D0)'$(DESTDIR_SQ)$(msgsdir_SQ)' $(INSTALL_D1)
+	$(QUIET)$(foreach p,$(ALL_LINGUAS), $(INSTALL_R0)po/$p.msg $(INSTALL_R1) '$(DESTDIR_SQ)$(msgsdir_SQ)' &&) true
 
 dist-version:
 	@mkdir -p $(TARDIR)
-- 
1.5.3.rc2.4.g726f9


^ permalink raw reply related

* Re: [RFC PATCH] Re: Empty directories...
From: David Kastrup @ 2007-07-19 12:24 UTC (permalink / raw)
  To: git
In-Reply-To: <Pine.LNX.4.64.0707191310430.14781@racer.site>

Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:

> Hi,
>
> On Thu, 19 Jul 2007, Tomash Brechko wrote:
>
>> A year or so ago I too would strongly advocate the need of tracking 
>> empty directories, permissions et al., it seemed so "natural" and "plain 
>> obvious" to me back then.  But since that time I learned to appreciate 
>> the "contents tracking" approach, and now view directories (paths in 
>> general) only as the means for Git to know where to put the contents on 
>> checkout.  This, BTW, is consistent with how Git figures container 
>> copies/renames.
>
> Thank you.  It is my impression, too, that after a while it becomes 
> obvious what is good and what is not.
>
> FWIW I just whipped up a proof-of-concept patch (so at least _I_ cannot be 
> accused of chickening out of writing code):
>
> This adds the command line option "--add-empty-dirs" to "git add", which 
> does the only sane thing: putting a placeholder into that directory, and 
> adding that.  Since ".gitignore" is already a reserved file name in git, 
> it is used as the name of this place holder.

But that means that checkout will create a file .gitignore in
previously empty directories, doesn't it?

I think that the placeholder name should rather be ".".

-- 
David Kastrup

^ permalink raw reply

* Re: [PATCH] Internationalization of git-gui
From: Johannes Schindelin @ 2007-07-19 12:25 UTC (permalink / raw)
  To: Christian Stimming; +Cc: git, Shawn Pearce
In-Reply-To: <20070719125657.8utk85ynuow4ow48@webmail.tu-harburg.de>

Hi,

On Thu, 19 Jul 2007, Christian Stimming wrote:

> Does this implementation look okay?

This is valuable work, but unfortunately, it does not follow the 
recommendation in Documentation/SubmittingPatches at all.

For starters, please send the patches inlined, one per mail.  And you 
might want to Cc the maintainer of git-gui (Shawn Pearce), too...

Ciao,
Dscho

^ 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