Re: URL rewrite in local config unable to override global config rule

2016-06-17 Thread Saksham Saxena
Thanks a lot Peff. This cleared a lot of things. Would it be okay if I cite some parts of this conversation on my personal blog? On Fri, Jun 17, 2016 at 8:31 PM, Jeff King wrote: > On Fri, Jun 17, 2016 at 08:05:47PM +0530, Saksham Saxena wrote: > >> > ..even if I have an existing

Re: What's cooking in git.git (Jun 2016, #05; Thu, 16)

2016-06-17 Thread Michael Haggerty
On 06/17/2016 05:20 AM, Junio C Hamano wrote: > [...] > * mh/ref-iterators (2016-06-03) 13 commits > (merged to 'next' on 2016-06-06 at c8e79dc) > + for_each_reflog(): reimplement using iterators > + dir_iterator: new API for iterating over a directory tree > + for_each_reflog(): don't abort

[PATCH v3 06/13] get_ref_cache(): only create an instance if there is a submodule

2016-06-17 Thread Michael Haggerty
If there is not a nonbare repository where a submodule is supposedly located, then don't instantiate a ref_cache for it. The analogous check can be removed from resolve_gitlink_ref(). Signed-off-by: Michael Haggerty --- refs/files-backend.c | 33

[PATCH v3 13/13] for_each_reflog(): reimplement using iterators

2016-06-17 Thread Michael Haggerty
Allow references with reflogs to be iterated over using a ref_iterator. The latter is implemented as a files_reflog_iterator, which in turn uses dir_iterator to read the "logs" directory. Note that reflog iteration doesn't correctly handle per-worktree reflogs (either before or after this patch).

[PATCH v3 10/13] do_for_each_ref(): reimplement using reference iteration

2016-06-17 Thread Michael Haggerty
Use the reference iterator interface to implement do_for_each_ref(). Delete a bunch of code supporting the old for_each_ref() implementation. And now that do_for_each_ref() is generic code (it is no longer tied to the files backend), move it to refs.c. The implementation is via a new function,

[PATCH v3 08/13] ref_resolves_to_object(): new function

2016-06-17 Thread Michael Haggerty
Extract new function ref_resolves_to_object() from entry_resolves_to_object(). It can be used even if there is no ref_entry at hand. Signed-off-by: Michael Haggerty --- refs/files-backend.c | 33 +++-- 1 file changed, 23 insertions(+), 10

[PATCH v3 12/13] dir_iterator: new API for iterating over a directory tree

2016-06-17 Thread Michael Haggerty
The iterator interface is modeled on that for references, though no vtable is necessary because there is (so far?) only one type of dir_iterator. There are obviously a lot of features that could easily be added to this class: * Skip/include directory paths in the iteration * Shallow/deep

[PATCH v3 11/13] for_each_reflog(): don't abort for bad references

2016-06-17 Thread Michael Haggerty
If there is a file under "$GIT_DIR/logs" with no corresponding reference, the old code was emitting an error message, aborting the reflog iteration, and returning -1. But * None of the callers was checking the exit value * The callers all want to find all legitimate reflogs (sometimes for the

[PATCH v3 05/13] remote rm: handle symbolic refs correctly

2016-06-17 Thread Michael Haggerty
In the modern world of reference backends, it is not OK to delete a symref by unlink()ing the file directly. This must be done via the refs API. We do so by adding the symref to the list of references to delete along with the non-symbolic references, then calling delete_refs() with the new flags

[PATCH v3 02/13] do_for_each_ref(): move docstring to the header file

2016-06-17 Thread Michael Haggerty
Signed-off-by: Michael Haggerty --- refs/files-backend.c | 9 - refs/refs-internal.h | 10 +- 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/refs/files-backend.c b/refs/files-backend.c index bbf96ad..8fa897b 100644 ---

[PATCH v3 09/13] refs: introduce an iterator interface

2016-06-17 Thread Michael Haggerty
Currently, the API for iterating over references is via a family of for_each_ref()-type functions that invoke a callback function for each selected reference. All of these eventually call do_for_each_ref(), which knows how to do one thing: iterate in parallel through two ref_caches, one for loose

[PATCH v3 07/13] entry_resolves_to_object(): rename function from ref_resolves_to_object()

2016-06-17 Thread Michael Haggerty
Free up the old name for a more general purpose. Signed-off-by: Michael Haggerty --- refs/files-backend.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/refs/files-backend.c b/refs/files-backend.c index b563a7e..c24a78e 100644 ---

[PATCH v3 01/13] refs: remove unnecessary "extern" keywords

2016-06-17 Thread Michael Haggerty
There's continuing work in this area, so clean up unneeded "extern" keywords rather than schlepping them around. Also split up some overlong lines and add parameter names in a couple of places. Signed-off-by: Michael Haggerty --- refs.h | 132

[PATCH v3 00/13] Reference iterators

2016-06-17 Thread Michael Haggerty
This is the reroll of branch mh/ref-iterators promised and discussed earlier [1]. There are no showstoppers here, but it would be preferable to merge this version rather than v2. This version squashes in Ramsay's patch [2], addresses Eric's comments, and incorporates the whitespace fix that you

Re: Migrating away from SHA-1?

2016-06-17 Thread Eric Wong
Leo Gaspard wrote: > First, sorry for not having this message threaded: I'm not subscribed to > the list and haven't found a way to get a Message-Id from gmane. Appending "/raw" to the gmane URL will get you the raw message with full headers:

Re: Migrating away from SHA-1?

2016-06-17 Thread Leo Gaspard
First, sorry for not having this message threaded: I'm not subscribed to the list and haven't found a way to get a Message-Id from gmane. I just wanted to ask, as an end-user highly relying on commit signatures, a few questions as to the migration away from SHA-1. SHA-1 already suffers from a

Re: [PATCH] archive-tar: add UL type suffix to unsigned long constant

2016-06-17 Thread Ramsay Jones
On 18/06/16 00:40, Jeff King wrote: > On Fri, Jun 17, 2016 at 10:06:14PM +0100, Ramsay Jones wrote: > >> If you need to re-roll your 'jk/big-and-old-archive-tar' branch, could >> you please squash this into the relevant patch (commit 8035a1e3, >> "archive-tar: write extended headers for

Re: [PATCH] run-command: mark file-local symbols static

2016-06-17 Thread Ramsay Jones
On 18/06/16 00:33, Jeff King wrote: > On Fri, Jun 17, 2016 at 10:01:24PM +0100, Ramsay Jones wrote: > >> If you need to re-roll your 'jk/gpg-interface-cleanup' branch, could >> you please squash this into the relevant patch (commit 74287e34, >> "run-command: add pipe_command helper",

Re: [PATCH v6 00/11] Fix icase grep on non-ascii

2016-06-17 Thread Duy Nguyen
On Sat, Jun 18, 2016 at 6:17 AM, Junio C Hamano wrote: > Nguyễn Thái Ngọc Duy writes: > >> v6 fixes comments from Ramsay and Eric. Interdiff below. > > Another thing I noticed with this is that the non-ascii test breaks > when run under dash (but passes

Re: [PATCH v6 01/11] grep: allow -F -i combination

2016-06-17 Thread Duy Nguyen
On Sat, Jun 18, 2016 at 4:54 AM, Junio C Hamano wrote: > Nguyễn Thái Ngọc Duy writes: > >> -F means "no regex", not "case sensitive" so it should not override -i > > That logic is flawed, isn't it? > > "-F" means "no regex", so it should not touch

Re: [PATCH] archive-tar: add UL type suffix to unsigned long constant

2016-06-17 Thread Jeff King
On Fri, Jun 17, 2016 at 10:06:14PM +0100, Ramsay Jones wrote: > If you need to re-roll your 'jk/big-and-old-archive-tar' branch, could > you please squash this into the relevant patch (commit 8035a1e3, > "archive-tar: write extended headers for far-future mtime", 16-06-2016). > > Thanks! > >

[PATCH v2 3/7] verify_signed_buffer: use tempfile object

2016-06-17 Thread Jeff King
We use git_mkstemp to create a temporary file, and try to clean it up in all exit paths from the function. But that misses any cases where we die by signal, or by calling die() in a sub-function. In addition, we missed one of the exit paths. Let's convert to using a tempfile object, which handles

[PATCH v2 6/7] sign_buffer: use pipe_command

2016-06-17 Thread Jeff King
Similar to the prior commit for verify_signed_buffer, the motivation here is both to make the code simpler, and to avoid any possible deadlocks with gpg. In this case we have the same "write to stdin, then read from stdout" that the verify case had. This is unlikely to be a problem in practice,

[PATCH v2 5/7] verify_signed_buffer: use pipe_command

2016-06-17 Thread Jeff King
This is shorter and should make the function easier to follow. But more importantly, it removes the possibility of any deadlocks based on reading or writing to gpg. It's not clear if such a deadlock is possible in practice. We do write the whole payload before reading anything, so we could

[PATCH v2 4/7] run-command: add pipe_command helper

2016-06-17 Thread Jeff King
We already have capture_command(), which captures the stdout of a command in a way that avoids deadlocks. But sometimes we need to do more I/O, like capturing stderr as well, or sending data to stdin. It's easy to write code that deadlocks racily in these situations depending on how fast the

[PATCH v2 7/7] gpg-interface: check gpg signature creation status

2016-06-17 Thread Jeff King
From: Michael J Gruber When we create a signature, it may happen that gpg returns with "success" but not with an actual detached signature on stdout. Check for the correct signature creation status to catch these cases better. Really, --status-fd parsing is the only

[PATCH v2 2/7] verify_signed_buffer: drop pbuf variable

2016-06-17 Thread Jeff King
If our caller gave us a non-NULL gpg_status parameter, we write the gpg status into their strbuf. If they didn't, then we write it to a temporary local strbuf (since we still need to look at it). The variable "pbuf" adds an extra layer of indirection so that the rest of the function can just

[PATCH v2 1/7] gpg-interface: use child_process.args

2016-06-17 Thread Jeff King
Our argv allocations are relatively straightforward, but this avoids us having to manually keep the count up to date (or create new to-be-replaced slots in the declaration) when we add new arguments. Signed-off-by: Jeff King --- gpg-interface.c | 19 +-- 1 file

[PATCH v2 0/7] gpg-interface cleanups

2016-06-17 Thread Jeff King
On Thu, Jun 16, 2016 at 05:32:48AM -0400, Jeff King wrote: > [1/7]: gpg-interface: use child_process.args > [2/7]: verify_signed_buffer: drop pbuf variable > [3/7]: verify_signed_buffer: use tempfile object > [4/7]: run-command: add pipe_command helper > [5/7]: verify_signed_buffer: use

Re: [PATCH] run-command: mark file-local symbols static

2016-06-17 Thread Jeff King
On Fri, Jun 17, 2016 at 10:01:24PM +0100, Ramsay Jones wrote: > If you need to re-roll your 'jk/gpg-interface-cleanup' branch, could > you please squash this into the relevant patch (commit 74287e34, > "run-command: add pipe_command helper", 16-06-2016). Thanks, yes. > BTW, also on that branch,

Re: [PATCH 4/7] run-command: add pipe_command helper

2016-06-17 Thread Eric Sunshine
On Fri, Jun 17, 2016 at 7:28 PM, Jeff King wrote: > On Fri, Jun 17, 2016 at 04:03:18PM -0400, Eric Sunshine wrote: >> > diff --git a/run-command.h b/run-command.h >> > @@ -79,17 +79,34 @@ int run_command_v_opt(const char **argv, int opt); >> > /** >> > - * Execute the given

Re: [PATCH 4/7] run-command: add pipe_command helper

2016-06-17 Thread Jeff King
On Fri, Jun 17, 2016 at 04:03:18PM -0400, Eric Sunshine wrote: > > diff --git a/run-command.h b/run-command.h > > @@ -79,17 +79,34 @@ int run_command_v_opt(const char **argv, int opt); > > /** > > - * Execute the given command, capturing its stdout in the given strbuf. > > + * Execute the given

Re: [PATCH v6 00/11] Fix icase grep on non-ascii

2016-06-17 Thread Junio C Hamano
Nguyễn Thái Ngọc Duy writes: > v6 fixes comments from Ramsay and Eric. Interdiff below. Another thing I noticed with this is that the non-ascii test breaks when run under dash (but passes under bash). You need to have is_IS locale on the system to see the breakage, it seems

[PATCH v2 0/4] clarify %f documentation

2016-06-17 Thread Joey Hess
It's natural to expect %f to be an actual file on disk; help avoid that mistake. Signed-off-by: Joey Hess --- This patch series was meant to contain 5 patches; here's the missing one. This patch will apply cleanly on top of v2.9.0. Documentation/gitattributes.txt | 5 +

Fwd: Re: [PATCH] hooks--pre-commit.sample: check for chars, that are not allowed for a windows file name

2016-06-17 Thread dex teritas
Am 15.06.2016 um 19:54 schrieb Junio C Hamano: > > dexteritas writes: >> >> After the ASCII-check, test the windows compatibility of file names. >> Can be disabled by: git config hooks.allownonwindowschars true --- > > Missing sign off. Will be there next time. >> >>

Re: [PATCH v5 00/38] i18n and test updates

2016-06-17 Thread Junio C Hamano
Junio C Hamano writes: > Vasco Almeida writes: > >> Interdiff included below. >> >> Vasco Almeida (38): >> i18n: builtin/remote.c: fix mark for translation >> i18n: advice: mark string about detached head for translation >> i18n: advice:

Re: [PATCH] hooks--pre-commit.sample: check for chars, that are not allowed for a windows file name

2016-06-17 Thread dex teritas
Am 15.06.2016 um 13:15 schrieb Thomas Braun: > Am 15.06.2016 um 10:02 schrieb dexteritas: >> After the ASCII-check, test the windows compatibility of file names. >> Can be disabled by: >> git config hooks.allownonwindowschars true >> --- >> templates/hooks--pre-commit.sample | 22

Re: What's cooking in git.git (Jun 2016, #05; Thu, 16)

2016-06-17 Thread Junio C Hamano
Lars Schneider writes: >> On 17 Jun 2016, at 05:20, Junio C Hamano wrote: >> >> ... >> >> * mh/split-under-lock (2016-05-13) 33 commits >> (merged to 'next' on 2016-06-03 at 2e71330) >> + lock_ref_sha1_basic(): only handle REF_NODEREF mode >> +

Re: What's cooking in git.git (Jun 2016, #05; Thu, 16)

2016-06-17 Thread Lars Schneider
> On 17 Jun 2016, at 05:20, Junio C Hamano wrote: > > ... > > * mh/split-under-lock (2016-05-13) 33 commits > (merged to 'next' on 2016-06-03 at 2e71330) > + lock_ref_sha1_basic(): only handle REF_NODEREF mode > + commit_ref_update(): remove the flags parameter > +

[PATCH v5 38/38] i18n: branch: mark comment when editing branch description for translation

2016-06-17 Thread Vasco Almeida
When one issues git branch --edit-description branch_name, a edit with that message commented out is opened. Mark that message for translation in to order to be localized. Signed-off-by: Vasco Almeida --- builtin/branch.c | 6 +++--- 1 file changed, 3 insertions(+), 3

[PATCH v5 34/38] i18n: init-db: join message pieces

2016-06-17 Thread Vasco Almeida
Join message displayed during repository initialization in one entire sentence. That would improve translations since it's easier translate an entire sentence than translating each piece. Update Icelandic translation to reflect the changes. The Icelandic translation of these messages is used

[PATCH v5 36/38] i18n: submodule: escape shell variables inside eval_gettext

2016-06-17 Thread Vasco Almeida
According to the gettext manual [1], references to shell variables inside eval_gettext call must be escaped so that eval_gettext receives the translatable string before the variable values are substituted into it. [1]

[PATCH v5 37/38] i18n: unmark die messages for translation

2016-06-17 Thread Vasco Almeida
These messages are relevant for the programmer only, not for the end user. Thus, they can be unmarked for translation, saving translator some work. Signed-off-by: Vasco Almeida --- git-bisect.sh | 2 +- wt-status.c | 4 ++-- 2 files changed, 3 insertions(+), 3

[PATCH v5 35/38] i18n: submodule: join strings marked for translation

2016-06-17 Thread Vasco Almeida
Join strings marked for translation since that would facilitate and improve translations result. Signed-off-by: Vasco Almeida --- git-submodule.sh | 18 ++ 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/git-submodule.sh b/git-submodule.sh

Re: [PATCH v6 01/11] grep: allow -F -i combination

2016-06-17 Thread Junio C Hamano
Nguyễn Thái Ngọc Duy writes: > -F means "no regex", not "case sensitive" so it should not override -i That logic is flawed, isn't it? "-F" means "no regex", so it should not touch opt.regflags at all. > Signed-off-by: Nguyễn Thái Ngọc Duy > --- >

Re: [PATCH v12 11/20] index-helper: use watchman to avoid refreshing index with lstat()

2016-06-17 Thread David Turner
> > - if (really && cache_errno == EINVAL) { > > + if (really || cache_errno == EINVAL) { > > /* If we are doing --really-refresh that > > * means the index is not valid anymore. > >

Re: [PATCH v5 00/38] i18n and test updates

2016-06-17 Thread Junio C Hamano
Vasco Almeida writes: > Interdiff included below. > > Vasco Almeida (38): > i18n: builtin/remote.c: fix mark for translation > i18n: advice: mark string about detached head for translation > i18n: advice: internationalize message for conflicts > i18n: transport:

Re: [PATCH v2 0/4] extend smudge/clean filters with direct file access

2016-06-17 Thread Junio C Hamano
Joey Hess writes: > Reroll of this patch set with changes: ... where is this 4-patch series designed to apply? The first one already fails... Applying: add smudgeToFile and cleanFromFile filter configs .git/rebase-apply/patch:28: trailing whitespace. Similar to

[PATCH] archive-tar: add UL type suffix to unsigned long constant

2016-06-17 Thread Ramsay Jones
Signed-off-by: Ramsay Jones --- Hi Jeff, If you need to re-roll your 'jk/big-and-old-archive-tar' branch, could you please squash this into the relevant patch (commit 8035a1e3, "archive-tar: write extended headers for far-future mtime", 16-06-2016). Thanks! ATB,

Re: [PATCH v2 0/4] extend smudge/clean filters with direct file access

2016-06-17 Thread Joey Hess
Doing a quick benchmark of this new interface and git-annex's use of it, git checkout of a 1 gigabyte file with git-annex providing the smudge filter took: 19 seconds using the smudge interface 11 seconds using smudgeToFile 0.1 seconds with smudgeToFile and annex.thin set

[PATCH] run-command: mark file-local symbols static

2016-06-17 Thread Ramsay Jones
Signed-off-by: Ramsay Jones --- Hi Jeff, If you need to re-roll your 'jk/gpg-interface-cleanup' branch, could you please squash this into the relevant patch (commit 74287e34, "run-command: add pipe_command helper", 16-06-2016). BTW, also on that branch, commit

[PATCH v2 3/4] use smudgeToFile in git checkout etc

2016-06-17 Thread Joey Hess
This makes git checkout, git reset, etc use smudgeToFile. Includes test cases. (There's a call to convert_to_working_tree in merge-recursive.c that could also be made to use smudgeToFile as well.) Signed-off-by: Joey Hess --- entry.c | 37

[PATCH v2 1/4] add smudgeToFile and cleanFromFile filter configs

2016-06-17 Thread Joey Hess
This adds new smudgeToFile and cleanFromFile filter commands, which are similar to smudge and clean but allow direct access to files on disk. This interface can be much more efficient when operating on large files, because the whole file content does not need to be streamed through the filter. It

[PATCH v2 4/4] warn on unusable smudgeToFile/cleanFromFile config

2016-06-17 Thread Joey Hess
Let the user know when they have a smudgeToFile/cleanFromFile config that cannot be used because the corresponding smudge/clean config is missing. The warning is only displayed a maximum of once per git invocation, and only when doing an operation that would use the filter. Signed-off-by: Joey

[PATCH v2 2/4] use cleanFromFile in git add

2016-06-17 Thread Joey Hess
Includes test cases. Signed-off-by: Joey Hess --- sha1_file.c | 42 -- t/t0021-conversion.sh | 36 2 files changed, 72 insertions(+), 6 deletions(-) diff --git a/sha1_file.c b/sha1_file.c

[PATCH v2 0/4] extend smudge/clean filters with direct file access

2016-06-17 Thread Joey Hess
Reroll of this patch set with changes: * Renamed the new filter drivers for consistency with other configs. * Improved documentation with feedback from Junio and others. * Eliminated %p and instead append the filename to the commands (separated by a space). * Fixed an FD leak and a space leak.

[PATCH v5 32/38] i18n: remote: mark URL fallback text for translation

2016-06-17 Thread Vasco Almeida
Marks fallback text for translation that may be displayed in git remote show output. Signed-off-by: Vasco Almeida --- builtin/remote.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/builtin/remote.c b/builtin/remote.c index ae74da6..9f934cb

[PATCH v5 27/38] i18n: config: unfold error messages marked for translation

2016-06-17 Thread Vasco Almeida
Introduced in 473166b ("config: add 'origin_type' to config_source struct", 2016-02-19), Git can inform the user about the origin of a config error, but the implementation does not allow translators to translate the keywords 'file', 'blob, 'standard input', and 'submodule-blob'. Moreover, for the

[PATCH v5 10/38] i18n: rebase: mark placeholder for translation

2016-06-17 Thread Vasco Almeida
Mark placeholder "" in git-rebase.sh for translation. The string containing the named placeholder is passed to shell function error_on_missing_default_upstream in git-parse-remote.sh which uses it to display a command hint for the user. Signed-off-by: Vasco Almeida ---

[PATCH v5 07/38] i18n: merge-octopus: mark messages for translation

2016-06-17 Thread Vasco Almeida
Mark messages in git-merge-octopus.sh for translation. Signed-off-by: Vasco Almeida --- git-merge-octopus.sh | 18 ++ 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/git-merge-octopus.sh b/git-merge-octopus.sh index dc2fd1b..89e967a 100755

[PATCH v5 21/38] t4153: fix negated test_i18ngrep call

2016-06-17 Thread Vasco Almeida
The function test_i18ngrep fakes success when run under GETTEXT_POISON. Hence, running in the following manner will always fail under gettext poison: ! test_i18ngrep expected actual Use correct syntax: test_i18ngrep ! expected actual For other instance of this issue see 41ca19b ("tests:

[PATCH v5 13/38] i18n: git-sh-setup.sh: mark strings for translation

2016-06-17 Thread Vasco Almeida
Positional arguments, such as $0, $1, etc, need to be stored on shell variables for use in translatable strings, according to gettext manual [1]. Add git-sh-setup.sh to LOCALIZED_SH variable in Makefile to enable extraction of string marked for translation by xgettext. Source git-sh-i18n in

[PATCH v5 16/38] i18n: rebase-interactive: mark comments of squash for translation

2016-06-17 Thread Vasco Almeida
Mark comment messages of squash/fixup file ($squash_msg) for translation. Helper functions this_nth_commit_message and skip_nth_commit_message replace the previous method of making the comment messages (such as "This is the 2nd commit message:") aided by nth_string helper function. This step was

[PATCH v5 15/38] i18n: rebase-interactive: mark here-doc strings for translation

2016-06-17 Thread Vasco Almeida
Use pipe to send gettext output to git stripspace instead of the original method of using shell here-document, because command substitution '$(...)' would not take place inside the here-documents. The exception is the case of the last here-document redirecting to cat, in which commands

[PATCH v5 19/38] tests: unpack-trees: update to use test_i18n* functions

2016-06-17 Thread Vasco Almeida
Use functions test_i18ncmp and test_i18ngrep to successfully pass tests running under GETTEXT_POISON. The output strings compared to in these test were marked for translation in ed47fdf ("i18n: unpack-trees: mark strings for translation", 2016-04-09) and later improved in 2e3926b ("i18n:

[PATCH v5 28/38] i18n: merge: mark messages for translation

2016-06-17 Thread Vasco Almeida
Mark messages shown to the user for translation. Signed-off-by: Vasco Almeida --- builtin/merge.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/builtin/merge.c b/builtin/merge.c index b555a1b..961def5 100644 --- a/builtin/merge.c +++

[PATCH v5 17/38] i18n: setup: mark strings for translation

2016-06-17 Thread Vasco Almeida
Update tests that compare the strings newly marked for translation to succeed when running under GETTEXT_POISON. Signed-off-by: Vasco Almeida --- setup.c| 16 t/t1506-rev-parse-diagnosis.sh | 2 +- t/t4208-log-magic-pathspec.sh |

[PATCH v5 14/38] i18n: rebase-interactive: mark strings for translation

2016-06-17 Thread Vasco Almeida
Mark strings in git-rebase--interactive.sh for translation. There is no need to source git-sh-i18n since git-rebase.sh already does so. Add git-rebase--interactive.sh to LOCALIZED_SH in Makefile in order to enable extracting strings marked for translation by xgettext. Signed-off-by: Vasco

[PATCH v5 31/38] i18n: standardise messages

2016-06-17 Thread Vasco Almeida
Standardise messages in order to save translators some work. Nuances fixed in this commit: "failed to read %s" "read of %s failed" "detach the HEAD at named commit" "detach HEAD at named commit" "removing '%s' failed" "failed to remove '%s'" "index file corrupt" "corrupt index file" "failed

[PATCH v5 29/38] i18n: merge: change command option help to lowercase

2016-06-17 Thread Vasco Almeida
Change command option description to lowercase, matching pull counterpart option. Translators would have to translate such message only once. Signed-off-by: Vasco Almeida --- builtin/merge.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH v5 18/38] tests: use test_i18n* functions to suppress false positives

2016-06-17 Thread Vasco Almeida
The test functions test_i18ncmp and test_i18ngrep pretend success if run under GETTEXT_POISON. By using those functions to test output which is correctly marked as translatable, enables one to detect if the strings newly marked for translation are from plumbing output. If they are indeed from

[PATCH v5 25/38] i18n: notes: mark strings for translation

2016-06-17 Thread Vasco Almeida
Mark strings of messages for the user as translatable. Update tests t3310-notes-merge-manual-resolve.sh and t3320-notes-merge-worktrees.sh to reflect new translatable messages. Tests that grep for .git/NOTES_MERGE_WORKTREE reflect the translatable string "Automatic notes merge failed. Fix

[PATCH v5 33/38] i18n: remote: allow translations to reorder message

2016-06-17 Thread Vasco Almeida
Before this patch, translations couldn't place the branch name where it was better fit in the message "and with remote ". Allow translations that, instead of forcing the branch name to display right of the message. Signed-off-by: Vasco Almeida --- builtin/remote.c | 7

[PATCH v5 12/38] t6030: update to use test_i18ncmp

2016-06-17 Thread Vasco Almeida
Since the git bisect output tested here is subject to translation, the helper function test_i18ncmp should be used over test_cmp. Signed-off-by: Vasco Almeida --- t/t6030-bisect-porcelain.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git

[PATCH v5 26/38] i18n: notes: mark options for translation

2016-06-17 Thread Vasco Almeida
Mark options description of git prune for translation. Signed-off-by: Vasco Almeida --- builtin/notes.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/builtin/notes.c b/builtin/notes.c index d11e6eb..0572051 100644 --- a/builtin/notes.c +++

[PATCH v5 30/38] i18n: sequencer: add period to error message

2016-06-17 Thread Vasco Almeida
Add a period to error message so it matches others instances in sequencer.c. Now translator would have to translate such message only once. Signed-off-by: Vasco Almeida --- sequencer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sequencer.c

[PATCH v5 24/38] i18n: transport-helper.c: change N_() call to _()

2016-06-17 Thread Vasco Almeida
The N_() no-op call currently marks the string to be extracted by xgettext but doesn't trigger the retrieval of the translation at run time, whereas _() does both. Meaning that, in spite of having translations available, they were never retrieved to make use of them. Signed-off-by: Vasco Almeida

[PATCH v5 11/38] i18n: bisect: simplify error message for i18n

2016-06-17 Thread Vasco Almeida
The message was not being extracted by xgettext, although it was marked for translation, seemingly because it contained a command substitution. Moreover, eval_gettext should be used instead of gettext for strings with substitution. See step 4. of section 15.5.2.1 Preparing Shell Scripts for

[PATCH v5 20/38] t9003: become resilient to GETTEXT_POISON

2016-06-17 Thread Vasco Almeida
The test t9003-help-autocorrect.sh fails when run under GETTEXT_POISON, because it's expecting to filter out the original output. Accommodate gettext poison case by also filtering out the default simulated output. Signed-off-by: Vasco Almeida ---

[PATCH v5 23/38] i18n: bisect: mark strings for translation

2016-06-17 Thread Vasco Almeida
In the last message, involving Q_(), try to mark the message in such way that is suited for RTL (Right to Left) languages. Update test t6030-bisect-porcelain.sh to reflect the changes. Signed-off-by: Vasco Almeida --- bisect.c| 56

[PATCH v5 22/38] t5523: use test_i18ngrep for negation

2016-06-17 Thread Vasco Almeida
Replace the first form with the second one: ! grep expected actual test_i18ngrep ! expected actual The latter syntax is supported by test_i18ngrep defined in t/test-lib.sh. Although the test already passes whether GETTEXT_POSION is enabled, use the i18n grep variant for the sake

[PATCH v5 06/38] i18n: sequencer: mark string for translation

2016-06-17 Thread Vasco Almeida
Mark informative string ": fast-forward" for translation. Signed-off-by: Vasco Almeida --- sequencer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sequencer.c b/sequencer.c index 88a7c78..57b3671 100644 --- a/sequencer.c +++ b/sequencer.c @@ -225,7

[PATCH v5 04/38] i18n: transport: mark strings for translation

2016-06-17 Thread Vasco Almeida
Mark one printf string and one error string for translation. Signed-off-by: Vasco Almeida --- transport.c | 20 ++-- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/transport.c b/transport.c index 095e61f..59b911e 100644 --- a/transport.c

[PATCH v5 09/38] i18n: rebase: fix marked string to use eval_gettext variant

2016-06-17 Thread Vasco Almeida
The string message marked for translation should use eval_gettext variant instead of the gettext one, since we want to dollar-substitute $head_name in the result. Signed-off-by: Vasco Almeida --- git-rebase.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff

[PATCH v5 02/38] i18n: advice: mark string about detached head for translation

2016-06-17 Thread Vasco Almeida
Mark string with advice seen by the user when in detached head. Update test t7201-co.sh to pass under GETTEXT_POISON build. Pretend success if the number of lines of "git checkout renamer^" output is not greater than 1 and test are running under GETTEXT_POISON. Signed-off-by: Vasco Almeida

[PATCH v5 05/38] i18n: sequencer: mark entire sentences for translation

2016-06-17 Thread Vasco Almeida
Mark entire sentences of error message rather than assembling one using placeholders (e.g. "Cannot %s during a %s"). That would facilitate translation work because it is easier to translate a entire sentence than translating pieces. We would have better translations at the expense of source code

[PATCH v5 00/38] i18n and test updates

2016-06-17 Thread Vasco Almeida
Marks several messages for translation and updates tests to pass under GETTEXT_POISON. Some tests were updated to fit previous i18n marks, others were updated to fit marks made by these patches. Patches that only touch test file refer to marks done in commits previous to these ones. "[PATCH v5

[PATCH v5 01/38] i18n: builtin/remote.c: fix mark for translation

2016-06-17 Thread Vasco Almeida
The second string inside _() was not being extracted for translation by xgettext, meaning that, although the string was passed to gettext, there was no translation available. Mark each individual string instead of marking the result of ternary if. Signed-off-by: Vasco Almeida

[PATCH v5 03/38] i18n: advice: internationalize message for conflicts

2016-06-17 Thread Vasco Almeida
Mark message for translation telling the user she has conflicts to resolve. Expose each particular use case, in order to enable translating entire sentences which would facilitate translating into other languages. Change "Pull" to lowercase to match other instances. Update test t5520-pull.sh,

[PATCH v5 08/38] merge-octupus: use die shell function from git-sh-setup.sh

2016-06-17 Thread Vasco Almeida
Source git-sh-setup in order to use die shell function from git-sh-setup.sh library instead of using the one defined in git-merge-octopus.sh. Remove the former die function. Signed-off-by: Vasco Almeida --- git-merge-octopus.sh | 6 +- 1 file changed, 1 insertion(+),

Re: [PATCH 4/7] run-command: add pipe_command helper

2016-06-17 Thread Eric Sunshine
On Thu, Jun 16, 2016 at 5:37 AM, Jeff King wrote: > We already have capture_command(), which captures the stdout > of a command in a way that avoids deadlocks. But sometimes > we need to do more I/O, like capturing stderr as well, or > sending data to stdin. It's easy to write code

Re: [PATCHv2] Documentation/technical: push certificate format

2016-06-17 Thread Junio C Hamano
Michael J Gruber writes: > Signed-off-by: Michael J Gruber > --- > This is the version describing the current state, not assuming any new > verify command for blobs. > > Documentation/technical/signature-format.txt | 51 >

Re: [PATCH 2/4] add smudge-to-file and clean-from-file filter configuration

2016-06-17 Thread Junio C Hamano
Joey Hess writes: > Here's a revised version of the documentation that I think takes the other > suggestions onboard. I emphasise that clean and smudge operate as filters, > to contrast better with cleanFromFile and smudgeToFile not operating as > regular stdio filters. > ... >

Re: [PATCH 2/4] add smudge-to-file and clean-from-file filter configuration

2016-06-17 Thread Junio C Hamano
Joey Hess writes: > Or we could pick one of the two methods of appending the file > (I prefer not including a space before it as more flexible), and > anything using this interface would need to design its command line > parsing with this interface in mind, and would probably

Re: [PATCH 2/4] add smudge-to-file and clean-from-file filter configuration

2016-06-17 Thread Joey Hess
Junio C Hamano wrote: > Would an interface that always appends the pathname at the end of > the command line string work? One problem with this is that "appends" is subtly unclear in this case. With the example of smugeToFile = cmd --to-file it seems that a space should be added by git before

Re: What's cooking in git.git (Jun 2016, #05; Thu, 16)

2016-06-17 Thread Vasco Almeida
Junio C Hamano pobox.com> writes: > * va/i18n-even-more (2016-06-07) 38 commits > - i18n: branch: mark comment when editing branch description for translation > - i18n: unmark die messages for translation > - i18n: submodule: escape shell variables inside eval_gettext > - i18n: submodule:

Re: [PATCH v4 34/38] i18n: init-db: join message pieces

2016-06-17 Thread Vasco Almeida
A Terça, 7 de Junho de 2016 12:55:37 Vasco Almeida escreveu: > Join message displayed during repository initialization in one entire > sentence. That would improve translations since it's easier translate an > entire sentence than translating each piece. > > Signed-off-by: Vasco Almeida

Re: [PATCH 0/5] Documentation/technical: describe signature formats

2016-06-17 Thread Junio C Hamano
Michael J Gruber writes: > - We don't support verifying push certificates, although they fit in with > git verify-tag. Patch has been submitted, and this series documents the > result already (git verify-tag --blob). > > - We don' support verifying signed merge

Re: [PATCH 2/4] add smudge-to-file and clean-from-file filter configuration

2016-06-17 Thread Joey Hess
Junio C Hamano wrote: > Would an interface that always appends the pathname at the end of > the command line string work? I'm ok with this, and like getting rid of %p as it's not distinguishable from %f without reading the documentation. The sh -c trick can of course be used if some other

Re: [PATCH 0/2] Log pretty format alignment improvements

2016-06-17 Thread Josef Kufner
Junio C Hamano wrote, on 16.6.2016 20:25: > "as long as >(N) can be used as Duy claims as a workaround to > get the original behaviour, it is good to allow using >|(N) > for this new output format; I didn't check if >(N) does behave > that way, though" Yes, it can be used in such way. Example:

  1   2   >