Re: [PATCH] fast_export.c: Fix a compiler warning

2012-08-20 Thread Florian Achleitner
On Sunday 19 August 2012 16:29:02 Ramsay Jones wrote:
 In particular, gcc complains thus:
 
 CC vcs-svn/fast_export.o
 vcs-svn/fast_export.c: In function 'fast_export_begin_note':
 vcs-svn/fast_export.c:77: warning: long long unsigned int format, \
 different type arg (arg 2)
 
 In order to fix the warning, we cast the second size_t argument in
 the call to printf to uintmax_t.
 
 Signed-off-by: Ramsay Jones ram...@ramsay1.demon.co.uk
 ---
 
 Hi Florian,
 
 If you need to re-roll your patches in the 'fa/remote-svn' branch, could
 you please squash this fix into them. [This was implemented on top of
 commit 2ce959ba, but you will probably want to make the equivalent change
 to commit d319a37c (Create a note for every imported commit containing
 svn metadata, 17-08-2012) instead. Note that, because of the context
 lines in the patch, it won't apply as-is.]

Ok, I'll add it to the next version. This warning only occurs when building 
for 32bit, thus I never saw it. There would be a format flag for printf that 
sprecifies the platform's size_t integer type: z. 
Probalby we should use it instead? I don't know how widely supported it is.
 
 Thanks!
 
 ATB,
 Ramsay Jones

Thanks,
Florian

 
  vcs-svn/fast_export.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/vcs-svn/fast_export.c b/vcs-svn/fast_export.c
 index c780d32..dd09c7d 100644
 --- a/vcs-svn/fast_export.c
 +++ b/vcs-svn/fast_export.c
 @@ -74,7 +74,7 @@ void fast_export_begin_note(uint32_t revision, const char
 *author, size_t loglen = strlen(log);
   printf(commit %s\n, note_ref);
   printf(committer %s %s@%s %ld +\n, author, author, local,
 timestamp); - printf(data %PRIuMAX\n, loglen);
 + printf(data %PRIuMAX\n, (uintmax_t) loglen);
   fwrite(log, loglen, 1, stdout);
   if (firstnote) {
   if (revision  1)
--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH/RFC v4 01/16] GSOC remote-svn

2012-08-20 Thread Florian Achleitner
On Saturday 18 August 2012 23:35:38 Junio C Hamano wrote:
 Junio C Hamano gits...@pobox.com writes:
 [..]
 Just to show how, here is what I did just now.
 [..] 
 Thanks.

Thanks for you guidance!
I'll base a new version on your fixups.

Florian
--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] fast_export.c: Fix a compiler warning

2012-08-20 Thread Junio C Hamano
Florian Achleitner florian.achleitner.2.6...@gmail.com writes:

 If you need to re-roll your patches in the 'fa/remote-svn' branch, could
 you please squash this fix into them. [This was implemented on top of
 commit 2ce959ba, but you will probably want to make the equivalent change
 to commit d319a37c (Create a note for every imported commit containing
 svn metadata, 17-08-2012) instead. Note that, because of the context
 lines in the patch, it won't apply as-is.]

 Ok, I'll add it to the next version. This warning only occurs when building 
 for 32bit, thus I never saw it. There would be a format flag for printf that 
 sprecifies the platform's size_t integer type: z. 

Yeah, I also queued 05ce866 (fixup: add missing cast to
vcs-svn/fast_export.c, 2012-08-18) on top of your series before
pushing 'pu' out yesterday.  Have you had a chance to look at these
fixups?  There are others you would find in my tree, including minor
log message typofixes.

--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


What's cooking in git.git (Aug 2012, #06; Sun, 19)

2012-08-20 Thread Junio C Hamano
Here are the topics that have been cooking.  Commits prefixed with '-' are
only in 'pu' (proposed updates) while commits prefixed with '+' are in 'next'.

Now 1.7.12 is out, we will have a few days of calming down period on
the 'master' front, just in case we have to deal with brown paper
bag post-release fixes, and then start getting the topics that have
been cooking on the 'next' branch graduate to the 'master', perhaps
starting on coming Wednesday.

For this cycle, we already have fairly well cooked topics, many of
which are on 'next', and the git-svn updates for svn 1.7 by Michael
G Schwern is also a candidate for early graduation, provided if Eric
is OK with the series (I'd need to double check with him).  There
also were some topics that were almost there already during their
review discussions but somehow lost momentum when we got distracted,
and I think most of them would be ready fairly quickly if the
respective owners of the topics (you know who you are) can find time
to put some work into them.

So I'm planning to keep this cycle reasonably short and aim for
tagging the result as 1.8.0 at the end of the 9th week, on October
21st, after which I'd disappear for a few weeks.

http://tinyurl.com/gitCal is where you can always find my rough
tagging schedule at.

You can find the changes described here in the integration branches of the
repositories listed at

http://git-blame.blogspot.com/p/git-public-repositories.html

--
[New Topics]

* kk/maint-for-each-ref-multi-sort (2012-08-19) 2 commits
 - for-each-ref: Fix sort with multiple keys
 - t6300: test sort with multiple keys

A small and sensible fix, even though the accompanying test seems to
touch too many unrelated existing ones needlessly, which may want to
be fixed by a reroll.

--
[Stalled]

* mz/rebase-range (2012-07-18) 7 commits
 . rebase (without -p): correctly calculate patches to rebase
 . rebase -p: don't request --left-right only to ignore left side
 . rebase -p: use --cherry-mark for todo file
 . git-rebase--interactive.sh: look up subject in add_pick_line
 . git-rebase--interactive: group all $preserve_merges code
 . git-rebase--interactive.sh: extract function for adding pick line
 . git-rebase--am.sh: avoid special-casing --keep-empty

Expecting a reroll.

Performance concerns from Windows folks.  Also the series lacks
proper sign-offs.

* jl/submodule-rm (2012-07-05) 2 commits
 - rm: remove submodules from the index and the .gitmodules file
 - rm: don't fail when removing populated submodules

Expecting a reroll.

* lt/commit-tree-guess-utf-8 (2012-06-28) 1 commit
 - commit/commit-tree: correct latin1 to utf-8

Teaches git commit and git commit-tree the we are told to use
utf-8 in log message, but this does not look like utf-8---attempt to
pass it through convert-from-latin1-to-utf8 and see if it makes
sense heuristics git mailinfo already uses.

A draft from Linus received privately without a log message.
Expecting a reroll.

* mb/remote-default-nn-origin (2012-07-11) 6 commits
 - Teach get_default_remote to respect remote.default.
 - Test that plain git fetch uses remote.default when on a detached HEAD.
 - Teach clone to set remote.default.
 - Teach git remote about remote.default.
 - Teach remote.c about the remote.default configuration setting.
 - Rename remote.c's default_remote_name static variables.

When the user does not specify what remote to interact with, we
often attempt to use 'origin'.  This can now be customized via a
configuration variable.

Expecting a reroll.
The first remote becomes the default bit is better done as a
separate step.

* jc/split-blob (2012-04-03) 6 commits
 - chunked-object: streaming checkout
 - chunked-object: fallback checkout codepaths
 - bulk-checkin: support chunked-object encoding
 - bulk-checkin: allow the same data to be multiply hashed
 - new representation types in the packstream
 - packfile: use varint functions

Not ready.

I finished the streaming checkout codepath, but as explained in
127b177 (bulk-checkin: support chunked-object encoding, 2011-11-30),
these are still early steps of a long and painful journey. At least
pack-objects and fsck need to learn the new encoding for the series
to be usable locally, and then index-pack/unpack-objects needs to
learn it to be used remotely.

Given that I heard a lot of noise that people want large files, and
that I was asked by somebody at GitTogether'11 privately for an
advice on how to pay developers (not me) to help adding necessary
support, I am somewhat dissapointed that the original patch series
that was sent long time ago still remains here without much comments
and updates from the developer community. I even made the interface
to the logic that decides where to split chunks easily replaceable,
and I deliberately made the logic in the original patch extremely
stupid to entice others, especially the bup fanbois, to come up
with a 

Re: What's cooking in git.git (Aug 2012, #06; Sun, 19)

2012-08-20 Thread Erik Faye-Lund
On Mon, Aug 20, 2012 at 9:00 AM, Junio C Hamano gits...@pobox.com wrote:
 * ef/win32-cred-helper (2012-08-16) 1 commit
  - contrib: add win32 credential-helper

 Credential helper for Win32 (is this GUI???).

No, and credential helpers shouldn't be either.
--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: read-cache-v5.c: compiler warnings

2012-08-20 Thread Thomas Gummerer
On 08/19, Ramsay Jones wrote:
 Hi Thomas,
 
 Just an FYI; two out of the three gcc compilers I use (Linux, cygwin
 but not MingW), issue the following warnings:
 
 CC read-cache-v5.o
 read-cache-v5.c: In function `write_index_v5':
 read-cache-v5.c:1011: warning: 'dir' might be used uninitialized in this 
 function
 read-cache-v5.c:1012: warning: 'search' might be used uninitialized in 
 this function
 read-cache-v5.c:1012: warning: 'found' might be used uninitialized in 
 this function
 
 [commit d2537158 (Write index-v5, 16-08-2012)]
 
 Normally I would take a look and offer a patch, but I haven't found time
 to do so in the last 10 days. So, I'm just giving you a heads up ... ;-P

Thanks for noticing.  This warnings only seem to be issued by older
versions of gcc, which is probably why two compilers give the warnings
while one doesn't.

The variables can never be uninitialized, because they are guarded by
ifs and older versions don't seem to recognize that.  I'll fix them
in a re-roll though (or a separate patch if that's preferred), just
waiting for some feedback for v4 of my series.

 
 HTH
 
 ATB,
 Ramsay Jones
 

Thomas
--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


RE: Porting git to HP NonStop

2012-08-20 Thread Joachim Schmitz
 From: Junio C Hamano [mailto:gits...@pobox.com]
 Sent: Sunday, August 19, 2012 7:23 PM
 To: Joachim Schmitz
 Cc: 'Shawn Pearce'; git@vger.kernel.org; rsbec...@nexbridge.com
 Subject: Re: Porting git to HP NonStop
 
 Joachim Schmitz j...@schmitz-digital.de writes:
 
  Found the problem: our mkdir(dir,flags) fails with ENOENT when dir
  ends with a '/'.
  Not sure whether this us a bug on out platform or just allowed by
  POSIX and as such a wrong assumption in git though?
 
  [shortly after]
  A bit of googleing revealed that there is a GNUlib solution for this,
  which claims that at least NetBSD 1.5.2 has the same problem.
  (http://www.opensource.apple.com/source/gpatch/gpatch-2/patch/mkdir.c)
 
  And apparently this has been discussed on the git mailing list too, 2
  years
  ago:
  http://lists-archives.com/git/728359-git-s-use-of-mkdir-2.html,
  there's a patch too.
 
 Given that newer BSDs have fixed libc to accept directory name with a
trailing
 slash, and that we use mkdir(2) in many places, I think the right way to
do so is
 still what I suggested in that old thread in the last paragraph of my
message
 
   http://thread.gmane.org/gmane.comp.version-
 control.git/155812/focus=155876
 
 That is, have compat/tandem.c and define a replacement mkdir(2) in a way
 similar to how MinGW does so.

OK, I'll go for a compat/mkdir.c though.
We shouldn't call it tandem.c as Tandem, the Company, doesn't exist anymore
and since more than a decade (bough by Compaq, then HP), only the __TANDEM
survived in our compiler and headers/libraries. Could call it NonStop.c, but
I don't really like that idea either, I'd rather keep it more generic, just
in case someone else might need it too, or that issue someday gets fixed for
NonStop.

  For now I've fixed it like this:
  /usr/local/bin/diff -EBbu ./builtin/init-db.c.orig ./builtin/init-db.c
  --- ./builtin/init-db.c.orig2012-08-19 03:55:50 -0500
  +++ ./builtin/init-db.c 2012-08-19 03:39:57 -0500
  @@ -25,7 +25,16 @@
 
   static void safe_create_dir(const char *dir, int share)  {
  +#ifdef __TANDEM /* our mkdir() can't cope with a trailing '/' */
  +   char mydir[PATH_MAX];
  +
  +   strcpy(mydir,dir);
  +   if (dir[strlen(dir)-1] == '/')
  +   mydir[strlen(dir)-1] = '\0';
  +   if (mkdir(mydir, 0777)  0) {
  +#else
  if (mkdir(dir, 0777)  0) {
  +#endif
 
 Move that part inside #ifdef __TANDEM to define
 
   int tandem_mkdir(const char *dir, mode_t mode)
 {
   ...
   }

I'll go for git_mkdir(), similar to other git wrappers, (like for mmap,
pread, fopen, snprintf, vsnprintf, qsort). Could call it gitmkdir() too
(like for basename, setenv, mkdtemp, mkstemps, unsetenv, strcasestr,
strlcpy, strtoumax, strtoimax, strtok_r, hstrerror, memmem, strchrnul,
memcpy), Opinions?
It seems the ones without the _ are for missing APIs and the ones with _
to wrap existing APIs (not sure about mmap and pread)?

Here it's current state:
$ cat compat/mkdir.c
#include ../git-compat-util.h
#undef mkdir

/* for platforms that can't deal with a trailing '/' */
int git_mkdir(const char *dir, mode_t mode)
{
int retval;
char *tmp_dir = NULL;
size_t len = strlen(dir);

if (len  dir[len-1] == '/') {
if ((tmp_dir = strdup(dir)) == NULL)
return -1;
tmp_dir[len-1] = '\0';
}
else
tmp_dir = (char *)dir;

retval = mkdir(tmp_dir, mode);
if (tmp_dir != dir)
free(tmp_dir);

return retval;
}
$
 
There is room for improvement though: it only removes one trailing slash. By
far not as advanced and generic as GNUlib's mkdir wrapper, but should be
good enough for git's usage.

 in your new file compat/tandem.c, add
 
   #ifdef __TANDEM
 #define mkdir(a,b) tandem_mkdir((a), (b))
   #endif
 
 to git-compat-util.h

Again, git_mkdir, see above

 and then add compat/tandem.o to COMPAT_OBJS in the
 top-level Makefile.

For now I've added it to the (new) NOSTOP_KERNEL section. 

We may want it to go along with some
MKDIR_DISLIKES_TRAILING_SLASH or MKDIR_BOGUS_TRAILING_SLASH some such.
Opinions, Ideas?

 That way we do not have to keep an ugly platform specific ifdef in the
very
 generic codepath.

Agreed, it was my quick and dirty fix for it.

Bye, Jojo

--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


RE: git on HP NonStop

2012-08-20 Thread Joachim Schmitz
 From: Jan Engelhardt [mailto:jeng...@inai.de]
 Sent: Sunday, August 19, 2012 6:26 PM
 To: Joachim Schmitz
 Cc: 'Junio C Hamano'; git@vger.kernel.org
 Subject: RE: git on HP NonStop
 
 
 On Tuesday 2012-08-14 17:52, Joachim Schmitz wrote:
  @@ -98,6 +99,11 @@
  #include stdlib.h
  #include stdarg.h
  #include string.h
 +#ifdef __TANDEM
 +# include strings.h /* for strcasecmp() */
 +  typedef int intptr_t; /* not int * ?!? */
 +  typedef unsigned int uintptr_t; /* not unsigned int * ?!? */
 
 Of course not. intptr_t is an integral value capable of holding a pointer;
it is not
 a pointer to int (because that would really be redundant to int*.)

OK, thanks for the clarification.

Another issue I stumbled across:
There are numerous places (well, some 10) were something like the following
is done

int var = var;
char *othervar = othervar;

Here this leads to Compiler warnings  'variable var is used before its
value is set' on NonStop. This self-initialization seems to be a GCC
extension (?), but even gcc has a -Winit-self option to warn about this.
Shouldn't that better be like the following?

int var = 0;
char *othervar = NULL;

What is the reason for using that self-init stuff? I don't think it is
really portable, is it?

Bye, Jojo

--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: git on HP NonStop

2012-08-20 Thread Johannes Sixt
Am 8/20/2012 12:36, schrieb Joachim Schmitz:
 int var = var;
 char *othervar = othervar;
 
 ... 

 What is the reason for using that self-init stuff? I don't think it is
 really portable, is it?

It is used to avoid var may be used uninitialized warnings for some
compilers. Officially (according to the C standard), it is undefined
behavior. But I've observed considerable resistance by Junio to fix this
properly. Therefore, unless you can show that your compiler generates
unusable code you better live with the self-initialization warnings.

-- Hannes
--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


RE: git on HP NonStop

2012-08-20 Thread Joachim Schmitz
 From: Johannes Sixt [mailto:j.s...@viscovery.net]
 Sent: Monday, August 20, 2012 12:57 PM
 To: Joachim Schmitz
 Cc: 'Jan Engelhardt'; 'Junio C Hamano'; git@vger.kernel.org
 Subject: Re: git on HP NonStop
 
 Am 8/20/2012 12:36, schrieb Joachim Schmitz:
  int var = var;
  char *othervar = othervar;
 
  ...
 
  What is the reason for using that self-init stuff? I don't think it is
  really portable, is it?
 
 It is used to avoid var may be used uninitialized warnings for some
compilers.

Well, it results in a similar warning on NonStop. var is used before it is
set and I think this is equally bad.
In either case we don't know what the content of that var is.

E.g. in wt_status.c the variable 'status' is set at only one place, but
later it is switched on. If lucky we get to the default case and die.
So why not just 
int status = 0;

 Officially (according to the C standard), it is undefined behavior. 

Yes, I had that suspicion. Not good to rely in this...

 But I've observed considerable resistance by Junio to fix this properly. 

What's the  reason behind that?

 Therefore, unless
 you can show that your compiler generates unusable code you better live
with
 the self-initialization warnings.

So far I can't, so I guess I'll have to live with the warnings, but don't
quite like it.
 
 -- Hannes

Bye, Jojo

--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [RFC 0/3] Reflogs for deleted refs: fix breakage and suggest namespace change

2012-08-20 Thread Alexey Muranov
On 20 Aug 2012, at 13:32, Alexey Muranov wrote:

 The problem of mapping branch names to file paths looks to me very similar to 
 the problem of mapping URLs to file paths for static web sites, so i would 
 propose to use the same solution: add a special extension to distinguish a 
 file from a directory, for example .branch and .tag (like .html in the 
 case of URL).  This would allow having both branches next and next/foo 
 with refs stored in files next.branch and next/foo.branch.  This will 
 look very clear and familiar to people not specialist in Git, but familiar 
 with static web sites.  The only limitation this would introduces is that 
 branch names foo.branch would need to be forbidden.  If the extension is 
 optional, this makes the new rule almost compatible with the current one, 
 except if somebody is currently using branches named like foo.branch or 
 next.branch/foo.

Another possible choice for the extensions: .~br and .~tg (to keep 
readability of file names and allow all currently allowed branch names).--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 00/66] parseopt i18n marking (again)

2012-08-20 Thread Nguyễn Thái Ngọc Duy
There are not many changes since last time I sent this. A few new
strings are introduced by new options, which are also marked. 'next'
has some more, which causes conflicts but they should be easy to
resolve.

The last two patches are not really related to i18n. I looked at the
marked strings and thought they were good changes to make. I suspect
we'll find more string fixups as translators do their work because
some of these texts are not clear.

Happy translating!

Nguyễn Thái Ngọc Duy (66):
  i18n: mark style in OPT_COLUMN() for translation
  i18n: archive: mark parseopt strings for translation
  i18n: add: mark parseopt strings for translation
  i18n: bisect--helper: mark parseopt strings for translation
  i18n: blame: mark parseopt strings for translation
  i18n: branch: mark parseopt strings for translation
  i18n: cat-file: mark parseopt strings for translation
  i18n: check-attr: mark parseopt strings for translation
  i18n: checkout-index: mark parseopt strings for translation
  i18n: checkout: mark parseopt strings for translation
  i18n: cherry: mark parseopt strings for translation
  i18n: clean: mark parseopt strings for translation
  i18n: clone: mark parseopt strings for translation
  i18n: column: mark parseopt strings for translation
  i18n: commit: mark parseopt strings for translation
  i18n: config: mark parseopt strings for translation
  i18n: count-objects: mark parseopt strings for translation
  i18n: describe: mark parseopt strings for translation
  i18n: fast-export: mark parseopt strings for translation
  i18n: fetch: mark parseopt strings for translation
  i18n: fmt-merge-msg: mark parseopt strings for translation
  i18n: for-each-ref: mark parseopt strings for translation
  i18n: format-patch: mark parseopt strings for translation
  i18n: fsck: mark parseopt strings for translation
  i18n: gc: mark parseopt strings for translation
  i18n: grep: mark parseopt strings for translation
  i18n: hash-object: mark parseopt strings for translation
  i18n: help: mark parseopt strings for translation
  i18n: init-db: mark parseopt strings for translation
  i18n: log: mark parseopt strings for translation
  i18n: ls-files: mark parseopt strings for translation
  i18n: ls-tree: mark parseopt strings for translation
  i18n: merge-base: mark parseopt strings for translation
  i18n: merge-file: mark parseopt strings for translation
  i18n: merge: mark parseopt strings for translation
  i18n: mktree: mark parseopt strings for translation
  i18n: mv: mark parseopt strings for translation
  i18n: name-rev: mark parseopt strings for translation
  i18n: notes: mark parseopt strings for translation
  i18n: pack-objects: mark parseopt strings for translation
  i18n: pack-refs: mark parseopt strings for translation
  i18n: prune-packed: mark parseopt strings for translation
  i18n: prune: mark parseopt strings for translation
  i18n: push: mark parseopt strings for translation
  i18n: read-tree: mark parseopt strings for translation
  i18n: remote: mark parseopt strings for translation
  i18n: replace: mark parseopt strings for translation
  i18n: status: mark parseopt strings for translation
  i18n: rerere: mark parseopt strings for translation
  i18n: reset: mark parseopt strings for translation
  i18n: rev-parse: mark parseopt strings for translation
  i18n: revert, cherry-pick: mark parseopt strings for translation
  i18n: rm: mark parseopt strings for translation
  i18n: shortlog: mark parseopt strings for translation
  i18n: show-branch: mark parseopt strings for translation
  i18n: show-ref: mark parseopt strings for translation
  i18n: symbolic-ref: mark parseopt strings for translation
  i18n: tag: mark parseopt strings for translation
  i18n: update-index: mark parseopt strings for translation
  i18n: update-ref: mark parseopt strings for translation
  i18n: update-server-info: mark parseopt strings for translation
  i18n: verify-pack: mark parseopt strings for translation
  i18n: verify-tag: mark parseopt strings for translation
  i18n: write-tree: mark parseopt strings for translation
  Reduce translations by using same terminologies
  Use imperative form in help usage to describe an action

 archive.c|  38 +++---
 builtin/add.c|  26 +-
 builtin/apply.c  |   2 +-
 builtin/archive.c|  12 ++---
 builtin/bisect--helper.c |   6 +--
 builtin/blame.c  |  46 -
 builtin/branch.c |  56 ++--
 builtin/cat-file.c   |  20 
 builtin/check-attr.c |  12 ++---
 builtin/checkout-index.c |  24 -
 builtin/checkout.c   |  40 +++
 builtin/clean.c  |  18 +++
 builtin/clone.c  |  56 ++--
 builtin/column.c |  16 +++---
 builtin/commit.c | 100 ++--
 builtin/config.c |  56 ++--
 builtin/count-objects.c 

[PATCH 01/66] i18n: mark style in OPT_COLUMN() for translation

2012-08-20 Thread Nguyễn Thái Ngọc Duy

Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com
---
 parse-options.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/parse-options.h b/parse-options.h
index 77a4a8b..71a39c6 100644
--- a/parse-options.h
+++ b/parse-options.h
@@ -238,6 +238,6 @@ extern int parse_opt_noop_cb(const struct option *, const 
char *, int);
 #define OPT__COLOR(var, h) \
OPT_COLOR_FLAG(0, color, (var), (h))
 #define OPT_COLUMN(s, l, v, h) \
-   { OPTION_CALLBACK, (s), (l), (v), style, (h), PARSE_OPT_OPTARG, 
parseopt_column_callback }
+   { OPTION_CALLBACK, (s), (l), (v), N_(style), (h), PARSE_OPT_OPTARG, 
parseopt_column_callback }
 
 #endif
-- 
1.7.12.rc2.18.g61b472e

--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 02/66] i18n: archive: mark parseopt strings for translation

2012-08-20 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com
---
 archive.c | 38 +++---
 builtin/archive.c | 12 ++--
 2 files changed, 25 insertions(+), 25 deletions(-)

diff --git a/archive.c b/archive.c
index a484433..2584324 100644
--- a/archive.c
+++ b/archive.c
@@ -7,10 +7,10 @@
 #include unpack-trees.h
 
 static char const * const archive_usage[] = {
-   git archive [options] tree-ish [path...],
-   git archive --list,
-   git archive --remote repo [--exec cmd] [options] tree-ish 
[path...],
-   git archive --remote repo [--exec cmd] --list,
+   N_(git archive [options] tree-ish [path...]),
+   N_(git archive --list),
+   N_(git archive --remote repo [--exec cmd] [options] tree-ish 
[path...]),
+   N_(git archive --remote repo [--exec cmd] --list),
NULL
 };
 
@@ -319,16 +319,16 @@ static int parse_archive_args(int argc, const char **argv,
int worktree_attributes = 0;
struct option opts[] = {
OPT_GROUP(),
-   OPT_STRING(0, format, format, fmt, archive format),
-   OPT_STRING(0, prefix, base, prefix,
-   prepend prefix to each pathname in the archive),
-   OPT_STRING('o', output, output, file,
-   write the archive to this file),
+   OPT_STRING(0, format, format, N_(fmt), N_(archive 
format)),
+   OPT_STRING(0, prefix, base, N_(prefix),
+   N_(prepend prefix to each pathname in the archive)),
+   OPT_STRING('o', output, output, N_(file),
+   N_(write the archive to this file)),
OPT_BOOL(0, worktree-attributes, worktree_attributes,
-   read .gitattributes in working directory),
-   OPT__VERBOSE(verbose, report archived files on stderr),
-   OPT__COMPR('0', compression_level, store only, 0),
-   OPT__COMPR('1', compression_level, compress faster, 1),
+   N_(read .gitattributes in working directory)),
+   OPT__VERBOSE(verbose, N_(report archived files on stderr)),
+   OPT__COMPR('0', compression_level, N_(store only), 0),
+   OPT__COMPR('1', compression_level, N_(compress faster), 1),
OPT__COMPR_HIDDEN('2', compression_level, 2),
OPT__COMPR_HIDDEN('3', compression_level, 3),
OPT__COMPR_HIDDEN('4', compression_level, 4),
@@ -336,15 +336,15 @@ static int parse_archive_args(int argc, const char **argv,
OPT__COMPR_HIDDEN('6', compression_level, 6),
OPT__COMPR_HIDDEN('7', compression_level, 7),
OPT__COMPR_HIDDEN('8', compression_level, 8),
-   OPT__COMPR('9', compression_level, compress better, 9),
+   OPT__COMPR('9', compression_level, N_(compress better), 9),
OPT_GROUP(),
OPT_BOOL('l', list, list,
-   list supported archive formats),
+   N_(list supported archive formats)),
OPT_GROUP(),
-   OPT_STRING(0, remote, remote, repo,
-   retrieve the archive from remote repository repo),
-   OPT_STRING(0, exec, exec, cmd,
-   path to the remote git-upload-archive command),
+   OPT_STRING(0, remote, remote, N_(repo),
+   N_(retrieve the archive from remote repository 
repo)),
+   OPT_STRING(0, exec, exec, N_(cmd),
+   N_(path to the remote git-upload-archive command)),
OPT_END()
};
 
diff --git a/builtin/archive.c b/builtin/archive.c
index 931956d..e7965bf 100644
--- a/builtin/archive.c
+++ b/builtin/archive.c
@@ -88,12 +88,12 @@ int cmd_archive(int argc, const char **argv, const char 
*prefix)
const char *output = NULL;
const char *remote = NULL;
struct option local_opts[] = {
-   OPT_STRING('o', output, output, file,
-   write the archive to this file),
-   OPT_STRING(0, remote, remote, repo,
-   retrieve the archive from remote repository repo),
-   OPT_STRING(0, exec, exec, cmd,
-   path to the remote git-upload-archive command),
+   OPT_STRING('o', output, output, N_(file),
+   N_(write the archive to this file)),
+   OPT_STRING(0, remote, remote, N_(repo),
+   N_(retrieve the archive from remote repository 
repo)),
+   OPT_STRING(0, exec, exec, N_(cmd),
+   N_(path to the remote git-upload-archive command)),
OPT_END()
};
 
-- 
1.7.12.rc2.18.g61b472e

--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 04/66] i18n: bisect--helper: mark parseopt strings for translation

2012-08-20 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com
---
 builtin/bisect--helper.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/builtin/bisect--helper.c b/builtin/bisect--helper.c
index 8d325a5..e3884e3 100644
--- a/builtin/bisect--helper.c
+++ b/builtin/bisect--helper.c
@@ -4,7 +4,7 @@
 #include bisect.h
 
 static const char * const git_bisect_helper_usage[] = {
-   git bisect--helper --next-all [--no-checkout],
+   N_(git bisect--helper --next-all [--no-checkout]),
NULL
 };
 
@@ -14,9 +14,9 @@ int cmd_bisect__helper(int argc, const char **argv, const 
char *prefix)
int no_checkout = 0;
struct option options[] = {
OPT_BOOLEAN(0, next-all, next_all,
-   perform 'git bisect next'),
+   N_(perform 'git bisect next')),
OPT_BOOLEAN(0, no-checkout, no_checkout,
-   update BISECT_HEAD instead of checking out the 
current commit),
+   N_(update BISECT_HEAD instead of checking out the 
current commit)),
OPT_END()
};
 
-- 
1.7.12.rc2.18.g61b472e

--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 05/66] i18n: blame: mark parseopt strings for translation

2012-08-20 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com
---
 builtin/blame.c | 46 +++---
 1 file changed, 23 insertions(+), 23 deletions(-)

diff --git a/builtin/blame.c b/builtin/blame.c
index 0d50273..c0c99c3 100644
--- a/builtin/blame.c
+++ b/builtin/blame.c
@@ -22,12 +22,12 @@
 #include utf8.h
 #include userdiff.h
 
-static char blame_usage[] = git blame [options] [rev-opts] [rev] [--] file;
+static char blame_usage[] = N_(git blame [options] [rev-opts] [rev] [--] 
file);
 
 static const char *blame_opt_usage[] = {
blame_usage,
,
-   [rev-opts] are documented in git-rev-list(1),
+   N_([rev-opts] are documented in git-rev-list(1)),
NULL
 };
 
@@ -2315,27 +2315,27 @@ int cmd_blame(int argc, const char **argv, const char 
*prefix)
static const char *revs_file = NULL;
static const char *contents_from = NULL;
static const struct option options[] = {
-   OPT_BOOLEAN(0, incremental, incremental, Show blame entries 
as we find them, incrementally),
-   OPT_BOOLEAN('b', NULL, blank_boundary, Show blank SHA-1 for 
boundary commits (Default: off)),
-   OPT_BOOLEAN(0, root, show_root, Do not treat root commits 
as boundaries (Default: off)),
-   OPT_BOOLEAN(0, show-stats, show_stats, Show work cost 
statistics),
-   OPT_BIT(0, score-debug, output_option, Show output score 
for blame entries, OUTPUT_SHOW_SCORE),
-   OPT_BIT('f', show-name, output_option, Show original 
filename (Default: auto), OUTPUT_SHOW_NAME),
-   OPT_BIT('n', show-number, output_option, Show original 
linenumber (Default: off), OUTPUT_SHOW_NUMBER),
-   OPT_BIT('p', porcelain, output_option, Show in a format 
designed for machine consumption, OUTPUT_PORCELAIN),
-   OPT_BIT(0, line-porcelain, output_option, Show porcelain 
format with per-line commit information, 
OUTPUT_PORCELAIN|OUTPUT_LINE_PORCELAIN),
-   OPT_BIT('c', NULL, output_option, Use the same output mode as 
git-annotate (Default: off), OUTPUT_ANNOTATE_COMPAT),
-   OPT_BIT('t', NULL, output_option, Show raw timestamp 
(Default: off), OUTPUT_RAW_TIMESTAMP),
-   OPT_BIT('l', NULL, output_option, Show long commit SHA1 
(Default: off), OUTPUT_LONG_OBJECT_NAME),
-   OPT_BIT('s', NULL, output_option, Suppress author name and 
timestamp (Default: off), OUTPUT_NO_AUTHOR),
-   OPT_BIT('e', show-email, output_option, Show author email 
instead of name (Default: off), OUTPUT_SHOW_EMAIL),
-   OPT_BIT('w', NULL, xdl_opts, Ignore whitespace differences, 
XDF_IGNORE_WHITESPACE),
-   OPT_BIT(0, minimal, xdl_opts, Spend extra cycles to find 
better match, XDF_NEED_MINIMAL),
-   OPT_STRING('S', NULL, revs_file, file, Use revisions from 
file instead of calling git-rev-list),
-   OPT_STRING(0, contents, contents_from, file, Use file's 
contents as the final image),
-   { OPTION_CALLBACK, 'C', NULL, opt, score, Find line copies 
within and across files, PARSE_OPT_OPTARG, blame_copy_callback },
-   { OPTION_CALLBACK, 'M', NULL, opt, score, Find line 
movements within and across files, PARSE_OPT_OPTARG, blame_move_callback },
-   OPT_CALLBACK('L', NULL, bottomtop, n,m, Process only line 
range n,m, counting from 1, blame_bottomtop_callback),
+   OPT_BOOLEAN(0, incremental, incremental, N_(Show blame 
entries as we find them, incrementally)),
+   OPT_BOOLEAN('b', NULL, blank_boundary, N_(Show blank SHA-1 
for boundary commits (Default: off))),
+   OPT_BOOLEAN(0, root, show_root, N_(Do not treat root 
commits as boundaries (Default: off))),
+   OPT_BOOLEAN(0, show-stats, show_stats, N_(Show work cost 
statistics)),
+   OPT_BIT(0, score-debug, output_option, N_(Show output score 
for blame entries), OUTPUT_SHOW_SCORE),
+   OPT_BIT('f', show-name, output_option, N_(Show original 
filename (Default: auto)), OUTPUT_SHOW_NAME),
+   OPT_BIT('n', show-number, output_option, N_(Show original 
linenumber (Default: off)), OUTPUT_SHOW_NUMBER),
+   OPT_BIT('p', porcelain, output_option, N_(Show in a format 
designed for machine consumption), OUTPUT_PORCELAIN),
+   OPT_BIT(0, line-porcelain, output_option, N_(Show porcelain 
format with per-line commit information), 
OUTPUT_PORCELAIN|OUTPUT_LINE_PORCELAIN),
+   OPT_BIT('c', NULL, output_option, N_(Use the same output mode 
as git-annotate (Default: off)), OUTPUT_ANNOTATE_COMPAT),
+   OPT_BIT('t', NULL, output_option, N_(Show raw timestamp 
(Default: off)), OUTPUT_RAW_TIMESTAMP),
+   OPT_BIT('l', NULL, output_option, N_(Show long commit SHA1 
(Default: off)), OUTPUT_LONG_OBJECT_NAME),
+   OPT_BIT('s', NULL, output_option, N_(Suppress author name and 
timestamp (Default: off)), 

[PATCH 06/66] i18n: branch: mark parseopt strings for translation

2012-08-20 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com
---
 builtin/branch.c | 56 
 1 file changed, 28 insertions(+), 28 deletions(-)

diff --git a/builtin/branch.c b/builtin/branch.c
index 0e060f2..3f34101 100644
--- a/builtin/branch.c
+++ b/builtin/branch.c
@@ -19,10 +19,10 @@
 #include column.h
 
 static const char * const builtin_branch_usage[] = {
-   git branch [options] [-r | -a] [--merged | --no-merged],
-   git branch [options] [-l] [-f] branchname [start-point],
-   git branch [options] [-r] (-d | -D) branchname...,
-   git branch [options] (-m | -M) [oldbranch] newbranch,
+   N_(git branch [options] [-r | -a] [--merged | --no-merged]),
+   N_(git branch [options] [-l] [-f] branchname [start-point]),
+   N_(git branch [options] [-r] (-d | -D) branchname...),
+   N_(git branch [options] (-m | -M) [oldbranch] newbranch),
NULL
 };
 
@@ -718,56 +718,56 @@ int cmd_branch(int argc, const char **argv, const char 
*prefix)
struct commit_list *with_commit = NULL;
 
struct option options[] = {
-   OPT_GROUP(Generic options),
+   OPT_GROUP(N_(Generic options)),
OPT__VERBOSE(verbose,
-   show hash and subject, give twice for upstream 
branch),
-   OPT__QUIET(quiet, suppress informational messages),
-   OPT_SET_INT('t', track,  track, set up tracking mode (see 
git-pull(1)),
+   N_(show hash and subject, give twice for upstream 
branch)),
+   OPT__QUIET(quiet, N_(suppress informational messages)),
+   OPT_SET_INT('t', track,  track, N_(set up tracking mode 
(see git-pull(1))),
BRANCH_TRACK_EXPLICIT),
-   OPT_SET_INT( 0, set-upstream,  track, change upstream info,
+   OPT_SET_INT( 0, set-upstream,  track, N_(change upstream 
info),
BRANCH_TRACK_OVERRIDE),
-   OPT__COLOR(branch_use_color, use colored output),
-   OPT_SET_INT('r', remotes, kinds, act on remote-tracking 
branches,
+   OPT__COLOR(branch_use_color, N_(use colored output)),
+   OPT_SET_INT('r', remotes, kinds, N_(act on 
remote-tracking branches),
REF_REMOTE_BRANCH),
{
-   OPTION_CALLBACK, 0, contains, with_commit, commit,
-   print only branches that contain the commit,
+   OPTION_CALLBACK, 0, contains, with_commit, 
N_(commit),
+   N_(print only branches that contain the commit),
PARSE_OPT_LASTARG_DEFAULT,
parse_opt_with_commit, (intptr_t)HEAD,
},
{
-   OPTION_CALLBACK, 0, with, with_commit, commit,
-   print only branches that contain the commit,
+   OPTION_CALLBACK, 0, with, with_commit, N_(commit),
+   N_(print only branches that contain the commit),
PARSE_OPT_HIDDEN | PARSE_OPT_LASTARG_DEFAULT,
parse_opt_with_commit, (intptr_t) HEAD,
},
OPT__ABBREV(abbrev),
 
-   OPT_GROUP(Specific git-branch actions:),
-   OPT_SET_INT('a', all, kinds, list both remote-tracking and 
local branches,
+   OPT_GROUP(N_(Specific git-branch actions:)),
+   OPT_SET_INT('a', all, kinds, N_(list both remote-tracking 
and local branches),
REF_REMOTE_BRANCH | REF_LOCAL_BRANCH),
-   OPT_BIT('d', delete, delete, delete fully merged branch, 
1),
-   OPT_BIT('D', NULL, delete, delete branch (even if not 
merged), 2),
-   OPT_BIT('m', move, rename, move/rename a branch and its 
reflog, 1),
-   OPT_BIT('M', NULL, rename, move/rename a branch, even if 
target exists, 2),
-   OPT_BOOLEAN(0, list, list, list branch names),
-   OPT_BOOLEAN('l', create-reflog, reflog, create the branch's 
reflog),
+   OPT_BIT('d', delete, delete, N_(delete fully merged 
branch), 1),
+   OPT_BIT('D', NULL, delete, N_(delete branch (even if not 
merged)), 2),
+   OPT_BIT('m', move, rename, N_(move/rename a branch and its 
reflog), 1),
+   OPT_BIT('M', NULL, rename, N_(move/rename a branch, even if 
target exists), 2),
+   OPT_BOOLEAN(0, list, list, N_(list branch names)),
+   OPT_BOOLEAN('l', create-reflog, reflog, N_(create the 
branch's reflog)),
OPT_BOOLEAN(0, edit-description, edit_description,
-   edit the description for the branch),
-   OPT__FORCE(force_create, force creation (when already 
exists)),
+   N_(edit the description for the branch)),
+   OPT__FORCE(force_create, 

[PATCH 07/66] i18n: cat-file: mark parseopt strings for translation

2012-08-20 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com
---
 builtin/cat-file.c | 20 ++--
 1 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/builtin/cat-file.c b/builtin/cat-file.c
index af74e77..512072a 100644
--- a/builtin/cat-file.c
+++ b/builtin/cat-file.c
@@ -244,8 +244,8 @@ static int batch_objects(int print_contents)
 }
 
 static const char * const cat_file_usage[] = {
-   git cat-file (-t|-s|-e|-p|type|--textconv) object,
-   git cat-file (--batch|--batch-check)  list_of_objects,
+   N_(git cat-file (-t|-s|-e|-p|type|--textconv) object),
+   N_(git cat-file (--batch|--batch-check)  list_of_objects),
NULL
 };
 
@@ -263,19 +263,19 @@ int cmd_cat_file(int argc, const char **argv, const char 
*prefix)
const char *exp_type = NULL, *obj_name = NULL;
 
const struct option options[] = {
-   OPT_GROUP(type can be one of: blob, tree, commit, tag),
-   OPT_SET_INT('t', NULL, opt, show object type, 't'),
-   OPT_SET_INT('s', NULL, opt, show object size, 's'),
+   OPT_GROUP(N_(type can be one of: blob, tree, commit, tag)),
+   OPT_SET_INT('t', NULL, opt, N_(show object type), 't'),
+   OPT_SET_INT('s', NULL, opt, N_(show object size), 's'),
OPT_SET_INT('e', NULL, opt,
-   exit with zero when there's no error, 'e'),
-   OPT_SET_INT('p', NULL, opt, pretty-print object's content, 
'p'),
+   N_(exit with zero when there's no error), 'e'),
+   OPT_SET_INT('p', NULL, opt, N_(pretty-print object's 
content), 'p'),
OPT_SET_INT(0, textconv, opt,
-   for blob objects, run textconv on object's 
content, 'c'),
+   N_(for blob objects, run textconv on object's 
content), 'c'),
OPT_SET_INT(0, batch, batch,
-   show info and content of objects fed from the 
standard input,
+   N_(show info and content of objects fed from the 
standard input),
BATCH),
OPT_SET_INT(0, batch-check, batch,
-   show info about objects fed from the standard 
input,
+   N_(show info about objects fed from the standard 
input),
BATCH_CHECK),
OPT_END()
};
-- 
1.7.12.rc2.18.g61b472e

--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 08/66] i18n: check-attr: mark parseopt strings for translation

2012-08-20 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com
---
 builtin/check-attr.c | 12 ++--
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/builtin/check-attr.c b/builtin/check-attr.c
index 44c421e..e1ff575 100644
--- a/builtin/check-attr.c
+++ b/builtin/check-attr.c
@@ -8,19 +8,19 @@ static int all_attrs;
 static int cached_attrs;
 static int stdin_paths;
 static const char * const check_attr_usage[] = {
-git check-attr [-a | --all | attr...] [--] pathname...,
-git check-attr --stdin [-a | --all | attr...]  list-of-paths,
+N_(git check-attr [-a | --all | attr...] [--] pathname...),
+N_(git check-attr --stdin [-a | --all | attr...]  list-of-paths),
 NULL
 };
 
 static int null_term_line;
 
 static const struct option check_attr_options[] = {
-   OPT_BOOLEAN('a', all, all_attrs, report all attributes set on 
file),
-   OPT_BOOLEAN(0,  cached, cached_attrs, use .gitattributes only from 
the index),
-   OPT_BOOLEAN(0 , stdin, stdin_paths, read file names from stdin),
+   OPT_BOOLEAN('a', all, all_attrs, N_(report all attributes set on 
file)),
+   OPT_BOOLEAN(0,  cached, cached_attrs, N_(use .gitattributes only 
from the index)),
+   OPT_BOOLEAN(0 , stdin, stdin_paths, N_(read file names from 
stdin)),
OPT_BOOLEAN('z', NULL, null_term_line,
-   input paths are terminated by a null character),
+   N_(input paths are terminated by a null character)),
OPT_END()
 };
 
-- 
1.7.12.rc2.18.g61b472e

--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 09/66] i18n: checkout-index: mark parseopt strings for translation

2012-08-20 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com
---
 builtin/checkout-index.c | 24 
 1 file changed, 12 insertions(+), 12 deletions(-)

diff --git a/builtin/checkout-index.c b/builtin/checkout-index.c
index c16d82b..86b7d36 100644
--- a/builtin/checkout-index.c
+++ b/builtin/checkout-index.c
@@ -123,7 +123,7 @@ static void checkout_all(const char *prefix, int 
prefix_length)
 }
 
 static const char * const builtin_checkout_index_usage[] = {
-   git checkout-index [options] [--] [file...],
+   N_(git checkout-index [options] [--] [file...]),
NULL
 };
 
@@ -184,27 +184,27 @@ int cmd_checkout_index(int argc, const char **argv, const 
char *prefix)
int force = 0, quiet = 0, not_new = 0;
struct option builtin_checkout_index_options[] = {
OPT_BOOLEAN('a', all, all,
-   checks out all files in the index),
-   OPT__FORCE(force, forces overwrite of existing files),
+   N_(checks out all files in the index)),
+   OPT__FORCE(force, N_(forces overwrite of existing files)),
OPT__QUIET(quiet,
-   no warning for existing files and files not in index),
+   N_(no warning for existing files and files not in 
index)),
OPT_BOOLEAN('n', no-create, not_new,
-   don't checkout new files),
+   N_(don't checkout new files)),
{ OPTION_CALLBACK, 'u', index, newfd, NULL,
-   update stat information in the index file,
+   N_(update stat information in the index file),
PARSE_OPT_NOARG, option_parse_u },
{ OPTION_CALLBACK, 'z', NULL, NULL, NULL,
-   paths are separated with NUL character,
+   N_(paths are separated with NUL character),
PARSE_OPT_NOARG, option_parse_z },
OPT_BOOLEAN(0, stdin, read_from_stdin,
-   read list of paths from the standard input),
+   N_(read list of paths from the standard input)),
OPT_BOOLEAN(0, temp, to_tempfile,
-   write the content to temporary files),
-   OPT_CALLBACK(0, prefix, NULL, string,
-   when creating files, prepend string,
+   N_(write the content to temporary files)),
+   OPT_CALLBACK(0, prefix, NULL, N_(string),
+   N_(when creating files, prepend string),
option_parse_prefix),
OPT_CALLBACK(0, stage, NULL, NULL,
-   copy out the files from named stage,
+   N_(copy out the files from named stage),
option_parse_stage),
OPT_END()
};
-- 
1.7.12.rc2.18.g61b472e

--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 10/66] i18n: checkout: mark parseopt strings for translation

2012-08-20 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com
---
 builtin/checkout.c | 40 
 1 file changed, 20 insertions(+), 20 deletions(-)

diff --git a/builtin/checkout.c b/builtin/checkout.c
index d812219..9f6dbe6 100644
--- a/builtin/checkout.c
+++ b/builtin/checkout.c
@@ -22,8 +22,8 @@
 #include argv-array.h
 
 static const char * const checkout_usage[] = {
-   git checkout [options] branch,
-   git checkout [options] [branch] -- file...,
+   N_(git checkout [options] branch),
+   N_(git checkout [options] [branch] -- file...),
NULL,
 };
 
@@ -934,28 +934,28 @@ int cmd_checkout(int argc, const char **argv, const char 
*prefix)
int patch_mode = 0;
int dwim_new_local_branch = 1;
struct option options[] = {
-   OPT__QUIET(opts.quiet, suppress progress reporting),
-   OPT_STRING('b', NULL, opts.new_branch, branch,
-  create and checkout a new branch),
-   OPT_STRING('B', NULL, opts.new_branch_force, branch,
-  create/reset and checkout a branch),
-   OPT_BOOLEAN('l', NULL, opts.new_branch_log, create reflog for 
new branch),
-   OPT_BOOLEAN(0, detach, opts.force_detach, detach the HEAD 
at named commit),
-   OPT_SET_INT('t', track,  opts.track, set upstream info for 
new branch,
+   OPT__QUIET(opts.quiet, N_(suppress progress reporting)),
+   OPT_STRING('b', NULL, opts.new_branch, N_(branch),
+  N_(create and checkout a new branch)),
+   OPT_STRING('B', NULL, opts.new_branch_force, N_(branch),
+  N_(create/reset and checkout a branch)),
+   OPT_BOOLEAN('l', NULL, opts.new_branch_log, N_(create reflog 
for new branch)),
+   OPT_BOOLEAN(0, detach, opts.force_detach, N_(detach the 
HEAD at named commit)),
+   OPT_SET_INT('t', track,  opts.track, N_(set upstream info 
for new branch),
BRANCH_TRACK_EXPLICIT),
-   OPT_STRING(0, orphan, opts.new_orphan_branch, new branch, 
new unparented branch),
-   OPT_SET_INT('2', ours, opts.writeout_stage, checkout our 
version for unmerged files,
+   OPT_STRING(0, orphan, opts.new_orphan_branch, N_(new 
branch), N_(new unparented branch)),
+   OPT_SET_INT('2', ours, opts.writeout_stage, N_(checkout our 
version for unmerged files),
2),
-   OPT_SET_INT('3', theirs, opts.writeout_stage, checkout 
their version for unmerged files,
+   OPT_SET_INT('3', theirs, opts.writeout_stage, N_(checkout 
their version for unmerged files),
3),
-   OPT__FORCE(opts.force, force checkout (throw away local 
modifications)),
-   OPT_BOOLEAN('m', merge, opts.merge, perform a 3-way merge 
with the new branch),
-   OPT_BOOLEAN(0, overwrite-ignore, opts.overwrite_ignore, 
update ignored files (default)),
-   OPT_STRING(0, conflict, conflict_style, style,
-  conflict style (merge or diff3)),
-   OPT_BOOLEAN('p', patch, patch_mode, select hunks 
interactively),
+   OPT__FORCE(opts.force, N_(force checkout (throw away local 
modifications))),
+   OPT_BOOLEAN('m', merge, opts.merge, N_(perform a 3-way 
merge with the new branch)),
+   OPT_BOOLEAN(0, overwrite-ignore, opts.overwrite_ignore, 
N_(update ignored files (default))),
+   OPT_STRING(0, conflict, conflict_style, N_(style),
+  N_(conflict style (merge or diff3))),
+   OPT_BOOLEAN('p', patch, patch_mode, N_(select hunks 
interactively)),
{ OPTION_BOOLEAN, 0, guess, dwim_new_local_branch, NULL,
- second guess 'git checkout no-such-branch',
+ N_(second guess 'git checkout no-such-branch'),
  PARSE_OPT_NOARG | PARSE_OPT_HIDDEN },
OPT_END(),
};
-- 
1.7.12.rc2.18.g61b472e

--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 11/66] i18n: cherry: mark parseopt strings for translation

2012-08-20 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com
---
 builtin/log.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/builtin/log.c b/builtin/log.c
index ecc2793..dcd3e13 100644
--- a/builtin/log.c
+++ b/builtin/log.c
@@ -1443,7 +1443,7 @@ static int add_pending_commit(const char *arg, struct 
rev_info *revs, int flags)
 }
 
 static const char * const cherry_usage[] = {
-   git cherry [-v] [upstream [head [limit]]],
+   N_(git cherry [-v] [upstream [head [limit]]]),
NULL
 };
 
@@ -1477,7 +1477,7 @@ int cmd_cherry(int argc, const char **argv, const char 
*prefix)
 
struct option options[] = {
OPT__ABBREV(abbrev),
-   OPT__VERBOSE(verbose, be verbose),
+   OPT__VERBOSE(verbose, N_(be verbose)),
OPT_END()
};
 
-- 
1.7.12.rc2.18.g61b472e

--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 12/66] i18n: clean: mark parseopt strings for translation

2012-08-20 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com
---
 builtin/clean.c | 18 +-
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/builtin/clean.c b/builtin/clean.c
index 0c7b3d0..69c1cda 100644
--- a/builtin/clean.c
+++ b/builtin/clean.c
@@ -16,7 +16,7 @@
 static int force = -1; /* unset */
 
 static const char *const builtin_clean_usage[] = {
-   git clean [-d] [-f] [-n] [-q] [-e pattern] [-x | -X] [--] 
paths...,
+   N_(git clean [-d] [-f] [-n] [-q] [-e pattern] [-x | -X] [--] 
paths...),
NULL
 };
 
@@ -48,16 +48,16 @@ int cmd_clean(int argc, const char **argv, const char 
*prefix)
const char *qname;
char *seen = NULL;
struct option options[] = {
-   OPT__QUIET(quiet, do not print names of files removed),
-   OPT__DRY_RUN(show_only, dry run),
-   OPT__FORCE(force, force),
+   OPT__QUIET(quiet, N_(do not print names of files removed)),
+   OPT__DRY_RUN(show_only, N_(dry run)),
+   OPT__FORCE(force, N_(force)),
OPT_BOOLEAN('d', NULL, remove_directories,
-   remove whole directories),
-   { OPTION_CALLBACK, 'e', exclude, exclude_list, pattern,
- add pattern to ignore rules, PARSE_OPT_NONEG, exclude_cb 
},
-   OPT_BOOLEAN('x', NULL, ignored, remove ignored files, too),
+   N_(remove whole directories)),
+   { OPTION_CALLBACK, 'e', exclude, exclude_list, N_(pattern),
+ N_(add pattern to ignore rules), PARSE_OPT_NONEG, 
exclude_cb },
+   OPT_BOOLEAN('x', NULL, ignored, N_(remove ignored files, 
too)),
OPT_BOOLEAN('X', NULL, ignored_only,
-   remove only ignored files),
+   N_(remove only ignored files)),
OPT_END()
};
 
-- 
1.7.12.rc2.18.g61b472e

--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 13/66] i18n: clone: mark parseopt strings for translation

2012-08-20 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com
---
 builtin/clone.c | 56 
 1 file changed, 28 insertions(+), 28 deletions(-)

diff --git a/builtin/clone.c b/builtin/clone.c
index e314b0b..5e8f3ba 100644
--- a/builtin/clone.c
+++ b/builtin/clone.c
@@ -33,7 +33,7 @@
  *
  */
 static const char * const builtin_clone_usage[] = {
-   git clone [options] [--] repo [dir],
+   N_(git clone [options] [--] repo [dir]),
NULL
 };
 
@@ -61,43 +61,43 @@ static int opt_parse_reference(const struct option *opt, 
const char *arg, int un
 static struct option builtin_clone_options[] = {
OPT__VERBOSITY(option_verbosity),
OPT_BOOL(0, progress, option_progress,
-force progress reporting),
+N_(force progress reporting)),
OPT_BOOLEAN('n', no-checkout, option_no_checkout,
-   don't create a checkout),
-   OPT_BOOLEAN(0, bare, option_bare, create a bare repository),
+   N_(don't create a checkout)),
+   OPT_BOOLEAN(0, bare, option_bare, N_(create a bare repository)),
{ OPTION_BOOLEAN, 0, naked, option_bare, NULL,
-   create a bare repository,
+   N_(create a bare repository),
PARSE_OPT_NOARG | PARSE_OPT_HIDDEN },
OPT_BOOLEAN(0, mirror, option_mirror,
-   create a mirror repository (implies bare)),
+   N_(create a mirror repository (implies bare))),
OPT_BOOL('l', local, option_local,
-   to clone from a local repository),
+   N_(to clone from a local repository)),
OPT_BOOLEAN(0, no-hardlinks, option_no_hardlinks,
-   don't use local hardlinks, always copy),
+   N_(don't use local hardlinks, always copy)),
OPT_BOOLEAN('s', shared, option_shared,
-   setup as shared repository),
+   N_(setup as shared repository)),
OPT_BOOLEAN(0, recursive, option_recursive,
-   initialize submodules in the clone),
+   N_(initialize submodules in the clone)),
OPT_BOOLEAN(0, recurse-submodules, option_recursive,
-   initialize submodules in the clone),
-   OPT_STRING(0, template, option_template, template-directory,
-  directory from which templates will be used),
-   OPT_CALLBACK(0 , reference, option_reference, repo,
-reference repository, opt_parse_reference),
-   OPT_STRING('o', origin, option_origin, name,
-  use name instead of 'origin' to track upstream),
-   OPT_STRING('b', branch, option_branch, branch,
-  checkout branch instead of the remote's HEAD),
-   OPT_STRING('u', upload-pack, option_upload_pack, path,
-  path to git-upload-pack on the remote),
-   OPT_STRING(0, depth, option_depth, depth,
-   create a shallow clone of that depth),
+   N_(initialize submodules in the clone)),
+   OPT_STRING(0, template, option_template, N_(template-directory),
+  N_(directory from which templates will be used)),
+   OPT_CALLBACK(0 , reference, option_reference, N_(repo),
+N_(reference repository), opt_parse_reference),
+   OPT_STRING('o', origin, option_origin, N_(name),
+  N_(use name instead of 'origin' to track upstream)),
+   OPT_STRING('b', branch, option_branch, N_(branch),
+  N_(checkout branch instead of the remote's HEAD)),
+   OPT_STRING('u', upload-pack, option_upload_pack, N_(path),
+  N_(path to git-upload-pack on the remote)),
+   OPT_STRING(0, depth, option_depth, N_(depth),
+   N_(create a shallow clone of that depth)),
OPT_BOOL(0, single-branch, option_single_branch,
-   clone only one branch, HEAD or --branch),
-   OPT_STRING(0, separate-git-dir, real_git_dir, gitdir,
-  separate git dir from working tree),
-   OPT_STRING_LIST('c', config, option_config, key=value,
-   set config inside the new repository),
+   N_(clone only one branch, HEAD or --branch)),
+   OPT_STRING(0, separate-git-dir, real_git_dir, N_(gitdir),
+  N_(separate git dir from working tree)),
+   OPT_STRING_LIST('c', config, option_config, N_(key=value),
+   N_(set config inside the new repository)),
OPT_END()
 };
 
-- 
1.7.12.rc2.18.g61b472e

--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 14/66] i18n: column: mark parseopt strings for translation

2012-08-20 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com
---
 builtin/column.c | 16 
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/builtin/column.c b/builtin/column.c
index 5ea798a..e125a55 100644
--- a/builtin/column.c
+++ b/builtin/column.c
@@ -6,7 +6,7 @@
 #include column.h
 
 static const char * const builtin_column_usage[] = {
-   git column [options],
+   N_(git column [options]),
NULL
 };
 static unsigned int colopts;
@@ -23,13 +23,13 @@ int cmd_column(int argc, const char **argv, const char 
*prefix)
struct column_options copts;
const char *command = NULL, *real_command = NULL;
struct option options[] = {
-   OPT_STRING(0, command, real_command, name, lookup config 
vars),
-   OPT_COLUMN(0, mode, colopts, layout to use),
-   OPT_INTEGER(0, raw-mode, colopts, layout to use),
-   OPT_INTEGER(0, width, copts.width, Maximum width),
-   OPT_STRING(0, indent, copts.indent, string, Padding space 
on left border),
-   OPT_INTEGER(0, nl, copts.nl, Padding space on right 
border),
-   OPT_INTEGER(0, padding, copts.padding, Padding space 
between columns),
+   OPT_STRING(0, command, real_command, N_(name), N_(lookup 
config vars)),
+   OPT_COLUMN(0, mode, colopts, N_(layout to use)),
+   OPT_INTEGER(0, raw-mode, colopts, N_(layout to use)),
+   OPT_INTEGER(0, width, copts.width, N_(Maximum width)),
+   OPT_STRING(0, indent, copts.indent, N_(string), 
N_(Padding space on left border)),
+   OPT_INTEGER(0, nl, copts.nl, N_(Padding space on right 
border)),
+   OPT_INTEGER(0, padding, copts.padding, N_(Padding space 
between columns)),
OPT_END()
};
 
-- 
1.7.12.rc2.18.g61b472e

--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 15/66] i18n: commit: mark parseopt strings for translation

2012-08-20 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com
---
 builtin/commit.c | 78 
 1 file changed, 39 insertions(+), 39 deletions(-)

diff --git a/builtin/commit.c b/builtin/commit.c
index 20cef95..33b78fe 100644
--- a/builtin/commit.c
+++ b/builtin/commit.c
@@ -30,7 +30,7 @@
 #include column.h
 
 static const char * const builtin_commit_usage[] = {
-   git commit [options] [--] filepattern...,
+   N_(git commit [options] [--] filepattern...),
NULL
 };
 
@@ -1188,7 +1188,7 @@ int cmd_status(int argc, const char **argv, const char 
*prefix)
{ OPTION_STRING, 0, ignore-submodules, ignore_submodule_arg, 
when,
  ignore changes to submodules, optional when: all, dirty, 
untracked. (Default: all),
  PARSE_OPT_OPTARG, NULL, (intptr_t)all },
-   OPT_COLUMN(0, column, s.colopts, list untracked files in 
columns),
+   OPT_COLUMN(0, column, s.colopts, N_(list untracked files in 
columns)),
OPT_END(),
};
 
@@ -1369,53 +1369,53 @@ int cmd_commit(int argc, const char **argv, const char 
*prefix)
 {
static struct wt_status s;
static struct option builtin_commit_options[] = {
-   OPT__QUIET(quiet, suppress summary after successful commit),
-   OPT__VERBOSE(verbose, show diff in commit message template),
-
-   OPT_GROUP(Commit message options),
-   OPT_FILENAME('F', file, logfile, read message from file),
-   OPT_STRING(0, author, force_author, author, override 
author for commit),
-   OPT_STRING(0, date, force_date, date, override date for 
commit),
-   OPT_CALLBACK('m', message, message, message, commit 
message, opt_parse_m),
-   OPT_STRING('c', reedit-message, edit_message, commit, 
reuse and edit message from specified commit),
-   OPT_STRING('C', reuse-message, use_message, commit, reuse 
message from specified commit),
-   OPT_STRING(0, fixup, fixup_message, commit, use 
autosquash formatted message to fixup specified commit),
-   OPT_STRING(0, squash, squash_message, commit, use 
autosquash formatted message to squash specified commit),
-   OPT_BOOLEAN(0, reset-author, renew_authorship, the commit 
is authored by me now (used with -C/-c/--amend)),
-   OPT_BOOLEAN('s', signoff, signoff, add Signed-off-by:),
-   OPT_FILENAME('t', template, template_file, use specified 
template file),
-   OPT_BOOL('e', edit, edit_flag, force edit of commit),
-   OPT_STRING(0, cleanup, cleanup_arg, default, how to strip 
spaces and #comments from message),
-   OPT_BOOLEAN(0, status, include_status, include status in 
commit message template),
-   { OPTION_STRING, 'S', gpg-sign, sign_commit, key id,
- GPG sign commit, PARSE_OPT_OPTARG, NULL, (intptr_t)  },
+   OPT__QUIET(quiet, N_(suppress summary after successful 
commit)),
+   OPT__VERBOSE(verbose, N_(show diff in commit message 
template)),
+
+   OPT_GROUP(N_(Commit message options)),
+   OPT_FILENAME('F', file, logfile, N_(read message from 
file)),
+   OPT_STRING(0, author, force_author, N_(author), 
N_(override author for commit)),
+   OPT_STRING(0, date, force_date, N_(date), N_(override 
date for commit)),
+   OPT_CALLBACK('m', message, message, N_(message), 
N_(commit message), opt_parse_m),
+   OPT_STRING('c', reedit-message, edit_message, N_(commit), 
N_(reuse and edit message from specified commit)),
+   OPT_STRING('C', reuse-message, use_message, N_(commit), 
N_(reuse message from specified commit)),
+   OPT_STRING(0, fixup, fixup_message, N_(commit), N_(use 
autosquash formatted message to fixup specified commit)),
+   OPT_STRING(0, squash, squash_message, N_(commit), N_(use 
autosquash formatted message to squash specified commit)),
+   OPT_BOOLEAN(0, reset-author, renew_authorship, N_(the 
commit is authored by me now (used with -C/-c/--amend))),
+   OPT_BOOLEAN('s', signoff, signoff, N_(add Signed-off-by:)),
+   OPT_FILENAME('t', template, template_file, N_(use specified 
template file)),
+   OPT_BOOL('e', edit, edit_flag, N_(force edit of commit)),
+   OPT_STRING(0, cleanup, cleanup_arg, N_(default), N_(how 
to strip spaces and #comments from message)),
+   OPT_BOOLEAN(0, status, include_status, N_(include status in 
commit message template)),
+   { OPTION_STRING, 'S', gpg-sign, sign_commit, N_(key id),
+ N_(GPG sign commit), PARSE_OPT_OPTARG, NULL, (intptr_t)  
},
/* end commit message options */
 
-   OPT_GROUP(Commit contents options),
-   OPT_BOOLEAN('a', all, all, commit all changed 

[PATCH 16/66] i18n: config: mark parseopt strings for translation

2012-08-20 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com
---
 builtin/config.c | 56 
 1 file changed, 28 insertions(+), 28 deletions(-)

diff --git a/builtin/config.c b/builtin/config.c
index 8cd08da..41032cc 100644
--- a/builtin/config.c
+++ b/builtin/config.c
@@ -4,7 +4,7 @@
 #include parse-options.h
 
 static const char *const builtin_config_usage[] = {
-   git config [options],
+   N_(git config [options]),
NULL
 };
 
@@ -49,33 +49,33 @@ static int respect_includes = -1;
 #define TYPE_PATH (13)
 
 static struct option builtin_config_options[] = {
-   OPT_GROUP(Config file location),
-   OPT_BOOLEAN(0, global, use_global_config, use global config file),
-   OPT_BOOLEAN(0, system, use_system_config, use system config file),
-   OPT_BOOLEAN(0, local, use_local_config, use repository config 
file),
-   OPT_STRING('f', file, given_config_file, file, use given config 
file),
-   OPT_GROUP(Action),
-   OPT_BIT(0, get, actions, get value: name [value-regex], 
ACTION_GET),
-   OPT_BIT(0, get-all, actions, get all values: key [value-regex], 
ACTION_GET_ALL),
-   OPT_BIT(0, get-regexp, actions, get values for regexp: name-regex 
[value-regex], ACTION_GET_REGEXP),
-   OPT_BIT(0, replace-all, actions, replace all matching variables: 
name value [value_regex], ACTION_REPLACE_ALL),
-   OPT_BIT(0, add, actions, adds a new variable: name value, 
ACTION_ADD),
-   OPT_BIT(0, unset, actions, removes a variable: name [value-regex], 
ACTION_UNSET),
-   OPT_BIT(0, unset-all, actions, removes all matches: name 
[value-regex], ACTION_UNSET_ALL),
-   OPT_BIT(0, rename-section, actions, rename section: old-name 
new-name, ACTION_RENAME_SECTION),
-   OPT_BIT(0, remove-section, actions, remove a section: name, 
ACTION_REMOVE_SECTION),
-   OPT_BIT('l', list, actions, list all, ACTION_LIST),
-   OPT_BIT('e', edit, actions, opens an editor, ACTION_EDIT),
-   OPT_STRING(0, get-color, get_color_slot, slot, find the color 
configured: [default]),
-   OPT_STRING(0, get-colorbool, get_colorbool_slot, slot, find the 
color setting: [stdout-is-tty]),
-   OPT_GROUP(Type),
-   OPT_BIT(0, bool, types, value is \true\ or \false\, TYPE_BOOL),
-   OPT_BIT(0, int, types, value is decimal number, TYPE_INT),
-   OPT_BIT(0, bool-or-int, types, value is --bool or --int, 
TYPE_BOOL_OR_INT),
-   OPT_BIT(0, path, types, value is a path (file or directory name), 
TYPE_PATH),
-   OPT_GROUP(Other),
-   OPT_BOOLEAN('z', null, end_null, terminate values with NUL byte),
-   OPT_BOOL(0, includes, respect_includes, respect include directives 
on lookup),
+   OPT_GROUP(N_(Config file location)),
+   OPT_BOOLEAN(0, global, use_global_config, N_(use global config 
file)),
+   OPT_BOOLEAN(0, system, use_system_config, N_(use system config 
file)),
+   OPT_BOOLEAN(0, local, use_local_config, N_(use repository config 
file)),
+   OPT_STRING('f', file, given_config_file, N_(file), N_(use given 
config file)),
+   OPT_GROUP(N_(Action)),
+   OPT_BIT(0, get, actions, N_(get value: name [value-regex]), 
ACTION_GET),
+   OPT_BIT(0, get-all, actions, N_(get all values: key 
[value-regex]), ACTION_GET_ALL),
+   OPT_BIT(0, get-regexp, actions, N_(get values for regexp: 
name-regex [value-regex]), ACTION_GET_REGEXP),
+   OPT_BIT(0, replace-all, actions, N_(replace all matching variables: 
name value [value_regex]), ACTION_REPLACE_ALL),
+   OPT_BIT(0, add, actions, N_(adds a new variable: name value), 
ACTION_ADD),
+   OPT_BIT(0, unset, actions, N_(removes a variable: name 
[value-regex]), ACTION_UNSET),
+   OPT_BIT(0, unset-all, actions, N_(removes all matches: name 
[value-regex]), ACTION_UNSET_ALL),
+   OPT_BIT(0, rename-section, actions, N_(rename section: old-name 
new-name), ACTION_RENAME_SECTION),
+   OPT_BIT(0, remove-section, actions, N_(remove a section: name), 
ACTION_REMOVE_SECTION),
+   OPT_BIT('l', list, actions, N_(list all), ACTION_LIST),
+   OPT_BIT('e', edit, actions, N_(opens an editor), ACTION_EDIT),
+   OPT_STRING(0, get-color, get_color_slot, N_(slot), N_(find the 
color configured: [default])),
+   OPT_STRING(0, get-colorbool, get_colorbool_slot, N_(slot), 
N_(find the color setting: [stdout-is-tty])),
+   OPT_GROUP(N_(Type)),
+   OPT_BIT(0, bool, types, N_(value is \true\ or \false\), 
TYPE_BOOL),
+   OPT_BIT(0, int, types, N_(value is decimal number), TYPE_INT),
+   OPT_BIT(0, bool-or-int, types, N_(value is --bool or --int), 
TYPE_BOOL_OR_INT),
+   OPT_BIT(0, path, types, N_(value is a path (file or directory 
name)), TYPE_PATH),
+   OPT_GROUP(N_(Other)),
+   OPT_BOOLEAN('z', null, end_null, N_(terminate values with NUL 
byte)),
+   OPT_BOOL(0, includes, respect_includes, N_(respect include 
directives on lookup)),
OPT_END(),
 };
 
-- 
1.7.12.rc2.18.g61b472e

--
To 

[PATCH 17/66] i18n: count-objects: mark parseopt strings for translation

2012-08-20 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com
---
 builtin/count-objects.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/builtin/count-objects.c b/builtin/count-objects.c
index c37cb98..9afaa88 100644
--- a/builtin/count-objects.c
+++ b/builtin/count-objects.c
@@ -66,7 +66,7 @@ static void count_objects(DIR *d, char *path, int len, int 
verbose,
 }
 
 static char const * const count_objects_usage[] = {
-   git count-objects [-v],
+   N_(git count-objects [-v]),
NULL
 };
 
@@ -79,7 +79,7 @@ int cmd_count_objects(int argc, const char **argv, const char 
*prefix)
unsigned long loose = 0, packed = 0, packed_loose = 0, garbage = 0;
off_t loose_size = 0;
struct option opts[] = {
-   OPT__VERBOSE(verbose, be verbose),
+   OPT__VERBOSE(verbose, N_(be verbose)),
OPT_END(),
};
 
-- 
1.7.12.rc2.18.g61b472e

--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 18/66] i18n: describe: mark parseopt strings for translation

2012-08-20 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com
---
 builtin/describe.c | 28 ++--
 1 file changed, 14 insertions(+), 14 deletions(-)

diff --git a/builtin/describe.c b/builtin/describe.c
index 9f63067..9fe11ed 100644
--- a/builtin/describe.c
+++ b/builtin/describe.c
@@ -12,8 +12,8 @@
 #define MAX_TAGS   (FLAG_BITS - 1)
 
 static const char * const describe_usage[] = {
-   git describe [options] committish*,
-   git describe [options] --dirty,
+   N_(git describe [options] committish*),
+   N_(git describe [options] --dirty),
NULL
 };
 
@@ -400,22 +400,22 @@ int cmd_describe(int argc, const char **argv, const char 
*prefix)
 {
int contains = 0;
struct option options[] = {
-   OPT_BOOLEAN(0, contains,   contains, find the tag that 
comes after the commit),
-   OPT_BOOLEAN(0, debug,  debug, debug search strategy on 
stderr),
-   OPT_BOOLEAN(0, all,all, use any ref in .git/refs),
-   OPT_BOOLEAN(0, tags,   tags, use any tag in 
.git/refs/tags),
-   OPT_BOOLEAN(0, long,   longformat, always use long 
format),
+   OPT_BOOLEAN(0, contains,   contains, N_(find the tag that 
comes after the commit)),
+   OPT_BOOLEAN(0, debug,  debug, N_(debug search strategy 
on stderr)),
+   OPT_BOOLEAN(0, all,all, N_(use any ref in 
.git/refs)),
+   OPT_BOOLEAN(0, tags,   tags, N_(use any tag in 
.git/refs/tags)),
+   OPT_BOOLEAN(0, long,   longformat, N_(always use long 
format)),
OPT__ABBREV(abbrev),
OPT_SET_INT(0, exact-match, max_candidates,
-   only output exact matches, 0),
+   N_(only output exact matches), 0),
OPT_INTEGER(0, candidates, max_candidates,
-   consider n most recent tags (default: 10)),
-   OPT_STRING(0, match,   pattern, pattern,
-  only consider tags matching pattern),
+   N_(consider n most recent tags (default: 10))),
+   OPT_STRING(0, match,   pattern, N_(pattern),
+  N_(only consider tags matching pattern)),
OPT_BOOLEAN(0, always, always,
-  show abbreviated commit object as fallback),
-   {OPTION_STRING, 0, dirty,  dirty, mark,
-  append mark on dirty working tree (default: 
\-dirty\),
+  N_(show abbreviated commit object as fallback)),
+   {OPTION_STRING, 0, dirty,  dirty, N_(mark),
+  N_(append mark on dirty working tree (default: 
\-dirty\)),
 PARSE_OPT_OPTARG, NULL, (intptr_t) -dirty},
OPT_END(),
};
-- 
1.7.12.rc2.18.g61b472e

--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 19/66] i18n: fast-export: mark parseopt strings for translation

2012-08-20 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com
---
 builtin/fast-export.c | 28 ++--
 1 file changed, 14 insertions(+), 14 deletions(-)

diff --git a/builtin/fast-export.c b/builtin/fast-export.c
index 9ab6db3..12220ad 100644
--- a/builtin/fast-export.c
+++ b/builtin/fast-export.c
@@ -19,7 +19,7 @@
 #include quote.h
 
 static const char *fast_export_usage[] = {
-   git fast-export [rev-list-opts],
+   N_(git fast-export [rev-list-opts]),
NULL
 };
 
@@ -632,24 +632,24 @@ int cmd_fast_export(int argc, const char **argv, const 
char *prefix)
char *export_filename = NULL, *import_filename = NULL;
struct option options[] = {
OPT_INTEGER(0, progress, progress,
-   show progress after n objects),
-   OPT_CALLBACK(0, signed-tags, signed_tag_mode, mode,
-select handling of signed tags,
+   N_(show progress after n objects)),
+   OPT_CALLBACK(0, signed-tags, signed_tag_mode, N_(mode),
+N_(select handling of signed tags),
 parse_opt_signed_tag_mode),
-   OPT_CALLBACK(0, tag-of-filtered-object, 
tag_of_filtered_mode, mode,
-select handling of tags that tag filtered 
objects,
+   OPT_CALLBACK(0, tag-of-filtered-object, 
tag_of_filtered_mode, N_(mode),
+N_(select handling of tags that tag filtered 
objects),
 parse_opt_tag_of_filtered_mode),
-   OPT_STRING(0, export-marks, export_filename, file,
-Dump marks to this file),
-   OPT_STRING(0, import-marks, import_filename, file,
-Import marks from this file),
+   OPT_STRING(0, export-marks, export_filename, N_(file),
+N_(Dump marks to this file)),
+   OPT_STRING(0, import-marks, import_filename, N_(file),
+N_(Import marks from this file)),
OPT_BOOLEAN(0, fake-missing-tagger, fake_missing_tagger,
-Fake a tagger when tags lack one),
+N_(Fake a tagger when tags lack one)),
OPT_BOOLEAN(0, full-tree, full_tree,
-Output full tree for each commit),
+N_(Output full tree for each commit)),
OPT_BOOLEAN(0, use-done-feature, use_done_feature,
-Use the done feature to terminate the stream),
-   OPT_BOOL(0, no-data, no_data, Skip output of blob data),
+N_(Use the done feature to terminate the 
stream)),
+   OPT_BOOL(0, no-data, no_data, N_(Skip output of blob 
data)),
OPT_END()
};
 
-- 
1.7.12.rc2.18.g61b472e

--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 20/66] i18n: fetch: mark parseopt strings for translation

2012-08-20 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com
---
 builtin/fetch.c | 48 
 1 file changed, 24 insertions(+), 24 deletions(-)

diff --git a/builtin/fetch.c b/builtin/fetch.c
index bb9a074..3f2ad77 100644
--- a/builtin/fetch.c
+++ b/builtin/fetch.c
@@ -16,10 +16,10 @@
 #include connected.h
 
 static const char * const builtin_fetch_usage[] = {
-   git fetch [options] [repository [refspec...]],
-   git fetch [options] group,
-   git fetch --multiple [options] [(repository | group)...],
-   git fetch --all [options],
+   N_(git fetch [options] [repository [refspec...]]),
+   N_(git fetch [options] group),
+   N_(git fetch --multiple [options] [(repository | group)...]),
+   N_(git fetch --all [options]),
NULL
 };
 
@@ -56,36 +56,36 @@ static int option_parse_recurse_submodules(const struct 
option *opt,
 static struct option builtin_fetch_options[] = {
OPT__VERBOSITY(verbosity),
OPT_BOOLEAN(0, all, all,
-   fetch from all remotes),
+   N_(fetch from all remotes)),
OPT_BOOLEAN('a', append, append,
-   append to .git/FETCH_HEAD instead of overwriting),
-   OPT_STRING(0, upload-pack, upload_pack, path,
-  path to upload pack on remote end),
-   OPT__FORCE(force, force overwrite of local branch),
+   N_(append to .git/FETCH_HEAD instead of overwriting)),
+   OPT_STRING(0, upload-pack, upload_pack, N_(path),
+  N_(path to upload pack on remote end)),
+   OPT__FORCE(force, N_(force overwrite of local branch)),
OPT_BOOLEAN('m', multiple, multiple,
-   fetch from multiple remotes),
+   N_(fetch from multiple remotes)),
OPT_SET_INT('t', tags, tags,
-   fetch all tags and associated objects, TAGS_SET),
+   N_(fetch all tags and associated objects), TAGS_SET),
OPT_SET_INT('n', NULL, tags,
-   do not fetch all tags (--no-tags), TAGS_UNSET),
+   N_(do not fetch all tags (--no-tags)), TAGS_UNSET),
OPT_BOOLEAN('p', prune, prune,
-   prune remote-tracking branches no longer on remote),
-   { OPTION_CALLBACK, 0, recurse-submodules, NULL, on-demand,
-   control recursive fetching of submodules,
+   N_(prune remote-tracking branches no longer on remote)),
+   { OPTION_CALLBACK, 0, recurse-submodules, NULL, N_(on-demand),
+   N_(control recursive fetching of submodules),
PARSE_OPT_OPTARG, option_parse_recurse_submodules },
OPT_BOOLEAN(0, dry-run, dry_run,
-   dry run),
-   OPT_BOOLEAN('k', keep, keep, keep downloaded pack),
+   N_(dry run)),
+   OPT_BOOLEAN('k', keep, keep, N_(keep downloaded pack)),
OPT_BOOLEAN('u', update-head-ok, update_head_ok,
-   allow updating of HEAD ref),
-   OPT_BOOL(0, progress, progress, force progress reporting),
-   OPT_STRING(0, depth, depth, depth,
-  deepen history of shallow clone),
-   { OPTION_STRING, 0, submodule-prefix, submodule_prefix, dir,
-  prepend this to submodule path output, PARSE_OPT_HIDDEN },
+   N_(allow updating of HEAD ref)),
+   OPT_BOOL(0, progress, progress, N_(force progress reporting)),
+   OPT_STRING(0, depth, depth, N_(depth),
+  N_(deepen history of shallow clone)),
+   { OPTION_STRING, 0, submodule-prefix, submodule_prefix, N_(dir),
+  N_(prepend this to submodule path output), 
PARSE_OPT_HIDDEN },
{ OPTION_STRING, 0, recurse-submodules-default,
   recurse_submodules_default, NULL,
-  default mode for recursion, PARSE_OPT_HIDDEN },
+  N_(default mode for recursion), PARSE_OPT_HIDDEN },
OPT_END()
 };
 
-- 
1.7.12.rc2.18.g61b472e

--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 21/66] i18n: fmt-merge-msg: mark parseopt strings for translation

2012-08-20 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com
---
 builtin/fmt-merge-msg.c | 16 
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/builtin/fmt-merge-msg.c b/builtin/fmt-merge-msg.c
index 2c4d435..e2e27b2 100644
--- a/builtin/fmt-merge-msg.c
+++ b/builtin/fmt-merge-msg.c
@@ -10,7 +10,7 @@
 #include gpg-interface.h
 
 static const char * const fmt_merge_msg_usage[] = {
-   git fmt-merge-msg [-m message] [--log[=n]|--no-log] [--file 
file],
+   N_(git fmt-merge-msg [-m message] [--log[=n]|--no-log] [--file 
file]),
NULL
 };
 
@@ -650,16 +650,16 @@ int cmd_fmt_merge_msg(int argc, const char **argv, const 
char *prefix)
const char *message = NULL;
int shortlog_len = -1;
struct option options[] = {
-   { OPTION_INTEGER, 0, log, shortlog_len, n,
- populate log with at most n entries from shortlog,
+   { OPTION_INTEGER, 0, log, shortlog_len, N_(n),
+ N_(populate log with at most n entries from shortlog),
  PARSE_OPT_OPTARG, NULL, DEFAULT_MERGE_LOG_LEN },
-   { OPTION_INTEGER, 0, summary, shortlog_len, n,
- alias for --log (deprecated),
+   { OPTION_INTEGER, 0, summary, shortlog_len, N_(n),
+ N_(alias for --log (deprecated)),
  PARSE_OPT_OPTARG | PARSE_OPT_HIDDEN, NULL,
  DEFAULT_MERGE_LOG_LEN },
-   OPT_STRING('m', message, message, text,
-   use text as start of message),
-   OPT_FILENAME('F', file, inpath, file to read from),
+   OPT_STRING('m', message, message, N_(text),
+   N_(use text as start of message)),
+   OPT_FILENAME('F', file, inpath, N_(file to read from)),
OPT_END()
};
 
-- 
1.7.12.rc2.18.g61b472e

--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 22/66] i18n: for-each-ref: mark parseopt strings for translation

2012-08-20 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com
---
 builtin/for-each-ref.c | 18 +-
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/builtin/for-each-ref.c b/builtin/for-each-ref.c
index b01d76a..afe83b9 100644
--- a/builtin/for-each-ref.c
+++ b/builtin/for-each-ref.c
@@ -974,7 +974,7 @@ static int opt_parse_sort(const struct option *opt, const 
char *arg, int unset)
 }
 
 static char const * const for_each_ref_usage[] = {
-   git for-each-ref [options] [pattern],
+   N_(git for-each-ref [options] [pattern]),
NULL
 };
 
@@ -989,19 +989,19 @@ int cmd_for_each_ref(int argc, const char **argv, const 
char *prefix)
 
struct option opts[] = {
OPT_BIT('s', shell, quote_style,
-   quote placeholders suitably for shells, QUOTE_SHELL),
+   N_(quote placeholders suitably for shells), 
QUOTE_SHELL),
OPT_BIT('p', perl,  quote_style,
-   quote placeholders suitably for perl, QUOTE_PERL),
+   N_(quote placeholders suitably for perl), QUOTE_PERL),
OPT_BIT(0 , python, quote_style,
-   quote placeholders suitably for python, QUOTE_PYTHON),
+   N_(quote placeholders suitably for python), 
QUOTE_PYTHON),
OPT_BIT(0 , tcl,  quote_style,
-   quote placeholders suitably for tcl, QUOTE_TCL),
+   N_(quote placeholders suitably for tcl), QUOTE_TCL),
 
OPT_GROUP(),
-   OPT_INTEGER( 0 , count, maxcount, show only n matched 
refs),
-   OPT_STRING(  0 , format, format, format, format to use 
for the output),
-   OPT_CALLBACK(0 , sort, sort_tail, key,
-   field name to sort on, opt_parse_sort),
+   OPT_INTEGER( 0 , count, maxcount, N_(show only n matched 
refs)),
+   OPT_STRING(  0 , format, format, N_(format), N_(format to 
use for the output)),
+   OPT_CALLBACK(0 , sort, sort_tail, N_(key),
+   N_(field name to sort on), opt_parse_sort),
OPT_END(),
};
 
-- 
1.7.12.rc2.18.g61b472e

--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 23/66] i18n: format-patch: mark parseopt strings for translation

2012-08-20 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com
---
 builtin/log.c | 66 +--
 1 file changed, 33 insertions(+), 33 deletions(-)

diff --git a/builtin/log.c b/builtin/log.c
index dcd3e13..ba59110 100644
--- a/builtin/log.c
+++ b/builtin/log.c
@@ -890,7 +890,7 @@ static const char *set_outdir(const char *prefix, const 
char *output_directory)
 }
 
 static const char * const builtin_format_patch_usage[] = {
-   git format-patch [options] [since | revision range],
+   N_(git format-patch [options] [since | revision range]),
NULL
 };
 
@@ -1063,61 +1063,61 @@ int cmd_format_patch(int argc, const char **argv, const 
char *prefix)
char *branch_name = NULL;
const struct option builtin_format_patch_options[] = {
{ OPTION_CALLBACK, 'n', numbered, numbered, NULL,
-   use [PATCH n/m] even with a single patch,
+   N_(use [PATCH n/m] even with a single patch),
PARSE_OPT_NOARG, numbered_callback },
{ OPTION_CALLBACK, 'N', no-numbered, numbered, NULL,
-   use [PATCH] even with multiple patches,
+   N_(use [PATCH] even with multiple patches),
PARSE_OPT_NOARG, no_numbered_callback },
-   OPT_BOOLEAN('s', signoff, do_signoff, add Signed-off-by:),
+   OPT_BOOLEAN('s', signoff, do_signoff, N_(add 
Signed-off-by:)),
OPT_BOOLEAN(0, stdout, use_stdout,
-   print patches to standard out),
+   N_(print patches to standard out)),
OPT_BOOLEAN(0, cover-letter, cover_letter,
-   generate a cover letter),
+   N_(generate a cover letter)),
OPT_BOOLEAN(0, numbered-files, numbered_files,
-   use simple number sequence for output file names),
-   OPT_STRING(0, suffix, fmt_patch_suffix, sfx,
-   use sfx instead of '.patch'),
+   N_(use simple number sequence for output file 
names)),
+   OPT_STRING(0, suffix, fmt_patch_suffix, N_(sfx),
+   N_(use sfx instead of '.patch')),
OPT_INTEGER(0, start-number, start_number,
-   start numbering patches at n instead of 1),
-   { OPTION_CALLBACK, 0, subject-prefix, rev, prefix,
-   Use [prefix] instead of [PATCH],
+   N_(start numbering patches at n instead of 1)),
+   { OPTION_CALLBACK, 0, subject-prefix, rev, N_(prefix),
+   N_(Use [prefix] instead of [PATCH]),
PARSE_OPT_NONEG, subject_prefix_callback },
{ OPTION_CALLBACK, 'o', output-directory, output_directory,
-   dir, store resulting files in dir,
+   N_(dir), N_(store resulting files in dir),
PARSE_OPT_NONEG, output_directory_callback },
{ OPTION_CALLBACK, 'k', keep-subject, rev, NULL,
-   don't strip/add [PATCH],
+   N_(don't strip/add [PATCH]),
PARSE_OPT_NOARG | PARSE_OPT_NONEG, keep_callback },
OPT_BOOLEAN(0, no-binary, no_binary_diff,
-   don't output binary diffs),
+   N_(don't output binary diffs)),
OPT_BOOLEAN(0, ignore-if-in-upstream, ignore_if_in_upstream,
-   don't include a patch matching a commit upstream),
+   N_(don't include a patch matching a commit 
upstream)),
{ OPTION_BOOLEAN, 'p', no-stat, use_patch_format, NULL,
- show patch format instead of default (patch + stat),
+ N_(show patch format instead of default (patch + stat)),
  PARSE_OPT_NONEG | PARSE_OPT_NOARG },
-   OPT_GROUP(Messaging),
-   { OPTION_CALLBACK, 0, add-header, NULL, header,
-   add email header, 0, header_callback },
-   { OPTION_CALLBACK, 0, to, NULL, email, add To: header,
+   OPT_GROUP(N_(Messaging)),
+   { OPTION_CALLBACK, 0, add-header, NULL, N_(header),
+   N_(add email header), 0, header_callback },
+   { OPTION_CALLBACK, 0, to, NULL, N_(email), N_(add To: 
header),
0, to_callback },
-   { OPTION_CALLBACK, 0, cc, NULL, email, add Cc: header,
+   { OPTION_CALLBACK, 0, cc, NULL, N_(email), N_(add Cc: 
header),
0, cc_callback },
-   OPT_STRING(0, in-reply-to, in_reply_to, message-id,
-   make first mail a reply to message-id),
-  

[PATCH 24/66] i18n: fsck: mark parseopt strings for translation

2012-08-20 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com
---
 builtin/fsck.c | 24 
 1 file changed, 12 insertions(+), 12 deletions(-)

diff --git a/builtin/fsck.c b/builtin/fsck.c
index a710227..bb9a2cd 100644
--- a/builtin/fsck.c
+++ b/builtin/fsck.c
@@ -605,23 +605,23 @@ static int fsck_cache_tree(struct cache_tree *it)
 }
 
 static char const * const fsck_usage[] = {
-   git fsck [options] [object...],
+   N_(git fsck [options] [object...]),
NULL
 };
 
 static struct option fsck_opts[] = {
-   OPT__VERBOSE(verbose, be verbose),
-   OPT_BOOLEAN(0, unreachable, show_unreachable, show unreachable 
objects),
-   OPT_BOOL(0, dangling, show_dangling, show dangling objects),
-   OPT_BOOLEAN(0, tags, show_tags, report tags),
-   OPT_BOOLEAN(0, root, show_root, report root nodes),
-   OPT_BOOLEAN(0, cache, keep_cache_objects, make index objects head 
nodes),
-   OPT_BOOLEAN(0, reflogs, include_reflogs, make reflogs head nodes 
(default)),
-   OPT_BOOLEAN(0, full, check_full, also consider packs and alternate 
objects),
-   OPT_BOOLEAN(0, strict, check_strict, enable more strict checking),
+   OPT__VERBOSE(verbose, N_(be verbose)),
+   OPT_BOOLEAN(0, unreachable, show_unreachable, N_(show unreachable 
objects)),
+   OPT_BOOL(0, dangling, show_dangling, N_(show dangling objects)),
+   OPT_BOOLEAN(0, tags, show_tags, N_(report tags)),
+   OPT_BOOLEAN(0, root, show_root, N_(report root nodes)),
+   OPT_BOOLEAN(0, cache, keep_cache_objects, N_(make index objects 
head nodes)),
+   OPT_BOOLEAN(0, reflogs, include_reflogs, N_(make reflogs head nodes 
(default))),
+   OPT_BOOLEAN(0, full, check_full, N_(also consider packs and 
alternate objects)),
+   OPT_BOOLEAN(0, strict, check_strict, N_(enable more strict 
checking)),
OPT_BOOLEAN(0, lost-found, write_lost_and_found,
-   write dangling objects in .git/lost-found),
-   OPT_BOOL(0, progress, show_progress, show progress),
+   N_(write dangling objects in 
.git/lost-found)),
+   OPT_BOOL(0, progress, show_progress, N_(show progress)),
OPT_END(),
 };
 
-- 
1.7.12.rc2.18.g61b472e

--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 25/66] i18n: gc: mark parseopt strings for translation

2012-08-20 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com
---
 builtin/gc.c | 12 ++--
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/builtin/gc.c b/builtin/gc.c
index 9b4232c..6d46608 100644
--- a/builtin/gc.c
+++ b/builtin/gc.c
@@ -19,7 +19,7 @@
 #define FAILED_RUN failed to run %s
 
 static const char * const builtin_gc_usage[] = {
-   git gc [options],
+   N_(git gc [options]),
NULL
 };
 
@@ -174,12 +174,12 @@ int cmd_gc(int argc, const char **argv, const char 
*prefix)
int quiet = 0;
 
struct option builtin_gc_options[] = {
-   OPT__QUIET(quiet, suppress progress reporting),
-   { OPTION_STRING, 0, prune, prune_expire, date,
-   prune unreferenced objects,
+   OPT__QUIET(quiet, N_(suppress progress reporting)),
+   { OPTION_STRING, 0, prune, prune_expire, N_(date),
+   N_(prune unreferenced objects),
PARSE_OPT_OPTARG, NULL, (intptr_t)prune_expire },
-   OPT_BOOLEAN(0, aggressive, aggressive, be more thorough 
(increased runtime)),
-   OPT_BOOLEAN(0, auto, auto_gc, enable auto-gc mode),
+   OPT_BOOLEAN(0, aggressive, aggressive, N_(be more thorough 
(increased runtime))),
+   OPT_BOOLEAN(0, auto, auto_gc, N_(enable auto-gc mode)),
OPT_END()
};
 
-- 
1.7.12.rc2.18.g61b472e

--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 26/66] i18n: grep: mark parseopt strings for translation

2012-08-20 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com
---
 builtin/grep.c | 90 +-
 1 file changed, 45 insertions(+), 45 deletions(-)

diff --git a/builtin/grep.c b/builtin/grep.c
index 29adb0a..d73841c 100644
--- a/builtin/grep.c
+++ b/builtin/grep.c
@@ -19,7 +19,7 @@
 #include dir.h
 
 static char const * const grep_usage[] = {
-   git grep [options] [-e] pattern [rev...] [[--] path...],
+   N_(git grep [options] [-e] pattern [rev...] [[--] path...]),
NULL
 };
 
@@ -680,84 +680,84 @@ int cmd_grep(int argc, const char **argv, const char 
*prefix)
 
struct option options[] = {
OPT_BOOLEAN(0, cached, cached,
-   search in index instead of in the work tree),
+   N_(search in index instead of in the work tree)),
OPT_NEGBIT(0, no-index, use_index,
-finds in contents not managed by git, 1),
+N_(finds in contents not managed by git), 1),
OPT_BOOLEAN(0, untracked, untracked,
-   search in both tracked and untracked files),
+   N_(search in both tracked and untracked files)),
OPT_SET_INT(0, exclude-standard, opt_exclude,
-   search also in ignored files, 1),
+   N_(search also in ignored files), 1),
OPT_GROUP(),
OPT_BOOLEAN('v', invert-match, opt.invert,
-   show non-matching lines),
+   N_(show non-matching lines)),
OPT_BOOLEAN('i', ignore-case, opt.ignore_case,
-   case insensitive matching),
+   N_(case insensitive matching)),
OPT_BOOLEAN('w', word-regexp, opt.word_regexp,
-   match patterns only at word boundaries),
+   N_(match patterns only at word boundaries)),
OPT_SET_INT('a', text, opt.binary,
-   process binary files as text, GREP_BINARY_TEXT),
+   N_(process binary files as text), GREP_BINARY_TEXT),
OPT_SET_INT('I', NULL, opt.binary,
-   don't match patterns in binary files,
+   N_(don't match patterns in binary files),
GREP_BINARY_NOMATCH),
-   { OPTION_INTEGER, 0, max-depth, opt.max_depth, depth,
-   descend at most depth levels, PARSE_OPT_NONEG,
+   { OPTION_INTEGER, 0, max-depth, opt.max_depth, N_(depth),
+   N_(descend at most depth levels), PARSE_OPT_NONEG,
NULL, 1 },
OPT_GROUP(),
OPT_SET_INT('E', extended-regexp, pattern_type,
-   use extended POSIX regular expressions,
+   N_(use extended POSIX regular expressions),
pattern_type_ere),
OPT_SET_INT('G', basic-regexp, pattern_type,
-   use basic POSIX regular expressions (default),
+   N_(use basic POSIX regular expressions (default)),
pattern_type_bre),
OPT_SET_INT('F', fixed-strings, pattern_type,
-   interpret patterns as fixed strings,
+   N_(interpret patterns as fixed strings),
pattern_type_fixed),
OPT_SET_INT('P', perl-regexp, pattern_type,
-   use Perl-compatible regular expressions,
+   N_(use Perl-compatible regular expressions),
pattern_type_pcre),
OPT_GROUP(),
-   OPT_BOOLEAN('n', line-number, opt.linenum, show line 
numbers),
-   OPT_NEGBIT('h', NULL, opt.pathname, don't show filenames, 1),
-   OPT_BIT('H', NULL, opt.pathname, show filenames, 1),
+   OPT_BOOLEAN('n', line-number, opt.linenum, N_(show line 
numbers)),
+   OPT_NEGBIT('h', NULL, opt.pathname, N_(don't show 
filenames), 1),
+   OPT_BIT('H', NULL, opt.pathname, N_(show filenames), 1),
OPT_NEGBIT(0, full-name, opt.relative,
-   show filenames relative to top directory, 1),
+   N_(show filenames relative to top directory), 1),
OPT_BOOLEAN('l', files-with-matches, opt.name_only,
-   show only filenames instead of matching lines),
+   N_(show only filenames instead of matching lines)),
OPT_BOOLEAN(0, name-only, opt.name_only,
-   synonym for --files-with-matches),
+   N_(synonym for --files-with-matches)),
OPT_BOOLEAN('L', files-without-match,
opt.unmatch_name_only,
-   show 

[PATCH 27/66] i18n: hash-object: mark parseopt strings for translation

2012-08-20 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com
---
 builtin/hash-object.c | 16 
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/builtin/hash-object.c b/builtin/hash-object.c
index 33911fd..8d184f1 100644
--- a/builtin/hash-object.c
+++ b/builtin/hash-object.c
@@ -57,8 +57,8 @@ static void hash_stdin_paths(const char *type, int 
write_objects)
 }
 
 static const char * const hash_object_usage[] = {
-   git hash-object [-t type] [-w] [--path=file|--no-filters] 
[--stdin] [--] file...,
-   git hash-object  --stdin-paths  list-of-paths,
+   N_(git hash-object [-t type] [-w] [--path=file|--no-filters] 
[--stdin] [--] file...),
+   N_(git hash-object  --stdin-paths  list-of-paths),
NULL
 };
 
@@ -69,12 +69,12 @@ static int stdin_paths;
 static const char *vpath;
 
 static const struct option hash_object_options[] = {
-   OPT_STRING('t', NULL, type, type, object type),
-   OPT_BOOLEAN('w', NULL, write_object, write the object into the object 
database),
-   OPT_BOOLEAN( 0 , stdin, hashstdin, read the object from stdin),
-   OPT_BOOLEAN( 0 , stdin-paths, stdin_paths, read file names from 
stdin),
-   OPT_BOOLEAN( 0 , no-filters, no_filters, store file as is without 
filters),
-   OPT_STRING( 0 , path, vpath, file, process file as it were from 
this path),
+   OPT_STRING('t', NULL, type, N_(type), N_(object type)),
+   OPT_BOOLEAN('w', NULL, write_object, N_(write the object into the 
object database)),
+   OPT_BOOLEAN( 0 , stdin, hashstdin, N_(read the object from stdin)),
+   OPT_BOOLEAN( 0 , stdin-paths, stdin_paths, N_(read file names from 
stdin)),
+   OPT_BOOLEAN( 0 , no-filters, no_filters, N_(store file as is 
without filters)),
+   OPT_STRING( 0 , path, vpath, N_(file), N_(process file as it were 
from this path)),
OPT_END()
 };
 
-- 
1.7.12.rc2.18.g61b472e

--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 28/66] i18n: help: mark parseopt strings for translation

2012-08-20 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com
---
 builtin/help.c | 10 +-
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/builtin/help.c b/builtin/help.c
index efea4f5..bd86253 100644
--- a/builtin/help.c
+++ b/builtin/help.c
@@ -40,17 +40,17 @@ static int show_all = 0;
 static unsigned int colopts;
 static enum help_format help_format = HELP_FORMAT_NONE;
 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,
+   OPT_BOOLEAN('a', all, show_all, N_(print all available commands)),
+   OPT_SET_INT('m', man, help_format, N_(show man page), 
HELP_FORMAT_MAN),
+   OPT_SET_INT('w', web, help_format, N_(show manual in web browser),
HELP_FORMAT_WEB),
-   OPT_SET_INT('i', info, help_format, show info page,
+   OPT_SET_INT('i', info, help_format, N_(show info page),
HELP_FORMAT_INFO),
OPT_END(),
 };
 
 static const char * const builtin_help_usage[] = {
-   git help [--all] [--man|--web|--info] [command],
+   N_(git help [--all] [--man|--web|--info] [command]),
NULL
 };
 
-- 
1.7.12.rc2.18.g61b472e

--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 29/66] i18n: init-db: mark parseopt strings for translation

2012-08-20 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com
---
 builtin/init-db.c | 18 +-
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/builtin/init-db.c b/builtin/init-db.c
index 244fb7f..78aa387 100644
--- a/builtin/init-db.c
+++ b/builtin/init-db.c
@@ -464,7 +464,7 @@ static int shared_callback(const struct option *opt, const 
char *arg, int unset)
 }
 
 static const char *const init_db_usage[] = {
-   git init [-q | --quiet] [--bare] [--template=template-directory] 
[--shared[=permissions]] [directory],
+   N_(git init [-q | --quiet] [--bare] [--template=template-directory] 
[--shared[=permissions]] [directory]),
NULL
 };
 
@@ -482,17 +482,17 @@ int cmd_init_db(int argc, const char **argv, const char 
*prefix)
const char *template_dir = NULL;
unsigned int flags = 0;
const struct option init_db_options[] = {
-   OPT_STRING(0, template, template_dir, template-directory,
-   directory from which templates will be used),
+   OPT_STRING(0, template, template_dir, 
N_(template-directory),
+   N_(directory from which templates will be 
used)),
OPT_SET_INT(0, bare, is_bare_repository_cfg,
-   create a bare repository, 1),
+   N_(create a bare repository), 1),
{ OPTION_CALLBACK, 0, shared, init_shared_repository,
-   permissions,
-   specify that the git repository is to be shared 
amongst several users,
+   N_(permissions),
+   N_(specify that the git repository is to be shared 
amongst several users),
PARSE_OPT_OPTARG | PARSE_OPT_NONEG, shared_callback, 0},
-   OPT_BIT('q', quiet, flags, be quiet, INIT_DB_QUIET),
-   OPT_STRING(0, separate-git-dir, real_git_dir, gitdir,
-  separate git dir from working tree),
+   OPT_BIT('q', quiet, flags, N_(be quiet), INIT_DB_QUIET),
+   OPT_STRING(0, separate-git-dir, real_git_dir, N_(gitdir),
+  N_(separate git dir from working tree)),
OPT_END()
};
 
-- 
1.7.12.rc2.18.g61b472e

--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 30/66] i18n: log: mark parseopt strings for translation

2012-08-20 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com
---
 builtin/log.c | 10 +-
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/builtin/log.c b/builtin/log.c
index ba59110..1ff2d8d 100644
--- a/builtin/log.c
+++ b/builtin/log.c
@@ -34,8 +34,8 @@ static const char *fmt_patch_subject_prefix = PATCH;
 static const char *fmt_pretty;
 
 static const char * const builtin_log_usage[] = {
-   git log [options] [since..until] [[--] path...]\n
-  or: git show [options] object...,
+   N_(git log [options] [since..until] [[--] path...]\n)
+   N_(   or: git show [options] object...),
NULL
 };
 
@@ -97,9 +97,9 @@ static void cmd_log_init_finish(int argc, const char **argv, 
const char *prefix,
int quiet = 0, source = 0;
 
const struct option builtin_log_options[] = {
-   OPT_BOOLEAN(0, quiet, quiet, suppress diff output),
-   OPT_BOOLEAN(0, source, source, show source),
-   { OPTION_CALLBACK, 0, decorate, NULL, NULL, decorate 
options,
+   OPT_BOOLEAN(0, quiet, quiet, N_(suppress diff output)),
+   OPT_BOOLEAN(0, source, source, N_(show source)),
+   { OPTION_CALLBACK, 0, decorate, NULL, NULL, N_(decorate 
options),
  PARSE_OPT_OPTARG, decorate_callback},
OPT_END()
};
-- 
1.7.12.rc2.18.g61b472e

--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 31/66] i18n: ls-files: mark parseopt strings for translation

2012-08-20 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com
---
 builtin/ls-files.c | 54 +++---
 1 file changed, 27 insertions(+), 27 deletions(-)

diff --git a/builtin/ls-files.c b/builtin/ls-files.c
index 31b3f2d..b5434af 100644
--- a/builtin/ls-files.c
+++ b/builtin/ls-files.c
@@ -405,7 +405,7 @@ int report_path_error(const char *ps_matched, const char 
**pathspec, const char
 }
 
 static const char * const ls_files_usage[] = {
-   git ls-files [options] [file...],
+   N_(git ls-files [options] [file...]),
NULL
 };
 
@@ -457,57 +457,57 @@ int cmd_ls_files(int argc, const char **argv, const char 
*cmd_prefix)
struct dir_struct dir;
struct option builtin_ls_files_options[] = {
{ OPTION_CALLBACK, 'z', NULL, NULL, NULL,
-   paths are separated with NUL character,
+   N_(paths are separated with NUL character),
PARSE_OPT_NOARG, option_parse_z },
OPT_BOOLEAN('t', NULL, show_tag,
-   identify the file status with tags),
+   N_(identify the file status with tags)),
OPT_BOOLEAN('v', NULL, show_valid_bit,
-   use lowercase letters for 'assume unchanged' files),
+   N_(use lowercase letters for 'assume unchanged' 
files)),
OPT_BOOLEAN('c', cached, show_cached,
-   show cached files in the output (default)),
+   N_(show cached files in the output (default))),
OPT_BOOLEAN('d', deleted, show_deleted,
-   show deleted files in the output),
+   N_(show deleted files in the output)),
OPT_BOOLEAN('m', modified, show_modified,
-   show modified files in the output),
+   N_(show modified files in the output)),
OPT_BOOLEAN('o', others, show_others,
-   show other files in the output),
+   N_(show other files in the output)),
OPT_BIT('i', ignored, dir.flags,
-   show ignored files in the output,
+   N_(show ignored files in the output),
DIR_SHOW_IGNORED),
OPT_BOOLEAN('s', stage, show_stage,
-   show staged contents' object name in the output),
+   N_(show staged contents' object name in the output)),
OPT_BOOLEAN('k', killed, show_killed,
-   show files on the filesystem that need to be removed),
+   N_(show files on the filesystem that need to be 
removed)),
OPT_BIT(0, directory, dir.flags,
-   show 'other' directories' name only,
+   N_(show 'other' directories' name only),
DIR_SHOW_OTHER_DIRECTORIES),
OPT_NEGBIT(0, empty-directory, dir.flags,
-   don't show empty directories,
+   N_(don't show empty directories),
DIR_HIDE_EMPTY_DIRECTORIES),
OPT_BOOLEAN('u', unmerged, show_unmerged,
-   show unmerged files in the output),
+   N_(show unmerged files in the output)),
OPT_BOOLEAN(0, resolve-undo, show_resolve_undo,
-   show resolve-undo information),
-   { OPTION_CALLBACK, 'x', exclude, dir.exclude_list[EXC_CMDL], 
pattern,
-   skip files matching pattern,
+   N_(show resolve-undo information)),
+   { OPTION_CALLBACK, 'x', exclude, dir.exclude_list[EXC_CMDL], 
N_(pattern),
+   N_(skip files matching pattern),
0, option_parse_exclude },
-   { OPTION_CALLBACK, 'X', exclude-from, dir, file,
-   exclude patterns are read from file,
+   { OPTION_CALLBACK, 'X', exclude-from, dir, N_(file),
+   N_(exclude patterns are read from file),
0, option_parse_exclude_from },
-   OPT_STRING(0, exclude-per-directory, dir.exclude_per_dir, 
file,
-   read additional per-directory exclude patterns in 
file),
+   OPT_STRING(0, exclude-per-directory, dir.exclude_per_dir, 
N_(file),
+   N_(read additional per-directory exclude patterns in 
file)),
{ OPTION_CALLBACK, 0, exclude-standard, dir, NULL,
-   add the standard git exclusions,
+   N_(add the standard git exclusions),
PARSE_OPT_NOARG, option_parse_exclude_standard },
{ OPTION_SET_INT, 0, full-name, prefix_len, NULL,
-   make the output relative to the project top directory,
+   

[PATCH 32/66] i18n: ls-tree: mark parseopt strings for translation

2012-08-20 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com
---
 builtin/ls-tree.c | 22 +++---
 1 file changed, 11 insertions(+), 11 deletions(-)

diff --git a/builtin/ls-tree.c b/builtin/ls-tree.c
index 6b666e1..235c17c 100644
--- a/builtin/ls-tree.c
+++ b/builtin/ls-tree.c
@@ -24,7 +24,7 @@ static int chomp_prefix;
 static const char *ls_tree_prefix;
 
 static const  char * const ls_tree_usage[] = {
-   git ls-tree [options] tree-ish [path...],
+   N_(git ls-tree [options] tree-ish [path...]),
NULL
 };
 
@@ -122,25 +122,25 @@ int cmd_ls_tree(int argc, const char **argv, const char 
*prefix)
struct tree *tree;
int i, full_tree = 0;
const struct option ls_tree_options[] = {
-   OPT_BIT('d', NULL, ls_options, only show trees,
+   OPT_BIT('d', NULL, ls_options, N_(only show trees),
LS_TREE_ONLY),
-   OPT_BIT('r', NULL, ls_options, recurse into subtrees,
+   OPT_BIT('r', NULL, ls_options, N_(recurse into subtrees),
LS_RECURSIVE),
-   OPT_BIT('t', NULL, ls_options, show trees when recursing,
+   OPT_BIT('t', NULL, ls_options, N_(show trees when recursing),
LS_SHOW_TREES),
OPT_SET_INT('z', NULL, line_termination,
-   terminate entries with NUL byte, 0),
-   OPT_BIT('l', long, ls_options, include object size,
+   N_(terminate entries with NUL byte), 0),
+   OPT_BIT('l', long, ls_options, N_(include object size),
LS_SHOW_SIZE),
-   OPT_BIT(0, name-only, ls_options, list only filenames,
+   OPT_BIT(0, name-only, ls_options, N_(list only filenames),
LS_NAME_ONLY),
-   OPT_BIT(0, name-status, ls_options, list only filenames,
+   OPT_BIT(0, name-status, ls_options, N_(list only 
filenames),
LS_NAME_ONLY),
OPT_SET_INT(0, full-name, chomp_prefix,
-   use full path names, 0),
+   N_(use full path names), 0),
OPT_BOOLEAN(0, full-tree, full_tree,
-   list entire tree; not just current directory 
-   (implies --full-name)),
+   N_(list entire tree; not just current directory 
+  (implies --full-name))),
OPT__ABBREV(abbrev),
OPT_END()
};
-- 
1.7.12.rc2.18.g61b472e

--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 33/66] i18n: merge-base: mark parseopt strings for translation

2012-08-20 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com
---
 builtin/merge-base.c | 12 ++--
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/builtin/merge-base.c b/builtin/merge-base.c
index 4f30f1b..2f223a6 100644
--- a/builtin/merge-base.c
+++ b/builtin/merge-base.c
@@ -23,9 +23,9 @@ static int show_merge_base(struct commit **rev, int rev_nr, 
int show_all)
 }
 
 static const char * const merge_base_usage[] = {
-   git merge-base [-a|--all] commit commit...,
-   git merge-base [-a|--all] --octopus commit...,
-   git merge-base --independent commit...,
+   N_(git merge-base [-a|--all] commit commit...),
+   N_(git merge-base [-a|--all] --octopus commit...),
+   N_(git merge-base --independent commit...),
NULL
 };
 
@@ -79,9 +79,9 @@ int cmd_merge_base(int argc, const char **argv, const char 
*prefix)
int reduce = 0;
 
struct option options[] = {
-   OPT_BOOLEAN('a', all, show_all, output all common 
ancestors),
-   OPT_BOOLEAN(0, octopus, octopus, find ancestors for a 
single n-way merge),
-   OPT_BOOLEAN(0, independent, reduce, list revs not reachable 
from others),
+   OPT_BOOLEAN('a', all, show_all, N_(output all common 
ancestors)),
+   OPT_BOOLEAN(0, octopus, octopus, N_(find ancestors for a 
single n-way merge)),
+   OPT_BOOLEAN(0, independent, reduce, N_(list revs not 
reachable from others)),
OPT_END()
};
 
-- 
1.7.12.rc2.18.g61b472e

--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 34/66] i18n: merge-file: mark parseopt strings for translation

2012-08-20 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com
---
 builtin/merge-file.c | 20 ++--
 1 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/builtin/merge-file.c b/builtin/merge-file.c
index 6f0efef..c0570f2 100644
--- a/builtin/merge-file.c
+++ b/builtin/merge-file.c
@@ -5,7 +5,7 @@
 #include parse-options.h
 
 static const char *const merge_file_usage[] = {
-   git merge-file [options] [-L name1 [-L orig [-L name2]]] file1 
orig_file file2,
+   N_(git merge-file [options] [-L name1 [-L orig [-L name2]]] file1 
orig_file file2),
NULL
 };
 
@@ -30,19 +30,19 @@ int cmd_merge_file(int argc, const char **argv, const char 
*prefix)
int quiet = 0;
int prefixlen = 0;
struct option options[] = {
-   OPT_BOOLEAN('p', stdout, to_stdout, send results to 
standard output),
-   OPT_SET_INT(0, diff3, xmp.style, use a diff3 based merge, 
XDL_MERGE_DIFF3),
-   OPT_SET_INT(0, ours, xmp.favor, for conflicts, use our 
version,
+   OPT_BOOLEAN('p', stdout, to_stdout, N_(send results to 
standard output)),
+   OPT_SET_INT(0, diff3, xmp.style, N_(use a diff3 based 
merge), XDL_MERGE_DIFF3),
+   OPT_SET_INT(0, ours, xmp.favor, N_(for conflicts, use our 
version),
XDL_MERGE_FAVOR_OURS),
-   OPT_SET_INT(0, theirs, xmp.favor, for conflicts, use their 
version,
+   OPT_SET_INT(0, theirs, xmp.favor, N_(for conflicts, use 
their version),
XDL_MERGE_FAVOR_THEIRS),
-   OPT_SET_INT(0, union, xmp.favor, for conflicts, use a union 
version,
+   OPT_SET_INT(0, union, xmp.favor, N_(for conflicts, use a 
union version),
XDL_MERGE_FAVOR_UNION),
OPT_INTEGER(0, marker-size, xmp.marker_size,
-   for conflicts, use this marker size),
-   OPT__QUIET(quiet, do not warn about conflicts),
-   OPT_CALLBACK('L', NULL, names, name,
-set labels for file1/orig_file/file2, label_cb),
+   N_(for conflicts, use this marker size)),
+   OPT__QUIET(quiet, N_(do not warn about conflicts)),
+   OPT_CALLBACK('L', NULL, names, N_(name),
+N_(set labels for file1/orig_file/file2), 
label_cb),
OPT_END(),
};
 
-- 
1.7.12.rc2.18.g61b472e

--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 35/66] i18n: merge: mark parseopt strings for translation

2012-08-20 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com
---
 builtin/merge.c | 48 
 1 file changed, 24 insertions(+), 24 deletions(-)

diff --git a/builtin/merge.c b/builtin/merge.c
index dd50a0c..e9871ab 100644
--- a/builtin/merge.c
+++ b/builtin/merge.c
@@ -40,9 +40,9 @@ struct strategy {
 };
 
 static const char * const builtin_merge_usage[] = {
-   git merge [options] [commit...],
-   git merge [options] msg HEAD commit,
-   git merge --abort,
+   N_(git merge [options] [commit...]),
+   N_(git merge [options] msg HEAD commit),
+   N_(git merge --abort),
NULL
 };
 
@@ -180,39 +180,39 @@ static int option_parse_n(const struct option *opt,
 
 static struct option builtin_merge_options[] = {
{ OPTION_CALLBACK, 'n', NULL, NULL, NULL,
-   do not show a diffstat at the end of the merge,
+   N_(do not show a diffstat at the end of the merge),
PARSE_OPT_NOARG, option_parse_n },
OPT_BOOLEAN(0, stat, show_diffstat,
-   show a diffstat at the end of the merge),
-   OPT_BOOLEAN(0, summary, show_diffstat, (synonym to --stat)),
-   { OPTION_INTEGER, 0, log, shortlog_len, n,
- add (at most n) entries from shortlog to merge commit message,
+   N_(show a diffstat at the end of the merge)),
+   OPT_BOOLEAN(0, summary, show_diffstat, N_((synonym to --stat))),
+   { OPTION_INTEGER, 0, log, shortlog_len, N_(n),
+ N_(add (at most n) entries from shortlog to merge commit message),
  PARSE_OPT_OPTARG, NULL, DEFAULT_MERGE_LOG_LEN },
OPT_BOOLEAN(0, squash, squash,
-   create a single commit instead of doing a merge),
+   N_(create a single commit instead of doing a merge)),
OPT_BOOLEAN(0, commit, option_commit,
-   perform a commit if the merge succeeds (default)),
+   N_(perform a commit if the merge succeeds (default))),
OPT_BOOL('e', edit, option_edit,
-   edit message before committing),
+   N_(edit message before committing)),
OPT_BOOLEAN(0, ff, allow_fast_forward,
-   allow fast-forward (default)),
+   N_(allow fast-forward (default))),
OPT_BOOLEAN(0, ff-only, fast_forward_only,
-   abort if fast-forward is not possible),
+   N_(abort if fast-forward is not possible)),
OPT_RERERE_AUTOUPDATE(allow_rerere_auto),
-   OPT_CALLBACK('s', strategy, use_strategies, strategy,
-   merge strategy to use, option_parse_strategy),
-   OPT_CALLBACK('X', strategy-option, xopts, option=value,
-   option for selected merge strategy, option_parse_x),
-   OPT_CALLBACK('m', message, merge_msg, message,
-   merge commit message (for a non-fast-forward merge),
+   OPT_CALLBACK('s', strategy, use_strategies, N_(strategy),
+   N_(merge strategy to use), option_parse_strategy),
+   OPT_CALLBACK('X', strategy-option, xopts, N_(option=value),
+   N_(option for selected merge strategy), option_parse_x),
+   OPT_CALLBACK('m', message, merge_msg, N_(message),
+   N_(merge commit message (for a non-fast-forward merge)),
option_parse_message),
OPT__VERBOSITY(verbosity),
OPT_BOOLEAN(0, abort, abort_current_merge,
-   abort the current in-progress merge),
-   OPT_SET_INT(0, progress, show_progress, force progress reporting, 
1),
-   { OPTION_STRING, 'S', gpg-sign, sign_commit, key id,
- GPG sign commit, PARSE_OPT_OPTARG, NULL, (intptr_t)  },
-   OPT_BOOLEAN(0, overwrite-ignore, overwrite_ignore, update ignored 
files (default)),
+   N_(abort the current in-progress merge)),
+   OPT_SET_INT(0, progress, show_progress, N_(force progress 
reporting), 1),
+   { OPTION_STRING, 'S', gpg-sign, sign_commit, N_(key id),
+ N_(GPG sign commit), PARSE_OPT_OPTARG, NULL, (intptr_t)  },
+   OPT_BOOLEAN(0, overwrite-ignore, overwrite_ignore, N_(update 
ignored files (default))),
OPT_END()
 };
 
-- 
1.7.12.rc2.18.g61b472e

--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 36/66] i18n: mktree: mark parseopt strings for translation

2012-08-20 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com
---
 builtin/mktree.c | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/builtin/mktree.c b/builtin/mktree.c
index 4ae1c41..f92ba40 100644
--- a/builtin/mktree.c
+++ b/builtin/mktree.c
@@ -64,7 +64,7 @@ static void write_tree(unsigned char *sha1)
 }
 
 static const char *mktree_usage[] = {
-   git mktree [-z] [--missing] [--batch],
+   N_(git mktree [-z] [--missing] [--batch]),
NULL
 };
 
@@ -150,9 +150,9 @@ int cmd_mktree(int ac, const char **av, const char *prefix)
int got_eof = 0;
 
const struct option option[] = {
-   OPT_SET_INT('z', NULL, line_termination, input is NUL 
terminated, '\0'),
-   OPT_SET_INT( 0 , missing, allow_missing, allow missing 
objects, 1),
-   OPT_SET_INT( 0 , batch, is_batch_mode, allow creation of 
more than one tree, 1),
+   OPT_SET_INT('z', NULL, line_termination, N_(input is NUL 
terminated), '\0'),
+   OPT_SET_INT( 0 , missing, allow_missing, N_(allow missing 
objects), 1),
+   OPT_SET_INT( 0 , batch, is_batch_mode, N_(allow creation of 
more than one tree), 1),
OPT_END()
};
 
-- 
1.7.12.rc2.18.g61b472e

--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 37/66] i18n: mv: mark parseopt strings for translation

2012-08-20 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com
---
 builtin/mv.c | 10 +-
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/builtin/mv.c b/builtin/mv.c
index 2a144b0..034fec9 100644
--- a/builtin/mv.c
+++ b/builtin/mv.c
@@ -11,7 +11,7 @@
 #include parse-options.h
 
 static const char * const builtin_mv_usage[] = {
-   git mv [options] source... destination,
+   N_(git mv [options] source... destination),
NULL
 };
 
@@ -59,10 +59,10 @@ int cmd_mv(int argc, const char **argv, const char *prefix)
int i, newfd;
int verbose = 0, show_only = 0, force = 0, ignore_errors = 0;
struct option builtin_mv_options[] = {
-   OPT__VERBOSE(verbose, be verbose),
-   OPT__DRY_RUN(show_only, dry run),
-   OPT__FORCE(force, force move/rename even if target exists),
-   OPT_BOOLEAN('k', NULL, ignore_errors, skip move/rename 
errors),
+   OPT__VERBOSE(verbose, N_(be verbose)),
+   OPT__DRY_RUN(show_only, N_(dry run)),
+   OPT__FORCE(force, N_(force move/rename even if target 
exists)),
+   OPT_BOOLEAN('k', NULL, ignore_errors, N_(skip move/rename 
errors)),
OPT_END(),
};
const char **source, **destination, **dest_path;
-- 
1.7.12.rc2.18.g61b472e

--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 38/66] i18n: name-rev: mark parseopt strings for translation

2012-08-20 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com
---
 builtin/name-rev.c | 22 +++---
 1 file changed, 11 insertions(+), 11 deletions(-)

diff --git a/builtin/name-rev.c b/builtin/name-rev.c
index 1b37458..6238247 100644
--- a/builtin/name-rev.c
+++ b/builtin/name-rev.c
@@ -172,9 +172,9 @@ static void show_name(const struct object *obj,
 }
 
 static char const * const name_rev_usage[] = {
-   git name-rev [options] commit...,
-   git name-rev [options] --all,
-   git name-rev [options] --stdin,
+   N_(git name-rev [options] commit...),
+   N_(git name-rev [options] --all),
+   N_(git name-rev [options] --stdin),
NULL
 };
 
@@ -226,16 +226,16 @@ int cmd_name_rev(int argc, const char **argv, const char 
*prefix)
int all = 0, transform_stdin = 0, allow_undefined = 1, always = 0;
struct name_ref_data data = { 0, 0, NULL };
struct option opts[] = {
-   OPT_BOOLEAN(0, name-only, data.name_only, print only names 
(no SHA-1)),
-   OPT_BOOLEAN(0, tags, data.tags_only, only use tags to name 
the commits),
-   OPT_STRING(0, refs, data.ref_filter, pattern,
-  only use refs matching pattern),
+   OPT_BOOLEAN(0, name-only, data.name_only, N_(print only 
names (no SHA-1))),
+   OPT_BOOLEAN(0, tags, data.tags_only, N_(only use tags to 
name the commits)),
+   OPT_STRING(0, refs, data.ref_filter, N_(pattern),
+  N_(only use refs matching pattern)),
OPT_GROUP(),
-   OPT_BOOLEAN(0, all, all, list all commits reachable from 
all refs),
-   OPT_BOOLEAN(0, stdin, transform_stdin, read from stdin),
-   OPT_BOOLEAN(0, undefined, allow_undefined, allow to print 
`undefined` names),
+   OPT_BOOLEAN(0, all, all, N_(list all commits reachable from 
all refs)),
+   OPT_BOOLEAN(0, stdin, transform_stdin, N_(read from 
stdin)),
+   OPT_BOOLEAN(0, undefined, allow_undefined, N_(allow to 
print `undefined` names)),
OPT_BOOLEAN(0, always, always,
-  show abbreviated commit object as fallback),
+  N_(show abbreviated commit object as fallback)),
OPT_END(),
};
 
-- 
1.7.12.rc2.18.g61b472e

--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 39/66] i18n: notes: mark parseopt strings for translation

2012-08-20 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com
---
 builtin/notes.c | 120 
 1 file changed, 60 insertions(+), 60 deletions(-)

diff --git a/builtin/notes.c b/builtin/notes.c
index 3644d14..423c6e8 100644
--- a/builtin/notes.c
+++ b/builtin/notes.c
@@ -20,71 +20,71 @@
 #include notes-merge.h
 
 static const char * const git_notes_usage[] = {
-   git notes [--ref notes_ref] [list [object]],
-   git notes [--ref notes_ref] add [-f] [-m msg | -F file | (-c | 
-C) object] [object],
-   git notes [--ref notes_ref] copy [-f] from-object to-object,
-   git notes [--ref notes_ref] append [-m msg | -F file | (-c | -C) 
object] [object],
-   git notes [--ref notes_ref] edit [object],
-   git notes [--ref notes_ref] show [object],
-   git notes [--ref notes_ref] merge [-v | -q] [-s strategy ] 
notes_ref,
-   git notes merge --commit [-v | -q],
-   git notes merge --abort [-v | -q],
-   git notes [--ref notes_ref] remove [object...],
-   git notes [--ref notes_ref] prune [-n | -v],
-   git notes [--ref notes_ref] get-ref,
+   N_(git notes [--ref notes_ref] [list [object]]),
+   N_(git notes [--ref notes_ref] add [-f] [-m msg | -F file | (-c 
| -C) object] [object]),
+   N_(git notes [--ref notes_ref] copy [-f] from-object to-object),
+   N_(git notes [--ref notes_ref] append [-m msg | -F file | (-c | 
-C) object] [object]),
+   N_(git notes [--ref notes_ref] edit [object]),
+   N_(git notes [--ref notes_ref] show [object]),
+   N_(git notes [--ref notes_ref] merge [-v | -q] [-s strategy ] 
notes_ref),
+   N_(git notes merge --commit [-v | -q]),
+   N_(git notes merge --abort [-v | -q]),
+   N_(git notes [--ref notes_ref] remove [object...]),
+   N_(git notes [--ref notes_ref] prune [-n | -v]),
+   N_(git notes [--ref notes_ref] get-ref),
NULL
 };
 
 static const char * const git_notes_list_usage[] = {
-   git notes [list [object]],
+   N_(git notes [list [object]]),
NULL
 };
 
 static const char * const git_notes_add_usage[] = {
-   git notes add [options] [object],
+   N_(git notes add [options] [object]),
NULL
 };
 
 static const char * const git_notes_copy_usage[] = {
-   git notes copy [options] from-object to-object,
-   git notes copy --stdin [from-object to-object]...,
+   N_(git notes copy [options] from-object to-object),
+   N_(git notes copy --stdin [from-object to-object]...),
NULL
 };
 
 static const char * const git_notes_append_usage[] = {
-   git notes append [options] [object],
+   N_(git notes append [options] [object]),
NULL
 };
 
 static const char * const git_notes_edit_usage[] = {
-   git notes edit [object],
+   N_(git notes edit [object]),
NULL
 };
 
 static const char * const git_notes_show_usage[] = {
-   git notes show [object],
+   N_(git notes show [object]),
NULL
 };
 
 static const char * const git_notes_merge_usage[] = {
-   git notes merge [options] notes_ref,
-   git notes merge --commit [options],
-   git notes merge --abort [options],
+   N_(git notes merge [options] notes_ref),
+   N_(git notes merge --commit [options]),
+   N_(git notes merge --abort [options]),
NULL
 };
 
 static const char * const git_notes_remove_usage[] = {
-   git notes remove [object],
+   N_(git notes remove [object]),
NULL
 };
 
 static const char * const git_notes_prune_usage[] = {
-   git notes prune [options],
+   N_(git notes prune [options]),
NULL
 };
 
 static const char * const git_notes_get_ref_usage[] = {
-   git notes get-ref,
+   N_(git notes get-ref),
NULL
 };
 
@@ -531,19 +531,19 @@ static int add(int argc, const char **argv, const char 
*prefix)
const unsigned char *note;
struct msg_arg msg = { 0, 0, STRBUF_INIT };
struct option options[] = {
-   { OPTION_CALLBACK, 'm', message, msg, msg,
-   note contents as a string, PARSE_OPT_NONEG,
+   { OPTION_CALLBACK, 'm', message, msg, N_(msg),
+   N_(note contents as a string), PARSE_OPT_NONEG,
parse_msg_arg},
-   { OPTION_CALLBACK, 'F', file, msg, file,
-   note contents in a file, PARSE_OPT_NONEG,
+   { OPTION_CALLBACK, 'F', file, msg, N_(file),
+   N_(note contents in a file), PARSE_OPT_NONEG,
parse_file_arg},
-   { OPTION_CALLBACK, 'c', reedit-message, msg, object,
-   reuse and edit specified note object, PARSE_OPT_NONEG,
+   { OPTION_CALLBACK, 'c', reedit-message, msg, N_(object),
+   N_(reuse and edit specified note object), 
PARSE_OPT_NONEG,
parse_reedit_arg},
-   { OPTION_CALLBACK, 'C', reuse-message, 

[PATCH 40/66] i18n: pack-objects: mark parseopt strings for translation

2012-08-20 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com
---
 builtin/pack-objects.c | 64 +-
 1 file changed, 32 insertions(+), 32 deletions(-)

diff --git a/builtin/pack-objects.c b/builtin/pack-objects.c
index 782e7d0..5e14064 100644
--- a/builtin/pack-objects.c
+++ b/builtin/pack-objects.c
@@ -20,8 +20,8 @@
 #include thread-utils.h
 
 static const char *pack_usage[] = {
-   git pack-objects --stdout [options...] [ ref-list |  object-list],
-   git pack-objects [options...] base-name [ ref-list |  object-list],
+   N_(git pack-objects --stdout [options...] [ ref-list |  
object-list]),
+   N_(git pack-objects [options...] base-name [ ref-list |  
object-list]),
NULL
 };
 
@@ -2445,67 +2445,67 @@ int cmd_pack_objects(int argc, const char **argv, const 
char *prefix)
int rev_list_unpacked = 0, rev_list_all = 0, rev_list_reflog = 0;
struct option pack_objects_options[] = {
OPT_SET_INT('q', quiet, progress,
-   do not show progress meter, 0),
+   N_(do not show progress meter), 0),
OPT_SET_INT(0, progress, progress,
-   show progress meter, 1),
+   N_(show progress meter), 1),
OPT_SET_INT(0, all-progress, progress,
-   show progress meter during object writing phase, 
2),
+   N_(show progress meter during object writing 
phase), 2),
OPT_BOOL(0, all-progress-implied,
 all_progress_implied,
-similar to --all-progress when progress meter is 
shown),
-   { OPTION_CALLBACK, 0, index-version, NULL, version[,offset],
- write the pack index file in the specified idx format 
version,
+N_(similar to --all-progress when progress meter is 
shown)),
+   { OPTION_CALLBACK, 0, index-version, NULL, 
N_(version[,offset]),
+ N_(write the pack index file in the specified idx format 
version),
  0, option_parse_index_version },
OPT_ULONG(0, max-pack-size, pack_size_limit,
- maximum size of each output pack file),
+ N_(maximum size of each output pack file)),
OPT_BOOL(0, local, local,
-ignore borrowed objects from alternate object store),
+N_(ignore borrowed objects from alternate object 
store)),
OPT_BOOL(0, incremental, incremental,
-ignore packed objects),
+N_(ignore packed objects)),
OPT_INTEGER(0, window, window,
-   limit pack window by objects),
+   N_(limit pack window by objects)),
OPT_ULONG(0, window-memory, window_memory_limit,
- limit pack window by memory in addition to object 
limit),
+ N_(limit pack window by memory in addition to object 
limit)),
OPT_INTEGER(0, depth, depth,
-   maximum length of delta chain allowed in the 
resulting pack),
+   N_(maximum length of delta chain allowed in the 
resulting pack)),
OPT_BOOL(0, reuse-delta, reuse_delta,
-reuse existing deltas),
+N_(reuse existing deltas)),
OPT_BOOL(0, reuse-object, reuse_object,
-reuse existing objects),
+N_(reuse existing objects)),
OPT_BOOL(0, delta-base-offset, allow_ofs_delta,
-use OFS_DELTA objects),
+N_(use OFS_DELTA objects)),
OPT_INTEGER(0, threads, delta_search_threads,
-   use threads when searching for best delta 
matches),
+   N_(use threads when searching for best delta 
matches)),
OPT_BOOL(0, non-empty, non_empty,
-do not create an empty pack output),
+N_(do not create an empty pack output)),
OPT_BOOL(0, revs, use_internal_rev_list,
-read revision arguments from standard input),
+N_(read revision arguments from standard input)),
{ OPTION_SET_INT, 0, unpacked, rev_list_unpacked, NULL,
- limit the objects to those that are not yet packed,
+ N_(limit the objects to those that are not yet packed),
  PARSE_OPT_NOARG | PARSE_OPT_NONEG, NULL, 1 },
{ OPTION_SET_INT, 0, all, rev_list_all, NULL,
- include objects reachable from any reference,
+ N_(include objects reachable from any reference),
  PARSE_OPT_NOARG | PARSE_OPT_NONEG, NULL, 1 },

[PATCH 41/66] i18n: pack-refs: mark parseopt strings for translation

2012-08-20 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com
---
 builtin/pack-refs.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/builtin/pack-refs.c b/builtin/pack-refs.c
index 39a9d89..b5a0f88 100644
--- a/builtin/pack-refs.c
+++ b/builtin/pack-refs.c
@@ -3,7 +3,7 @@
 #include pack-refs.h
 
 static char const * const pack_refs_usage[] = {
-   git pack-refs [options],
+   N_(git pack-refs [options]),
NULL
 };
 
@@ -11,8 +11,8 @@ int cmd_pack_refs(int argc, const char **argv, const char 
*prefix)
 {
unsigned int flags = PACK_REFS_PRUNE;
struct option opts[] = {
-   OPT_BIT(0, all,   flags, pack everything, PACK_REFS_ALL),
-   OPT_BIT(0, prune, flags, prune loose refs (default), 
PACK_REFS_PRUNE),
+   OPT_BIT(0, all,   flags, N_(pack everything), 
PACK_REFS_ALL),
+   OPT_BIT(0, prune, flags, N_(prune loose refs (default)), 
PACK_REFS_PRUNE),
OPT_END(),
};
if (parse_options(argc, argv, prefix, opts, pack_refs_usage, 0))
-- 
1.7.12.rc2.18.g61b472e

--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 42/66] i18n: prune-packed: mark parseopt strings for translation

2012-08-20 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com
---
 builtin/prune-packed.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/builtin/prune-packed.c b/builtin/prune-packed.c
index b58a2e1..83382c1 100644
--- a/builtin/prune-packed.c
+++ b/builtin/prune-packed.c
@@ -4,7 +4,7 @@
 #include parse-options.h
 
 static const char * const prune_packed_usage[] = {
-   git prune-packed [-n|--dry-run] [-q|--quiet],
+   N_(git prune-packed [-n|--dry-run] [-q|--quiet]),
NULL
 };
 
@@ -73,8 +73,8 @@ int cmd_prune_packed(int argc, const char **argv, const char 
*prefix)
 {
int opts = isatty(2) ? VERBOSE : 0;
const struct option prune_packed_options[] = {
-   OPT_BIT('n', dry-run, opts, dry run, DRY_RUN),
-   OPT_NEGBIT('q', quiet, opts, be quiet, VERBOSE),
+   OPT_BIT('n', dry-run, opts, N_(dry run), DRY_RUN),
+   OPT_NEGBIT('q', quiet, opts, N_(be quiet), VERBOSE),
OPT_END()
};
 
-- 
1.7.12.rc2.18.g61b472e

--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 43/66] i18n: prune: mark parseopt strings for translation

2012-08-20 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com
---
 builtin/prune.c | 10 +-
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/builtin/prune.c b/builtin/prune.c
index b99b635..a9e2241 100644
--- a/builtin/prune.c
+++ b/builtin/prune.c
@@ -9,7 +9,7 @@
 #include dir.h
 
 static const char * const prune_usage[] = {
-   git prune [-n] [-v] [--expire time] [--] [head...],
+   N_(git prune [-n] [-v] [--expire time] [--] [head...]),
NULL
 };
 static int show_only;
@@ -128,11 +128,11 @@ int cmd_prune(int argc, const char **argv, const char 
*prefix)
struct rev_info revs;
struct progress *progress = NULL;
const struct option options[] = {
-   OPT__DRY_RUN(show_only, do not remove, show only),
-   OPT__VERBOSE(verbose, report pruned objects),
-   OPT_BOOL(0, progress, show_progress, show progress),
+   OPT__DRY_RUN(show_only, N_(do not remove, show only)),
+   OPT__VERBOSE(verbose, N_(report pruned objects)),
+   OPT_BOOL(0, progress, show_progress, N_(show progress)),
OPT_DATE(0, expire, expire,
-expire objects older than time),
+N_(expire objects older than time)),
OPT_END()
};
char *s;
-- 
1.7.12.rc2.18.g61b472e

--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 44/66] i18n: push: mark parseopt strings for translation

2012-08-20 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com
---
 builtin/push.c | 34 +-
 1 file changed, 17 insertions(+), 17 deletions(-)

diff --git a/builtin/push.c b/builtin/push.c
index fdfcc6c..4840bc2 100644
--- a/builtin/push.c
+++ b/builtin/push.c
@@ -11,7 +11,7 @@
 #include submodule.h
 
 static const char * const push_usage[] = {
-   git push [options] [repository [refspec...]],
+   N_(git push [options] [repository [refspec...]]),
NULL,
 };
 
@@ -354,25 +354,25 @@ int cmd_push(int argc, const char **argv, const char 
*prefix)
const char *repo = NULL;/* default repository */
struct option options[] = {
OPT__VERBOSITY(verbosity),
-   OPT_STRING( 0 , repo, repo, repository, repository),
-   OPT_BIT( 0 , all, flags, push all refs, 
TRANSPORT_PUSH_ALL),
-   OPT_BIT( 0 , mirror, flags, mirror all refs,
+   OPT_STRING( 0 , repo, repo, N_(repository), 
N_(repository)),
+   OPT_BIT( 0 , all, flags, N_(push all refs), 
TRANSPORT_PUSH_ALL),
+   OPT_BIT( 0 , mirror, flags, N_(mirror all refs),
(TRANSPORT_PUSH_MIRROR|TRANSPORT_PUSH_FORCE)),
-   OPT_BOOLEAN( 0, delete, deleterefs, delete refs),
-   OPT_BOOLEAN( 0 , tags, tags, push tags (can't be used with 
--all or --mirror)),
-   OPT_BIT('n' , dry-run, flags, dry run, 
TRANSPORT_PUSH_DRY_RUN),
-   OPT_BIT( 0,  porcelain, flags, machine-readable output, 
TRANSPORT_PUSH_PORCELAIN),
-   OPT_BIT('f', force, flags, force updates, 
TRANSPORT_PUSH_FORCE),
-   { OPTION_CALLBACK, 0, recurse-submodules, flags, check,
-   controls recursive pushing of submodules,
+   OPT_BOOLEAN( 0, delete, deleterefs, N_(delete refs)),
+   OPT_BOOLEAN( 0 , tags, tags, N_(push tags (can't be used 
with --all or --mirror))),
+   OPT_BIT('n' , dry-run, flags, N_(dry run), 
TRANSPORT_PUSH_DRY_RUN),
+   OPT_BIT( 0,  porcelain, flags, N_(machine-readable 
output), TRANSPORT_PUSH_PORCELAIN),
+   OPT_BIT('f', force, flags, N_(force updates), 
TRANSPORT_PUSH_FORCE),
+   { OPTION_CALLBACK, 0, recurse-submodules, flags, N_(check),
+   N_(controls recursive pushing of submodules),
PARSE_OPT_OPTARG, option_parse_recurse_submodules },
-   OPT_BOOLEAN( 0 , thin, thin, use thin pack),
-   OPT_STRING( 0 , receive-pack, receivepack, receive-pack, 
receive pack program),
-   OPT_STRING( 0 , exec, receivepack, receive-pack, receive 
pack program),
-   OPT_BIT('u', set-upstream, flags, set upstream for git 
pull/status,
+   OPT_BOOLEAN( 0 , thin, thin, N_(use thin pack)),
+   OPT_STRING( 0 , receive-pack, receivepack, receive-pack, 
N_(receive pack program)),
+   OPT_STRING( 0 , exec, receivepack, receive-pack, 
N_(receive pack program)),
+   OPT_BIT('u', set-upstream, flags, N_(set upstream for git 
pull/status),
TRANSPORT_PUSH_SET_UPSTREAM),
-   OPT_BOOL(0, progress, progress, force progress reporting),
-   OPT_BIT(0, prune, flags, prune locally removed refs,
+   OPT_BOOL(0, progress, progress, N_(force progress 
reporting)),
+   OPT_BIT(0, prune, flags, N_(prune locally removed refs),
TRANSPORT_PUSH_PRUNE),
OPT_END()
};
-- 
1.7.12.rc2.18.g61b472e

--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 45/66] i18n: read-tree: mark parseopt strings for translation

2012-08-20 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com
---
 builtin/read-tree.c | 38 +++---
 1 file changed, 19 insertions(+), 19 deletions(-)

diff --git a/builtin/read-tree.c b/builtin/read-tree.c
index df6c4c8..042ac1b 100644
--- a/builtin/read-tree.c
+++ b/builtin/read-tree.c
@@ -33,7 +33,7 @@ static int list_tree(unsigned char *sha1)
 }
 
 static const char * const read_tree_usage[] = {
-   git read-tree [[-m [--trivial] [--aggressive] | --reset | 
--prefix=prefix] [-u [--exclude-per-directory=gitignore] | -i]] 
[--no-sparse-checkout] [--index-output=file] (--empty | tree-ish1 
[tree-ish2 [tree-ish3]]),
+   N_(git read-tree [[-m [--trivial] [--aggressive] | --reset | 
--prefix=prefix] [-u [--exclude-per-directory=gitignore] | -i]] 
[--no-sparse-checkout] [--index-output=file] (--empty | tree-ish1 
[tree-ish2 [tree-ish3]])),
NULL
 };
 
@@ -104,37 +104,37 @@ int cmd_read_tree(int argc, const char **argv, const char 
*unused_prefix)
struct unpack_trees_options opts;
int prefix_set = 0;
const struct option read_tree_options[] = {
-   { OPTION_CALLBACK, 0, index-output, NULL, file,
- write resulting index to file,
+   { OPTION_CALLBACK, 0, index-output, NULL, N_(file),
+ N_(write resulting index to file),
  PARSE_OPT_NONEG, index_output_cb },
OPT_SET_INT(0, empty, read_empty,
-   only empty the index, 1),
-   OPT__VERBOSE(opts.verbose_update, be verbose),
-   OPT_GROUP(Merging),
+   N_(only empty the index), 1),
+   OPT__VERBOSE(opts.verbose_update, N_(be verbose)),
+   OPT_GROUP(N_(Merging)),
OPT_SET_INT('m', NULL, opts.merge,
-   perform a merge in addition to a read, 1),
+   N_(perform a merge in addition to a read), 1),
OPT_SET_INT(0, trivial, opts.trivial_merges_only,
-   3-way merge if no file level merging required, 1),
+   N_(3-way merge if no file level merging 
required), 1),
OPT_SET_INT(0, aggressive, opts.aggressive,
-   3-way merge in presence of adds and removes, 1),
+   N_(3-way merge in presence of adds and removes), 
1),
OPT_SET_INT(0, reset, opts.reset,
-   same as -m, but discard unmerged entries, 1),
-   { OPTION_STRING, 0, prefix, opts.prefix, subdirectory/,
- read the tree into the index under subdirectory/,
+   N_(same as -m, but discard unmerged entries), 1),
+   { OPTION_STRING, 0, prefix, opts.prefix, 
N_(subdirectory/),
+ N_(read the tree into the index under subdirectory/),
  PARSE_OPT_NONEG | PARSE_OPT_LITERAL_ARGHELP },
OPT_SET_INT('u', NULL, opts.update,
-   update working tree with merge result, 1),
+   N_(update working tree with merge result), 1),
{ OPTION_CALLBACK, 0, exclude-per-directory, opts,
- gitignore,
- allow explicitly ignored files to be overwritten,
+ N_(gitignore),
+ N_(allow explicitly ignored files to be overwritten),
  PARSE_OPT_NONEG, exclude_per_directory_cb },
OPT_SET_INT('i', NULL, opts.index_only,
-   don't check the working tree after merging, 1),
-   OPT__DRY_RUN(opts.dry_run, don't update the index or the work 
tree),
+   N_(don't check the working tree after merging), 
1),
+   OPT__DRY_RUN(opts.dry_run, N_(don't update the index or the 
work tree)),
OPT_SET_INT(0, no-sparse-checkout, opts.skip_sparse_checkout,
-   skip applying sparse checkout filter, 1),
+   N_(skip applying sparse checkout filter), 1),
OPT_SET_INT(0, debug-unpack, opts.debug_unpack,
-   debug unpack-trees, 1),
+   N_(debug unpack-trees), 1),
OPT_END()
};
 
-- 
1.7.12.rc2.18.g61b472e

--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 47/66] i18n: replace: mark parseopt strings for translation

2012-08-20 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com
---
 builtin/replace.c | 12 ++--
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/builtin/replace.c b/builtin/replace.c
index 4a8970e..e3aaf70 100644
--- a/builtin/replace.c
+++ b/builtin/replace.c
@@ -14,9 +14,9 @@
 #include parse-options.h
 
 static const char * const git_replace_usage[] = {
-   git replace [-f] object replacement,
-   git replace -d object...,
-   git replace -l [pattern],
+   N_(git replace [-f] object replacement),
+   N_(git replace -d object...),
+   N_(git replace -l [pattern]),
NULL
 };
 
@@ -115,9 +115,9 @@ int cmd_replace(int argc, const char **argv, const char 
*prefix)
 {
int list = 0, delete = 0, force = 0;
struct option options[] = {
-   OPT_BOOLEAN('l', NULL, list, list replace refs),
-   OPT_BOOLEAN('d', NULL, delete, delete replace refs),
-   OPT_BOOLEAN('f', NULL, force, replace the ref if it exists),
+   OPT_BOOLEAN('l', NULL, list, N_(list replace refs)),
+   OPT_BOOLEAN('d', NULL, delete, N_(delete replace refs)),
+   OPT_BOOLEAN('f', NULL, force, N_(replace the ref if it 
exists)),
OPT_END()
};
 
-- 
1.7.12.rc2.18.g61b472e

--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 48/66] i18n: status: mark parseopt strings for translation

2012-08-20 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com
---
 builtin/commit.c | 22 +++---
 1 file changed, 11 insertions(+), 11 deletions(-)

diff --git a/builtin/commit.c b/builtin/commit.c
index 33b78fe..feb43f4 100644
--- a/builtin/commit.c
+++ b/builtin/commit.c
@@ -35,7 +35,7 @@ static const char * const builtin_commit_usage[] = {
 };
 
 static const char * const builtin_status_usage[] = {
-   git status [options] [--] filepattern...,
+   N_(git status [options] [--] filepattern...),
NULL
 };
 
@@ -1169,24 +1169,24 @@ int cmd_status(int argc, const char **argv, const char 
*prefix)
int fd;
unsigned char sha1[20];
static struct option builtin_status_options[] = {
-   OPT__VERBOSE(verbose, be verbose),
+   OPT__VERBOSE(verbose, N_(be verbose)),
OPT_SET_INT('s', short, status_format,
-   show status concisely, STATUS_FORMAT_SHORT),
+   N_(show status concisely), STATUS_FORMAT_SHORT),
OPT_BOOLEAN('b', branch, s.show_branch,
-   show branch information),
+   N_(show branch information)),
OPT_SET_INT(0, porcelain, status_format,
-   machine-readable output,
+   N_(machine-readable output),
STATUS_FORMAT_PORCELAIN),
OPT_BOOLEAN('z', null, s.null_termination,
-   terminate entries with NUL),
+   N_(terminate entries with NUL)),
{ OPTION_STRING, 'u', untracked-files, untracked_files_arg,
- mode,
- show untracked files, optional modes: all, normal, no. 
(Default: all),
+ N_(mode),
+ N_(show untracked files, optional modes: all, normal, no. 
(Default: all)),
  PARSE_OPT_OPTARG, NULL, (intptr_t)all },
OPT_BOOLEAN(0, ignored, show_ignored_in_status,
-   show ignored files),
-   { OPTION_STRING, 0, ignore-submodules, ignore_submodule_arg, 
when,
- ignore changes to submodules, optional when: all, dirty, 
untracked. (Default: all),
+   N_(show ignored files)),
+   { OPTION_STRING, 0, ignore-submodules, ignore_submodule_arg, 
N_(when),
+ N_(ignore changes to submodules, optional when: all, dirty, 
untracked. (Default: all)),
  PARSE_OPT_OPTARG, NULL, (intptr_t)all },
OPT_COLUMN(0, column, s.colopts, N_(list untracked files in 
columns)),
OPT_END(),
-- 
1.7.12.rc2.18.g61b472e

--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 50/66] i18n: reset: mark parseopt strings for translation

2012-08-20 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com
---
 builtin/reset.c | 20 ++--
 1 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/builtin/reset.c b/builtin/reset.c
index 74442bd..915cc9f 100644
--- a/builtin/reset.c
+++ b/builtin/reset.c
@@ -22,9 +22,9 @@
 #include cache-tree.h
 
 static const char * const git_reset_usage[] = {
-   git reset [--mixed | --soft | --hard | --merge | --keep] [-q] 
[commit],
-   git reset [-q] commit [--] paths...,
-   git reset --patch [commit] [--] [paths...],
+   N_(git reset [--mixed | --soft | --hard | --merge | --keep] [-q] 
[commit]),
+   N_(git reset [-q] commit [--] paths...),
+   N_(git reset --patch [commit] [--] [paths...]),
NULL
 };
 
@@ -235,17 +235,17 @@ int cmd_reset(int argc, const char **argv, const char 
*prefix)
struct commit *commit;
struct strbuf msg = STRBUF_INIT;
const struct option options[] = {
-   OPT__QUIET(quiet, be quiet, only report errors),
+   OPT__QUIET(quiet, N_(be quiet, only report errors)),
OPT_SET_INT(0, mixed, reset_type,
-   reset HEAD and index, MIXED),
-   OPT_SET_INT(0, soft, reset_type, reset only HEAD, SOFT),
+   N_(reset HEAD and index), 
MIXED),
+   OPT_SET_INT(0, soft, reset_type, N_(reset only HEAD), 
SOFT),
OPT_SET_INT(0, hard, reset_type,
-   reset HEAD, index and working tree, HARD),
+   N_(reset HEAD, index and working tree), HARD),
OPT_SET_INT(0, merge, reset_type,
-   reset HEAD, index and working tree, MERGE),
+   N_(reset HEAD, index and working tree), 
MERGE),
OPT_SET_INT(0, keep, reset_type,
-   reset HEAD but keep local changes, KEEP),
-   OPT_BOOLEAN('p', patch, patch_mode, select hunks 
interactively),
+   N_(reset HEAD but keep local changes), KEEP),
+   OPT_BOOLEAN('p', patch, patch_mode, N_(select hunks 
interactively)),
OPT_END()
};
 
-- 
1.7.12.rc2.18.g61b472e

--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 51/66] i18n: rev-parse: mark parseopt strings for translation

2012-08-20 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com
---
 builtin/rev-parse.c | 18 +-
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/builtin/rev-parse.c b/builtin/rev-parse.c
index 32788a9..bb3a516 100644
--- a/builtin/rev-parse.c
+++ b/builtin/rev-parse.c
@@ -324,15 +324,15 @@ static int cmd_parseopt(int argc, const char **argv, 
const char *prefix)
 {
static int keep_dashdash = 0, stop_at_non_option = 0;
static char const * const parseopt_usage[] = {
-   git rev-parse --parseopt [options] -- [args...],
+   N_(git rev-parse --parseopt [options] -- [args...]),
NULL
};
static struct option parseopt_opts[] = {
OPT_BOOLEAN(0, keep-dashdash, keep_dashdash,
-   keep the `--` passed as an arg),
+   N_(keep the `--` passed as an arg)),
OPT_BOOLEAN(0, stop-at-non-option, stop_at_non_option,
-   stop parsing after the 
-   first non-option argument),
+   N_(stop parsing after the 
+  first non-option argument)),
OPT_END(),
};
 
@@ -449,11 +449,11 @@ static void die_no_single_rev(int quiet)
 }
 
 static const char builtin_rev_parse_usage[] =
-git rev-parse --parseopt [options] -- [args...]\n
-   or: git rev-parse --sq-quote [arg...]\n
-   or: git rev-parse [options] [arg...]\n
-\n
-Run \git rev-parse --parseopt -h\ for more information on the first usage.;
+N_(git rev-parse --parseopt [options] -- [args...]\n
+  or: git rev-parse --sq-quote [arg...]\n
+  or: git rev-parse [options] [arg...]\n
+   \n
+   Run \git rev-parse --parseopt -h\ for more information on the first 
usage.);
 
 int cmd_rev_parse(int argc, const char **argv, const char *prefix)
 {
-- 
1.7.12.rc2.18.g61b472e

--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 52/66] i18n: revert, cherry-pick: mark parseopt strings for translation

2012-08-20 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com
---
 builtin/revert.c | 36 ++--
 1 file changed, 18 insertions(+), 18 deletions(-)

diff --git a/builtin/revert.c b/builtin/revert.c
index 82d1bf8..02ca95f 100644
--- a/builtin/revert.c
+++ b/builtin/revert.c
@@ -19,14 +19,14 @@
  */
 
 static const char * const revert_usage[] = {
-   git revert [options] commit-ish,
-   git revert subcommand,
+   N_(git revert [options] commit-ish),
+   N_(git revert subcommand),
NULL
 };
 
 static const char * const cherry_pick_usage[] = {
-   git cherry-pick [options] commit-ish,
-   git cherry-pick subcommand,
+   N_(git cherry-pick [options] commit-ish),
+   N_(git cherry-pick subcommand),
NULL
 };
 
@@ -100,18 +100,18 @@ static void parse_args(int argc, const char **argv, 
struct replay_opts *opts)
int contin = 0;
int rollback = 0;
struct option options[] = {
-   OPT_BOOLEAN(0, quit, remove_state, end revert or 
cherry-pick sequence),
-   OPT_BOOLEAN(0, continue, contin, resume revert or 
cherry-pick sequence),
-   OPT_BOOLEAN(0, abort, rollback, cancel revert or 
cherry-pick sequence),
-   OPT_BOOLEAN('n', no-commit, opts-no_commit, don't 
automatically commit),
-   OPT_BOOLEAN('e', edit, opts-edit, edit the commit 
message),
+   OPT_BOOLEAN(0, quit, remove_state, N_(end revert or 
cherry-pick sequence)),
+   OPT_BOOLEAN(0, continue, contin, N_(resume revert or 
cherry-pick sequence)),
+   OPT_BOOLEAN(0, abort, rollback, N_(cancel revert or 
cherry-pick sequence)),
+   OPT_BOOLEAN('n', no-commit, opts-no_commit, N_(don't 
automatically commit)),
+   OPT_BOOLEAN('e', edit, opts-edit, N_(edit the commit 
message)),
OPT_NOOP_NOARG('r', NULL),
-   OPT_BOOLEAN('s', signoff, opts-signoff, add 
Signed-off-by:),
-   OPT_INTEGER('m', mainline, opts-mainline, parent number),
+   OPT_BOOLEAN('s', signoff, opts-signoff, N_(add 
Signed-off-by:)),
+   OPT_INTEGER('m', mainline, opts-mainline, N_(parent 
number)),
OPT_RERERE_AUTOUPDATE(opts-allow_rerere_auto),
-   OPT_STRING(0, strategy, opts-strategy, strategy, merge 
strategy),
-   OPT_CALLBACK('X', strategy-option, opts, option,
-   option for merge strategy, option_parse_x),
+   OPT_STRING(0, strategy, opts-strategy, N_(strategy), 
N_(merge strategy)),
+   OPT_CALLBACK('X', strategy-option, opts, N_(option),
+   N_(option for merge strategy), option_parse_x),
OPT_END(),
OPT_END(),
OPT_END(),
@@ -121,10 +121,10 @@ static void parse_args(int argc, const char **argv, 
struct replay_opts *opts)
 
if (opts-action == REPLAY_PICK) {
struct option cp_extra[] = {
-   OPT_BOOLEAN('x', NULL, opts-record_origin, append 
commit name),
-   OPT_BOOLEAN(0, ff, opts-allow_ff, allow 
fast-forward),
-   OPT_BOOLEAN(0, allow-empty, opts-allow_empty, 
preserve initially empty commits),
-   OPT_BOOLEAN(0, keep-redundant-commits, 
opts-keep_redundant_commits, keep redundant, empty commits),
+   OPT_BOOLEAN('x', NULL, opts-record_origin, N_(append 
commit name)),
+   OPT_BOOLEAN(0, ff, opts-allow_ff, N_(allow 
fast-forward)),
+   OPT_BOOLEAN(0, allow-empty, opts-allow_empty, 
N_(preserve initially empty commits)),
+   OPT_BOOLEAN(0, keep-redundant-commits, 
opts-keep_redundant_commits, N_(keep redundant, empty commits)),
OPT_END(),
};
if (parse_options_concat(options, ARRAY_SIZE(options), 
cp_extra))
-- 
1.7.12.rc2.18.g61b472e

--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 53/66] i18n: rm: mark parseopt strings for translation

2012-08-20 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com
---
 builtin/rm.c | 14 +++---
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/builtin/rm.c b/builtin/rm.c
index 90c8a50..b384c4c 100644
--- a/builtin/rm.c
+++ b/builtin/rm.c
@@ -11,7 +11,7 @@
 #include parse-options.h
 
 static const char * const builtin_rm_usage[] = {
-   git rm [options] [--] file...,
+   N_(git rm [options] [--] file...),
NULL
 };
 
@@ -130,13 +130,13 @@ static int show_only = 0, force = 0, index_only = 0, 
recursive = 0, quiet = 0;
 static int ignore_unmatch = 0;
 
 static struct option builtin_rm_options[] = {
-   OPT__DRY_RUN(show_only, dry run),
-   OPT__QUIET(quiet, do not list removed files),
-   OPT_BOOLEAN( 0 , cached, index_only, only remove from the 
index),
-   OPT__FORCE(force, override the up-to-date check),
-   OPT_BOOLEAN('r', NULL, recursive,  allow recursive 
removal),
+   OPT__DRY_RUN(show_only, N_(dry run)),
+   OPT__QUIET(quiet, N_(do not list removed files)),
+   OPT_BOOLEAN( 0 , cached, index_only, N_(only remove from 
the index)),
+   OPT__FORCE(force, N_(override the up-to-date check)),
+   OPT_BOOLEAN('r', NULL, recursive,  N_(allow recursive 
removal)),
OPT_BOOLEAN( 0 , ignore-unmatch, ignore_unmatch,
-   exit with a zero status even if nothing 
matched),
+   N_(exit with a zero status even if nothing 
matched)),
OPT_END(),
 };
 
-- 
1.7.12.rc2.18.g61b472e

--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 54/66] i18n: shortlog: mark parseopt strings for translation

2012-08-20 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com
---
 builtin/shortlog.c | 14 +++---
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/builtin/shortlog.c b/builtin/shortlog.c
index 37f3193..b316cf3 100644
--- a/builtin/shortlog.c
+++ b/builtin/shortlog.c
@@ -10,9 +10,9 @@
 #include parse-options.h
 
 static char const * const shortlog_usage[] = {
-   git shortlog [-n] [-s] [-e] [-w] [rev-opts] [--] [commit-id... ],
+   N_(git shortlog [-n] [-s] [-e] [-w] [rev-opts] [--] [commit-id... 
]),
,
-   [rev-opts] are documented in git-rev-list(1),
+   N_([rev-opts] are documented in git-rev-list(1)),
NULL
 };
 
@@ -250,13 +250,13 @@ int cmd_shortlog(int argc, const char **argv, const char 
*prefix)
 
static const struct option options[] = {
OPT_BOOLEAN('n', numbered, log.sort_by_number,
-   sort output according to the number of commits per 
author),
+   N_(sort output according to the number of commits 
per author)),
OPT_BOOLEAN('s', summary, log.summary,
-   Suppress commit descriptions, only provides commit 
count),
+   N_(Suppress commit descriptions, only provides 
commit count)),
OPT_BOOLEAN('e', email, log.email,
-   Show the email address of each author),
-   { OPTION_CALLBACK, 'w', NULL, log, w[,i1[,i2]],
-   Linewrap output, PARSE_OPT_OPTARG, parse_wrap_args },
+   N_(Show the email address of each author)),
+   { OPTION_CALLBACK, 'w', NULL, log, N_(w[,i1[,i2]]),
+   N_(Linewrap output), PARSE_OPT_OPTARG, 
parse_wrap_args },
OPT_END(),
};
 
-- 
1.7.12.rc2.18.g61b472e

--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 55/66] i18n: show-branch: mark parseopt strings for translation

2012-08-20 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com
---
 builtin/show-branch.c | 42 +-
 1 file changed, 21 insertions(+), 21 deletions(-)

diff --git a/builtin/show-branch.c b/builtin/show-branch.c
index a59e088..d208fd6 100644
--- a/builtin/show-branch.c
+++ b/builtin/show-branch.c
@@ -6,8 +6,8 @@
 #include parse-options.h
 
 static const char* show_branch_usage[] = {
-git show-branch [-a|--all] [-r|--remotes] [--topo-order | --date-order] 
[--current] [--color[=when] | --no-color] [--sparse] [--more=n | --list | 
--independent | --merge-base] [--no-name | --sha1-name] [--topics] [(rev | 
glob)...],
-git show-branch (-g|--reflog)[=n[,base]] [--list] [ref],
+N_(git show-branch [-a|--all] [-r|--remotes] [--topo-order | 
--date-order] [--current] [--color[=when] | --no-color] [--sparse] 
[--more=n | --list | --independent | --merge-base] [--no-name | --sha1-name] 
[--topics] [(rev | glob)...]),
+N_(git show-branch (-g|--reflog)[=n[,base]] [--list] [ref]),
 NULL
 };
 
@@ -648,36 +648,36 @@ int cmd_show_branch(int ac, const char **av, const char 
*prefix)
const char *reflog_base = NULL;
struct option builtin_show_branch_options[] = {
OPT_BOOLEAN('a', all, all_heads,
-   show remote-tracking and local branches),
+   N_(show remote-tracking and local branches)),
OPT_BOOLEAN('r', remotes, all_remotes,
-   show remote-tracking branches),
+   N_(show remote-tracking branches)),
OPT__COLOR(showbranch_use_color,
-   color '*!+-' corresponding to the branch),
-   { OPTION_INTEGER, 0, more, extra, n,
-   show n more commits after the common ancestor,
+   N_(color '*!+-' corresponding to the branch)),
+   { OPTION_INTEGER, 0, more, extra, N_(n),
+   N_(show n more commits after the common 
ancestor),
PARSE_OPT_OPTARG, NULL, (intptr_t)1 },
-   OPT_SET_INT(0, list, extra, synonym to more=-1, -1),
-   OPT_BOOLEAN(0, no-name, no_name, suppress naming strings),
+   OPT_SET_INT(0, list, extra, N_(synonym to more=-1), -1),
+   OPT_BOOLEAN(0, no-name, no_name, N_(suppress naming 
strings)),
OPT_BOOLEAN(0, current, with_current_branch,
-   include the current branch),
+   N_(include the current branch)),
OPT_BOOLEAN(0, sha1-name, sha1_name,
-   name commits with their object names),
+   N_(name commits with their object names)),
OPT_BOOLEAN(0, merge-base, merge_base,
-   show possible merge bases),
+   N_(show possible merge bases)),
OPT_BOOLEAN(0, independent, independent,
-   show refs unreachable from any other ref),
+   N_(show refs unreachable from any other ref)),
OPT_BOOLEAN(0, topo-order, lifo,
-   show commits in topological order),
+   N_(show commits in topological order)),
OPT_BOOLEAN(0, topics, topics,
-   show only commits not on the first branch),
+   N_(show only commits not on the first branch)),
OPT_SET_INT(0, sparse, dense,
-   show merges reachable from only one tip, 0),
+   N_(show merges reachable from only one tip), 0),
OPT_SET_INT(0, date-order, lifo,
-   show commits where no parent comes before its 
-   children, 0),
-   { OPTION_CALLBACK, 'g', reflog, reflog_base, n[,base],
-   show n most recent ref-log entries starting at 
-   base,
+   N_(show commits where no parent comes before its 
+  children), 0),
+   { OPTION_CALLBACK, 'g', reflog, reflog_base, 
N_(n[,base]),
+   N_(show n most recent ref-log entries starting 
at 
+  base),
PARSE_OPT_OPTARG | PARSE_OPT_LITERAL_ARGHELP,
parse_reflog_param },
OPT_END()
-- 
1.7.12.rc2.18.g61b472e

--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 56/66] i18n: show-ref: mark parseopt strings for translation

2012-08-20 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com
---
 builtin/show-ref.c | 28 ++--
 1 file changed, 14 insertions(+), 14 deletions(-)

diff --git a/builtin/show-ref.c b/builtin/show-ref.c
index 3911661..4eb016d 100644
--- a/builtin/show-ref.c
+++ b/builtin/show-ref.c
@@ -7,8 +7,8 @@
 #include parse-options.h
 
 static const char * const show_ref_usage[] = {
-   git show-ref [-q|--quiet] [--verify] [--head] [-d|--dereference] 
[-s|--hash[=n]] [--abbrev[=n]] [--tags] [--heads] [--] [pattern*] ,
-   git show-ref --exclude-existing[=pattern]  ref-list,
+   N_(git show-ref [-q|--quiet] [--verify] [--head] [-d|--dereference] 
[-s|--hash[=n]] [--abbrev[=n]] [--tags] [--heads] [--] [pattern*] ),
+   N_(git show-ref --exclude-existing[=pattern]  ref-list),
NULL
 };
 
@@ -179,26 +179,26 @@ static int help_callback(const struct option *opt, const 
char *arg, int unset)
 }
 
 static const struct option show_ref_options[] = {
-   OPT_BOOLEAN(0, tags, tags_only, only show tags (can be combined 
with heads)),
-   OPT_BOOLEAN(0, heads, heads_only, only show heads (can be combined 
with tags)),
-   OPT_BOOLEAN(0, verify, verify, stricter reference checking, 
-   requires exact ref path),
+   OPT_BOOLEAN(0, tags, tags_only, N_(only show tags (can be combined 
with heads))),
+   OPT_BOOLEAN(0, heads, heads_only, N_(only show heads (can be 
combined with tags))),
+   OPT_BOOLEAN(0, verify, verify, N_(stricter reference checking, 
+   requires exact ref path)),
{ OPTION_BOOLEAN, 'h', NULL, show_head, NULL,
- show the HEAD reference,
+ N_(show the HEAD reference),
  PARSE_OPT_NOARG | PARSE_OPT_HIDDEN },
-   OPT_BOOLEAN(0, head, show_head, show the HEAD reference),
+   OPT_BOOLEAN(0, head, show_head, N_(show the HEAD reference)),
OPT_BOOLEAN('d', dereference, deref_tags,
-   dereference tags into object IDs),
-   { OPTION_CALLBACK, 's', hash, abbrev, n,
- only show SHA1 hash using n digits,
+   N_(dereference tags into object IDs)),
+   { OPTION_CALLBACK, 's', hash, abbrev, N_(n),
+ N_(only show SHA1 hash using n digits),
  PARSE_OPT_OPTARG, hash_callback },
OPT__ABBREV(abbrev),
OPT__QUIET(quiet,
-  do not print results to stdout (useful with --verify)),
+  N_(do not print results to stdout (useful with --verify))),
{ OPTION_CALLBACK, 0, exclude-existing, exclude_existing_arg,
- pattern, show refs from stdin that aren't in local repository,
+ N_(pattern), N_(show refs from stdin that aren't in local 
repository),
  PARSE_OPT_OPTARG | PARSE_OPT_NONEG, exclude_existing_callback },
-   { OPTION_CALLBACK, 0, help-all, NULL, NULL, show usage,
+   { OPTION_CALLBACK, 0, help-all, NULL, NULL, N_(show usage),
  PARSE_OPT_HIDDEN | PARSE_OPT_NOARG, help_callback },
OPT_END()
 };
-- 
1.7.12.rc2.18.g61b472e

--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 57/66] i18n: symbolic-ref: mark parseopt strings for translation

2012-08-20 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com
---
 builtin/symbolic-ref.c | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/builtin/symbolic-ref.c b/builtin/symbolic-ref.c
index 801d62e..9e92828 100644
--- a/builtin/symbolic-ref.c
+++ b/builtin/symbolic-ref.c
@@ -4,7 +4,7 @@
 #include parse-options.h
 
 static const char * const git_symbolic_ref_usage[] = {
-   git symbolic-ref [options] name [ref],
+   N_(git symbolic-ref [options] name [ref]),
NULL
 };
 
@@ -35,9 +35,9 @@ int cmd_symbolic_ref(int argc, const char **argv, const char 
*prefix)
const char *msg = NULL;
struct option options[] = {
OPT__QUIET(quiet,
-   suppress error message for non-symbolic (detached) 
refs),
-   OPT_BOOL(0, short, shorten, shorten ref output),
-   OPT_STRING('m', NULL, msg, reason, reason of the update),
+   N_(suppress error message for non-symbolic (detached) 
refs)),
+   OPT_BOOL(0, short, shorten, N_(shorten ref output)),
+   OPT_STRING('m', NULL, msg, N_(reason), N_(reason of the 
update)),
OPT_END(),
};
 
-- 
1.7.12.rc2.18.g61b472e

--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 58/66] i18n: tag: mark parseopt strings for translation

2012-08-20 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com
---
 builtin/tag.c | 56 
 1 file changed, 28 insertions(+), 28 deletions(-)

diff --git a/builtin/tag.c b/builtin/tag.c
index 7b1be85..c581e0a 100644
--- a/builtin/tag.c
+++ b/builtin/tag.c
@@ -19,11 +19,11 @@
 #include column.h
 
 static const char * const git_tag_usage[] = {
-   git tag [-a|-s|-u key-id] [-f] [-m msg|-F file] tagname 
[head],
-   git tag -d tagname...,
-   git tag -l [-n[num]] [--contains commit] [--points-at object] 
-   \n\t\t[pattern...],
-   git tag -v tagname...,
+   N_(git tag [-a|-s|-u key-id] [-f] [-m msg|-F file] tagname 
[head]),
+   N_(git tag -d tagname...),
+   N_(git tag -l [-n[num]] [--contains commit] [--points-at object] 

+   \n\t\t[pattern...]),
+   N_(git tag -v tagname...),
NULL
 };
 
@@ -444,37 +444,37 @@ int cmd_tag(int argc, const char **argv, const char 
*prefix)
struct msg_arg msg = { 0, STRBUF_INIT };
struct commit_list *with_commit = NULL;
struct option options[] = {
-   OPT_BOOLEAN('l', list, list, list tag names),
-   { OPTION_INTEGER, 'n', NULL, lines, n,
-   print n lines of each tag message,
+   OPT_BOOLEAN('l', list, list, N_(list tag names)),
+   { OPTION_INTEGER, 'n', NULL, lines, N_(n),
+   N_(print n lines of each tag message),
PARSE_OPT_OPTARG, NULL, 1 },
-   OPT_BOOLEAN('d', delete, delete, delete tags),
-   OPT_BOOLEAN('v', verify, verify, verify tags),
+   OPT_BOOLEAN('d', delete, delete, N_(delete tags)),
+   OPT_BOOLEAN('v', verify, verify, N_(verify tags)),
 
-   OPT_GROUP(Tag creation options),
+   OPT_GROUP(N_(Tag creation options)),
OPT_BOOLEAN('a', annotate, annotate,
-   annotated tag, needs a message),
-   OPT_CALLBACK('m', message, msg, message,
-tag message, parse_msg_arg),
-   OPT_FILENAME('F', file, msgfile, read message from file),
-   OPT_BOOLEAN('s', sign, opt.sign, annotated and GPG-signed 
tag),
-   OPT_STRING(0, cleanup, cleanup_arg, mode,
-   how to strip spaces and #comments from message),
-   OPT_STRING('u', local-user, keyid, key-id,
-   use another key to sign the tag),
-   OPT__FORCE(force, replace the tag if exists),
-   OPT_COLUMN(0, column, colopts, show tag list in columns),
-
-   OPT_GROUP(Tag listing options),
+   N_(annotated tag, needs a message)),
+   OPT_CALLBACK('m', message, msg, N_(message),
+N_(tag message), parse_msg_arg),
+   OPT_FILENAME('F', file, msgfile, N_(read message from 
file)),
+   OPT_BOOLEAN('s', sign, opt.sign, N_(annotated and 
GPG-signed tag)),
+   OPT_STRING(0, cleanup, cleanup_arg, N_(mode),
+   N_(how to strip spaces and #comments from message)),
+   OPT_STRING('u', local-user, keyid, N_(key-id),
+   N_(use another key to sign the tag)),
+   OPT__FORCE(force, N_(replace the tag if exists)),
+   OPT_COLUMN(0, column, colopts, N_(show tag list in 
columns)),
+
+   OPT_GROUP(N_(Tag listing options)),
{
-   OPTION_CALLBACK, 0, contains, with_commit, commit,
-   print only tags that contain the commit,
+   OPTION_CALLBACK, 0, contains, with_commit, 
N_(commit),
+   N_(print only tags that contain the commit),
PARSE_OPT_LASTARG_DEFAULT,
parse_opt_with_commit, (intptr_t)HEAD,
},
{
-   OPTION_CALLBACK, 0, points-at, NULL, object,
-   print only tags of the object, 0, parse_opt_points_at
+   OPTION_CALLBACK, 0, points-at, NULL, N_(object),
+   N_(print only tags of the object), 0, 
parse_opt_points_at
},
OPT_END()
};
-- 
1.7.12.rc2.18.g61b472e

--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 59/66] i18n: update-index: mark parseopt strings for translation

2012-08-20 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com
---
 builtin/update-index.c | 56 +-
 1 file changed, 28 insertions(+), 28 deletions(-)

diff --git a/builtin/update-index.c b/builtin/update-index.c
index 4ce341c..74986bf 100644
--- a/builtin/update-index.c
+++ b/builtin/update-index.c
@@ -398,7 +398,7 @@ static void read_index_info(int line_termination)
 }
 
 static const char * const update_index_usage[] = {
-   git update-index [options] [--] [file...],
+   N_(git update-index [options] [--] [file...]),
NULL
 };
 
@@ -714,83 +714,83 @@ int cmd_update_index(int argc, const char **argv, const 
char *prefix)
int parseopt_state = PARSE_OPT_UNKNOWN;
struct option options[] = {
OPT_BIT('q', NULL, refresh_args.flags,
-   continue refresh even when index needs update,
+   N_(continue refresh even when index needs update),
REFRESH_QUIET),
OPT_BIT(0, ignore-submodules, refresh_args.flags,
-   refresh: ignore submodules,
+   N_(refresh: ignore submodules),
REFRESH_IGNORE_SUBMODULES),
OPT_SET_INT(0, add, allow_add,
-   do not ignore new files, 1),
+   N_(do not ignore new files), 1),
OPT_SET_INT(0, replace, allow_replace,
-   let files replace directories and vice-versa, 1),
+   N_(let files replace directories and vice-versa), 1),
OPT_SET_INT(0, remove, allow_remove,
-   notice files missing from worktree, 1),
+   N_(notice files missing from worktree), 1),
OPT_BIT(0, unmerged, refresh_args.flags,
-   refresh even if index contains unmerged entries,
+   N_(refresh even if index contains unmerged entries),
REFRESH_UNMERGED),
{OPTION_CALLBACK, 0, refresh, refresh_args, NULL,
-   refresh stat information,
+   N_(refresh stat information),
PARSE_OPT_NOARG | PARSE_OPT_NONEG,
refresh_callback},
{OPTION_CALLBACK, 0, really-refresh, refresh_args, NULL,
-   like --refresh, but ignore assume-unchanged setting,
+   N_(like --refresh, but ignore assume-unchanged 
setting),
PARSE_OPT_NOARG | PARSE_OPT_NONEG,
really_refresh_callback},
{OPTION_LOWLEVEL_CALLBACK, 0, cacheinfo, NULL,
-   mode object path,
-   add the specified entry to the index,
+   N_(mode object path),
+   N_(add the specified entry to the index),
PARSE_OPT_NOARG |   /* disallow --cacheinfo=mode 
form */
PARSE_OPT_NONEG | PARSE_OPT_LITERAL_ARGHELP,
(parse_opt_cb *) cacheinfo_callback},
-   {OPTION_CALLBACK, 0, chmod, set_executable_bit, (+/-)x,
-   override the executable bit of the listed files,
+   {OPTION_CALLBACK, 0, chmod, set_executable_bit, N_((+/-)x),
+   N_(override the executable bit of the listed files),
PARSE_OPT_NONEG | PARSE_OPT_LITERAL_ARGHELP,
chmod_callback},
{OPTION_SET_INT, 0, assume-unchanged, mark_valid_only, NULL,
-   mark files as \not changing\,
+   N_(mark files as \not changing\),
PARSE_OPT_NOARG | PARSE_OPT_NONEG, NULL, MARK_FLAG},
{OPTION_SET_INT, 0, no-assume-unchanged, mark_valid_only, 
NULL,
-   clear assumed-unchanged bit,
+   N_(clear assumed-unchanged bit),
PARSE_OPT_NOARG | PARSE_OPT_NONEG, NULL, UNMARK_FLAG},
{OPTION_SET_INT, 0, skip-worktree, mark_skip_worktree_only, 
NULL,
-   mark files as \index-only\,
+   N_(mark files as \index-only\),
PARSE_OPT_NOARG | PARSE_OPT_NONEG, NULL, MARK_FLAG},
{OPTION_SET_INT, 0, no-skip-worktree, 
mark_skip_worktree_only, NULL,
-   clear skip-worktree bit,
+   N_(clear skip-worktree bit),
PARSE_OPT_NOARG | PARSE_OPT_NONEG, NULL, UNMARK_FLAG},
OPT_SET_INT(0, info-only, info_only,
-   add to index only; do not add content to object 
database, 1),
+   N_(add to index only; do not add content to object 
database), 1),
OPT_SET_INT(0, force-remove, force_remove,
-   remove named paths even if present in worktree, 1),
+  

[PATCH 60/66] i18n: update-ref: mark parseopt strings for translation

2012-08-20 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com
---
 builtin/update-ref.c | 10 +-
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/builtin/update-ref.c b/builtin/update-ref.c
index 835c62a..b30394f 100644
--- a/builtin/update-ref.c
+++ b/builtin/update-ref.c
@@ -4,8 +4,8 @@
 #include parse-options.h
 
 static const char * const git_update_ref_usage[] = {
-   git update-ref [options] -d refname [oldval],
-   git update-ref [options]refname newval [oldval],
+   N_(git update-ref [options] -d refname [oldval]),
+   N_(git update-ref [options]refname newval [oldval]),
NULL
 };
 
@@ -15,10 +15,10 @@ int cmd_update_ref(int argc, const char **argv, const char 
*prefix)
unsigned char sha1[20], oldsha1[20];
int delete = 0, no_deref = 0, flags = 0;
struct option options[] = {
-   OPT_STRING( 'm', NULL, msg, reason, reason of the update),
-   OPT_BOOLEAN('d', NULL, delete, deletes the reference),
+   OPT_STRING( 'm', NULL, msg, N_(reason), N_(reason of the 
update)),
+   OPT_BOOLEAN('d', NULL, delete, N_(deletes the reference)),
OPT_BOOLEAN( 0 , no-deref, no_deref,
-   update refname not the one it points 
to),
+   N_(update refname not the one it 
points to)),
OPT_END(),
};
 
-- 
1.7.12.rc2.18.g61b472e

--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 61/66] i18n: update-server-info: mark parseopt strings for translation

2012-08-20 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com
---
 builtin/update-server-info.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/builtin/update-server-info.c b/builtin/update-server-info.c
index 0d63c44..6c8cc3e 100644
--- a/builtin/update-server-info.c
+++ b/builtin/update-server-info.c
@@ -3,7 +3,7 @@
 #include parse-options.h
 
 static const char * const update_server_info_usage[] = {
-   git update-server-info [--force],
+   N_(git update-server-info [--force]),
NULL
 };
 
@@ -11,7 +11,7 @@ int cmd_update_server_info(int argc, const char **argv, const 
char *prefix)
 {
int force = 0;
struct option options[] = {
-   OPT__FORCE(force, update the info files from scratch),
+   OPT__FORCE(force, N_(update the info files from scratch)),
OPT_END()
};
 
-- 
1.7.12.rc2.18.g61b472e

--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 62/66] i18n: verify-pack: mark parseopt strings for translation

2012-08-20 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com
---
 builtin/verify-pack.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/builtin/verify-pack.c b/builtin/verify-pack.c
index e841b4a..66cd2df 100644
--- a/builtin/verify-pack.c
+++ b/builtin/verify-pack.c
@@ -53,7 +53,7 @@ static int verify_one_pack(const char *path, unsigned int 
flags)
 }
 
 static const char * const verify_pack_usage[] = {
-   git verify-pack [-v|--verbose] [-s|--stat-only] pack...,
+   N_(git verify-pack [-v|--verbose] [-s|--stat-only] pack...),
NULL
 };
 
@@ -63,9 +63,9 @@ int cmd_verify_pack(int argc, const char **argv, const char 
*prefix)
unsigned int flags = 0;
int i;
const struct option verify_pack_options[] = {
-   OPT_BIT('v', verbose, flags, verbose,
+   OPT_BIT('v', verbose, flags, N_(verbose),
VERIFY_PACK_VERBOSE),
-   OPT_BIT('s', stat-only, flags, show statistics only,
+   OPT_BIT('s', stat-only, flags, N_(show statistics only),
VERIFY_PACK_STAT_ONLY),
OPT_END()
};
-- 
1.7.12.rc2.18.g61b472e

--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 63/66] i18n: verify-tag: mark parseopt strings for translation

2012-08-20 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com
---
 builtin/verify-tag.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/builtin/verify-tag.c b/builtin/verify-tag.c
index 986789f..a8eee88 100644
--- a/builtin/verify-tag.c
+++ b/builtin/verify-tag.c
@@ -14,7 +14,7 @@
 #include gpg-interface.h
 
 static const char * const verify_tag_usage[] = {
-   git verify-tag [-v|--verbose] tag...,
+   N_(git verify-tag [-v|--verbose] tag...),
NULL
 };
 
@@ -70,7 +70,7 @@ int cmd_verify_tag(int argc, const char **argv, const char 
*prefix)
 {
int i = 1, verbose = 0, had_error = 0;
const struct option verify_tag_options[] = {
-   OPT__VERBOSE(verbose, print tag contents),
+   OPT__VERBOSE(verbose, N_(print tag contents)),
OPT_END()
};
 
-- 
1.7.12.rc2.18.g61b472e

--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 64/66] i18n: write-tree: mark parseopt strings for translation

2012-08-20 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com
---
 builtin/write-tree.c | 10 +-
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/builtin/write-tree.c b/builtin/write-tree.c
index b223af4..084c0df 100644
--- a/builtin/write-tree.c
+++ b/builtin/write-tree.c
@@ -10,7 +10,7 @@
 #include parse-options.h
 
 static const char * const write_tree_usage[] = {
-   git write-tree [--missing-ok] [--prefix=prefix/],
+   N_(git write-tree [--missing-ok] [--prefix=prefix/]),
NULL
 };
 
@@ -21,13 +21,13 @@ int cmd_write_tree(int argc, const char **argv, const char 
*unused_prefix)
unsigned char sha1[20];
const char *me = git-write-tree;
struct option write_tree_options[] = {
-   OPT_BIT(0, missing-ok, flags, allow missing objects,
+   OPT_BIT(0, missing-ok, flags, N_(allow missing objects),
WRITE_TREE_MISSING_OK),
-   { OPTION_STRING, 0, prefix, prefix, prefix/,
- write tree object for a subdirectory prefix ,
+   { OPTION_STRING, 0, prefix, prefix, N_(prefix/),
+ N_(write tree object for a subdirectory prefix) ,
  PARSE_OPT_LITERAL_ARGHELP },
{ OPTION_BIT, 0, ignore-cache-tree, flags, NULL,
- only useful for debugging,
+ N_(only useful for debugging),
  PARSE_OPT_HIDDEN | PARSE_OPT_NOARG, NULL,
  WRITE_TREE_IGNORE_CACHE_TREE },
OPT_END()
-- 
1.7.12.rc2.18.g61b472e

--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 65/66] Reduce translations by using same terminologies

2012-08-20 Thread Nguyễn Thái Ngọc Duy
Somewhere in help usage, we use both message and msg, command
and cmd, key id and key-id. This patch makes all help text from
parseopt use the first form. Clearer and 3 fewer strings for
translators.

Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com
---
 archive.c | 2 +-
 builtin/archive.c | 2 +-
 builtin/notes.c   | 4 ++--
 builtin/tag.c | 2 +-
 4 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/archive.c b/archive.c
index 2584324..4666404 100644
--- a/archive.c
+++ b/archive.c
@@ -343,7 +343,7 @@ static int parse_archive_args(int argc, const char **argv,
OPT_GROUP(),
OPT_STRING(0, remote, remote, N_(repo),
N_(retrieve the archive from remote repository 
repo)),
-   OPT_STRING(0, exec, exec, N_(cmd),
+   OPT_STRING(0, exec, exec, N_(command),
N_(path to the remote git-upload-archive command)),
OPT_END()
};
diff --git a/builtin/archive.c b/builtin/archive.c
index e7965bf..9a1cfd3 100644
--- a/builtin/archive.c
+++ b/builtin/archive.c
@@ -92,7 +92,7 @@ int cmd_archive(int argc, const char **argv, const char 
*prefix)
N_(write the archive to this file)),
OPT_STRING(0, remote, remote, N_(repo),
N_(retrieve the archive from remote repository 
repo)),
-   OPT_STRING(0, exec, exec, N_(cmd),
+   OPT_STRING(0, exec, exec, N_(command),
N_(path to the remote git-upload-archive command)),
OPT_END()
};
diff --git a/builtin/notes.c b/builtin/notes.c
index 423c6e8..554c801 100644
--- a/builtin/notes.c
+++ b/builtin/notes.c
@@ -531,7 +531,7 @@ static int add(int argc, const char **argv, const char 
*prefix)
const unsigned char *note;
struct msg_arg msg = { 0, 0, STRBUF_INIT };
struct option options[] = {
-   { OPTION_CALLBACK, 'm', message, msg, N_(msg),
+   { OPTION_CALLBACK, 'm', message, msg, N_(message),
N_(note contents as a string), PARSE_OPT_NONEG,
parse_msg_arg},
{ OPTION_CALLBACK, 'F', file, msg, N_(file),
@@ -688,7 +688,7 @@ static int append_edit(int argc, const char **argv, const 
char *prefix)
const char * const *usage;
struct msg_arg msg = { 0, 0, STRBUF_INIT };
struct option options[] = {
-   { OPTION_CALLBACK, 'm', message, msg, N_(msg),
+   { OPTION_CALLBACK, 'm', message, msg, N_(message),
N_(note contents as a string), PARSE_OPT_NONEG,
parse_msg_arg},
{ OPTION_CALLBACK, 'F', file, msg, N_(file),
diff --git a/builtin/tag.c b/builtin/tag.c
index c581e0a..9c3e067 100644
--- a/builtin/tag.c
+++ b/builtin/tag.c
@@ -460,7 +460,7 @@ int cmd_tag(int argc, const char **argv, const char *prefix)
OPT_BOOLEAN('s', sign, opt.sign, N_(annotated and 
GPG-signed tag)),
OPT_STRING(0, cleanup, cleanup_arg, N_(mode),
N_(how to strip spaces and #comments from message)),
-   OPT_STRING('u', local-user, keyid, N_(key-id),
+   OPT_STRING('u', local-user, keyid, N_(key id),
N_(use another key to sign the tag)),
OPT__FORCE(force, N_(replace the tag if exists)),
OPT_COLUMN(0, column, colopts, N_(show tag list in 
columns)),
-- 
1.7.12.rc2.18.g61b472e

--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: Temporary merge branch 2 Conflicts

2012-08-20 Thread Stephen Bash
- Original Message -
 From: Junio C Hamano gits...@pobox.com
 Sent: Friday, August 17, 2012 5:10:47 PM
 Subject: Re: Temporary merge branch 2 Conflicts
 
 Stephen Bash b...@genarts.com writes:
 
  What is the recommended method for resolving this sort of merge?
  kdiff3 obviously doesn't understand the situation.  Do the working
  tree files contain all the conflicts?  If so, I can just go
  through by hand and resolve the conflicts the old fashion way.
 
 Yes.  External tools like kdiff3 may not understand the conflict in
 the working tree, but the files in the working tree should have
 resolved the naturally resolvable bits and only left the conflicted
 bits conflicted.  Just resolve manually if you can, and then look at
 what both branches wanted to do to the file (git log -p --merge
 $that_path before you git add as the final sanity check would
 work nicely) to make sure your resolution makes sense.

Thanks for the clarification Junio.  I'll take another swipe at it this week 
now that I know what I'm doing!

Stephen
--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


receive.denyNonNonFastForwards not denying force update

2012-08-20 Thread John Arthorne
At eclipse.org we wanted all git repositories to disallow non-fastforward
commits by default. So, we set receive.denyNonFastForwards=true as a system
configuration setting. However, this does not prevent a non-fastforward
force push. If we set the same configuration setting in the local repository
configuration then it does prevent non-fastforward pushes.

For all the details see this bugzilla, particularly comment #59 where we
finally narrowed this down:

https://bugs.eclipse.org/bugs/show_bug.cgi?id=343150

This is on git version 1.7.4.1.

The Git book recommends setting this property at the system level:

http://git-scm.com/book/ch7-1.html (near the bottom)

Can someone confirm if this is intended behaviour or not. We ended up
using a script to set a local config property in each repository, but
with several hundred git repositories it would be much easier if the
system setting was honoured.

Thanks,
John Arthorne
--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [RFC 1/5] GSOC: prepare svndump for branch detection

2012-08-20 Thread Florian Achleitner
On Sunday 19 August 2012 23:57:23 Junio C Hamano wrote:
 Florian Achleitner florian.achleitner.2.6...@gmail.com writes:
  This change makes me uncomfortable.
  We are doubling up on hashing with fast-import.
  This introduces git-specific logic into vcs-svn.
 
 IIUC, vcs-svn/fast-export is meant to produce a stream in the
 fast-import format, and that format is meant to be VCS agnostic,
 it would need a careful thinking to add anything Git specific to
 it.  If you make other people's importers unable to read from you
 because you tell them the contents of blob in Git's terms, that is
 not very good.

Good point.

 
  You have two choices of referencing that blobs later, by using a mark, or
  by giving their sha1. Marks are already used for marking commits, and
  there is only one mark namespace. So I couldn't use marks to reference
  the blobs in a nice way. This allows for referencing them by their sha1.
 
 Surely you can, by using even and odd numbers (or modulo 4 if you
 may later want to mark trees and tags as well, but I doubt that is
 needed), no?

Currently, the mark number is equal to the svn revision number the commit 
corresponds to. I didn't want to break that, but not mandatory. We could also 
split the mark namespace by reserving one or more of the most significant bits 
as a type specifier. 
I'll develop a marks-based version ..


--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH/RFC v4 01/16] GSOC remote-svn

2012-08-20 Thread Florian Achleitner
On Saturday 18 August 2012 13:13:47 Junio C Hamano wrote:
 That indicates that one necessary patch to add logic to Makefile to
 go and build that subdirectory, at least before running the test,
 but possibly as part of the all target, is missing, isn't it?
 
 Or you can add, at the beginning of your tests files that require
 the contrib bit, to have something like
 
 if test -e $GIT_BUILD_DIR/remote-svn
 then
 test_set_prereq REMOTE_SVN
 fi
 
 and protect your tests with the prerequisite, e.g.
 
 test_expect_success REMOTE_SVN 'test svn:// URL' '
 ...
 '
 
 without changing the top-level Makefile.

What version would you prefer? Currently nothing in contrib/ is built by the 
toplevel Makefile..
--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 3/3] branch: suggest how to undo a --set-upstream when given one branch

2012-08-20 Thread Carlos Martín Nieto
This interface is error prone, and a better one (--set-upstream-to)
exists. Suggest how to fix a --set-upstream invocation in case the
user only gives one argument, which makes it likely that he meant to
do the opposite, like with

git branch --set-upstream origin/master

when they meant one of

git branch --set-upstream origin/master master
git branch --set-upstream-to origin/master

While we're at it, add a notice that the --set-upstream flag is
deprecated and will be removed at some point.

Signed-off-by: Carlos Martín Nieto c...@elego.de

---

This produces suboptimal output in case that A tracks B and we do

git checkout B
git branch --set-upstream A

as it will suggest

git branch --set-upstream A B

as a way of undoing what we just did. Avoiding it becomes a bit messy
(yet another layer of ifs), so I've left it out. Anybody reckon it's
worth recognising this?
---
 builtin/branch.c  | 35 +++
 t/t3200-branch.sh | 52 
 2 files changed, 87 insertions(+)

diff --git a/builtin/branch.c b/builtin/branch.c
index 08068f7..33641d9 100644
--- a/builtin/branch.c
+++ b/builtin/branch.c
@@ -707,6 +707,21 @@ static int edit_branch_description(const char *branch_name)
return status;
 }
 
+static void print_set_upstream_warning(const char *branch, int branch_existed, 
const char *old_upstream)
+{
+   fprintf(stderr, _(If you wanted to make '%s' track '%s', do 
this:\n\n), head, branch);
+   if (branch_existed) {
+   if (old_upstream)
+   fprintf(stderr, _(git branch --set-upstream %s 
%s\n), old_upstream, branch);
+   else
+   fprintf(stderr, _(git branch --unset-upstream 
%s\n), branch);
+   } else {
+   fprintf(stderr, _(git branch -d %s\n), branch);
+   }
+
+   fprintf(stderr, _(git branch --set-upstream-to %s\n), branch);
+}
+
 int cmd_branch(int argc, const char **argv, const char *prefix)
 {
int delete = 0, rename = 0, force_create = 0, list = 0;
@@ -877,10 +892,30 @@ int cmd_branch(int argc, const char **argv, const char 
*prefix)
git_config_set_multivar(buf.buf, NULL, NULL, 1);
strbuf_release(buf);
} else if (argc  0  argc = 2) {
+   struct branch *branch = branch_get(argv[0]);
+   const char *old_upstream = NULL;
+   int branch_existed = 0;
+
if (kinds != REF_LOCAL_BRANCH)
die(_(-a and -r options to 'git branch' do not make 
sense with a branch name));
+
+   if (track == BRANCH_TRACK_OVERRIDE)
+   fprintf(stderr, _(The --set-upstream flag is 
deprecated and will be removed. Consider using --track or 
--set-upstream-to\n));
+
+   /*
+* Save what argv[0] was pointing to so we can give
+* the --set-upstream-to hint
+*/
+   if (branch_has_merge_config(branch))
+   old_upstream = 
shorten_unambiguous_ref(branch-merge[0]-dst, 0);
+
+   branch_existed = ref_exists(branch-refname);
create_branch(head, argv[0], (argc == 2) ? argv[1] : head,
  force_create, reflog, 0, quiet, track);
+
+   if (argc == 1  track == BRANCH_TRACK_OVERRIDE)
+   print_set_upstream_warning(argv[0], branch_existed, 
old_upstream);
+
} else
usage_with_options(builtin_branch_usage, options);
 
diff --git a/t/t3200-branch.sh b/t/t3200-branch.sh
index 93e5d6e..702bffa 100755
--- a/t/t3200-branch.sh
+++ b/t/t3200-branch.sh
@@ -399,6 +399,58 @@ test_expect_success 'test --unset-upstream on a particular 
branch' \
  test_must_fail git config branch.my14.remote 
  test_must_fail git config branch.my14.merge'
 
+test_expect_success 'test --set-upstream help message with one arg' \
+'git branch --set-upstream origin/master 2actual 
+ test_when_finished git branch -d origin/master 
+ cat expected EOF 
+The --set-upstream flag is deprecated and will be removed. Consider using 
--track or --set-upstream-to
+If you wanted to make ''master'' track ''origin/master'', do this:
+
+git branch -d origin/master
+git branch --set-upstream-to origin/master
+EOF
+ test_cmp expected actual
+'
+
+test_expect_success '--set-upstream with a branch that already has an 
upstream' \
+'git branch --set-upstream-to my12 master 
+ git branch --set-upstream-to my13 my12 
+ test_when_finished git branch --unset-upstream my12 
+ test_when_finished git branch --unset-upstream my13 
+ git branch --set-upstream my12 2actual 
+ cat actual 
+ cat expected EOF 
+The --set-upstream flag is deprecated and will be removed. Consider using 
--track or --set-upstream-to
+If you wanted to make ''master'' track ''my12'', do this:
+
+git branch 

[PATCH 2/3] branch: add --unset-upstream option

2012-08-20 Thread Carlos Martín Nieto
We have ways of setting the upstream information, but if we want to
unset it, we need to resort to modifying the configuration manually.

Teach branch an --unset-upstream option that unsets this information.

Signed-off-by: Carlos Martín Nieto c...@elego.de
---
 Documentation/git-branch.txt |  5 +
 builtin/branch.c | 17 ++---
 t/t3200-branch.sh| 16 
 3 files changed, 35 insertions(+), 3 deletions(-)

diff --git a/Documentation/git-branch.txt b/Documentation/git-branch.txt
index e41c4b5..9c1d2f1 100644
--- a/Documentation/git-branch.txt
+++ b/Documentation/git-branch.txt
@@ -14,6 +14,7 @@ SYNOPSIS
[(--merged | --no-merged | --contains) [commit]] [pattern...]
 'git branch' [--set-upstream | --track | --no-track] [-l] [-f] branchname 
[start-point]
 'git branch' (--set-upstream-to=upstream | -u upstream) [branchname]
+'git branch' --unset-upstream [branchname]
 'git branch' (-m | -M) [oldbranch] newbranch
 'git branch' (-d | -D) [-r] branchname...
 'git branch' --edit-description [branchname]
@@ -180,6 +181,10 @@ start-point is either a local or remote-tracking branch.
considered branchname's upstream branch. If no branchname
is specified, then it defaults to the current branch.
 
+--unset-upstream::
+   Remove the upstream information for branchname. If no branch
+   is specified it defaults to the current branch.
+
 --edit-description::
Open an editor and edit the text to explain what the branch is
for, to be used by various other commands (e.g. `request-pull`).
diff --git a/builtin/branch.c b/builtin/branch.c
index 3c978eb..08068f7 100644
--- a/builtin/branch.c
+++ b/builtin/branch.c
@@ -712,7 +712,7 @@ int cmd_branch(int argc, const char **argv, const char 
*prefix)
int delete = 0, rename = 0, force_create = 0, list = 0;
int verbose = 0, abbrev = -1, detached = 0;
int reflog = 0, edit_description = 0;
-   int quiet = 0;
+   int quiet = 0, unset_upstream = 0;
const char *new_upstream = NULL;
enum branch_track track;
int kinds = REF_LOCAL_BRANCH;
@@ -728,6 +728,7 @@ int cmd_branch(int argc, const char **argv, const char 
*prefix)
OPT_SET_INT( 0, set-upstream,  track, change upstream info,
BRANCH_TRACK_OVERRIDE),
OPT_STRING('u', set-upstream-to, new_upstream, upstream, 
change the upstream info),
+   OPT_BOOLEAN(0, unset-upstream, unset_upstream, Unset the 
upstream info),
OPT__COLOR(branch_use_color, use colored output),
OPT_SET_INT('r', remotes, kinds, act on remote-tracking 
branches,
REF_REMOTE_BRANCH),
@@ -796,10 +797,10 @@ int cmd_branch(int argc, const char **argv, const char 
*prefix)
argc = parse_options(argc, argv, prefix, options, builtin_branch_usage,
 0);
 
-   if (!delete  !rename  !edit_description  !new_upstream  argc == 
0)
+   if (!delete  !rename  !edit_description  !new_upstream  
!unset_upstream  argc == 0)
list = 1;
 
-   if (!!delete + !!rename + !!force_create + !!list + !!new_upstream  1)
+   if (!!delete + !!rename + !!force_create + !!list + !!new_upstream + 
!!unset_upstream  1)
usage_with_options(builtin_branch_usage, options);
 
if (abbrev == -1)
@@ -865,6 +866,16 @@ int cmd_branch(int argc, const char **argv, const char 
*prefix)
 * info and making sure new_upstream is correct
 */
create_branch(head, branch-name, new_upstream, 0, 0, 0, quiet, 
BRANCH_TRACK_OVERRIDE);
+   } else if (unset_upstream) {
+   struct branch *branch = branch_get(argv[0]);
+   struct strbuf buf = STRBUF_INIT;
+
+   strbuf_addf(buf, branch.%s.remote, branch-name);
+   git_config_set_multivar(buf.buf, NULL, NULL, 1);
+   strbuf_reset(buf);
+   strbuf_addf(buf, branch.%s.merge, branch-name);
+   git_config_set_multivar(buf.buf, NULL, NULL, 1);
+   strbuf_release(buf);
} else if (argc  0  argc = 2) {
if (kinds != REF_LOCAL_BRANCH)
die(_(-a and -r options to 'git branch' do not make 
sense with a branch name));
diff --git a/t/t3200-branch.sh b/t/t3200-branch.sh
index e9019ac..93e5d6e 100755
--- a/t/t3200-branch.sh
+++ b/t/t3200-branch.sh
@@ -383,6 +383,22 @@ test_expect_success 'use --set-upstream-to modify a 
particular branch' \
  test $(git config branch.my13.remote) = . 
  test $(git config branch.my13.merge) = refs/heads/master'
 
+test_expect_success 'test --unset-upstream on HEAD' \
+'git branch my14
+ test_config branch.master.remote foo 
+ test_config branch.master.merge foo 
+ git branch --set-upstream-to my14 
+ git branch --unset-upstream 
+ test_must_fail git config branch.master.remote 
+ 

[PATCH 0/3] Improve branch UI for setting upstream information

2012-08-20 Thread Carlos Martín Nieto
Hi all,

After way too long, here's the next iteration of the concept that
began with swapping arguments in --set-upstream like -m does.

After the feedback from the list, --set-upstream-to was born and
--set-upstream is being deprecated in favour of either --track or
--set-upstream-to depening on which of the behaviours the user wants
to have.

Using --set-upsteam with one argument now also leads to a message
explaining how to undo it. For that, branch has learnt
--unset-upstream which will remove the upstream information for the
given branch (or HEAD).

Carlos Martín Nieto (3):
  branch: introduce --set-upstream-to
  branch: add --unset-upstream option
  branch: suggest how to undo a --set-upstream when given one branch

 Documentation/git-branch.txt | 14 +++-
 builtin/branch.c | 65 +--
 t/t3200-branch.sh| 82 
 3 files changed, 157 insertions(+), 4 deletions(-)

-- 
1.7.11.1.104.ge7b44f1

--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 1/3] branch: introduce --set-upstream-to

2012-08-20 Thread Carlos Martín Nieto
The existing --set-uptream option can cause confusion, as it uses the
usual branch convention of assuming a starting point of HEAD if none
is specified, causing

git branch --set-upstream origin/master

to create a new local branch 'origin/master' that tracks the current
branch. As --set-upstream already exists, we can't simply change its
behaviour. To work around this, introduce --set-upstream-to which
accepts a compulsory argument indicating what the new upstream branch
should be and one optinal argument indicating which branch to change,
defaulting to HEAD.

The new options allows us to type

git branch --set-upstream-to origin/master

to set the current branch's upstream to be origin's master.

Signed-off-by: Carlos Martín Nieto c...@elego.de
---
 Documentation/git-branch.txt |  9 -
 builtin/branch.c | 17 +++--
 t/t3200-branch.sh| 14 ++
 3 files changed, 37 insertions(+), 3 deletions(-)

diff --git a/Documentation/git-branch.txt b/Documentation/git-branch.txt
index 47235be..e41c4b5 100644
--- a/Documentation/git-branch.txt
+++ b/Documentation/git-branch.txt
@@ -13,6 +13,7 @@ SYNOPSIS
[--column[=options] | --no-column]
[(--merged | --no-merged | --contains) [commit]] [pattern...]
 'git branch' [--set-upstream | --track | --no-track] [-l] [-f] branchname 
[start-point]
+'git branch' (--set-upstream-to=upstream | -u upstream) [branchname]
 'git branch' (-m | -M) [oldbranch] newbranch
 'git branch' (-d | -D) [-r] branchname...
 'git branch' --edit-description [branchname]
@@ -48,7 +49,7 @@ branch so that 'git pull' will appropriately merge from
 the remote-tracking branch. This behavior may be changed via the global
 `branch.autosetupmerge` configuration flag. That setting can be
 overridden by using the `--track` and `--no-track` options, and
-changed later using `git branch --set-upstream`.
+changed later using `git branch --set-upstream-to`.
 
 With a `-m` or `-M` option, oldbranch will be renamed to newbranch.
 If oldbranch had a corresponding reflog, it is renamed to match
@@ -173,6 +174,12 @@ start-point is either a local or remote-tracking branch.
like `--track` would when creating the branch, except that where
branch points to is not changed.
 
+-u upstream::
+--set-upstream-to=upstream::
+   Set up branchname's tracking information so upstream is
+   considered branchname's upstream branch. If no branchname
+   is specified, then it defaults to the current branch.
+
 --edit-description::
Open an editor and edit the text to explain what the branch is
for, to be used by various other commands (e.g. `request-pull`).
diff --git a/builtin/branch.c b/builtin/branch.c
index 0e060f2..3c978eb 100644
--- a/builtin/branch.c
+++ b/builtin/branch.c
@@ -713,6 +713,7 @@ int cmd_branch(int argc, const char **argv, const char 
*prefix)
int verbose = 0, abbrev = -1, detached = 0;
int reflog = 0, edit_description = 0;
int quiet = 0;
+   const char *new_upstream = NULL;
enum branch_track track;
int kinds = REF_LOCAL_BRANCH;
struct commit_list *with_commit = NULL;
@@ -726,6 +727,7 @@ int cmd_branch(int argc, const char **argv, const char 
*prefix)
BRANCH_TRACK_EXPLICIT),
OPT_SET_INT( 0, set-upstream,  track, change upstream info,
BRANCH_TRACK_OVERRIDE),
+   OPT_STRING('u', set-upstream-to, new_upstream, upstream, 
change the upstream info),
OPT__COLOR(branch_use_color, use colored output),
OPT_SET_INT('r', remotes, kinds, act on remote-tracking 
branches,
REF_REMOTE_BRANCH),
@@ -794,10 +796,10 @@ int cmd_branch(int argc, const char **argv, const char 
*prefix)
argc = parse_options(argc, argv, prefix, options, builtin_branch_usage,
 0);
 
-   if (!delete  !rename  !edit_description  argc == 0)
+   if (!delete  !rename  !edit_description  !new_upstream  argc == 
0)
list = 1;
 
-   if (!!delete + !!rename + !!force_create + !!list  1)
+   if (!!delete + !!rename + !!force_create + !!list + !!new_upstream  1)
usage_with_options(builtin_branch_usage, options);
 
if (abbrev == -1)
@@ -852,6 +854,17 @@ int cmd_branch(int argc, const char **argv, const char 
*prefix)
rename_branch(argv[0], argv[1], rename  1);
else
usage_with_options(builtin_branch_usage, options);
+   } else if (new_upstream) {
+   struct branch *branch = branch_get(argv[0]);
+
+   if (!ref_exists(branch-refname))
+   die(_(branch '%s' does not exist), branch-name);
+
+   /*
+* create_branch takes care of setting up the tracking
+* info and making sure new_upstream is correct
+*/
+

Re: Porting git to HP NonStop

2012-08-20 Thread Junio C Hamano
Joachim Schmitz j...@schmitz-digital.de writes:

 OK, I'll go for a compat/mkdir.c though.

No.  See below.

 We shouldn't call it tandem.c as Tandem, the Company, doesn't exist anymore
 and since more than a decade (bough by Compaq, then HP), only the __TANDEM
 survived in our compiler and headers/libraries. Could call it NonStop.c, but
 I don't really like that idea either, I'd rather keep it more generic, just
 in case someone else might need it too, or that issue someday gets fixed for
 NonStop.

compat/hp_nonstop.c is also fine, but I think matching #ifdef __TANDEM is
the most sensible.

And I wouldn't call it just mkdir, as it is more likely than not
that we will find other incompatibilities that needs to be absorbed
in the compat/ layer, and we can add it to compat/tandem.c, but not
to compat/mkdir.c, as that will be another nonstop specific tweak. 
A separate file, compat/tandem/mkdir.c, is fine, though.

 I'll go for git_mkdir(), similar to other git wrappers, (like for mmap,
 pread, fopen, snprintf, vsnprintf, qsort).

Again, no.  Your breakage is that having underlying system mkdir
that does not understand trailing slash, which may not be specific
to __TANDEM, but still is _not_ the only possible mode of breakage.
Squatting on a generic git_mkdir() name makes it harder for other
people to name their compat mkdir functions to tweak for the
breakage on their platforms.  The examples you listed are all the
platform does not offer it, so we implement the whole thing kind,
so it is in a different genre.
--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: What's cooking in git.git (Aug 2012, #06; Sun, 19)

2012-08-20 Thread Junio C Hamano
Erik Faye-Lund kusmab...@gmail.com writes:

 On Mon, Aug 20, 2012 at 9:00 AM, Junio C Hamano gits...@pobox.com wrote:
 * ef/win32-cred-helper (2012-08-16) 1 commit
  - contrib: add win32 credential-helper

 Credential helper for Win32 (is this GUI???).

 No, and credential helpers shouldn't be either.

Hrm, doesn't it even do the application wants to access your
keychain.  Allow it [Y/N]? kind of thing?

--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH/RFC v4 01/16] GSOC remote-svn

2012-08-20 Thread Junio C Hamano
Florian Achleitner florian.achleitner.2.6...@gmail.com writes:

 On Saturday 18 August 2012 13:13:47 Junio C Hamano wrote:
 That indicates that one necessary patch to add logic to Makefile to
 go and build that subdirectory, at least before running the test,
 but possibly as part of the all target, is missing, isn't it?
 
 Or you can add, at the beginning of your tests files that require
 the contrib bit, to have something like
 
 if test -e $GIT_BUILD_DIR/remote-svn
 then
 test_set_prereq REMOTE_SVN
 fi
 
 and protect your tests with the prerequisite, e.g.
 
 test_expect_success REMOTE_SVN 'test svn:// URL' '
 ...
 '
 
 without changing the top-level Makefile.

 What version would you prefer? Currently nothing in contrib/ is built by the 
 toplevel Makefile..

The latter approach of running tests only for people who went to
contrib/vcs-svn and built things there may be more conservative.  I
could be persuaded either way.
--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: What's cooking in git.git (Aug 2012, #06; Sun, 19)

2012-08-20 Thread Erik Faye-Lund
On Mon, Aug 20, 2012 at 6:21 PM, Junio C Hamano gits...@pobox.com wrote:
 Erik Faye-Lund kusmab...@gmail.com writes:

 On Mon, Aug 20, 2012 at 9:00 AM, Junio C Hamano gits...@pobox.com wrote:
 * ef/win32-cred-helper (2012-08-16) 1 commit
  - contrib: add win32 credential-helper

 Credential helper for Win32 (is this GUI???).

 No, and credential helpers shouldn't be either.

 Hrm, doesn't it even do the application wants to access your
 keychain.  Allow it [Y/N]? kind of thing?


No. On Windows, you can freely access the keychain as long as a user
is logged in and the machine is not locked.
--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: git on HP NonStop

2012-08-20 Thread Junio C Hamano
Johannes Sixt j.s...@viscovery.net writes:

 Am 8/20/2012 12:36, schrieb Joachim Schmitz:
 int var = var;
 char *othervar = othervar;
 
 ... 

 What is the reason for using that self-init stuff? I don't think it is
 really portable, is it?

 It is used to avoid var may be used uninitialized warnings for some
 compilers. Officially (according to the C standard), it is undefined
 behavior. But I've observed considerable resistance by Junio to fix this
 properly.

I had resisted

-   int foo = foo;
+   int foo = 0;

in the past.  If some compiler is not seeing that foo is never
used uninitialized, such a compiler will generate an unnecessary
initialization, so it is not a _proper_ fix anyway (in fact, I do
not think a proper fix exists, short of simplifying the code so that
less sophisticated compilers can see that foo is never used
uninitialized).

So, no, I never resisted a proper fix.  I resisted swapping an
unsatisfactory workaround with another.

Between the two unsatisfactory workarounds, the latter (explicit
and unnecessary assignment to an innocuous value) is lessor of two
evils, so I do not particularly mind it, though.  Indeed, I think
more recent history shows that we have such changes.


--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: What's cooking in git.git (Aug 2012, #06; Sun, 19)

2012-08-20 Thread Junio C Hamano
Erik Faye-Lund kusmab...@gmail.com writes:

 On Mon, Aug 20, 2012 at 6:21 PM, Junio C Hamano gits...@pobox.com wrote:
 Erik Faye-Lund kusmab...@gmail.com writes:

 On Mon, Aug 20, 2012 at 9:00 AM, Junio C Hamano gits...@pobox.com wrote:
 * ef/win32-cred-helper (2012-08-16) 1 commit
  - contrib: add win32 credential-helper

 Credential helper for Win32 (is this GUI???).

 No, and credential helpers shouldn't be either.

 Hrm, doesn't it even do the application wants to access your
 keychain.  Allow it [Y/N]? kind of thing?


 No. On Windows, you can freely access the keychain as long as a user
 is logged in and the machine is not locked.

OK, so is this a good description to go in the merge commit when it
goes to 'master'?

* ef/win32-cred-helper (2012-08-16) 1 commit
 - contrib: add win32 credential-helper

 Credential helper for Win32, to allow access to the keychain of
 logged-in user.


--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: What's cooking in git.git (Aug 2012, #06; Sun, 19)

2012-08-20 Thread Erik Faye-Lund
On Mon, Aug 20, 2012 at 6:35 PM, Junio C Hamano gits...@pobox.com wrote:
 Erik Faye-Lund kusmab...@gmail.com writes:

 On Mon, Aug 20, 2012 at 6:21 PM, Junio C Hamano gits...@pobox.com wrote:
 Erik Faye-Lund kusmab...@gmail.com writes:

 On Mon, Aug 20, 2012 at 9:00 AM, Junio C Hamano gits...@pobox.com wrote:
 * ef/win32-cred-helper (2012-08-16) 1 commit
  - contrib: add win32 credential-helper

 Credential helper for Win32 (is this GUI???).

 No, and credential helpers shouldn't be either.

 Hrm, doesn't it even do the application wants to access your
 keychain.  Allow it [Y/N]? kind of thing?


 No. On Windows, you can freely access the keychain as long as a user
 is logged in and the machine is not locked.

 OK, so is this a good description to go in the merge commit when it
 goes to 'master'?

 * ef/win32-cred-helper (2012-08-16) 1 commit
  - contrib: add win32 credential-helper

  Credential helper for Win32, to allow access to the keychain of
  logged-in user.


Looks good to me.
--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH/RFC v4 01/16] GSOC remote-svn

2012-08-20 Thread Jonathan Nieder
Hi,

Florian Achleitner wrote:

 What version would you prefer?

I think git-remote-svn should move out of contrib to the toplevel of
git.git (as I think I've mentioned before).  Since it's just a new git
command in incubation, I don't want the maintenance hassle of keeping
it in contrib/svn-fe.  It can be a test program for now (e.g.,
git-remote-testsvn).

Hope that helps,
Jonathan
--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [RFC 1/5] GSOC: prepare svndump for branch detection

2012-08-20 Thread Jonathan Nieder
Florian Achleitner wrote:

 Currently, the mark number is equal to the svn revision number the commit
 corresponds to. I didn't want to break that, but not mandatory. We could also
 split the mark namespace by reserving one or more of the most significant bits
 as a type specifier.
 I'll develop a marks-based version ..

Have we already exhausted possibilities that don't involve changing
vcs-svn/ code quite so much?  One possibility mentioned before was to
post-process the stream that svn-fe produces, which seemed appealing
from a debuggability point of view.

Curious,
Jonathan
--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: Porting git to HP NonStop

2012-08-20 Thread Junio C Hamano
Joachim Schmitz j...@schmitz-digital.de writes:

 I haven't found any other to be needed. Well, poll, maybe, but with only
 minor tweaks for the win32 one works for me (and those tweaks are compatible
 with win32

 A separate file, compat/tandem/mkdir.c, is fine, though.

If you wouldn't have dozens of them, so compat/tandem/mkdir.c is not
suitable; compat/tandem.c would be good, then.

  I'll go for git_mkdir(), similar to other git wrappers, (like for
  mmap, pread, fopen, snprintf, vsnprintf, qsort).
 
 Again, no.  Your breakage is that having underlying system mkdir that does
 not
 understand trailing slash, which may not be specific to __TANDEM, but
 still is
 _not_ the only possible mode of breakage.

 Well, it is the only one GNUlib's mkdir caters for and I'd regard that an
 authoritative source...

I suspect that you may be misunderstanding what compat/ is about, so
let's try again.

Platform difference in mkdir may not be limited to on this
platform, the underlying one supplied by the system does not like
path ending with a slash.

What I am saying is that it is unacceptable to call something that
caters to that specific kind of difference from what the codebase
expects with a generic name such as git_mkdir().  Look at mingw's
replacement.  The platform difference over there is that the one
from the system does not take mode parameter.  Imagine that one
was already called git_mkdir().  Now we have two different kind of
differences, and one has more officially-looking git_mkdir() name;
yours cannot take it---what would you do in that case?  Neither kind
of difference is more officially sanctioned difference; don't call
yours any more official/generic than necessary.

Your wrapper is not limited to tandem, but is applicable to ancient
BSDs, so it is fine to call it as compat_mkdir_wo_trailing_slash(),
so that it can be shared among platforms whose mkdir do not want to
see trailing slashes.  If you are going that route, the function
should live in its own file (without any other wrapper), and not be
named after specific platform (should be named after the specific
difference from what we expect, instead).  I am perfectly fine with
that approach as well.

 Squatting on a generic git_mkdir() name makes it harder for other people
 to
 name their compat mkdir functions to tweak for the breakage on their
 platforms.  The examples you listed are all the platform does not offer
 it, so
 we implement the whole thing kind, so it is in a different genre.

 Nope, git_fopen() definitly is a wrapper for fopen(), as is git_vsnprintf()
 for vsnprintf().

I was talking more about mmap() and pread().

For the two you mentioned, ideally they should have been named after
the specific breakages they cover (fopen that does not error out on
directories is primarily AIX thing IIRC, and snprintf returns bogus
result are shared between HPUX and Windows), but over these years we
haven't seen any other kind of differences from various platforms, so
the need to rename them away is very low.

On the other hand, we already know there are at least two kinds of
platform mkdir() that need different compat/ layer support, so
calling one git_mkdir() to cover one particular kind of difference
does not make any sense.

Besides, an earlier mistake is not a valid excuse to add new
mistakes.
--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: receive.denyNonNonFastForwards not denying force update

2012-08-20 Thread Junio C Hamano
John Arthorne arthorne.ecli...@gmail.com writes:

 For all the details see this bugzilla, particularly comment #59 where we
 finally narrowed this down:

 https://bugs.eclipse.org/bugs/show_bug.cgi?id=343150

What does at the system level in your does *not* work at the
system level. exactly mean?

A configuration variable in the repository configuration take
precedence over user preference $HOME/.gitconfig which in turn take
precedence over system wide default /etc/gitconfig (or whereever you
or your distro decided to place it).  In other words, if you have
[receive] denyNonFastForwards in the system wide default, you can
say [receive] denyNonFastForwards = false in one particular
repository to allow it for that repository.



--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: What's cooking in git.git (Aug 2012, #06; Sun, 19)

2012-08-20 Thread Junio C Hamano
Erik Faye-Lund kusmab...@gmail.com writes:

 OK, so is this a good description to go in the merge commit when it
 goes to 'master'?

 * ef/win32-cred-helper (2012-08-16) 1 commit
  - contrib: add win32 credential-helper

  Credential helper for Win32, to allow access to the keychain of
  logged-in user.


 Looks good to me.

Thanks.
--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 0/2] further fixes of check_ref_format() users

2012-08-20 Thread Junio C Hamano
There were a few overtight check_ref_format() that was exposed
with a natural mirror refspec refs/*:refs/*.

Junio C Hamano (2):
  fetch/push: allow refs/*:refs/*
  get_fetch_map(): tighten checks on dest refs

 builtin/fetch-pack.c   |  2 +-
 builtin/receive-pack.c |  2 +-
 connect.c  |  8 ++--
 remote.c   |  6 +++---
 t/t5516-fetch-push.sh  | 33 +
 5 files changed, 40 insertions(+), 11 deletions(-)

-- 
1.7.12.92.g7963261

--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 1/2] fetch/push: allow refs/*:refs/*

2012-08-20 Thread Junio C Hamano
There are a handful of places where we call check_refname_format() on a
substring after refs/ of a refname we are going to use, and filter out a
valid match with refs/stash with such a pathspec.  Not sending a stash
may arguably be a feature (as stash is inherently a local workflow
element), but the code in the transport layer is oblivious to this
filtering performed by the lower layer of the code, and complains that the
other side did not send all the objects that needs to complete refs/stash
at the end, even though the code will not write refs/stash out anyway, and
making the whole command fail.

This is an attempt to fix it by using check_refname_format() on the
whole refs/. string and allowing refs/stash to be also copied.

Signed-off-by: Junio C Hamano gits...@pobox.com
---
 builtin/fetch-pack.c   |  2 +-
 builtin/receive-pack.c |  2 +-
 connect.c  |  8 ++--
 remote.c   |  2 +-
 t/t5516-fetch-push.sh  | 33 +
 5 files changed, 38 insertions(+), 9 deletions(-)

diff --git a/builtin/fetch-pack.c b/builtin/fetch-pack.c
index 6207ecd..a3e3fa3 100644
--- a/builtin/fetch-pack.c
+++ b/builtin/fetch-pack.c
@@ -546,7 +546,7 @@ static void filter_refs(struct ref **refs, int nr_match, 
char **match)
for (ref = *refs; ref; ref = next) {
next = ref-next;
if (!memcmp(ref-name, refs/, 5) 
-   check_refname_format(ref-name + 5, 0))
+   check_refname_format(ref-name, 0))
; /* trash */
else if (args.fetch_all 
 (!args.depth || prefixcmp(ref-name, refs/tags/) )) {
diff --git a/builtin/receive-pack.c b/builtin/receive-pack.c
index 7ec68a1..1935b80 100644
--- a/builtin/receive-pack.c
+++ b/builtin/receive-pack.c
@@ -401,7 +401,7 @@ static const char *update(struct command *cmd)
struct ref_lock *lock;
 
/* only refs/... are allowed */
-   if (prefixcmp(name, refs/) || check_refname_format(name + 5, 0)) {
+   if (prefixcmp(name, refs/) || check_refname_format(name, 0)) {
rp_error(refusing to create funny ref '%s' remotely, name);
return funny refname;
}
diff --git a/connect.c b/connect.c
index c8d0ea5..b30639c 100644
--- a/connect.c
+++ b/connect.c
@@ -17,20 +17,16 @@ static int check_ref(const char *name, int len, unsigned 
int flags)
if (len  5 || memcmp(name, refs/, 5))
return 0;
 
-   /* Skip the refs/ part */
-   name += 5;
-   len -= 5;
-
/* REF_NORMAL means that we don't want the magic fake tag refs */
if ((flags  REF_NORMAL)  check_refname_format(name, 0))
return 0;
 
/* REF_HEADS means that we want regular branch heads */
-   if ((flags  REF_HEADS)  !memcmp(name, heads/, 6))
+   if ((flags  REF_HEADS)  !memcmp(name, refs/heads/, 11))
return 1;
 
/* REF_TAGS means that we want tags */
-   if ((flags  REF_TAGS)  !memcmp(name, tags/, 5))
+   if ((flags  REF_TAGS)  !memcmp(name, refs/tags/, 10))
return 1;
 
/* All type bits clear means that we are ok with anything */
diff --git a/remote.c b/remote.c
index e2ef991..eacd8ad 100644
--- a/remote.c
+++ b/remote.c
@@ -1595,7 +1595,7 @@ static int one_local_ref(const char *refname, const 
unsigned char *sha1, int fla
int len;
 
/* we already know it starts with refs/ to get here */
-   if (check_refname_format(refname + 5, 0))
+   if (check_refname_format(refname, 0))
return 0;
 
len = strlen(refname) + 1;
diff --git a/t/t5516-fetch-push.sh b/t/t5516-fetch-push.sh
index b69cf57..3fdfaea 100755
--- a/t/t5516-fetch-push.sh
+++ b/t/t5516-fetch-push.sh
@@ -929,6 +929,39 @@ test_expect_success 'push into aliased refs 
(inconsistent)' '
)
 '
 
+test_expect_success 'push all hierarchies with stash' '
+   mk_empty 
+   git stash clear 
+   git reset --hard 
+   echo path1 
+   git stash save Tweak path1 
+   git push testrepo refs/*:refs/* 
+   # without fix to connect.c::check_ref(), the second push
+   # would fail.
+   git push testrepo refs/stash 
+   git ls-remote . expect 
+   git ls-remote testrepo actual 
+   test_cmp actual expect
+'
+
+test_expect_success 'fetch all hierarchies with stash' '
+   mk_empty 
+   git stash clear 
+   git reset --hard 
+   echo path1 
+   git stash save Tweak path1 
+   (
+   cd testrepo 
+   git commit --allow-empty -m initial 
+   git checkout HEAD^0 
+   git fetch .. +refs/*:refs/* 
+   git checkout master
+   ) 
+   git ls-remote . expect 
+   git ls-remote testrepo actual 
+   test_cmp actual expect
+'
+
 test_expect_success 'push --porcelain' '
mk_empty 
echo .git/foo  To testrepo 
-- 
1.7.12.92.g7963261

--
To unsubscribe from 

Re: [RFC 1/5] GSOC: prepare svndump for branch detection

2012-08-20 Thread Florian Achleitner
On Monday 20 August 2012 09:45:30 Jonathan Nieder wrote:
 Florian Achleitner wrote:
  Currently, the mark number is equal to the svn revision number the commit
  corresponds to. I didn't want to break that, but not mandatory. We could
  also split the mark namespace by reserving one or more of the most
  significant bits as a type specifier.
  I'll develop a marks-based version ..
 
 Have we already exhausted possibilities that don't involve changing
 vcs-svn/ code quite so much?  One possibility mentioned before was to
 post-process the stream that svn-fe produces, which seemed appealing
 from a debuggability point of view.
 

Do you mean like another program in the pipe, that translates the fast-import 
stream produced by svn-fe into another fast-import stream?
svnrdump | svn-fe | svnbranchdetect | git-fast-import ?

My two previous ideas were meant like this:
1. Import everything into git and detect branches on the stuff in git, or
2. detect branches as it imports.

Both require to create commits for their work. So the idea behind these 
patches is to split the creation of commits from the creation of data. So that 
the data can be sent immediatly as it is coming in from svnrdump, and 
therefore save memory by not buffering it. 

And create the commits later. Either all linear and splitting it into branches 
later which requires creating commits but not data, or creating branched 
commits immediatly. This requires to inspect all  node data before starting a 
commit.

Anyways it's just an idea..

 Curious,
 Jonathan

Hope that helps,
Florian
--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] precompose-utf8: do not call checks for non-ascii utf8

2012-08-20 Thread Junio C Hamano
As suggested by Linus, this function is not checking UTF-8-ness of the
string; it only is seeing if it is pure US-ASCII.

Signed-off-by: Junio C Hamano gits...@pobox.com
---

 * Just for completeness, this on top.

 compat/precompose_utf8.c | 16 
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/compat/precompose_utf8.c b/compat/precompose_utf8.c
index 3190d50..8cf5955 100644
--- a/compat/precompose_utf8.c
+++ b/compat/precompose_utf8.c
@@ -13,20 +13,20 @@ typedef char *iconv_ibp;
 static const char *repo_encoding = UTF-8;
 static const char *path_encoding = UTF-8-MAC;
 
-static size_t has_utf8(const char *s, size_t maxlen, size_t *strlen_c)
+static size_t has_non_ascii(const char *s, size_t maxlen, size_t *strlen_c)
 {
-   const uint8_t *utf8p = (const uint8_t *)s;
+   const uint8_t *ptr = (const uint8_t *)s;
size_t strlen_chars = 0;
size_t ret = 0;
 
-   if (!utf8p || !*utf8p)
+   if (!ptr || !*ptr)
return 0;
 
-   while (*utf8p  maxlen) {
-   if (*utf8p  0x80)
+   while (*ptr  maxlen) {
+   if (*ptr  0x80)
ret++;
strlen_chars++;
-   utf8p++;
+   ptr++;
maxlen--;
}
if (strlen_c)
@@ -77,7 +77,7 @@ void precompose_argv(int argc, const char **argv)
while (i  argc) {
size_t namelen;
oldarg = argv[i];
-   if (has_utf8(oldarg, (size_t)-1, namelen)) {
+   if (has_non_ascii(oldarg, (size_t)-1, namelen)) {
newarg = reencode_string_iconv(oldarg, namelen, 
ic_precompose);
if (newarg)
argv[i] = newarg;
@@ -130,7 +130,7 @@ struct dirent_prec_psx *precompose_utf8_readdir(PREC_DIR 
*prec_dir)
prec_dir-dirent_nfc-d_ino  = res-d_ino;
prec_dir-dirent_nfc-d_type = res-d_type;
 
-   if ((precomposed_unicode == 1)  has_utf8(res-d_name, 
(size_t)-1, NULL)) {
+   if ((precomposed_unicode == 1)  has_non_ascii(res-d_name, 
(size_t)-1, NULL)) {
if (prec_dir-ic_precompose == (iconv_t)-1) {
die(iconv_open(%s,%s) failed, but needed:\n
precomposed unicode is not 
supported.\n
-- 
1.7.12.129.g11de995

--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] parseopt: do not translate empty help string

2012-08-20 Thread Thomas Rast
The gettext .po files have a header, but it looks like the translation
specification for an empty string.  This results in _() actually
returning that header.

Prevent parseopt from passing empty strings to gettext when it
displays help about commands.  In some instances it already did this,
but git-grep's --or etc. caught another case.

Signed-off-by: Thomas Rast tr...@student.ethz.ch
---
 parse-options.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/parse-options.c b/parse-options.c
index c1c66bd..f95bbb2 100644
--- a/parse-options.c
+++ b/parse-options.c
@@ -562,7 +562,8 @@ static int usage_with_options_internal(struct 
parse_opt_ctx_t *ctx,
fputc('\n', outfile);
pad = USAGE_OPTS_WIDTH;
}
-   fprintf(outfile, %*s%s\n, pad + USAGE_GAP, , _(opts-help));
+   fprintf(outfile, %*s%s\n, pad + USAGE_GAP, ,
+   *opts-help ? _(opts-help) : );
}
fputc('\n', outfile);
 
-- 
1.7.12.rc1.203.gc3c8071

--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: Comparing the working tree with a commit should be independent of the index

2012-08-20 Thread Maaartin
On 08/18/2012 11:19 PM, Junio C Hamano wrote:
 Instead I get deleted file. Adding the file to the index changes
 it. This is IMHO a bug.

 Among the 7 interesting cases, a path missing from the index have 3
 interesting cases.
 
 In $commitOn filesystem
 
 Yes   Yes
 Yes   No
 NoYes
 
 and your case is the first one.  What do you want to see happen for
 other two cases?  I would guess deleted and added, as anything
 else would not be internally consistent.

Sure.

 git diff compares contents in the index and in the working tree.
 git diff HEAD compares contents in HEAD and in the working tree.
 
 The definition of paths in the working tree in these sentences is
 not all files on the filesystem, or all files on the filesystem,
 filtered with the ignore mechanism.  It is all files on the
 filesystem that are in the index, and that is why you see a path
 that is in the commit and on the filesystem but not in the index
 as deleted.

That explains it all.

 This definition worked well for us, because that will give a clean
 semantics to git diff HEAD: what change would I be recording if I
 said git commit -a at this point?

Ok, I see. I nearly always inspect changes to be committed via git gui, so I 
don't care much about what git commit -a does.

 And that is why git add on the path changes the output as you
 observed in your message.  It is an intended behaviour.  If you did
 not tell Git that you want a path that does not exist in the index
 with git add, the path will not participate in the next commit
 created by git commit -a, and git diff HEAD should not talk
 about it.  If the path is only in the index, not showing it as
 deletion as you saw is actually dangerous.  git commit -a will
 record the deletion of the path in the commit, even though you
 checked with the git diff HEAD before you commit to make sure you
 didn't change it.

This is a good point. The deletion itself is easily undone, but git wouldn't 
record the new file content, which could be a problem for me.

 Of course, our definition of the set of working tree files does not
 have to be the only one.  Instead, it could be something that
 changes the semantics of git diff HEAD output to: what change
 would I be recording if I said git add -A  git commit at this
 point?

This was more or less my POW. Or more exactly, I simply just wanted to compare 
the state seen in the filesystem against an old commit.

 The updated semantics will be far less useful than the current one,
 but it still is an understandable one.  You could introduce a new
 option (mode of operation to git diff) to make it include
 untracked but not ignored paths to the set of paths on the working
 tree side of the comparison, but I do not think it is useful.

Such a behavior would suit me, but I can live with the current one. There 
aren't much cases when it makes a difference and git commands have already a 
lot of options.

 In short, I do not think there is a bug in the current behaviour.

I can live with it. Many thanks for your answer.

Do you care to copy-paste something to [1], so I could accept your answer? 
Otherwise, I'll do it, so the information is there.

[1]: 
http://stackoverflow.com/questions/8452820/how-to-compare-the-working-tree-with-a-commit

Regards, Maaartin.
--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


  1   2   >