Re: More builtin git-am issues..

2015-09-05 Thread Jeff King
On Sat, Sep 05, 2015 at 09:30:27AM +0200, Johannes Sixt wrote: > >How about a bit looser rule like this? > > > > A block of text at the end of the message, each and every > > line in which must match "^[^: ]+:[ ]" (that is, > > a "keyword" that does not contain a whitespace nor

Re: glibc mutex deadlock in signal handler

2015-09-05 Thread Jeff King
On Fri, Sep 04, 2015 at 02:56:58PM -0700, Junio C Hamano wrote: > Jeff King writes: > > > Perhaps we should reconsider whether f4c3edc (vreportf: avoid > > intermediate buffer, 2015-08-11) is a good idea. Note that snprintf is > > not on the list of safe functions, but I imagine

Re: [L10N] Kickoff of translation for Git 2.6.0 round 1

2015-09-05 Thread Jean-Noël AVILA
Le samedi 5 septembre 2015, 10:17:54 Jiang Xin a écrit : > Hi, > > Git v2.6.0-rc0 has been released, and it's time to start new round of git > l10n. This time there are 123 updated messages need to be translated since > last update: > > l10n: git.pot: v2.6.0 round 1 (123 new, 41 removed) >

Re: More builtin git-am issues..

2015-09-05 Thread Johannes Sixt
Am 05.09.2015 um 02:54 schrieb Junio C Hamano: Linus Torvalds writes: So I think that logic should basically be extended to saying - if any line in the last chunk has a "Signed-off-by:", set a flag. - at the end of the loop, if that flag wasn't set, return

Re: [RFC] test_when_finished in subshells

2015-09-05 Thread Jeff King
On Fri, Sep 04, 2015 at 11:43:15AM -0700, Junio C Hamano wrote: > > t7800 (in its final test) calls test_config in a subshell which has cd'd > > into a submodule. > > > > Is this something worth worrying about, or is it sufficiently rare that > > we can live with the current behaviour? > >

Bug? push --recurse-submodules=on-demandd not really recursive

2015-09-05 Thread Pedro Rodrigues
Yesterday I was discussing this in on G+, which lead me to conclude this is actually a bug (or, at least, a very good improvement). When you run push --recurse-submodules=on-demand, according to the push manpage you would expect any submodule commit missing on it's default remote to be pushed

Draft of Git Rev News edition 7

2015-09-05 Thread Christian Couder
Hi, A draft of Git Rev News edition 7 is available here: https://github.com/git/git.github.io/blob/master/rev_news/drafts/edition-7.md Everyone is welcome to contribute in any section, like Matthieu already did, either by editing the above page on GitHub and sending a pull request, or by

[PATCH] tag: support mixing --sort= and -n

2015-09-05 Thread Rudy Matela
Allow -n and --sort=version:refname to be used together instead of failing with: fatal: --sort and -n are incompatible Signed-off-by: Rudy Matela --- builtin/tag.c | 64 --- 1 file changed, 35 insertions(+), 29

Re: More builtin git-am issues..

2015-09-05 Thread Junio C Hamano
Junio C Hamano writes: > To salvage "interpret-trailers" needs a lot more, as we are > realizing that the definition that led to its external design does > not match the way users use footers in the real world. This affects > the internal data representation and the whole

Re: [PATCH] git_connect: clear GIT_* environment for ssh

2015-09-05 Thread Giuseppe Bilotta
On Sat, Sep 5, 2015 at 12:40 AM, Jeff King wrote: > So here is the patch I would propose. I'm fairly certain it will solve > Giuseppe's problem, though I think there is something else odd going on > here that I don't understand. I'm worried that we're papering over > another

Re: determine name of tag used for checkout when multiple tags exist?

2015-09-05 Thread Jesse Hopkins
On Fri, Sep 4, 2015 at 5:19 AM, John Keeping wrote: > I think it would be a reasonable enhancement to include the branch name > in the reflog message if "-b" is given to "git clone", but I'm not aware > of any (formal) policy on the format of reflog messages so relying on >

Re: More builtin git-am issues..

2015-09-05 Thread Junio C Hamano
Junio C Hamano writes: > Johannes Sixt writes: > >> Why do we need a new rule? The old git-am had a logic that pleased >> everyone, and it must have been implemented somewhere. Shouldn't it be >> sufficient to just re-implement or re-use that logic? > ... >

Re: [PATCH 0/5] disallow test_when_finished in subshells

2015-09-05 Thread John Keeping
On Sat, Sep 05, 2015 at 10:36:29AM -0700, Junio C Hamano wrote: > On Sat, Sep 5, 2015 at 6:12 AM, John Keeping wrote: > > > > I don't think it's worth trying to clear $BASH_SUBSHELL before the tests > > start because to do so we have to reliably detect that we're not running >

[PATCH] Makefile: fix MAKEFLAGS tests with multiple flags

2015-09-05 Thread John Keeping
findstring is defined as $(findstring FIND,IN) so if multiple flags are set these tests do the wrong thing unless $(MAKEFLAGS) is the second argument. Signed-off-by: John Keeping --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile

Standardization of messages - dot after the sentence

2015-09-05 Thread sigo
I've found really "little bug" with dots in the git output. $ git push Everything up-to-date git pull Already up-to-date. Could all phrases contain dots? :) -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majord...@vger.kernel.org More majordomo

Re: More builtin git-am issues..

2015-09-05 Thread Junio C Hamano
Junio C Hamano writes: > But for the purpose of 2.6-rc period, I think we should start from > doing a separate implementation inside builtin/am.c without touching > append_signoff(). > ... > Here is a quick attempt to do the "just fix am regression without > changing anything

[PATCH 3/5] test-lib-functions: support "test_config -C ..."

2015-09-05 Thread John Keeping
If used in a subshell, test_config cannot unset variables at the end of a test. This is a problem when testing submodules because we do not want to "cd" at to top level of a test script in order to run the command inside the submodule. Add a "-C" option to test_config (and test_unconfig) so that

[PATCH 5/5] test-lib-functions: detect test_when_finished in subshell

2015-09-05 Thread John Keeping
test_when_finished does nothing in a subshell because the change to test_cleanup does not affect the parent. There is no POSIX way to detect that we are in a subshell ($$ and $PPID are specified to remain unchanged), but we can detect it on Bash and fall back to ignoring the bug on other shells.

[PATCH 0/5] disallow test_when_finished in subshells

2015-09-05 Thread John Keeping
On Sat, Sep 05, 2015 at 04:54:30AM -0400, Jeff King wrote: > On Fri, Sep 04, 2015 at 11:43:15AM -0700, Junio C Hamano wrote: > > > > t7800 (in its final test) calls test_config in a subshell which has cd'd > > > into a submodule. > > > > > > Is this something worth worrying about, or is it

[PATCH 2/5] t5801: don't use test_when_finished in a subshell

2015-09-05 Thread John Keeping
test_when_finished has no effect in a subshell. Since the cmp_marks function is only used once, inline it at its call site and move the test_when_finished invocation to the start of the test. Signed-off-by: John Keeping --- t/t5801-remote-helpers.sh | 12 1

[PATCH 1/5] t7610: don't use test_config in a subshell

2015-09-05 Thread John Keeping
test_config uses test_when_finished to reset the configuration after the test, but this does not work inside a subshell. This does not cause a problem here because the first thing the next test does is to set this config variable itself, but we are about to add a check that will complain when

Re: [L10N] Kickoff of translation for Git 2.6.0 round 1

2015-09-05 Thread Jiang Xin
2015-09-05 18:02 GMT+08:00 Jean-Noël AVILA : > Le samedi 5 septembre 2015, 10:17:54 Jiang Xin a écrit : >> Hi, >> >> Git v2.6.0-rc0 has been released, and it's time to start new round of git >> l10n. This time there are 123 updated messages need to be translated since >> last

[PATCH 4/5] t7800: don't use test_config in a subshell

2015-09-05 Thread John Keeping
Use the new "-C" option to test_config to change the configuration in the submodule from the top level of the test so that it can be unset correctly when the test finishes. Signed-off-by: John Keeping --- t/t7800-difftool.sh | 8 1 file changed, 4 insertions(+), 4

Re: [L10N] Kickoff of translation for Git 2.6.0 round 1

2015-09-05 Thread Jiang Xin
2015-09-05 21:21 GMT+08:00 John Keeping : > On Sat, Sep 05, 2015 at 09:14:18PM +0800, Jiang Xin wrote: >> 2015-09-05 18:02 GMT+08:00 Jean-Noël AVILA : >> > Le samedi 5 septembre 2015, 10:17:54 Jiang Xin a écrit : >> >> Hi, >> >> >> >> Git v2.6.0-rc0 has been

Re: More builtin git-am issues..

2015-09-05 Thread Junio C Hamano
Junio C Hamano writes: > And a quick attempt without even compilation testing has flaws as > expected X-<. > > Second attempt. ... and I forget the de-dup logic. The third attempt. builtin/am.c | 32 ++-- 1 file changed, 30 insertions(+), 2

[PATCH] interpret-trailers: allow running outside a repository

2015-09-05 Thread John Keeping
It may be useful to run git-interpret-trailers without needing to be in a repository. Signed-off-by: John Keeping --- git.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/git.c b/git.c index 82d7a1c..2431cb0 100644 --- a/git.c +++ b/git.c @@ -417,7

[PATCHv1 2/2] git-p4: work with a detached head

2015-09-05 Thread Luke Diamand
When submitting, git-p4 finds the current branch in order to know if it is allowed to submit (configuration "git-p4.allowSubmit"). On a detached head, detecting the branch would fail, and git-p4 would report a cryptic error. This change teaches git-p4 to recognise a detached head and submit

[PATCHv1 0/2] git-p4: work on a detached head

2015-09-05 Thread Luke Diamand
git-p4 won't submit from a detached head. If you do, it gives a cryptic error message, and instead you have to create an endless series of throw-away branches, which can get very trying. The first patch in this series demonstrates the problem, and the second patch fixes it. I've been using it for

[PATCHv1 1/2] git-p4: add failing test for submit from detached head

2015-09-05 Thread Luke Diamand
git-p4 can't submit from a detached head. This test case demonstrates the problem. Signed-off-by: Luke Diamand --- t/t9800-git-p4-basic.sh | 16 1 file changed, 16 insertions(+) diff --git a/t/t9800-git-p4-basic.sh b/t/t9800-git-p4-basic.sh index

Re: More builtin git-am issues..

2015-09-05 Thread Junio C Hamano
Linus Torvalds writes: > That said, the original "git am" rules actually seem to be rather > straightforward: it's never an issue about "last block of text", and > it's simply an issue of "is there a sign-ff _anywhere_ in the text". > > That simplicity has a

Re: [L10N] Kickoff of translation for Git 2.6.0 round 1

2015-09-05 Thread John Keeping
On Sat, Sep 05, 2015 at 09:14:18PM +0800, Jiang Xin wrote: > 2015-09-05 18:02 GMT+08:00 Jean-Noël AVILA : > > Le samedi 5 septembre 2015, 10:17:54 Jiang Xin a écrit : > >> Hi, > >> > >> Git v2.6.0-rc0 has been released, and it's time to start new round of git > >> l10n. This time

Re: More builtin git-am issues..

2015-09-05 Thread Junio C Hamano
Johannes Sixt writes: > Why do we need a new rule? The old git-am had a logic that pleased > everyone, and it must have been implemented somewhere. Shouldn't it be > sufficient to just re-implement or re-use that logic? If you look at the helper the rewritten "am" calls, you will

Re: More builtin git-am issues..

2015-09-05 Thread Junio C Hamano
Jeff King writes: > [1] I think part of the reason people are interested in "fancy" here is > that this topic extends beyond "git am". There's "commit -s", of > course, but there's also the generic "interpret-trailers" command, > which is supposed to be a

Re: [PATCH] tag: support mixing --sort= and -n

2015-09-05 Thread Karthik Nayak
On Sun, Sep 6, 2015 at 3:55 AM, Jacob Keller wrote: > On Sat, Sep 5, 2015 at 10:52 AM, Rudy Matela wrote: >> >> Allow -n and --sort=version:refname to be used together >> instead of failing with: >> >> fatal: --sort and -n are incompatible >> >>

Re: [PATCH] tag: support mixing --sort= and -n

2015-09-05 Thread Jacob Keller
On Sat, Sep 5, 2015 at 10:52 AM, Rudy Matela wrote: > > Allow -n and --sort=version:refname to be used together > instead of failing with: > > fatal: --sort and -n are incompatible > > Signed-off-by: Rudy Matela Nice! I've been wondering about this one

Re: [PATCH] tag: support mixing --sort= and -n

2015-09-05 Thread Junio C Hamano
Karthik Nayak writes: > On Sun, Sep 6, 2015 at 3:55 AM, Jacob Keller wrote: >> On Sat, Sep 5, 2015 at 10:52 AM, Rudy Matela wrote: >>> >>> Allow -n and --sort=version:refname to be used together >>> instead of failing with: >>>

[PATCH] am: match --signoff to the original scripted version

2015-09-05 Thread Junio C Hamano
Linus noticed that the recently reimplementated "git am -s" defines the trailer block too rigidly, resulting an unnecessary blank line between the existing sign-offs and his new sign-off. An e-mail submission sent to Linus in real life ends with mixture of sign-offs and commentaries, e.g.

Re: [PATCH 0/5] disallow test_when_finished in subshells

2015-09-05 Thread Junio C Hamano
On Sat, Sep 5, 2015 at 6:12 AM, John Keeping wrote: > > I don't think it's worth trying to clear $BASH_SUBSHELL before the tests > start because to do so we have to reliably detect that we're not running > under Bash, and if we don't trust people not to set $BASH_SUBSHELL why

[PATCH v16 12/14] tag.c: use 'ref-filter' APIs

2015-09-05 Thread Karthik Nayak
From: Karthik Nayak Make 'tag.c' use 'ref-filter' APIs for iterating through refs, sorting and printing of refs. This removes most of the code used in 'tag.c' replacing it with calls to the 'ref-filter' library. Make 'tag.c' use the 'filter_refs()' function provided by

[PATCH v16 04/14] ref-filter: introduce handler function for each atom

2015-09-05 Thread Karthik Nayak
Introduce a handler function for each atom, which is called when the atom is processed in show_ref_array_item(). In this context make append_atom() as the default handler function and extract quote_formatting() out of append_atom(). Bump this to the top. Mentored-by: Christian Couder

[PATCH v16 02/14] ref-filter: introduce ref_formatting_state and ref_formatting_stack

2015-09-05 Thread Karthik Nayak
Introduce ref_formatting_state which will hold the formatted output strbuf instead of directly printing to stdout. This will help us in creating modifier atoms which modify the format specified before printing to stdout. Implement a stack machinery for ref_formatting_state, this allows us to push

[PATCH v16 11/14] tag.c: use 'ref-filter' data structures

2015-09-05 Thread Karthik Nayak
From: Karthik Nayak Make 'tag.c' use 'ref-filter' data structures and make changes to support the new data structures. This is a part of the process of porting 'tag.c' to use 'ref-filter' APIs. This is a temporary step before porting 'tag.c' to use 'ref-filter'

[PATCH v16 09/14] ref-filter: add support to sort by version

2015-09-05 Thread Karthik Nayak
From: Karthik Nayak Add support to sort by version using the "v:refname" and "version:refname" option. This is achieved by using the 'versioncmp()' function as the comparing function for qsort. This option is included to support sorting by versions in `git tag -l` which

[PATCH v16 07/14] ref-filter: add option to filter out tags, branches and remotes

2015-09-05 Thread Karthik Nayak
From: Karthik Nayak Add a function called 'for_each_fullref_in()' to refs.{c,h} which iterates through each ref for the given path without trimming the path and also accounting for broken refs, if mentioned. Add 'filter_ref_kind()' in ref-filter.c to check the kind of ref

[PATCH v16 13/14] tag.c: implement '--format' option

2015-09-05 Thread Karthik Nayak
Implement the '--format' option provided by 'ref-filter'. This lets the user list tags as per desired format similar to the implementation in 'git for-each-ref'. Add tests and documentation for the same. Mentored-by: Christian Couder Mentored-by: Matthieu Moy

[PATCH v16 01/14] ref-filter: move `struct atom_value` to ref-filter.c

2015-09-05 Thread Karthik Nayak
Since atom_value is only required for the internal working of ref-filter it doesn't belong in the public header. Helped-by: Eric Sunshine Mentored-by: Christian Couder Mentored-by: Matthieu Moy Signed-off-by:

[PATCH v16 00/14] port tag.c to use ref-filter APIs

2015-09-05 Thread Karthik Nayak
Version 15 can be found here: http://thread.gmane.org/gmane.comp.version-control.git/277012 Changes in this version: * Grammatical changes. * rename cb_data to at_end_data. * rename align_handler() to end_align_handler() and move it next to align_atom_handler(). * introduce match_atom_name() for

[PATCH v16 06/14] ref-filter: implement an `align` atom

2015-09-05 Thread Karthik Nayak
Implement an `align` atom which left-, middle-, or right-aligns the content between %(align:...) and %(end). It is followed by `:,`, where the `` is either left, right or middle and `` is the size of the area into which the content will be placed. If the content between %(align:...) and %(end) is

[PATCH v16 08/14] ref-filter: add support for %(contents:lines=X)

2015-09-05 Thread Karthik Nayak
In 'tag.c' we can print N lines from the annotation of the tag using the '-n' option. Copy code from 'tag.c' to 'ref-filter' and modify it to support appending of N lines from the annotation of tags to the given strbuf. Implement %(contents:lines=X) where X lines of the given object are obtained.

[PATCH v16 05/14] ref-filter: introduce match_atom_name()

2015-09-05 Thread Karthik Nayak
Introduce match_atom_name() which helps in checking if a particular atom is the atom we're looking for and if it has a value attached to it or not. Use it instead of starts_with() for checking the value of %(color:...) atom. Write a test for the same. Mentored-by: Christian Couder

[PATCH v16 10/14] ref-filter: add option to match literal pattern

2015-09-05 Thread Karthik Nayak
From: Karthik Nayak Since 'ref-filter' only has an option to match path names add an option for plain fnmatch pattern-matching. This is to support the pattern matching options which are used in `git tag -l` and `git branch -l` where we can match patterns like `git tag -l

[PATCH v16 14/14] tag.c: implement '--merged' and '--no-merged' options

2015-09-05 Thread Karthik Nayak
Use 'ref-filter' APIs to implement the '--merged' and '--no-merged' options into 'tag.c'. The '--merged' option lets the user to only list tags merged into the named commit. The '--no-merged' option lets the user to only list tags not merged into the named commit. If no object is provided it

Re: [PATCH 0/5] disallow test_when_finished in subshells

2015-09-05 Thread Junio C Hamano
>> Isn't it just the matter of resetting the variable regardless of $BASH >> (and ignoring >> a possible refusal to do so under bash) at the beginning of the test, or do >> you >> really have to rely on the value of $BASH and do things differently? > > Bash doesn't refuse to set it, it lets you