[RFC v2] git-multimail: a replacement for post-receive-email

2013-01-27 Thread Michael Haggerty
A while ago, I submitted an RFC for adding a new email notification script to contrib [1]. The reaction seemed favorable and it was suggested that the new script should replace post-receive-email rather than be added separately, ideally with some kind of migration support. I've been working on

Re: [PATCH v3 6/8] git-remote-testpy: hash bytes explicitly

2013-01-27 Thread Michael Haggerty
On 01/27/2013 06:30 AM, Sverre Rabbelier wrote: On Sat, Jan 26, 2013 at 8:44 PM, Michael Haggerty mhag...@alum.mit.edu wrote: So to handle all of the cases across Python versions as closely as possible to the old 2.x code, it might be necessary to make the code explicitly depend on the

Re: [PATCH 2/2] mergetools: Make tortoisemerge work with

2013-01-27 Thread Sven Strickroth
Am 26.01.2013 08:10 schrieb David Aguilar: These patches look correct (I do not have the tool to test) but I think we should fixup this commit message. How about something like... mergetools: Teach tortoisemerge about TortoiseGitMerge TortoiseGitMerge improved its syntax to allow for

Re: [PATCH] tests: turn on test-lint-shell-syntax by default

2013-01-27 Thread Jonathan Nieder
Hi, Torsten Bögershausen wrote: On 15.01.13 21:38, Junio C Hamano wrote: Torsten Bögershausen tbo...@web.de writes: What do we think about something like this for fishing for which: [...] +which () { + echo 2 which is not portable (please use type) + exit 1 +} [...] if (

Re: [PATCH 2/2] fetch-pack: avoid repeatedly re-scanning pack directory

2013-01-27 Thread Jonathan Nieder
Hi, Jeff King wrote: When we look up a sha1 object for reading, we first check packfiles, and then loose objects. If we still haven't found it, we re-scan the list of packfiles in `objects/pack`. This final step ensures that we can co-exist with a simultaneous repack process which creates a

Behavior of stash apply vs merge

2013-01-27 Thread Robin Rosenberg
Hi, What good reason is it that 'git stash apply' gives hairy conflict markers, while 'git merge stash' does not. No renames involved. -- robin -- 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

Re: [PATCH v2 3/3] branch: mark more strings for translation

2013-01-27 Thread Jonathan Nieder
Nguyễn Thái Ngọc Duy wrote: --- a/builtin/branch.c +++ b/builtin/branch.c @@ -466,7 +466,7 @@ static void add_verbose_info(struct strbuf *out, struct ref_item *item, int verbose, int abbrev) { struct strbuf subject = STRBUF_INIT, stat = STRBUF_INIT; -

Re: [PATCH v2 2/3] branch: give a more helpful message on redundant arguments

2013-01-27 Thread Jonathan Nieder
Nguyễn Thái Ngọc Duy wrote: --- a/builtin/branch.c +++ b/builtin/branch.c @@ -852,14 +852,14 @@ int cmd_branch(int argc, const char **argv, const char *prefix) const char *branch_name; struct strbuf branch_ref = STRBUF_INIT; - if (detached) -

Re: [PATCH v2] add: warn when -u or -A is used without filepattern

2013-01-27 Thread Jonathan Nieder
Hi Matthieu, Matthieu Moy wrote: --- a/builtin/add.c +++ b/builtin/add.c [...] @@ -392,8 +420,14 @@ int cmd_add(int argc, const char **argv, const char *prefix) die(_(-A and -u are mutually incompatible)); if (!show_only ignore_missing) die(_(Option

[PATCH v4 0/2] for-each-repo: new command for multi-repo operations

2013-01-27 Thread Lars Hjemli
Changes since v3: * option -x used to execute non-git commands * option -z used to NUL-terminate paths * write_name_quoted() used to print repo paths * repos are handled in sorted order (as defined by strcmp(3)) to get predictable output from the command * unsetenv() reintroduced to avoid

[PATCH v4 2/2] git: rewrite `git -a` to become a git-for-each-repo command

2013-01-27 Thread Lars Hjemli
With this rewriting, it is now possible to run e.g. `git -ad gui` to start up git-gui in each repo within the current directory which contains uncommited work. Signed-off-by: Lars Hjemli hje...@gmail.com --- git.c| 36 +++ t/t6400-for-each-repo.sh | 63

Re: [PATCH] tests: turn on test-lint-shell-syntax by default

2013-01-27 Thread Torsten Bögershausen
On 27.01.13 10:31, Jonathan Nieder wrote: Hi, Torsten Bögershausen wrote: On 15.01.13 21:38, Junio C Hamano wrote: Torsten Bögershausen tbo...@web.de writes: What do we think about something like this for fishing for which: [...] +which () { + echo 2 which is not portable (please

Re: git-svn problems with white-space in tag names

2013-01-27 Thread Hans-Juergen Euler
This seems to be a problem of the windows version. At least with its complete severity. Installed git on Ubuntu in a virtual machine was able to clone the subversion repos past the tag with the white-space at the end. I am not sure but apparently this tag has not been converted. The git repos I

Re: [PATCH v3 6/8] git-remote-testpy: hash bytes explicitly

2013-01-27 Thread John Keeping
On Sun, Jan 27, 2013 at 05:44:37AM +0100, Michael Haggerty wrote: On 01/26/2013 10:44 PM, Junio C Hamano wrote: John Keeping j...@keeping.me.uk writes: @@ -45,7 +45,7 @@ def get_repo(alias, url): repo.get_head() hasher = _digest() -hasher.update(repo.path) +

Re: [PATCH v3 6/8] git-remote-testpy: hash bytes explicitly

2013-01-27 Thread John Keeping
On Sat, Jan 26, 2013 at 09:30:00PM -0800, Junio C Hamano wrote: Michael Haggerty mhag...@alum.mit.edu writes: This will still fail under Python 2.x if repo.path is a byte string that contains non-ASCII characters. And it will fail under Python 3.1 and later if repo.path contains

Re: [PATCH 0/7] guilt patches, including git 1.8 support

2013-01-27 Thread Josef 'Jeff' Sipek
On Tue, Jan 15, 2013 at 06:26:06PM -0800, Jonathan Nieder wrote: Hi Jeff and other guilty parties, I collected all the guilt patches I could find on-list and added one of my own. Completely untested, except for running the regression tests. These are also available via git protocol from

[PATCH] git-remote-testpy: fix patch hashing on Python 3

2013-01-27 Thread John Keeping
When this change was originally made (0846b0c - git-remote-testpy: hash bytes explicitly , I didn't realised that the hex encoding we chose is a bytes to bytes encoding so it just fails with an error on Python 3 in the same way as the original code. It is not possible to provide a single code

[PATCH v2] Reduce false positive in check-non-portable-shell.pl

2013-01-27 Thread Torsten Bögershausen
check-non-portable-shell.pl is using simple regular expressions to find illegal shell syntax. Improve the expressions and reduce the chance for false positves: sed -i must be followed by 1..n whitespace and 1 non whitespace declare must be followed by 1..n whitespace and 1 non whitespace echo -n

[RFC] test-lib.sh: No POSIXPERM for cygwin

2013-01-27 Thread Torsten Bögershausen
t0070 and t1301 fail when running the test suite under cygwin. Skip the failing tests by unsetting POSIXPERM. Signed-off-by: Torsten Bögershausen tbo...@web.de --- t/test-lib.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/t/test-lib.sh b/t/test-lib.sh index 1a6c4ab..94b097e 100644 ---

Re: [PATCH v2] add: warn when -u or -A is used without filepattern

2013-01-27 Thread Matthieu Moy
Junio C Hamano gits...@pobox.com writes: Matthieu Moy matthieu@imag.fr writes: Most git commands that can be used with our without a filepattern are tree-wide by default, the filepattern being used to restrict their scope. A few exceptions are: 'git grep', 'git clean', 'git add -u' and

mergetool: include custom tools in '--tool-help'

2013-01-27 Thread John Keeping
'git mergetool --tool-help' only lists builtin tools, not those that the user has configured via a 'mergetool.tool.cmd' config value. Fix this by inspecting the tools configured in this way and adding them to the available and unavailable lists before displaying them. Signed-off-by: John Keeping

Re: [PATCH] tests: turn on test-lint-shell-syntax by default

2013-01-27 Thread Junio C Hamano
Jonathan Nieder jrnie...@gmail.com writes: ... With the above definition of which, the only sign of a mistake would be some extra output to stderr (which is quelled when running tests in the normal way). The exit is caught by the subshell and just makes the if condition false. That's not

Re: [PATCH] tests: turn on test-lint-shell-syntax by default

2013-01-27 Thread Junio C Hamano
Torsten Bögershausen tbo...@web.de writes: Back to the which: ... and running make test gives the following, at least in my system: ... I think everybody involved in this discussion already knows that; the point is that it can easily give false negative, without the scripts working very hard

Re: [PATCH 2/2] mergetools: Make tortoisemerge work with

2013-01-27 Thread Junio C Hamano
Sven Strickroth sven.strickr...@tu-clausthal.de writes: Am 26.01.2013 08:10 schrieb David Aguilar: These patches look correct (I do not have the tool to test) but I think we should fixup this commit message. How about something like... mergetools: Teach tortoisemerge about

Re: Behavior of stash apply vs merge

2013-01-27 Thread Junio C Hamano
Robin Rosenberg robin.rosenb...@dewire.com writes: What good reason is it that 'git stash apply' gives hairy conflict markers, while 'git merge stash' does not. No renames involved. git merge stash is nonsensical and would do a vastly different thing compared to git stash apply depending on

Re: [git-multimail] License unknown (#1)

2013-01-27 Thread Michael Haggerty
I have a question about the license of contrib/hooks/post-commit-email. I had assumed that since it is in the git project, which is GPLv2, and since it contains no contrary information, it would by implication also fall under GPLv2. But the file itself contains no explicit license information,

Re: [PATCH v4 1/2] for-each-repo: new command used for multi-repo operations

2013-01-27 Thread Junio C Hamano
Lars Hjemli hje...@gmail.com writes: When working with multiple, unrelated (or loosly related) git repos, there is often a need to locate all repos with uncommitted work and perform some action on them (say, commit and push). Before this patch, such tasks would require manually visiting all

Re: Behavior of stash apply vs merge

2013-01-27 Thread Robin Rosenberg
Thanks. Feeling a bit studid now. I was actually thinking about using merge to implement stash apply in JGit. What we have is broken so I tried using merge to implement it and them compared to git merge --no-commit.. FAIL. The main difference is of course that I set the merge base to stash^1,

Re: Behavior of stash apply vs merge

2013-01-27 Thread Junio C Hamano
Robin Rosenberg robin.rosenb...@dewire.com writes: Thanks. Feeling a bit studid now. I was actually thinking about using merge to implement stash apply in JGit. What we have is broken so I tried using merge to implement it and them compared to git merge --no-commit.. FAIL. Do you have

Re: [PATCH v4 1/2] for-each-repo: new command used for multi-repo operations

2013-01-27 Thread John Keeping
On Sun, Jan 27, 2013 at 11:04:08AM -0800, Junio C Hamano wrote: One more thing that nobody brought up during the previous reviews is if we want to support subset of repositories by allowing the standard pathspec match mechanism. For example, git for-each-repo -d git diff --name-only

Re: [PATCH v4 1/2] for-each-repo: new command used for multi-repo operations

2013-01-27 Thread Junio C Hamano
John Keeping j...@keeping.me.uk writes: On Sun, Jan 27, 2013 at 11:04:08AM -0800, Junio C Hamano wrote: One more thing that nobody brought up during the previous reviews is if we want to support subset of repositories by allowing the standard pathspec match mechanism. For example,

Re: [PATCH] git-remote-testpy: fix patch hashing on Python 3

2013-01-27 Thread Junio C Hamano
John Keeping j...@keeping.me.uk writes: When this change was originally made (0846b0c - git-remote-testpy: hash bytes explicitly , I didn't realised that the hex encoding we chose is a bytes to bytes encoding so it just fails with an error on Python 3 in the same way as the original code.

Re: Behavior of stash apply vs merge

2013-01-27 Thread Robin Rosenberg
- Ursprungligt meddelande - Robin Rosenberg robin.rosenb...@dewire.com writes: Thanks. Feeling a bit studid now. I was actually thinking about using merge to implement stash apply in JGit. What we have is broken so I tried using merge to implement it and them compared to git

Re: [PATCH] git-remote-testpy: fix patch hashing on Python 3

2013-01-27 Thread John Keeping
On Sun, Jan 27, 2013 at 11:49:39AM -0800, Junio C Hamano wrote: John Keeping j...@keeping.me.uk writes: When this change was originally made (0846b0c - git-remote-testpy: hash bytes explicitly , I didn't realised that the hex encoding we chose is a bytes to bytes encoding so it just fails

Re: [PATCH 2/2] fetch-pack: avoid repeatedly re-scanning pack directory

2013-01-27 Thread Junio C Hamano
Jonathan Nieder jrnie...@gmail.com writes: Jeff King wrote: When we look up a sha1 object for reading, we first check packfiles, and then loose objects. If we still haven't found it, we re-scan the list of packfiles in `objects/pack`. This final step ensures that we can co-exist with a

Re: [PATCH] git-remote-testpy: fix patch hashing on Python 3

2013-01-27 Thread Junio C Hamano
John Keeping j...@keeping.me.uk writes: Thanks; will queue and wait for an Ack from Michael. Does the helper function need to be named with leading underscore, though? ... Since this is a script not a library module I don't feel strongly about it in this case. That is exactly why I

Re: mergetool: include custom tools in '--tool-help'

2013-01-27 Thread Junio C Hamano
John Keeping j...@keeping.me.uk writes: I think I'd want to do this with a suffix if at all, so the output would be like this: 'git mergetool --tool=tool' may be set to one of the following: araxis gvimdiff gvimdiff2 mytool

Re: [PATCH] git-remote-testpy: fix patch hashing on Python 3

2013-01-27 Thread John Keeping
On Sun, Jan 27, 2013 at 12:11:20PM -0800, Junio C Hamano wrote: John Keeping j...@keeping.me.uk writes: Thanks; will queue and wait for an Ack from Michael. Does the helper function need to be named with leading underscore, though? ... Since this is a script not a library module

Re: [PATCH] tests: turn on test-lint-shell-syntax by default

2013-01-27 Thread Junio C Hamano
Junio C Hamano gits...@pobox.com writes: If we did not care about incurring runtime performance cost, we could arrange: ... Then you can wrap commands whose use we want to limit, perhaps like this, in the test framework: ... sed () { ... done if test -z

Re: [PATCH v2] add: warn when -u or -A is used without filepattern

2013-01-27 Thread Junio C Hamano
Matthieu Moy matthieu@grenoble-inp.fr writes: Plus, option_with_implicit_dot is used in cut-and-paste ready commands below. I do not think we should aim for easy cut-and-paste, especially when the real purpose of the change is to train people's fingers; the message should discouraging

Re: [PATCH] git-remote-testpy: fix patch hashing on Python 3

2013-01-27 Thread Junio C Hamano
John Keeping j...@keeping.me.uk writes: On Sun, Jan 27, 2013 at 12:11:20PM -0800, Junio C Hamano wrote: John Keeping j...@keeping.me.uk writes: Thanks; will queue and wait for an Ack from Michael. Does the helper function need to be named with leading underscore, though? ...

Re: [PATCH] git-remote-testpy: fix patch hashing on Python 3

2013-01-27 Thread Junio C Hamano
Junio C Hamano gits...@pobox.com writes: John Keeping j...@keeping.me.uk writes: So I think the answer is habit, but I probably shouldn't have put it in in this case. OK, then I'll queue with a local amend to drop the leading underscore. So this is what I will be queuing (I'd appreciate

Re: mergetool: include custom tools in '--tool-help'

2013-01-27 Thread David Aguilar
On Sun, Jan 27, 2013 at 12:13 PM, Junio C Hamano gits...@pobox.com wrote: John Keeping j...@keeping.me.uk writes: I think I'd want to do this with a suffix if at all, so the output would be like this: 'git mergetool --tool=tool' may be set to one of the following: araxis

[PATCH 0/4] Documentation: Auto-generate merge tool lists

2013-01-27 Thread David Aguilar
Refactor the mergetool-lib so that we can reuse it in Documentation/Makefile. The end result is that the diff.tool and merge.tool documentation now includes an auto-generated list of all available tools. This applies on top of jk/mergetool in pu. David Aguilar (4): mergetool--lib: Simplify

[PATCH 2/4] mergetool--lib: Improve the help text in guess_merge_tool()

2013-01-27 Thread David Aguilar
This code path is only activated when the user does not have a valid configured tool. Add a message to guide new users towards configuring a default tool. Signed-off-by: David Aguilar dav...@gmail.com --- git-mergetool--lib.sh | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff

[PATCH 3/4] mergetool--lib: Add functions for finding available tools

2013-01-27 Thread David Aguilar
Refactor show_tool_help() so that the tool-finding logic is broken out into separate functions. Signed-off-by: David Aguilar dav...@gmail.com --- git-mergetool--lib.sh | 60 +-- 1 file changed, 34 insertions(+), 26 deletions(-) diff --git

[PATCH 4/4] doc: Generate a list of valid merge tools

2013-01-27 Thread David Aguilar
Use the new filter_tools() function to build lists of all the built-in tools supported by difftool and mergetool. This frees us from needing to update the documentation whenever a new tool is added. Signed-off-by: David Aguilar dav...@gmail.com --- Documentation/.gitignore | 1 +

Re: [PATCH 1/4] mergetool--lib: Simplify command expressions

2013-01-27 Thread Johannes Sixt
Am 27.01.2013 22:24, schrieb David Aguilar: Use $(command $arg) instead of $(command $arg) as the latter is harder to read. If at all, you should restrict yourself to simplify only variable assignments. Because this case: - if test -z $(get_merge_tool_cmd $merge_tool) + if test -z

Re: [PATCH 1/4] mergetool--lib: Simplify command expressions

2013-01-27 Thread David Aguilar
On Sun, Jan 27, 2013 at 2:08 PM, Johannes Sixt j...@kdbg.org wrote: Am 27.01.2013 22:24, schrieb David Aguilar: Use $(command $arg) instead of $(command $arg) as the latter is harder to read. If at all, you should restrict yourself to simplify only variable assignments. Because this case:

Re: [PATCH 1/4] mergetool--lib: Simplify command expressions

2013-01-27 Thread Junio C Hamano
David Aguilar dav...@gmail.com writes: Use $(command $arg) instead of $(command $arg) as the latter is harder to read. Did you miss my comment that this is about RHS of an assignment? -- To unsubscribe from this list: send the line unsubscribe git in the body of a message to

Re: [PATCH 3/4] mergetool--lib: Add functions for finding available tools

2013-01-27 Thread Johannes Sixt
Am 27.01.2013 22:24, schrieb David Aguilar: Refactor show_tool_help() so that the tool-finding logic is broken out into separate functions. Signed-off-by: David Aguilar dav...@gmail.com --- git-mergetool--lib.sh | 60 +-- 1 file changed,

Re: [PATCH 3/4] mergetool--lib: Add functions for finding available tools

2013-01-27 Thread Junio C Hamano
David Aguilar dav...@gmail.com writes: Refactor show_tool_help() so that the tool-finding logic is broken out into separate functions. Signed-off-by: David Aguilar dav...@gmail.com --- git-mergetool--lib.sh | 60 +-- 1 file changed, 34

Re: [PATCH 1/4] mergetool--lib: Simplify command expressions

2013-01-27 Thread Junio C Hamano
David Aguilar dav...@gmail.com writes: Definitely. I learned this the hard way when the tests broke on me while working it ;-) My patch rewrites things to always use var=$(command) expressions with separate test $var evaluating them. OK; that wasn't clear from the log message. -- To

Re: [PATCH 4/4] doc: Generate a list of valid merge tools

2013-01-27 Thread Junio C Hamano
David Aguilar dav...@gmail.com writes: +mergetools_txt = mergetools-diff.txt mergetools-merge.txt + +$(mergetools_txt): mergetools-list.made + +mergetools-list.made: ../git-mergetool--lib.sh $(wildcard ../mergetools/*) + $(QUIET_GEN)$(RM) $@ \ + $(SHELL_PATH) -c

Re: [PATCH] git-remote-testpy: fix patch hashing on Python 3

2013-01-27 Thread John Keeping
On Sun, Jan 27, 2013 at 12:47:09PM -0800, Junio C Hamano wrote: I remember that I earlier asked somewhere if we want to say Python 3.x that is older than 3.y is unsupported http://thread.gmane.org/gmane.comp.version-control.git/213920/focus=213926 but I was told that we will support

Re: [PATCH 3/4] mergetool--lib: Add functions for finding available tools

2013-01-27 Thread John Keeping
On Sun, Jan 27, 2013 at 01:24:45PM -0800, David Aguilar wrote: +filter_tools () { + filter=$1 + prefix=$2 + ( + cd $MERGE_TOOLS_DIR + for i in * + do + echo $i + done + ) | sort | while read tool +

Re: [PATCH 2/4] mergetool--lib: Improve the help text in guess_merge_tool()

2013-01-27 Thread Junio C Hamano
David Aguilar dav...@gmail.com writes: This code path is only activated when the user does not have a valid configured tool. Add a message to guide new users towards configuring a default tool. Signed-off-by: David Aguilar dav...@gmail.com --- git-mergetool--lib.sh | 9 - 1 file

Re: [PATCH] git-remote-testpy: fix patch hashing on Python 3

2013-01-27 Thread Junio C Hamano
John Keeping j...@keeping.me.uk writes: On Sun, Jan 27, 2013 at 12:47:09PM -0800, Junio C Hamano wrote: I remember that I earlier asked somewhere if we want to say Python 3.x that is older than 3.y is unsupported

Re: [PATCH 2/2] fetch-pack: avoid repeatedly re-scanning pack directory

2013-01-27 Thread Jonathan Nieder
Junio C Hamano wrote: It is not about a rough estimate nor common commits, though. The everything local check in question is interested in only one thing: are we _clearly_ up to date without fetching anything from them? [...] Jonathan Nieder jrnie...@gmail.com writes: * Why is 49bb805e

Re: [PATCH 3/4] mergetool--lib: Add functions for finding available tools

2013-01-27 Thread Junio C Hamano
David Aguilar dav...@gmail.com writes: +filter_tools () { + filter=$1 + prefix=$2 + ( + cd $MERGE_TOOLS_DIR + for i in * + do + echo $i + done + ) | sort | while read tool + do +

Re: [PATCH v2 03/10] t/t3511: add some tests of 'cherry-pick -s' functionality

2013-01-27 Thread Jonathan Nieder
Brandon Casey wrote: I'll tweak the string so it looks like this: The signed-off-by string should begin with the words Signed-off-by followed by a colon and space, and then the signers name and email address. e.g. Signed-off-by:

Re: [PATCH v2 03/10] t/t3511: add some tests of 'cherry-pick -s' functionality

2013-01-27 Thread Brandon Casey
On Tue, Jan 22, 2013 at 12:17 AM, Jonathan Nieder jrnie...@gmail.com wrote: Brandon Casey wrote: --- /dev/null +++ b/t/t3511-cherry-pick-x.sh [...] +test_expect_failure 'cherry-pick -s inserts blank line after non-conforming footer' ' IIUC this is an illustration of false-positives from

Re: [PATCH 3/4] mergetool--lib: Add functions for finding available tools

2013-01-27 Thread David Aguilar
On Sun, Jan 27, 2013 at 3:32 PM, Junio C Hamano gits...@pobox.com wrote: David Aguilar dav...@gmail.com writes: +filter_tools () { + filter=$1 + prefix=$2 + ( + cd $MERGE_TOOLS_DIR + for i in * + do + echo $i +

Re: [PATCH 4/4] doc: Generate a list of valid merge tools

2013-01-27 Thread Junio C Hamano
David Aguilar dav...@gmail.com writes: diff --git a/Documentation/Makefile b/Documentation/Makefile index 267dfe1..f595d26 100644 --- a/Documentation/Makefile +++ b/Documentation/Makefile @@ -226,13 +226,27 @@ cmd-list.made: cmd-list.perl ../command-list.txt $(MAN1_TXT) $(PERL_PATH)

Re: [PATCH v2 06/10] sequencer.c: teach append_signoff how to detect duplicate s-o-b

2013-01-27 Thread Brandon Casey
On Tue, Jan 22, 2013 at 12:38 AM, Jonathan Nieder jrnie...@gmail.com wrote: Brandon Casey wrote: Teach append_signoff how to detect a duplicate s-o-b in the commit footer. This is in preparation to unify the append_signoff implementations in log-tree.c and sequencer.c. [...] ---

[PATCH v2 0/4] Auto-generate mergetool lists

2013-01-27 Thread David Aguilar
This is round two of this series. I think this touched on everything brought up in the code review. 4/4 could use a review as I'm not completely familiar with the makefile dependencies, though it seems to work correctly. David Aguilar (4): mergetool--lib: Simplify command expressions

[PATCH v2 1/4] mergetool--lib: Simplify command expressions

2013-01-27 Thread David Aguilar
Update variable assignments to always use $(command $arg) in their RHS instead of $(command $arg) as the latter is harder to read. Make get_merge_tool_cmd() simpler by avoiding echo and $(command) substitutions completely. Signed-off-by: David Aguilar dav...@gmail.com --- I reworded the commit

[PATCH v2 2/4] mergetool--lib: Improve the help text in guess_merge_tool()

2013-01-27 Thread David Aguilar
This code path is only activated when the user does not have a valid configured tool. Add a message to guide new users towards configuring a default tool. Signed-off-by: David Aguilar dav...@gmail.com --- This now uses a cat here-doc. git-mergetool--lib.sh | 7 ++- 1 file changed, 6

[PATCH v2 3/4] mergetool--lib: Add functions for finding available tools

2013-01-27 Thread David Aguilar
Refactor show_tool_help() so that the tool-finding logic is broken out into a separate show_tool_names() function. Signed-off-by: David Aguilar dav...@gmail.com --- filter_tools renamed to show_tool_names() and simplfied to use ls -1. show_tool_names() now has a preamble as discussed.

[PATCH v2 4/4] doc: Generate a list of valid merge tools

2013-01-27 Thread David Aguilar
Use the show_tool_names() function to build lists of all the built-in tools supported by difftool and mergetool. This frees us from needing to update the documentation whenever a new tool is added. Signed-off-by: David Aguilar dav...@gmail.com --- Adjusted to use show_tool_names() and reworked

[PATCH v3 00/11] unify appending of sob

2013-01-27 Thread Brandon Casey
Round 3. -Brandon Brandon Casey (9): sequencer.c: rework search for start of footer to improve clarity commit, cherry-pick -s: remove broken support for multiline rfc2822 fields t/test-lib-functions.sh: allow to specify the tag name to test_commit t/t3511: add some tests of

[PATCH v3 01/11] sequencer.c: rework search for start of footer to improve clarity

2013-01-27 Thread Brandon Casey
This code sequence is somewhat difficult to read. Let's rewrite it using more descriptive variable names to try to make it easier to understand. Signed-off-by: Brandon Casey draf...@gmail.com --- sequencer.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git

[PATCH v3 02/11] commit, cherry-pick -s: remove broken support for multiline rfc2822 fields

2013-01-27 Thread Brandon Casey
Starting with c1e01b0c (commit: More generous accepting of RFC-2822 footer lines, 2009-10-28), git commit -s carefully parses the last paragraph of each commit message to check if it consists only of RFC2822-style headers, in which case the signoff will be added as a new line in the same list:

[PATCH v3 03/11] t/test-lib-functions.sh: allow to specify the tag name to test_commit

2013-01-27 Thread Brandon Casey
The message part of test_commit() may not be appropriate for a tag name. So let's allow test_commit to accept a fourth argument to specify the tag name. Signed-off-by: Brandon Casey bca...@nvidia.com Reviewed-by: Jonathan Nieder jrnie...@gmail.com --- t/test-lib-functions.sh | 8 1 file

[PATCH v3 04/11] t/t3511: add some tests of 'cherry-pick -s' functionality

2013-01-27 Thread Brandon Casey
Add some tests to ensure that 'cherry-pick -s' operates in the following manner: * Inserts a blank line before appending a s-o-b to a commit message that does not contain a s-o-b footer * Does not mistake first line subject: description as a s-o-b footer * Does not mistake single

[PATCH v3 05/11] sequencer.c: recognize (cherry picked from ... as part of s-o-b footer

2013-01-27 Thread Brandon Casey
When 'cherry-pick -s' is used to append a signed-off-by line to a cherry picked commit, it does not currently detect the (cherry picked from... that may have been appended by a previous 'cherry-pick -x' as part of the s-o-b footer and it will insert a blank line before appending a new s-o-b.

[PATCH v3 06/11] sequencer.c: always separate (cherry picked from from commit body

2013-01-27 Thread Brandon Casey
Start treating the (cherry picked from line added by cherry-pick -x the same way that the s-o-b lines are treated. Namely, separate them from the main commit message body with an empty line. This commit is mostly a code movement, but notice that has_conforming_footer() was modified, in addition

[PATCH v3 08/11] sequencer.c: teach append_signoff to avoid adding a duplicate newline

2013-01-27 Thread Brandon Casey
Teach append_signoff to detect whether a blank line exists at the position that the signed-off-by line will be added, and avoid adding an additional one if one already exists. This is necessary to allow format-patch to add a s-o-b to a patch with no commit message without adding an extra newline.

[PATCH v3 09/11] t4014: more tests about appending s-o-b lines

2013-01-27 Thread Brandon Casey
From: Nguyễn Thái Ngọc Duy pclo...@gmail.com [bc: Squash the tests from Duy's original unify-appending-sob series. Fix test 90 signoff: some random signoff-alike and mark as failing. Correct behavior should insert a blank line after message body and signed-off-by. Add two

[PATCH v3 10/11] format-patch: update append_signoff prototype

2013-01-27 Thread Brandon Casey
From: Nguyễn Thái Ngọc Duy pclo...@gmail.com This is a preparation step for merging with append_signoff from sequencer.c Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com Signed-off-by: Brandon Casey bca...@nvidia.com --- builtin/log.c | 13 + log-tree.c| 17

[PATCH v3 11/11] Unify appending signoff in format-patch, commit and sequencer

2013-01-27 Thread Brandon Casey
There are two implementations of append_signoff in log-tree.c and sequencer.c, which do more or less the same thing. Unify on top of the sequencer.c implementation. Add a test in t4014 to demonstrate support for non-s-o-b elements in the commit footer provided by sequence.c:append_sob. Mark

[PATCH v3 2/4] branch: reject -D/-d without branch name

2013-01-27 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com --- builtin/branch.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/builtin/branch.c b/builtin/branch.c index ea6498b..30c4545 100644 --- a/builtin/branch.c +++ b/builtin/branch.c @@ -837,9 +837,11 @@ int

[PATCH v3 3/4] branch: give a more helpful message on redundant arguments

2013-01-27 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com --- builtin/branch.c | 4 ++-- t/t3200-branch.sh | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/builtin/branch.c b/builtin/branch.c index 30c4545..ca61c5b 100644 --- a/builtin/branch.c +++ b/builtin/branch.c @@

[PATCH v3 4/4] branch: mark more strings for translation

2013-01-27 Thread Nguyễn Thái Ngọc Duy
Reviewed-by: Jonathan Nieder jrnie...@gmail.com Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com --- On Sun, Jan 27, 2013 at 6:55 PM, Jonathan Nieder jrnie...@gmail.com wrote: For what it's worth, assuming this passes tests, It passes the tests. Although I doubt the tests are written to

Re: [PATCH v2 04/10] sequencer.c: recognize (cherry picked from ... as part of s-o-b footer

2013-01-27 Thread Jonathan Nieder
Hi, Brandon Casey wrote: Let's detect (cherry picked from...) as part of the footer so that we will produce this: Signed-off-by: A U Thor aut...@example.com (cherry picked from da39a3ee5e6b4b0d3255bfef95601890afd80709) Signed-off-by: C O Mmitter commit...@example.com instead of

Re: [PATCH v3 01/11] sequencer.c: rework search for start of footer to improve clarity

2013-01-27 Thread Jonathan Nieder
Brandon Casey wrote: --- a/sequencer.c +++ b/sequencer.c @@ -1024,16 +1024,19 @@ int sequencer_pick_revisions(struct replay_opts *opts) static int ends_rfc2822_footer(struct strbuf *sb, int ignore_footer) { int ch; - int hit = 0; + int last_char_was_nl, this_char_is_nl;

Re: [PATCH v3 02/11] commit, cherry-pick -s: remove broken support for multiline rfc2822 fields

2013-01-27 Thread Jonathan Nieder
Brandon Casey wrote: sequencer.c | 6 -- 1 file changed, 6 deletions(-) Nice simplification. Reviewed-by: Jonathan Nieder jrnie...@gmail.com -- 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

Re: [PATCH v2 06/10] sequencer.c: teach append_signoff how to detect duplicate s-o-b

2013-01-27 Thread Junio C Hamano
Brandon Casey draf...@gmail.com writes: On Tue, Jan 22, 2013 at 12:38 AM, Jonathan Nieder jrnie...@gmail.com wrote: Brandon Casey wrote: Teach append_signoff how to detect a duplicate s-o-b in the commit footer. This is in preparation to unify the append_signoff implementations in

Re: [PATCH v3 04/11] t/t3511: add some tests of 'cherry-pick -s' functionality

2013-01-27 Thread Jonathan Nieder
Brandon Casey wrote: --- /dev/null +++ b/t/t3511-cherry-pick-x.sh @@ -0,0 +1,111 @@ +#!/bin/sh + +test_description='Test cherry-pick -x and -s' + +. ./test-lib.sh + +pristine_detach () { + git cherry-pick --quit + git checkout -f $1^0 + git read-tree -u --reset HEAD +

Re: [PATCH v2 0/4] Auto-generate mergetool lists

2013-01-27 Thread Junio C Hamano
I think our works crossed, while I was tweaking the previous series to push out as part of 'pu' you were already rerolling. Could you compare this series with what I pushed out and see if anything you missed? I think I fixed the (a b || c d) issue in the version I pushed out, but it is still

Re: [PATCH v2 4/4] doc: Generate a list of valid merge tools

2013-01-27 Thread Junio C Hamano
David Aguilar dav...@gmail.com writes: Use the show_tool_names() function to build lists of all the built-in tools supported by difftool and mergetool. This frees us from needing to update the documentation whenever a new tool is added. Signed-off-by: David Aguilar dav...@gmail.com ---

Re: [PATCH v2 0/4] Auto-generate mergetool lists

2013-01-27 Thread David Aguilar
On Sun, Jan 27, 2013 at 6:08 PM, Junio C Hamano gits...@pobox.com wrote: I think our works crossed, while I was tweaking the previous series to push out as part of 'pu' you were already rerolling. Could you compare this series with what I pushed out and see if anything you missed? I think I

Re: [PATCH v3 05/11] sequencer.c: recognize (cherry picked from ... as part of s-o-b footer

2013-01-27 Thread Jonathan Nieder
Brandon Casey wrote: Let's detect (cherry picked from...) as part of the footer so that we will produce this: Signed-off-by: A U Thor aut...@example.com (cherry picked from da39a3ee5e6b4b0d3255bfef95601890afd80709) Signed-off-by: C O Mmitter commit...@example.com instead of this:

Re: [PATCH v3 06/11] sequencer.c: always separate (cherry picked from from commit body

2013-01-27 Thread Jonathan Nieder
Brandon Casey wrote: --- a/sequencer.c +++ b/sequencer.c @@ -20,6 +20,67 @@ [...] static int has_conforming_footer(struct strbuf *sb, int ignore_footer) [...] + /* require at least one blank line */ + if (!last_char_was_nl || buf[i] != '\n') + return 0; Makes sense.

Re: [PATCH v2 0/4] Auto-generate mergetool lists

2013-01-27 Thread David Aguilar
On Sun, Jan 27, 2013 at 6:27 PM, Junio C Hamano gits...@pobox.com wrote: David Aguilar dav...@gmail.com writes: On Sun, Jan 27, 2013 at 6:08 PM, Junio C Hamano gits...@pobox.com wrote: I think our works crossed, while I was tweaking the previous series to push out as part of 'pu' you were

Re: [PATCH v3 05/11] sequencer.c: recognize (cherry picked from ... as part of s-o-b footer

2013-01-27 Thread Jonathan Nieder
Jonathan Nieder wrote: Here's the tweak I suggested last time. I think its behavior is slightly better in the ends with incomplete line case because it limits the characters examined by is_rfc2822_line() and is_cherry_picked_from_line() not to include buf[len] (which would presumably

Re: [PATCH v2 0/4] Auto-generate mergetool lists

2013-01-27 Thread Junio C Hamano
David Aguilar dav...@gmail.com writes: Okay, cool, so no need to reroll, ya? It was more like please don't switch to incremental yet; I tweaked the mode_ok in your v2 and pushed out the result on 'pu' again. There may later be comments from others that make us realize some patches need to be

Re: [PATCH v3 07/11] sequencer.c: teach append_signoff how to detect duplicate s-o-b

2013-01-27 Thread Jonathan Nieder
Brandon Casey wrote: Teach append_signoff how to detect a duplicate s-o-b in the commit footer. This replaces the previous (slightly broken) logic that checked whether the sign-off to be appended would be redundant and puts the fixed logic further down the call-chain next to the rest of footer

Re: [PATCH v3 07/11] sequencer.c: teach append_signoff how to detect duplicate s-o-b

2013-01-27 Thread Jonathan Nieder
Brandon Casey wrote: --- a/sequencer.c +++ b/sequencer.c [...] @@ -1096,10 +1117,16 @@ void append_signoff(struct strbuf *msgbuf, int ignore_footer) strbuf_addch(sob, '\n'); for (i = msgbuf-len - 1 - ignore_footer; i 0 msgbuf-buf[i - 1] != '\n'; i--) ; /* do

Re: [PATCH v3 08/11] sequencer.c: teach append_signoff to avoid adding a duplicate newline

2013-01-27 Thread Jonathan Nieder
Brandon Casey wrote: Teach append_signoff to detect whether a blank line exists at the position that the signed-off-by line will be added, and avoid adding an additional one if one already exists. This is necessary to allow format-patch to add a s-o-b to a patch with no commit message

  1   2   >