[PATCH v4 3/7] i18n: Rewrite gettext messages start with dash

2012-07-24 Thread Jiang Xin
Gettext message in a shell script should not start with '-', one
workaround is adding '--' between gettext and the message, like:

gettext -- "--exec option ..."

But due to a bug in the xgettext extraction, xgettext can not
extract the actual message for this case. Rewriting the message
is a simpler and better solution.

Signed-off-by: Jiang Xin 
Signed-off-by: Ævar Arnfjörð Bjarmason 
Reported-by: Vincent van Ravesteijn 
Reviewed-by: Stefano Lattarini 
---
 git-rebase.sh | 2 +-
 git-submodule.sh  | 2 +-
 t/t3404-rebase-interactive.sh | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/git-rebase.sh b/git-rebase.sh
index 8710d..705bd 100755
--- a/git-rebase.sh
+++ b/git-rebase.sh
@@ -317,7 +317,7 @@ test $# -gt 2 && usage
 if test -n "$cmd" &&
test "$interactive_rebase" != explicit
 then
-   die "$(gettext -- "--exec option must be used with --interactive 
option")"
+   die "$(gettext "The --exec option must be used with the --interactive 
option")"
 fi
 
 if test -n "$action"
diff --git a/git-submodule.sh b/git-submodule.sh
index dba4d..5b019 100755
--- a/git-submodule.sh
+++ b/git-submodule.sh
@@ -748,7 +748,7 @@ cmd_summary() {
if [ -n "$files" ]
then
test -n "$cached" &&
-   die "$(gettext -- "--cached cannot be used with --files")"
+   die "$(gettext "The --cached option cannot be used with the 
--files option")"
diff_cmd=diff-files
head=
fi
diff --git a/t/t3404-rebase-interactive.sh b/t/t3404-rebase-interactive.sh
index 8078..f206a 100755
--- a/t/t3404-rebase-interactive.sh
+++ b/t/t3404-rebase-interactive.sh
@@ -858,7 +858,7 @@ test_expect_success 'rebase -ix with --autosquash' '
 test_expect_success 'rebase --exec without -i shows error message' '
git reset --hard execute &&
test_must_fail git rebase --exec "git show HEAD" HEAD~2 2>actual &&
-   echo "--exec option must be used with --interactive option" >expected &&
+   echo "The --exec option must be used with the --interactive option" 
>expected &&
test_i18ncmp expected actual
 '
 
-- 
1.7.12.rc0.16.gf4916ac

--
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 v4 4/7] Remove obsolete LONG_USAGE which breaks xgettext

2012-07-24 Thread Jiang Xin
The obsolete LONG_USAGE variable has the following message in it:

A'\''--B'\''--C'\''

And such complex LONG_USAGE message will breaks xgettext when extracting
l10n messages. But if single quotes are removed from the message, xgettext
works fine on 'git-rebase.sh'.

Since there is a modern OPTIONS_SPEC variable in use in this script,
it's safe to remove the obsolete USAGE and LONG_USAGE variables.

Signed-off-by: Jiang Xin 
Reviewed-by: Stefano Lattarini 
---
 git-rebase.sh | 25 -
 1 file changed, 25 deletions(-)

diff --git a/git-rebase.sh b/git-rebase.sh
index 705bd..0e6fd 100755
--- a/git-rebase.sh
+++ b/git-rebase.sh
@@ -3,31 +3,6 @@
 # Copyright (c) 2005 Junio C Hamano.
 #
 
-USAGE='[--interactive | -i] [--exec | -x ] [-v] [--force-rebase | -f]
-   [--no-ff] [--onto ] [|--root] [] [--quiet | 
-q]'
-LONG_USAGE='git-rebase replaces  with a new branch of the
-same name.  When the --onto option is provided the new branch starts
-out with a HEAD equal to , otherwise it is equal to 
-It then attempts to create a new commit for each commit from the original
- that does not exist in the  branch.
-
-It is possible that a merge failure will prevent this process from being
-completely automatic.  You will have to resolve any such merge failure
-and run git rebase --continue.  Another option is to bypass the commit
-that caused the merge failure with git rebase --skip.  To check out the
-original  and remove the .git/rebase-apply working files, use the
-command git rebase --abort instead.
-
-Note that if  is not specified on the command line, the
-currently checked out branch is used.
-
-Example:   git-rebase master~1 topic
-
-   A---B---C topic   A'\''--B'\''--C'\'' topic
-   /   -->   /
-  D---E---F---G master  D---E---F---G master
-'
-
 SUBDIRECTORY_OK=Yes
 OPTIONS_KEEPDASHDASH=
 OPTIONS_SPEC="\
-- 
1.7.12.rc0.16.gf4916ac

--
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 v4 5/7] i18n: am: mark more strings for translation

2012-07-24 Thread Jiang Xin
Mark strings in 'git-am.sh' for translation. In the last chunk, I
changed '$1' to '-b/--binary' for this reason:

 * First, if there is a variable in the l10n message, we could not use
   gettext. Because the variable will be expanded (evaluated) and will
   never match the entry in the po file.

 * Second, if there is a positional parameter ($1, $2,...) in the
   message, we could not use eval_gettext either. Because
   eval_gettext may be a wapper for gettext, and the positional
   parameter would loose it's original context.

Also reduce one indentation level for one gettextln clause introduced
in commit de88c1c.

Signed-off-by: Jiang Xin 
Reviewed-by: Stefano Lattarini 
Reviewed-by: Jonathan Nieder 
---
 git-am.sh | 11 +--
 1 file changed, 5 insertions(+), 6 deletions(-)

diff --git a/git-am.sh b/git-am.sh
index 8961a..3f654 100755
--- a/git-am.sh
+++ b/git-am.sh
@@ -92,7 +92,7 @@ safe_to_abort () {
then
return 0
fi
-   gettextln "You seem to have moved HEAD since the last 'am' 
failure.
+   gettextln "You seem to have moved HEAD since the last 'am' failure.
 Not rewinding to ORIG_HEAD" >&2
return 1
 }
@@ -136,7 +136,7 @@ fall_back_3way () {
 git write-tree >"$dotest/patch-merge-base+" ||
 cannot_fallback "$(gettext "Repository lacks necessary blobs to fall back 
on 3-way merge.")"
 
-say Using index info to reconstruct a base tree...
+say "$(gettext "Using index info to reconstruct a base tree...")"
 
 cmd='GIT_INDEX_FILE="$dotest/patch-merge-tmp-index"'
 
@@ -176,8 +176,7 @@ It does not apply to blobs recorded in its index.")"
 fi
 git-merge-recursive $orig_tree -- HEAD $his_tree || {
git rerere $allow_rerere_autoupdate
-   echo Failed to merge in the changes.
-   exit 1
+   die "$(gettext "Failed to merge in the changes.")"
 }
 unset GITHEAD_$his_tree
 }
@@ -387,8 +386,8 @@ do
-i|--interactive)
interactive=t ;;
-b|--binary)
-   echo >&2 "The $1 option has been a no-op for long time, and"
-   echo >&2 "it will be removed. Please do not use it anymore."
+   echo >&2 $(gettext "The -b/--binary option has been a no-op for 
long time, and
+it will be removed. Please do not use it anymore.")
;;
-3|--3way)
threeway=t ;;
-- 
1.7.12.rc0.16.gf4916ac

--
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 v4 6/7] Remove dead code which contains bad gettext block

2012-07-24 Thread Jiang Xin
Found this dead code when I examine gettext messages in shell scripts
start with dash ('-' or '--'). An error will be raised for this case,
like:

$ gettext "-d option is no longer supported.  Do not use."
gettext: missing arguments

Indead, this code has been left as dead for a long time, as Junathan
points out:

The git am -d/--dotest option has errored out with a message
since e72c7406 (am: remove support for -d .dotest, 2008-03-04).
The error message about lack of support was eliminated along
with other cleanups (probably by mistake) a year later by
removing the option from the option table in 98ef23b3 (git-am:
minor cleanups, 2009-01-28).

But the code to handle -d and --dotest stayed around even though
ever since then it could not be tripped.  Remove this dead code.

Signed-off-by: Jiang Xin 
Reviewed-by: Stefano Lattarini 
Reviewed-by: Jonathan Nieder 
---
 git-am.sh | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/git-am.sh b/git-am.sh
index 3f654..c81a2 100755
--- a/git-am.sh
+++ b/git-am.sh
@@ -413,9 +413,6 @@ it will be removed. Please do not use it anymore.")
abort=t ;;
--rebasing)
rebasing=t threeway=t ;;
-   -d|--dotest)
-   die "$(gettext "-d option is no longer supported.  Do not 
use.")"
-   ;;
--resolvemsg)
shift; resolvemsg=$1 ;;
--whitespace|--directory|--exclude|--include)
-- 
1.7.12.rc0.16.gf4916ac

--
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 v4 7/7] i18n: merge-recursive: mark strings for translation

2012-07-24 Thread Jiang Xin
Mark strings in merge-recursive for translation.

Some test scripts are affected by this update, and would fail if tested
with GETTEXT_POISON switch turned on. Using i18n-specific test
functions, such as test_i18ngrep, in the related test scripts will fix
these issues.

Signed-off-by: Jiang Xin 
Reviewed-by: Stefano Lattarini 
---
 merge-recursive.c| 148 +++
 t/t6022-merge-rename.sh  |  16 ++--
 t/t6042-merge-rename-corner-cases.sh |   2 +-
 3 files changed, 88 insertions(+), 78 deletions(-)

diff --git a/merge-recursive.c b/merge-recursive.c
index 68093..8903 100644
--- a/merge-recursive.c
+++ b/merge-recursive.c
@@ -187,7 +187,7 @@ static void output_commit_title(struct merge_options *o, 
struct commit *commit)
else {
printf("%s ", find_unique_abbrev(commit->object.sha1, 
DEFAULT_ABBREV));
if (parse_commit(commit) != 0)
-   printf("(bad commit)\n");
+   printf(_("(bad commit)\n"));
else {
const char *title;
int len = find_commit_subject(commit->buffer, &title);
@@ -203,7 +203,7 @@ static int add_cacheinfo(unsigned int mode, const unsigned 
char *sha1,
struct cache_entry *ce;
ce = make_cache_entry(mode, sha1 ? sha1 : null_sha1, path, stage, 
refresh);
if (!ce)
-   return error("addinfo_cache failed for path '%s'", path);
+   return error(_("addinfo_cache failed for path '%s'"), path);
return add_cache_entry(ce, options);
 }
 
@@ -265,7 +265,7 @@ struct tree *write_tree_from_memory(struct merge_options *o)
if (!cache_tree_fully_valid(active_cache_tree) &&
cache_tree_update(active_cache_tree,
  active_cache, active_nr, 0) < 0)
-   die("error building trees");
+   die(_("error building trees"));
 
result = lookup_tree(active_cache_tree->sha1);
 
@@ -494,7 +494,7 @@ static struct string_list *get_renames(struct merge_options 
*o,
opts.show_rename_progress = o->show_rename_progress;
opts.output_format = DIFF_FORMAT_NO_OUTPUT;
if (diff_setup_done(&opts) < 0)
-   die("diff setup failed");
+   die(_("diff setup failed"));
diff_tree_sha1(o_tree->object.sha1, tree->object.sha1, "", &opts);
diffcore_std(&opts);
if (opts.needed_rename_limit > o->needed_rename_limit)
@@ -624,7 +624,7 @@ static void flush_buffer(int fd, const char *buf, unsigned 
long size)
break;
die_errno("merge-recursive");
} else if (!ret) {
-   die("merge-recursive: disk full?");
+   die(_("merge-recursive: disk full?"));
}
size -= ret;
buf += ret;
@@ -687,7 +687,7 @@ static int would_lose_untracked(const char *path)
 static int make_room_for_path(struct merge_options *o, const char *path)
 {
int status, i;
-   const char *msg = "failed to create path '%s'%s";
+   const char *msg = _("failed to create path '%s'%s");
 
/* Unlink any D/F conflict files that are in the way */
for (i = 0; i < o->df_conflict_file_set.nr; i++) {
@@ -698,7 +698,7 @@ static int make_room_for_path(struct merge_options *o, 
const char *path)
path[df_pathlen] == '/' &&
strncmp(path, df_path, df_pathlen) == 0) {
output(o, 3,
-  "Removing %s to make room for subdirectory\n",
+  _("Removing %s to make room for subdirectory\n"),
   df_path);
unlink(df_path);

unsorted_string_list_delete_item(&o->df_conflict_file_set,
@@ -712,7 +712,7 @@ static int make_room_for_path(struct merge_options *o, 
const char *path)
if (status) {
if (status == -3) {
/* something else exists */
-   error(msg, path, ": perhaps a D/F conflict?");
+   error(msg, path, _(": perhaps a D/F conflict?"));
return -1;
}
die(msg, path, "");
@@ -723,7 +723,7 @@ static int make_room_for_path(struct merge_options *o, 
const char *path)
 * tracking it.
 */
if (would_lose_untracked(path))
-   return error("refusing to lose untracked file at '%s'",
+   return error(_("refusing to lose untracked file at '%s'"),
 path);
 
/* Successful unlink is good.. */
@@ -733,7 +733,7 @@ static int make_room_for_path(struct merge_options *o, 
const char *path)
if (errno == ENOENT)
return 0;
/* .. but not some other error (who really cares what?) */
-   return error(msg, path, ": perhaps 

Re: [PATCH v4 2/7] i18n: rebase: mark strings for translation

2012-07-24 Thread Jonathan Nieder
(cc-ing Duy because of a mention of his nice GETTEXT_POISON tweak[*])
Hi,

Jiang Xin wrote:

> Mark strings in git-rebase.sh for translation. Jonathan offers a help
> for reorgnization of the resolvemsg variable in 'git-rebase.sh', since
> there is a likely message in git-am.sh, I update it in this commit for
> consistency. And so does to 't/t0201-gettext-fallbacks.sh'.

Ah.  Looks like I tweaked the comma usage and sentence structure a
little.  Sorry, force of habit --- I shouldn't have.

> Some test scripts are affected by this update, and would fail if tested
> with GETTEXT_POISON switch turned on. Using i18n-specific test
> functions, such as test_i18ngrep, in the related test scripts will fix
> these issues.

If we're going to keep the changes together, here's how I would phrase
the commit message:

Mark messages in git-rebase.sh for translation.  While doing this
it was noticed that the comma usage and sentence structure of the
resolvemsg was not quite right, so correct that and its cousins in
git-am.sh and t/t0201-gettext-fallbacks.sh at the same time.

Some tests would start to fail with GETTEXT_POISON turned on after
this update.  Use test_i18ncmp and test_i18ngrep where
appropriate to mark strings that should only be checked in the C
locale output to avoid such issues.

> Signed-off-by: Jiang Xin 
> Reviewed-by: Stefano Lattarini 
> Reviewed-by: Jonathan Nieder 

I haven't tested or reviewed this patch in detail, so even though it
looks good, I'd prefer it not to have my Reviewed-by.  (See
Documentation/SubmittingPatches: '"Reviewed-by:", unlike the other
extra tags, can only be offered by the reviewer'.)  If you'd like to
credit my help, something like "With advice from Jonathan." would be
fine.

[...]
> --- a/t/t3406-rebase-message.sh
> +++ b/t/t3406-rebase-message.sh
> @@ -64,7 +64,7 @@ test_expect_success 'rebase -n overrides config rebase.stat 
> config' '
>  
>  test_expect_success 'rebase --onto outputs the invalid ref' '
>   test_must_fail git rebase --onto invalid-ref HEAD HEAD 2>err &&
> - grep "invalid-ref" err
> + test_i18ngrep "invalid-ref" err
>  '

Could we add a comment so others do not have to wonder what
human-readable message prompts the test_i18ngrep here?  e.g

# "Does not point to a valid commit: invalid-ref"
#
# NEEDSWORK: This "grep" is fine in real non-C locales, but
# GETTEXT_POISON poisons the refname along with the enclosing
# error message.
test_i18ngrep invalid-ref err

In the long run we may be able to turn this back to a "grep" again,
since any reasonable translation will keep the $onto_name somewhere
in the message.  But changing it to test_i18ngrep for now is the
right thing to do, until something like Duy's more sophisticated
version of GETTEXT_POISON arrives. (<-- [*])

Thanks,
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: [PATCH v4 5/7] i18n: am: mark more strings for translation

2012-07-24 Thread Jonathan Nieder
Jiang Xin wrote:

> Mark strings in 'git-am.sh' for translation. In the last chunk, I
> changed '$1' to '-b/--binary' for this reason:
>
>  * First, if there is a variable in the l10n message, we could not use
>gettext. Because the variable will be expanded (evaluated) and will
>never match the entry in the po file.
>
>  * Second, if there is a positional parameter ($1, $2,...) in the
>message, we could not use eval_gettext either. Because
>eval_gettext may be a wapper for gettext, and the positional
>parameter would loose it's original context.

Yes, I think it's a good change.

> --- a/git-am.sh
> +++ b/git-am.sh
[...]
> @@ -387,8 +386,8 @@ do
>   -i|--interactive)
>   interactive=t ;;
>   -b|--binary)
> - echo >&2 "The $1 option has been a no-op for long time, and"
> - echo >&2 "it will be removed. Please do not use it anymore."
> + echo >&2 $(gettext "The -b/--binary option has been a no-op for 
> long time, and
> +it will be removed. Please do not use it anymore.")

Could this be simplified to

gettextln >&2 'The -b/--binary option...
... any more.'

or

gettextln 'The -b/--binary option ...
... any more.' >&2

or would that confuse xgettext?  That would be more comforting than "echo"
because if the translated string includes backslashes then the behavior of
echo can be unpredictable.

Sorry I missed that last time.

The rest is indeed
Reviewed-by: Jonathan Nieder 

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


Re: [PATCH v4 6/7] Remove dead code which contains bad gettext block

2012-07-24 Thread Jonathan Nieder
Jiang Xin wrote:
> Found this dead code when I examine gettext messages in shell scripts
> start with dash ('-' or '--'). An error will be raised for this case,
> like:
> 
> $ gettext "-d option is no longer supported.  Do not use."
> gettext: missing arguments
> 
> Indead, this code has been left as dead for a long time, as Junathan
> points out:

Jonathan, not Junathan. :)

> The git am -d/--dotest option has errored out with a message
> since e72c7406 (am: remove support for -d .dotest, 2008-03-04).
> The error message about lack of support was eliminated along
> with other cleanups (probably by mistake) a year later by
> removing the option from the option table in 98ef23b3 (git-am:
> minor cleanups, 2009-01-28).
>
> But the code to handle -d and --dotest stayed around even though
> ever since then it could not be tripped.  Remove this dead code.
>
> Signed-off-by: Jiang Xin 

Your explanation is certainly clearer than mine.  So: yes, for what
it's worth this is

Reviewed-by: Jonathan Nieder 
--
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-svn SVN 1.7 fix, take 2

2012-07-24 Thread Jonathan Nieder
Michael G Schwern wrote:

> No, now it's just canonicalizing as early as possible.  Preferably within the
> object accessor rather than at the point of use.  So in the code below,
> $full_url is already escaped/canonicalized.

Let's start with this.

Is svn_path_canonicalize() idempotent?  What does it do when it
encounters a percent-sign?

Thanks,
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: git-svn SVN 1.7 fix, take 2

2012-07-24 Thread Michael G Schwern
On 2012.7.24 9:53 PM, Jonathan Nieder wrote:
> Michael G Schwern wrote:
> 
>> No, now it's just canonicalizing as early as possible.  Preferably within the
>> object accessor rather than at the point of use.  So in the code below,
>> $full_url is already escaped/canonicalized.
> 
> Let's start with this.
> 
> Is svn_path_canonicalize() idempotent?  What does it do when it
> encounters a percent-sign?

Nothing, because paths are not URI escaped. :)

You probably meant svn_uri_canonicalize().  And no, it does not double escape,
so its safe to escape as early as possible.

   use SVN::Core;

   my $uri = "http://www.example.com/ foo";

print SVN::_Core::svn_uri_canonicalize(
SVN::_Core::svn_uri_canonicalize($uri)
);

That produces "http://www.example.com/%20foo";.

The API docs don't say it specifically, but if it were otherwise it would be
impossible to use.  You'd have to check first if anything were escaped before
canonicalizing.  And a user couldn't pass in an escaped URL without risking it
being double escaped.

http://subversion.apache.org/docs/api/latest/svn__dirent__uri_8h.html#a8bae33a2fbf86857869f7b0e39a553e7


-- 
'All anyone gets in a mirror is themselves,' she said. 'But what you
gets in a good gumbo is everything.'
-- "Witches Abroad" by Terry Prachett
--
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: Extract Git classes from git-svn (1/10)

2012-07-24 Thread Michael G Schwern
On 2012.7.24 7:55 PM, Eric Wong wrote:
>> After I'm exhausted from volunteering all the coding work, rather than
>> submitting a URL to a remote repository I find I have to learn new 
>> specialized
>> tools.  It's extra learning and work, an extra step to screw up, and foreign
>> to me (even as a experienced git user).  It is of little benefit to me as a
>> casual volunteer submitter.
> 
> Except git is also a "new specialized tool".  Your examples are exactly
> why I'm saddened many projects only adopted git, but not the workflow
> which _built_ git (and Linux).

There is an important difference between a tool which is useful for one or two
projects and one which is useful for a broad spectrum of projects.  I learn
git once (or diff or bash or Perl or whatever) and I'm going to use it again
and again all over the place.  I learn git-send-email and (if I'm not a kernel
developer) I'm going to use it on a handful of projects maybe.  It's O(1) vs
O(n) effort.

Github also has broad spectrum utility.  I learn how to fork and work with a
Github pull request once, and I can repeat that on thousands of different
projects of all different sorts of things.

This commonality of tools and techniques is very important to easing the on
ramp for new (to-your-project) developers.


>> I can see if you've been on the git mailing list for a while and have git-am
>> and all that set up, this system is great.  But it comes at a cost which is
>> offloaded onto new and casual contributors.
> 
> Email is integral to Free/Open Source development and remains one of the
> few things on the Internet not (yet) controlled by any central entity.
> Once setup, the same email setup can work across all projects which use
> email.  These projects need not be hosted on the same websites/servers
> at all.

While I hear your concern about being centrally controlled, it is largely
irrelevant to the new user experience.  And remaining independent does not
mean you can't use web tools.  Be wary of a false dichotomy between Free and 
web.

"We use a mailing list" is by no means an indication of commonality.  Every
project of the "send patches to the list" form has their own quirks and ways
of doing it.  Usually they're not written down.  This is what I've been
struggling with.  I've been sending patches to mailing lists for decades and I
can tell you everybody does it differently.  "Send a patch to the list" is one
of the steeper project on-ramps.


>> This sort of specialized setup makes people bounce right off the submission
>> process.  At OSCON I was asking around for help getting things setup so I
>> could submit patches here properly.  As soon as they said "which mail daemon
>> are you running?", I said "stop!  I don't want to know any more".  I have too
>> many things to do to be fiddling with my mailer configuration just to submit
>> volunteer work in the right form (that said, I'm pleased as punch that
>> git-send-email now has instructions for sending via GMail).  You're
>> volunteers, too.  We're all volunteers, so a more balanced submission process
>> would be nice.
> 
> How about we educate users about a proper email setup instead?  If
> they're capable of learning git, they're surely capable of setting up an
> email client properly, and perhaps more projects can adopt an
> email-centric workflow.

SubmittingPatches would be helped by that, particularly with a clear
step-by-step example of using git-send-email and all its numerous command line
switches.

I was showing Jonathan the guide I have for releasing Perl modules which is
both A) step-by-step and also B) covers the numerous little problems that are
usually only in somebody's head or scattered around the docs.  It was built in
order to allow a person who had never released a module to release a module.
Then we watched just such a person follow the directions.  As they asked
questions, struggled or made mistakes we filled in the gaps in the docs.
https://github.com/scrottie/autobox-Core/wiki/How-To-Make-A-Release

But this is also not about capability.  Yes, people are capable of figuring
out git-send-email, but its Yet Another Special Thing to learn before they can
submit a patch and call their work done.  Volunteers, especially brand new
ones, have only so much volunteerism to burn before they'll walk away.  You
want them burning that on productive patching and contributions, not learning
specialty tools.

And, finally, the last thing most people want is more email.  Seriously.  It
sounds like you live in your mailer, but fewer and fewer people do that.  Me?
 I don't want to join another mailing list.  My email management is a disaster!

What it comes down to is this: is it enough to contribute to git.git to know
how to work on git.git?  Or do you also need to live in your mailer?  Bolt on
that extra requirement and you lose a large swath of contributors.


>> But since you brought Github up... (I get the impression its kind of a dirty
>> word around here)
> 
> (Not speakin

OT: mail-based interfaces and web-based interfaces (Re: Extract Git classes from git-svn (1/10))

2012-07-24 Thread Jonathan Nieder
Michael G Schwern wrote:

> And again, it *does not have to be zero sum*.  It doesn't have to be email VS
> GUI.  You can have your cake and eat it too.

I assume you're talking about web-based interfaces that have gateways
to email, that produce inboxes like this:

 24 Jul 02:46   GitHub  [github] msysgit/msysgit was forked by peters
 23 Jul 10:27   GitHub  [msysgit/git] ce8ebc: vcs-svn: rename check_o
 23 Jul 10:01   GitHub  [github] Comment created on issue 44 (new git
 23 Jul 09:50   GitHub  [github] Comment created on issue 44 (new git
 23 Jul 09:33   GitHub  [github] Comment created on issue 44 (new git
 23 Jul 09:39   GitHub  [github] Comment created on issue 24 (Long fi
 23 Jul 09:31   GitHub  [github] Comment created on issue 44 (new git
 23 Jul 09:30   GitHub  [github] Comment created on issue 24 (Long fi
 22 Jul 23:57   GitHub  [github] Comment created on issue 44 (new git

I call that pretending to have my cake, rather than having it. :)

Maybe some day someone will prove me wrong and make a nice web-based
tool that I don't even need to know about that mines project mailing
lists.  If I have to tweak my subject lines a little to help it out,
that's fine with me.  I think patchwork is supposed to work this way.

But unless we're talking about splitting the mailing list into a bunch
of mini mailing lists (like some bug trackers do), it doesn't change
anything fundamental, so I'm not sure why we're discussing this.

Ciao,
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


Move Git::SVN into its own .pm file

2012-07-24 Thread Michael G. Schwern
This is a refactoring to move Git::SVN out of git-svn and into its own .pm file.
This will make it easier to work with and test.  This is just the extraction
with minimal work to keep all tests passing.

A couple of utility functions which were used by Git::SVN, git-svn and others
were also extracted from git-svn into a new Git::SVN::Utils.  Not the most
imaginitive name, but it's better than Git::SVN grabbing at git-svn internals
and it allows Git::SVN (and later other classes) to stand alone without git-svn.

Its was reworked to be done backwards (instead of extracting and then fixing the
resulting problems, the problems were fixed in place and then it's extracted) in
order to keep every commit passing tests and provide a useful history.  This was
something of a pain.

--
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/4] Extract some utilities from git-svn to allow extracting Git::SVN.

2012-07-24 Thread Michael G. Schwern
From: "Michael G. Schwern" 

Put them in a new module called Git::SVN::Utils.  Yeah, not terribly
original and it will be a dumping ground.  But its better than having
them in the main git-svn program.  At least they can be documented
and tested.

* fatal() is used by many classes.
* Change the $can_compress lexical into a function.

This should be enough to extract Git::SVN.

Signed-off-by: Michael G. Schwern 
---
 git-svn.perl   | 34 +---
 perl/Git/SVN/Utils.pm  | 59 ++
 perl/Makefile  |  1 +
 t/Git-SVN/00compile.t  |  8 ++
 t/Git-SVN/Utils/can_compress.t | 11 
 t/Git-SVN/Utils/fatal.t| 34 
 6 files changed, 132 insertions(+), 15 deletions(-)
 create mode 100644 perl/Git/SVN/Utils.pm
 create mode 100644 t/Git-SVN/00compile.t
 create mode 100644 t/Git-SVN/Utils/can_compress.t
 create mode 100644 t/Git-SVN/Utils/fatal.t

diff --git a/git-svn.perl b/git-svn.perl
index 0b074c4..79fe4a4 100755
--- a/git-svn.perl
+++ b/git-svn.perl
@@ -10,6 +10,8 @@ use vars qw/  $AUTHOR $VERSION
 $AUTHOR = 'Eric Wong ';
 $VERSION = '@@GIT_VERSION@@';
 
+use Git::SVN::Utils qw(fatal can_compress);
+
 # From which subdir have we been invoked?
 my $cmd_dir_prefix = eval {
command_oneline([qw/rev-parse --show-prefix/], STDERR => 0)
@@ -35,8 +37,6 @@ $Git::SVN::Log::TZ = $ENV{TZ};
 $ENV{TZ} = 'UTC';
 $| = 1; # unbuffer STDOUT
 
-sub fatal (@) { print STDERR "@_\n"; exit 1 }
-
 # All SVN commands do it.  Otherwise we may die on SIGPIPE when the remote
 # repository decides to close the connection which we expect to be kept alive.
 $SIG{PIPE} = 'IGNORE';
@@ -66,7 +66,7 @@ sub _req_svn {
fatal "Need SVN::Core 1.1.0 or better (got 
$SVN::Core::VERSION)";
}
 }
-my $can_compress = eval { require Compress::Zlib; 1};
+
 use Carp qw/croak/;
 use Digest::MD5;
 use IO::File qw//;
@@ -1578,7 +1578,7 @@ sub cmd_reset {
 }
 
 sub cmd_gc {
-   if (!$can_compress) {
+   if (!can_compress()) {
warn "Compress::Zlib could not be found; unhandled.log " .
 "files will not be compressed.\n";
}
@@ -2014,13 +2014,13 @@ sub md5sum {
} elsif (!$ref) {
$md5->add($arg) or croak $!;
} else {
-   ::fatal "Can't provide MD5 hash for unknown ref type: '", $ref, 
"'";
+   fatal "Can't provide MD5 hash for unknown ref type: '", $ref, 
"'";
}
return $md5->hexdigest();
 }
 
 sub gc_directory {
-   if ($can_compress && -f $_ && basename($_) eq "unhandled.log") {
+   if (can_compress() && -f $_ && basename($_) eq "unhandled.log") {
my $out_filename = $_ . ".gz";
open my $in_fh, "<", $_ or die "Unable to open $_: $!\n";
binmode $in_fh;
@@ -2055,6 +2055,9 @@ use Time::Local;
 use Memoize;  # core since 5.8.0, Jul 2002
 use Memoize::Storable;
 use POSIX qw(:signal_h);
+
+use Git::SVN::Utils qw(fatal can_compress);
+
 my $can_use_yaml;
 BEGIN {
$can_use_yaml = eval { require Git::SVN::Memoize::YAML; 1};
@@ -2880,8 +2883,8 @@ sub assert_index_clean {
command_noisy('read-tree', $treeish);
$x = command_oneline('write-tree');
if ($y ne $x) {
-   ::fatal "trees ($treeish) $y != $x\n",
-   "Something is seriously wrong...";
+   fatal "trees ($treeish) $y != $x\n",
+ "Something is seriously wrong...";
}
});
 }
@@ -3236,7 +3239,7 @@ sub mkemptydirs {
my %empty_dirs = ();
my $gz_file = "$self->{dir}/unhandled.log.gz";
if (-f $gz_file) {
-   if (!$can_compress) {
+   if (!can_compress()) {
warn "Compress::Zlib could not be found; ",
 "empty directories in $gz_file will not be read\n";
} else {
@@ -3919,7 +3922,7 @@ sub set_tree {
my ($self, $tree) = (shift, shift);
my $log_entry = ::get_commit_entry($tree);
unless ($self->{last_rev}) {
-   ::fatal("Must have an existing revision to commit");
+   fatal("Must have an existing revision to commit");
}
my %ed_opts = ( r => $self->{last_rev},
log => $log_entry->{log},
@@ -4348,6 +4351,7 @@ sub remove_username {
 package Git::SVN::Log;
 use strict;
 use warnings;
+use Git::SVN::Utils qw(fatal);
 use POSIX qw/strftime/;
 use constant commit_log_separator => ('-' x 72) . "\n";
 use vars qw/$TZ $limit $color $pager $non_recursive $verbose $oneline
@@ -4446,15 +4450,15 @@ sub config_pager {
 sub run_pager {
return unless defined $pager;
pipe my ($rfd, $wfd) or return;
-   defined(my $pid = fork) or ::fatal "Can't fork: $!";
+   defined(my $pid = fork) or fatal "Can't fork: $!";
if 

[PATCH 2/4] Prepare Git::SVN for extraction into its own file.

2012-07-24 Thread Michael G. Schwern
From: "Michael G. Schwern" 

This means it should be able to load without git-svn being loaded.

* Load Git.pm on its own and all the needed command functions.

* It needs to grab at a git-svn lexical $_prefix representing the --prefix
  option.  Provide opt_prefix() for that.  This is a refactoring artifact.
  The prefix should really be passed into Git::SVN->new.

* Unqualify unnecessarily fully qualified globals like
  $Git::SVN::default_repo_id.

* Lexically isolate the class just to make sure nothing is leaking out.
---
 git-svn.perl | 22 ++
 1 file changed, 18 insertions(+), 4 deletions(-)

diff --git a/git-svn.perl b/git-svn.perl
index 79fe4a4..9cdf6fc 100755
--- a/git-svn.perl
+++ b/git-svn.perl
@@ -89,7 +89,7 @@ BEGIN {
foreach (qw/command command_oneline command_noisy command_output_pipe
command_input_pipe command_close_pipe
command_bidi_pipe command_close_bidi_pipe/) {
-   for my $package ( qw(Git::SVN::Migration Git::SVN::Log 
Git::SVN),
+   for my $package ( qw(Git::SVN::Migration Git::SVN::Log),
__PACKAGE__) {
*{"${package}::$_"} = \&{"Git::$_"};
}
@@ -109,6 +109,10 @@ my ($_stdin, $_help, $_edit,
$_merge, $_strategy, $_preserve_merges, $_dry_run, $_local,
$_prefix, $_no_checkout, $_url, $_verbose,
$_git_format, $_commit_url, $_tag, $_merge_info, $_interactive);
+
+# This is a refactoring artifact so Git::SVN can get at this git-svn switch.
+sub opt_prefix { return $_prefix || '' }
+
 $Git::SVN::_follow_parent = 1;
 $Git::SVN::Fetcher::_placeholder_filename = ".gitignore";
 $_q ||= 0;
@@ -2038,6 +2042,7 @@ sub gc_directory {
}
 }
 
+{
 package Git::SVN;
 use strict;
 use warnings;
@@ -2056,6 +2061,13 @@ use Memoize;  # core since 5.8.0, Jul 2002
 use Memoize::Storable;
 use POSIX qw(:signal_h);
 
+use Git qw(
+command
+command_oneline
+command_noisy
+command_output_pipe
+command_close_pipe
+);
 use Git::SVN::Utils qw(fatal can_compress);
 
 my $can_use_yaml;
@@ -4280,12 +4292,13 @@ sub find_rev_after {
 sub _new {
my ($class, $repo_id, $ref_id, $path) = @_;
unless (defined $repo_id && length $repo_id) {
-   $repo_id = $Git::SVN::default_repo_id;
+   $repo_id = $default_repo_id;
}
unless (defined $ref_id && length $ref_id) {
-   $_prefix = '' unless defined($_prefix);
+   # Access the prefix option from the git-svn main program if 
it's loaded.
+   my $prefix = defined &::opt_prefix ? ::opt_prefix() : "";
$_[2] = $ref_id =
-"refs/remotes/$_prefix$Git::SVN::default_ref_id";
+"refs/remotes/$prefix$default_ref_id";
}
$_[1] = $repo_id;
my $dir = "$ENV{GIT_DIR}/svn/$ref_id";
@@ -4347,6 +4360,7 @@ sub uri_decode {
 sub remove_username {
$_[0] =~ s{^([^:]*://)[^@]+@}{$1};
 }
+}
 
 package Git::SVN::Log;
 use strict;
-- 
1.7.11.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


[PATCH 4/4] Move initialization of Git::SVN variables into Git::SVN.

2012-07-24 Thread Michael G. Schwern
From: "Michael G. Schwern" 

Also it can compile on its own now, yay!
---
 git-svn.perl  | 4 
 perl/Git/SVN.pm   | 9 +++--
 t/Git-SVN/00compile.t | 3 ++-
 3 files changed, 9 insertions(+), 7 deletions(-)

diff --git a/git-svn.perl b/git-svn.perl
index 4c77f69..ef10f6f 100755
--- a/git-svn.perl
+++ b/git-svn.perl
@@ -20,10 +20,7 @@ my $cmd_dir_prefix = eval {
 
 my $git_dir_user_set = 1 if defined $ENV{GIT_DIR};
 $ENV{GIT_DIR} ||= '.git';
-$Git::SVN::default_repo_id = 'svn';
-$Git::SVN::default_ref_id = $ENV{GIT_SVN_ID} || 'git-svn';
 $Git::SVN::Ra::_log_window_size = 100;
-$Git::SVN::_minimize_url = 'unset';
 
 if (! exists $ENV{SVN_SSH} && exists $ENV{GIT_SSH}) {
$ENV{SVN_SSH} = $ENV{GIT_SSH};
@@ -114,7 +111,6 @@ my ($_stdin, $_help, $_edit,
 # This is a refactoring artifact so Git::SVN can get at this git-svn switch.
 sub opt_prefix { return $_prefix || '' }
 
-$Git::SVN::_follow_parent = 1;
 $Git::SVN::Fetcher::_placeholder_filename = ".gitignore";
 $_q ||= 0;
 my %remote_opts = ( 'username=s' => \$Git::SVN::Prompt::_username,
diff --git a/perl/Git/SVN.pm b/perl/Git/SVN.pm
index c71c041..2e0d7f0 100644
--- a/perl/Git/SVN.pm
+++ b/perl/Git/SVN.pm
@@ -3,9 +3,9 @@ use strict;
 use warnings;
 use Fcntl qw/:DEFAULT :seek/;
 use constant rev_map_fmt => 'NH40';
-use vars qw/$default_repo_id $default_ref_id $_no_metadata $_follow_parent
+use vars qw/$_no_metadata
 $_repack $_repack_flags $_use_svm_props $_head
-$_use_svnsync_props $no_reuse_existing $_minimize_url
+$_use_svnsync_props $no_reuse_existing
$_use_log_author $_add_author_from $_localtime/;
 use Carp qw/croak/;
 use File::Path qw/mkpath/;
@@ -30,6 +30,11 @@ BEGIN {
$can_use_yaml = eval { require Git::SVN::Memoize::YAML; 1};
 }
 
+our $_follow_parent  = 1;
+our $_minimize_url   = 'unset';
+our $default_repo_id = 'svn';
+our $default_ref_id  = $ENV{GIT_SVN_ID} || 'git-svn';
+
 my ($_gc_nr, $_gc_period);
 
 # properties that we do not log:
diff --git a/t/Git-SVN/00compile.t b/t/Git-SVN/00compile.t
index a7aa85a..97475d9 100644
--- a/t/Git-SVN/00compile.t
+++ b/t/Git-SVN/00compile.t
@@ -3,6 +3,7 @@
 use strict;
 use warnings;
 
-use Test::More tests => 1;
+use Test::More tests => 2;
 
 require_ok 'Git::SVN::Utils';
+require_ok 'Git::SVN';
-- 
1.7.11.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


[PATCH] difftool: Do not remove temporary files on error

2012-07-24 Thread David Aguilar
Keep the temporary directory around when either compare() or
the difftool returns a non-zero exit status.

Tell the user about the location of the temporary files so that
they can recover from the failure.

Signed-off-by: David Aguilar 
---
 git-difftool.perl | 36 ++--
 1 file changed, 26 insertions(+), 10 deletions(-)

diff --git a/git-difftool.perl b/git-difftool.perl
index 10d3d97..f4f7d4a 100755
--- a/git-difftool.perl
+++ b/git-difftool.perl
@@ -18,7 +18,7 @@ use File::Copy;
 use File::Compare;
 use File::Find;
 use File::stat;
-use File::Path qw(mkpath);
+use File::Path qw(mkpath rmtree);
 use File::Temp qw(tempdir);
 use Getopt::Long qw(:config pass_through);
 use Git;
@@ -119,7 +119,7 @@ sub setup_dir_diff
exit(0) if (length($diffrtn) == 0);
 
# Setup temp directories
-   my $tmpdir = tempdir('git-difftool.X', CLEANUP => 1, TMPDIR => 1);
+   my $tmpdir = tempdir('git-difftool.X', CLEANUP => 0, TMPDIR => 1);
my $ldir = "$tmpdir/left";
my $rdir = "$tmpdir/right";
mkpath($ldir) or die $!;
@@ -257,7 +257,7 @@ sub setup_dir_diff
}
}
 
-   return ($ldir, $rdir, @working_tree);
+   return ($ldir, $rdir, $tmpdir, @working_tree);
 }
 
 sub write_to_file
@@ -349,20 +349,23 @@ sub main
 sub dir_diff
 {
my ($extcmd, $symlinks) = @_;
-
my $rc;
+   my $error = 0;
my $repo = Git->repository();
-
my $workdir = find_worktree($repo);
-   my ($a, $b, @worktree) = setup_dir_diff($repo, $workdir, $symlinks);
+   my ($a, $b, $tmpdir, @worktree) =
+   setup_dir_diff($repo, $workdir, $symlinks);
+
if (defined($extcmd)) {
$rc = system($extcmd, $a, $b);
} else {
$ENV{GIT_DIFFTOOL_DIRDIFF} = 'true';
$rc = system('git', 'difftool--helper', $a, $b);
}
-
-   exit($rc | ($rc >> 8)) if ($rc != 0);
+   if ($rc != 0) {
+   dir_diff_tmpdir_warning($tmpdir);
+   exit($rc | ($rc >> 8));
+   }
 
# If the diff including working copy files and those
# files were modified during the diff, then the changes
@@ -377,16 +380,29 @@ sub dir_diff
if ($diff == 0) {
next;
} elsif ($diff == -1 ) {
-   my $errmsg = "warning: could not compare ";
+   my $errmsg = "warning: Could not compare ";
$errmsg += "'$b/$file' with '$workdir/$file'\n";
warn $errmsg;
+   $error = 1;
} elsif ($diff == 1) {
copy("$b/$file", "$workdir/$file") or die $!;
my $mode = stat("$b/$file")->mode;
chmod($mode, "$workdir/$file") or die $!;
}
}
-   exit(0);
+   if ($error) {
+   dir_diff_tmpdir_warning($tmpdir);
+   } else {
+   rmtree($tmpdir);
+   }
+   exit($error);
+}
+
+sub dir_diff_tmpdir_warning
+{
+   my ($tmpdir) = @_;
+   warn "warning: Temporary files exist in '$tmpdir'.\n";
+   warn "warning: You may want to cleanup or recover these.\n";
 }
 
 sub file_diff
-- 
1.7.11.9.g2b1cfc7.dirty

--
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: OT: mail-based interfaces and web-based interfaces (Re: Extract Git classes from git-svn (1/10))

2012-07-24 Thread Michael G Schwern
On 2012.7.24 10:54 PM, Jonathan Nieder wrote:
>> And again, it *does not have to be zero sum*.  It doesn't have to be email VS
>> GUI.  You can have your cake and eat it too.
> 
> I assume you're talking about web-based interfaces that have gateways
> to email, that produce inboxes like this:
> 
>  24 Jul 02:46 GitHub  [github] msysgit/msysgit was forked by peters
>  23 Jul 10:27 GitHub  [msysgit/git] ce8ebc: vcs-svn: rename check_o
>  23 Jul 10:01 GitHub  [github] Comment created on issue 44 (new git
>  23 Jul 09:50 GitHub  [github] Comment created on issue 44 (new git
>  23 Jul 09:33 GitHub  [github] Comment created on issue 44 (new git
>  23 Jul 09:39 GitHub  [github] Comment created on issue 24 (Long fi
>  23 Jul 09:31 GitHub  [github] Comment created on issue 44 (new git
>  23 Jul 09:30 GitHub  [github] Comment created on issue 24 (Long fi
>  22 Jul 23:57 GitHub  [github] Comment created on issue 44 (new git
> 
> I call that pretending to have my cake, rather than having it. :)

That's kind of like pointing at RCS and saying "version control sucks and its
pointless to try and make it better!"  Mail gateways built by web sites suck
because they live in the web browser and email is an after thought.  Sound
familiar?

Here is a much better example of the RT mail gateway that Perl 5 development
uses.  They're a dev community still centered around email, so it has to
integrate well.
http://www.nntp.perl.org/group/perl.perl5.porters/2012/07/msg189716.html

And the corresponding ticket in the tracker.
https://rt.perl.org/rt3/Public/Bug/Display.html?id=113684

The initial report comes in either via the web tracker or via a command line
program (perlbug) that sends an email to the list.  Replies on either the
tracker or the mailing list are mirrored.  Duplicates are detected etc...
That's the sort of mail gateways I'm used to.


> Maybe some day someone will prove me wrong and make a nice web-based
> tool that I don't even need to know about that mines project mailing
> lists.  If I have to tweak my subject lines a little to help it out,
> that's fine with me.  I think patchwork is supposed to work this way.
> 
> But unless we're talking about splitting the mailing list into a bunch
> of mini mailing lists (like some bug trackers do), it doesn't change
> anything fundamental, so I'm not sure why we're discussing this.

I don't follow the bit about splitting the mailing list.


-- 
emacs -- THAT'S NO EDITOR... IT'S AN OPERATING SYSTEM!
--
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] Add a svnrdump-simulator replaying a dump file for testing.

2012-07-24 Thread Florian Achleitner
On Tuesday 24 July 2012 14:50:49 Jonathan Nieder wrote:
> > It is unclear how this is different from giving the ceiling by
> > specifying it as the "END" in -rSTART:END command line.  Is this
> > feature really needed?
> 
> I think the idea is that you put this script (or a symlink to it) on
> your $PATH with higher precedence than svnrdump and run a command
> that expected to be able to use svnrdump.  Then instead of going to
> the network, the command you run magically uses your test data
> instead.
> 
> If the command you are testing wanted to run "svnrdump" without the
> upper endpoint set, we need to handle that request, either by emitting
> all the revs we have, or by stopping somewhere.  The revlimit feature
> provides the "stopping somewhere" behavior which is not strictly
> needed but is presumably very useful when testing incremental fetch.

Exactly, the purpose is to transparently replace svnrdump.
Callers of svnrdump usually will specify -rSTART:HEAD, because they want to 
fetch everything they don't yet have.
This feature allows to limit HEAD and to simulate incremental fetches using 
the same dump file.
For me it proved very useful.

> Florian, do you mind if I make the revlimit feature a separate patch
> when applying this?

No problem.

> 
> Anyway, it looks good and reasonable to me, so will apply.
> 
> Thanks.
> Jonathan

--
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 v3 5/7] i18n: am: mark more strings for translation

2012-07-24 Thread Thomas Rast
Junio C Hamano  writes:

> Jonathan Nieder  writes:
>
>> Before this patch, it says
>>
>>  The --binary option has been a no-op for a long time, and ...
>>
>> After the patch, it says
>>
>>  The -b option has been a no-op for a long time, and ...
>>
>> Intentional?  That may be a good change or a bad one (I haven't
>> thought clearly about it), but it seems at least worth mentioning.
>> Cc-ing Thomas in case he has advice.
>
> If we really care we could printf $1, but I think we usually do
>
>   The -b/--binary option has been...
>
> in a case like this, especially in codepaths that no longer has an
> easy access to $1 after parsing the command line but knows that
> either one of them is given from the parse result, and that would be
> an appropriate solution for this particular one as well.

Yes.  The original plan was to free up -b, but since we don't need
--binary any more either, it's better if we can get rid of it the same
way.

-- 
Thomas Rast
trast@{inf,student}.ethz.ch
--
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: [GSoC] Designing a faster index format - Progress report week 13

2012-07-24 Thread Thomas Rast
Junio C Hamano  writes:

> Thomas Rast  writes:
>
>> Junio's index-v4 was a speed boost mainly because it cuts down on the
>> size of the index.  Do we want to throw that out?
>
> That's pretty much orthogonal, isn't it?
>
> The index-v4 is merely to show how a stupid prefix compression of
> pathnames without nothing else would reduce the file size and I/O
> cost, in order to set the bar for anything more clever than that.
>
> I thought that this discussion is about keeping, squishing, or
> discarding part of the cached stat info, and nobody is suggesting
> what to do with the prefix compression of pathnames.

True, sorry for being so confusing.  'Throw "that" out' was meant to
refer to the observation that smaller indexes are generally faster.

Whether this matters in the long run is another question.  Perhaps
partial loading combined with something like inotify can avoid full
reads in most operations.

-- 
Thomas Rast
trast@{inf,student}.ethz.ch
--
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