[PATCH] git format-patch --signature string | file

2014-05-13 Thread Jeremiah Mahler
characters can be easily included. Signed-off-by: Jeremiah Mahler jmmah...@gmail.com --- builtin/log.c | 26 -- 1 file changed, 24 insertions(+), 2 deletions(-) diff --git a/builtin/log.c b/builtin/log.c index 39e8836..5988f8f 100644 --- a/builtin/log.c +++ b/builtin/log.c

Re: [PATCH] git format-patch --signature string | file

2014-05-13 Thread Jeremiah Mahler
On Tue, May 13, 2014 at 09:07:12AM -0700, Jonathan Nieder wrote: Hi, Jeremiah Mahler wrote: # from a string $ git format-patch --signature from a string origin # or from a file $ git format-patch --signature ~/.signature origin Interesting. But... what if I want my

[PATCH v2] format-patch --signature-file file

2014-05-15 Thread Jeremiah Mahler
On Tue, May 13, 2014 at 09:07:12AM -0700, Jonathan Nieder wrote: Hi, Jeremiah Mahler wrote: # from a string $ git format-patch --signature from a string origin # or from a file $ git format-patch --signature ~/.signature origin Interesting. But... what if I want my

[PATCH v2] format-patch --signature-file file

2014-05-15 Thread Jeremiah Mahler
Added feature that allows a signature file to be used with format-patch. $ git format-patch --signature-file ~/.signature -1 Now signatures with newlines and other special characters can be easily included. Signed-off-by: Jeremiah Mahler jmmah...@gmail.com --- Documentation/git-format

Re: [PATCH v2] format-patch --signature-file file

2014-05-17 Thread Jeremiah Mahler
On Fri, May 16, 2014 at 04:14:45AM -0400, Jeff King wrote: On Thu, May 15, 2014 at 06:31:21PM -0700, Jeremiah Mahler wrote: ... A few questions/comments: +static int signature_file_callback(const struct option *opt, const char *arg

Re: [PATCH v2] format-patch --signature-file file

2014-05-17 Thread Jeremiah Mahler
On Sat, May 17, 2014 at 03:42:24AM -0400, Jeff King wrote: On Sat, May 17, 2014 at 12:25:48AM -0700, Jeremiah Mahler wrote: We have routines for reading directly into a strbuf, which eliminates the need for this 1024-byte limit. We even have a wrapper that can make this much shorter

Re: [PATCH] Documentation/technical/api-hashmap: Remove source highlighting

2014-05-17 Thread Jeremiah Mahler
to be the single place where source code highlighting is used in Documentation/technical. So it might be worthwhile to eliminate this dependency all together as Anders patch does. -- Jeremiah Mahler jmmah...@gmail.com http://github.com/jmahler -- To unsubscribe from this list: send the line

Re: [PATCH v2] format-patch --signature-file file

2014-05-17 Thread Jeremiah Mahler
On Sat, May 17, 2014 at 06:00:14AM -0400, Jeff King wrote: On Sat, May 17, 2014 at 01:59:11AM -0700, Jeremiah Mahler wrote: if (signature) { if (signature_file) die(you cannot specify both a signature and a signature-file); /* otherwise, we already have the value

[PATCH v3] format-patch --signature-file file

2014-05-17 Thread Jeremiah Mahler
. Jeremiah Mahler (1): format-patch --signature-file file Documentation/git-format-patch.txt | 4 builtin/log.c | 13 + t/t4014-format-patch.sh| 28 3 files changed, 45 insertions(+) -- To unsubscribe from this list: send

[PATCH v3] format-patch --signature-file file

2014-05-17 Thread Jeremiah Mahler
Added feature that allows a signature file to be used with format-patch. $ git format-patch --signature-file ~/.signature -1 Now signatures with newlines and other special characters can be easily included. Signed-off-by: Jeremiah Mahler jmmah...@gmail.com --- Documentation/git-format

Re: [PATCH v3] format-patch --signature-file file

2014-05-18 Thread Jeremiah Mahler
Peff, Lots of good suggestions. I had to expand upon the signature pattern match to get to work. On Sun, May 18, 2014 at 07:20:20AM -0400, Jeff King wrote: On Sat, May 17, 2014 at 09:02:22AM -0700, Jeremiah Mahler wrote: ... +test_expect_success 'format-patch --signature-file file

[PATCH v4] format-patch --signature-file file

2014-05-18 Thread Jeremiah Mahler
by default. $ git config format.signaturefile ~/.signature $ git format-patch -1 Signed-off-by: Jeremiah Mahler jmmah...@gmail.com --- Documentation/config.txt | 4 Documentation/git-format-patch.txt | 4 builtin/log.c | 16 t/t4014

[PATCH v4] format-patch --signature-file file

2014-05-18 Thread Jeremiah Mahler
and --foo bar - Changed to use test_must_fail instead of ! Jeremiah Mahler (1): format-patch --signature-file file Documentation/config.txt | 4 Documentation/git-format-patch.txt | 4 builtin/log.c | 16 t/t4014-format-patch.sh

Re: [PATCH v2] format-patch --signature-file file

2014-05-19 Thread Jeremiah Mahler
On Mon, May 19, 2014 at 09:54:33AM -0700, Junio C Hamano wrote: Jeremiah Mahler jmmah...@gmail.com writes: On Sat, May 17, 2014 at 06:00:14AM -0400, Jeff King wrote: Avoiding that is easy with an indirection, no? Something like this at the top: static const char

[PATCH v5] format-patch --signature-file file

2014-05-20 Thread Jeremiah Mahler
by default. $ git config format.signaturefile ~/.signature $ git format-patch -1 Signed-off-by: Jeremiah Mahler jmmah...@gmail.com --- Documentation/config.txt | 4 Documentation/git-format-patch.txt | 4 builtin/log.c | 19 ++- t/t4014

[PATCH v5] format-patch --signature-file file

2014-05-20 Thread Jeremiah Mahler
equivalents. - Used test_config instead of git config which also handles unsetting. - Use a DEFAULT_SIGNATURE variable to better describe its purpose instead of git_version_string which could be confusing. Jeremiah Mahler (1): format-patch --signature-file file Documentation

Re: [PATCH v5] format-patch --signature-file file

2014-05-20 Thread Jeremiah Mahler
On Tue, May 20, 2014 at 04:27:40AM -0400, Jeff King wrote: On Tue, May 20, 2014 at 01:00:06AM -0700, Jeremiah Mahler wrote: ... +test_expect_success 'format-patch --signature-file=file' ' + git format-patch --stdout --signature-file=expect -1 output + check_patch output + sed -n

Re: [PATCH v2] format-patch --signature-file file

2014-05-20 Thread Jeremiah Mahler
be better for me to refrain from sending it during the -rc freeze. I will take DEFAULT_SIGNATURE out of the next patch revision. -- Jeremiah Mahler jmmah...@gmail.com http://github.com/jmahler -- To unsubscribe from this list: send the line unsubscribe git in the body of a message to majord

[PATCH v6] format-patch --signature-file file

2014-05-20 Thread Jeremiah Mahler
changed. So this was removed. - The test cases depend on there being two blank lines after a signature from a file. This is an odd problem because if --signature or the default is used only one blank line is produced. This problem can be addressed in another patch. Jeremiah Mahler

[PATCH v6] format-patch --signature-file file

2014-05-20 Thread Jeremiah Mahler
by default. $ git config format.signaturefile ~/.signature $ git format-patch -1 Signed-off-by: Jeremiah Mahler jmmah...@gmail.com --- Documentation/config.txt | 4 Documentation/git-format-patch.txt | 4 builtin/log.c | 16 t/t4014

Re: [PATCH v5] format-patch --signature-file file

2014-05-21 Thread Jeremiah Mahler
is what you were indicating above). -Peff I am fine with including your previous patch. Would like me to test it out and create another patch set? -- Jeremiah Mahler jmmah...@gmail.com http://github.com/jmahler -- To unsubscribe from this list: send the line unsubscribe git in the body

[PATCH v7 0/2] format-patch --signature-file file

2014-05-21 Thread Jeremiah Mahler
v7 of patch to add format-patch --signature-file file option. This revision includes a patch from Jeff King to fix the odd number spaces produced by print_signature(). Jeff King (1): format-patch: make newline after signature conditional Jeremiah Mahler (1): format-patch --signature-file

[PATCH v7 1/2] format-patch: make newline after signature conditional

2014-05-21 Thread Jeremiah Mahler
, multi-line signature, like: git format-patch --signature=' this is my long signature it has multiple lines ' ... We should notice that it already has its own trailing newline, and suppress one of ours. Signed-off-by: Jeff King p...@peff.net Signed-off-by: Jeremiah Mahler jmmah

[PATCH v7 2/2] format-patch --signature-file file

2014-05-21 Thread Jeremiah Mahler
by default. $ git config format.signaturefile ~/.signature $ git format-patch -1 Signed-off-by: Jeremiah Mahler jmmah...@gmail.com --- Documentation/config.txt | 4 Documentation/git-format-patch.txt | 4 builtin/log.c | 16 t/t4014

Re: [PATCH v5] format-patch --signature-file file

2014-05-21 Thread Jeremiah Mahler
the airspeed of an unladen swallow. :-) I think we're close to a final patch. v7 sent. -- Jeremiah Mahler jmmah...@gmail.com http://github.com/jmahler -- To unsubscribe from this list: send the line unsubscribe git in the body of a message to majord...@vger.kernel.org More majordomo info at http

Re: [PATCH v6] format-patch --signature-file file

2014-05-21 Thread Jeremiah Mahler
, though. Thanks. It is not a problem. Thanks again for all your feedback. -- Jeremiah Mahler jmmah...@gmail.com http://github.com/jmahler -- To unsubscribe from this list: send the line unsubscribe git in the body of a message to majord...@vger.kernel.org More majordomo info at http

Re: [PATCH v6] format-patch --signature-file file

2014-05-21 Thread Jeremiah Mahler
On Wed, May 21, 2014 at 02:13:06PM -0700, Junio C Hamano wrote: Jeremiah Mahler jmmah...@gmail.com writes: ... ! grep ^-- \$ output ... We have been trying not to do the above in recent test updates. It would be nice if this set-up did not have to be outside of the usual

Re: [PATCH v6] format-patch --signature-file file

2014-05-21 Thread Jeremiah Mahler
On Wed, May 21, 2014 at 02:58:42PM -0700, Junio C Hamano wrote: Jeremiah Mahler jmmah...@gmail.com writes: ... The problem is a cat you added outside test_expect_*; the recent push is to have as little executable outside them, especially the set-up code to prepare for the real tests. i.e

Re: [PATCH v6] format-patch --signature-file file

2014-05-21 Thread Jeremiah Mahler
multiple test cases creates duplication. Is there a way to define data once for a limited set of tests? -- Jeremiah Mahler jmmah...@gmail.com http://github.com/jmahler -- To unsubscribe from this list: send the line unsubscribe git in the body of a message to majord...@vger.kernel.org More

Re: [PATCH v6] format-patch --signature-file file

2014-05-21 Thread Jeremiah Mahler
On Wed, May 21, 2014 at 03:37:11PM -0700, Junio C Hamano wrote: Jeremiah Mahler jmmah...@gmail.com writes: Below is one of the updated test cases. test_expect_success 'format-patch --signature-file=mail-signature' ' cat mail-signature -\EOF Test User test.em...@kernel.org

[PATCH v8 0/2] format-patch --signature-file file

2014-05-21 Thread Jeremiah Mahler
the signature output of Git. Previously, the last of the output was deleted. Thanks again for all the suggestions. Jeff King (1): format-patch: make newline after signature conditional Jeremiah Mahler (1): format-patch --signature-file file Documentation/config.txt | 4

[PATCH v8 1/2] format-patch: make newline after signature conditional

2014-05-21 Thread Jeremiah Mahler
, multi-line signature, like: git format-patch --signature=' this is my long signature it has multiple lines ' ... We should notice that it already has its own trailing newline, and suppress one of ours. Signed-off-by: Jeff King p...@peff.net Signed-off-by: Jeremiah Mahler jmmah

[PATCH v8 2/2] format-patch --signature-file file

2014-05-21 Thread Jeremiah Mahler
by default. $ git config format.signaturefile ~/.signature $ git format-patch -1 Signed-off-by: Jeremiah Mahler jmmah...@gmail.com --- Documentation/config.txt | 4 Documentation/git-format-patch.txt | 4 builtin/log.c | 16 +++ t/t4014

Re: [PATCH v8 0/2] format-patch --signature-file file

2014-05-22 Thread Jeremiah Mahler
Junio, On Thu, May 22, 2014 at 12:00:39PM -0700, Junio C Hamano wrote: Jeremiah Mahler jmmah...@gmail.com writes: I just notice that my patch is in 'pu'. But it is version 7 instead of the improved version 8. Yeah, I know. In a distributed environment, multiple people work

[PATCH v9 2/2] format-patch --signature-file=file

2014-05-23 Thread Jeremiah Mahler
Signed-off-by: Jeremiah Mahler jmmah...@gmail.com --- Documentation/config.txt | 4 +++ Documentation/git-format-patch.txt | 4 +++ builtin/log.c | 17 +++ t/t4014-format-patch.sh| 61 ++ 4 files changed, 86

[PATCH v9 0/2] format-patch --signature-file=file

2014-05-23 Thread Jeremiah Mahler
- Note, the control logic had to be re-worked to satisfy these test cases. Jeff King (1): format-patch: make newline after signature conditional Jeremiah Mahler (1): format-patch --signature-file=file Documentation/config.txt | 4 +++ Documentation/git-format-patch.txt | 4

[PATCH v9 1/2] format-patch: make newline after signature conditional

2014-05-23 Thread Jeremiah Mahler
, multi-line signature, like: git format-patch --signature=' this is my long signature it has multiple lines ' ... We should notice that it already has its own trailing newline, and suppress one of ours. Signed-off-by: Jeff King p...@peff.net Signed-off-by: Jeremiah Mahler jmmah

Re: commit: support commit.verbose and --no-verbose

2014-05-24 Thread Jeremiah Mahler
file test_config commit.verbose true check_message message ' -- Jeremiah Mahler jmmah...@gmail.com http://github.com/jmahler -- To unsubscribe from this list: send the line unsubscribe git in the body of a message to majord...@vger.kernel.org More majordomo info at http

[PATCH] wording fixes in the user manual and glossary

2014-05-24 Thread Jeremiah Mahler
Some minor wording fixes in the user manual and glossary. Signed-off-by: Jeremiah Mahler jmmah...@gmail.com --- Documentation/glossary-content.txt | 2 +- Documentation/user-manual.txt | 8 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Documentation/glossary

Re: [PATCH v2] commit: support commit.verbose and --no-verbose

2014-05-25 Thread Jeremiah Mahler
+ test_config commit.verbose true + test_set_editor $PWD/check-for-no-diff + git commit --amend --no-verbose +' + I like those better with 'test_config' instead of 'git config', good. Keep working on it, it is looking better :-) -- Jeremiah Mahler jmmah...@gmail.com http://github.com/jmahler

Re: [PATCH v2] commit: support commit.verbose and --no-verbose

2014-05-25 Thread Jeremiah Mahler
On Sun, May 25, 2014 at 01:24:27AM -0500, Caleb Thompson wrote: Incorporated changes from Duy Nguyen and Jeremiah Mahler. ... +test_expect_success 'commit shows verbose diff with set commit.verbose' ' + echo morecontent file + git add file + test_config commit.verbose true

Re: [PATCH] wording fixes in the user manual and glossary

2014-05-25 Thread Jeremiah Mahler
On Sun, May 25, 2014 at 07:56:41PM +1200, Chris Packham wrote: On 25/05/14 15:50, Jeremiah Mahler wrote: Some minor wording fixes in the user manual and glossary. ... -Eventually the developer cloned from will do additional work in her +Eventually the developer will do additional work

[PATCH] t9138-git-svn-authors-prog.sh fixups

2014-05-25 Thread Jeremiah Mahler
. - Fixed trailing quotes to use the same indentation throughout. Signed-off-by: Jeremiah Mahler jmmah...@gmail.com --- t/t9138-git-svn-authors-prog.sh | 35 +-- 1 file changed, 17 insertions(+), 18 deletions(-) diff --git a/t/t9138-git-svn-authors-prog.sh b/t/t9138

[PATCH v2] wording fixes in the user manual and glossary

2014-05-26 Thread Jeremiah Mahler
Various minor wording fixes throughout the user manual and glossary. The section on Updating a repository with git fetch was substantially re-worded to try and better explain `git fetch`. Signed-off-by: Jeremiah Mahler jmmah...@gmail.com --- Notes: From the feedback I received by Chris

Re: [PATCH v3 5/5] commit: support commit.verbose and --no-verbose

2014-05-26 Thread Jeremiah Mahler
that these tests still aren't checking to see if the verbose output appears in the commit message. -- Jeremiah Mahler jmmah...@gmail.com http://github.com/jmahler -- To unsubscribe from this list: send the line unsubscribe git in the body of a message to majord...@vger.kernel.org More majordomo

Re: [PATCH v3 5/5] commit: support commit.verbose and --no-verbose

2014-05-26 Thread Jeremiah Mahler
message. OK, got it. The editor, set by test_set_editor, is run as part of the commit. Thanks for explaining that. -- Jeremiah Mahler jmmah...@gmail.com http://github.com/jmahler -- To unsubscribe from this list: send the line unsubscribe git in the body of a message to majord...@vger.kernel.org

Re: [PATCH v3 5/5] commit: support commit.verbose and --no-verbose

2014-05-26 Thread Jeremiah Mahler
for your tests. verbose=false looks different than commit.verbose=false at first glance. Also, since commit.verbose=false is an invalid syntax for a config option, I would remove the '=' and just make it commit.verbose false. -- Jeremiah Mahler jmmah...@gmail.com http://github.com/jmahler

Re: [PATCH v3 0/5] commit: support commit.verbose and --no-verbose

2014-05-26 Thread Jeremiah Mahler
Sunshine, Duy Nguyen, and Jeremiah Mahler. ... Other than the minor style issue I pointed out in another email, it looks good, and the patch set works properly on my machine. -- Jeremiah Mahler jmmah...@gmail.com http://github.com/jmahler -- To unsubscribe from this list: send the line unsubscribe

Re: [PATCH 01/15] builtin/add.c: rearrange xcalloc arguments

2014-05-26 Thread Jeremiah Mahler
--interactive; if (patch_mode) This patch doesn't apply to any of the branches I have available (master, pu, next). And there is no line containing pathspec-nr + 6 anywhere in my builtin/add.c. Which branch is your work based off? -- Jeremiah Mahler jmmah...@gmail.com http://github.com/jmahler

Re: [PATCH 00/15] Rearrange xcalloc arguments

2014-05-26 Thread Jeremiah Mahler
! -- Jeremiah Mahler jmmah...@gmail.com http://github.com/jmahler -- To unsubscribe from this list: send the line unsubscribe git in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH 01/15] builtin/add.c: rearrange xcalloc arguments

2014-05-26 Thread Jeremiah Mahler
like you did :-) No need to reroll I can just use the maint branch to test it out. Thanks! -- Jeremiah Mahler jmmah...@gmail.com http://github.com/jmahler -- To unsubscribe from this list: send the line unsubscribe git in the body of a message to majord...@vger.kernel.org More majordomo info

Re: [PATCH v3 2/5] commit test: Change $PWD to $(pwd)

2014-05-27 Thread Jeremiah Mahler
names. For details, see the commit message of 4114156ae9. -- Jeremiah Mahler jmmah...@gmail.com http://github.com/jmahler -- To unsubscribe from this list: send the line unsubscribe git in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org

Re: [PATCH] t9138-git-svn-authors-prog.sh fixups

2014-05-27 Thread Jeremiah Mahler
Junio, On Tue, May 27, 2014 at 12:43:06PM -0700, Junio C Hamano wrote: Jeremiah Mahler jmmah...@gmail.com writes: ... diff --git a/t/t9138-git-svn-authors-prog.sh b/t/t9138-git-svn-authors-prog.sh index 83cc5fc..d54c37a 100755 --- a/t/t9138-git-svn-authors-prog.sh +++ b/t/t9138-git

[PATCH v3] wording fixes in the user manual and glossary

2014-05-27 Thread Jeremiah Mahler
Re-worded the section on Updating a repository with git fetch in the user manual. Various other minor fixes in the manual and glossary. Signed-off-by: Jeremiah Mahler jmmah...@gmail.com --- Notes: This revision includes suggestions from Chris Packham, Ben Aveling and Junio C Hamano [1

Re: [PATCH 01/15] builtin/add.c: rearrange xcalloc arguments

2014-05-27 Thread Jeremiah Mahler
A: Because it messes up the order in which people normally read text. Q: Why is top-posting such a bad thing? That is the funniest post I have ever seen by Kroah. -- Jeremiah Mahler jmmah...@gmail.com http://github.com/jmahler -- To unsubscribe from this list: send the line unsubscribe git

[PATCH 0/5] replace signal() with sigaction()

2014-05-28 Thread Jeremiah Mahler
sigchain.c. sigchain.c is a bit more complicated than the others and will be done in a separate patch. Jeremiah Mahler (5): progress.c: replace signal() with sigaction() daemon.c run_service(): replace signal() with sigaction() daemon.c child_handler(): replace signal() with sigaction

[PATCH 4/5] daemon.c service_loop(): replace signal() with sigaction()

2014-05-28 Thread Jeremiah Mahler
-by: Jeremiah Mahler jmmah...@gmail.com --- daemon.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/daemon.c b/daemon.c index 3c48dc0..8c28b3d 100644 --- a/daemon.c +++ b/daemon.c @@ -1002,6 +1002,7 @@ static int service_loop(struct socketlist *socklist) { struct pollfd

[PATCH 3/5] daemon.c child_handler(): replace signal() with sigaction()

2014-05-28 Thread Jeremiah Mahler
-by: Jeremiah Mahler jmmah...@gmail.com --- daemon.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/daemon.c b/daemon.c index 78c4a1c..3c48dc0 100644 --- a/daemon.c +++ b/daemon.c @@ -791,12 +791,15 @@ static void handle(int incoming, struct sockaddr *addr, socklen_t addrlen

[PATCH 5/5] connect.c: replace signal() with sigaction()

2014-05-28 Thread Jeremiah Mahler
From signal(2) The behavior of signal() varies across UNIX versions, and has also var‐ ied historically across different versions of Linux. Avoid its use: use sigaction(2) instead. See Portability below. Replaced signal() with sigaction() in connect.c Signed-off-by: Jeremiah Mahler

[PATCH 1/5] progress.c: replace signal() with sigaction()

2014-05-28 Thread Jeremiah Mahler
From signal(2) The behavior of signal() varies across UNIX versions, and has also var‐ ied historically across different versions of Linux. Avoid its use: use sigaction(2) instead. See Portability below. Replaced signal() with sigaction() in progress.c Signed-off-by: Jeremiah Mahler

[PATCH 2/5] daemon.c run_service(): replace signal() with sigaction()

2014-05-28 Thread Jeremiah Mahler
-by: Jeremiah Mahler jmmah...@gmail.com --- daemon.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/daemon.c b/daemon.c index eba1255..78c4a1c 100644 --- a/daemon.c +++ b/daemon.c @@ -322,6 +322,7 @@ static int run_service(char *dir, struct daemon_service *service) { const

Re: [PATCH 1/5] progress.c: replace signal() with sigaction()

2014-05-28 Thread Jeremiah Mahler
On Wed, May 28, 2014 at 08:07:38PM +1200, Chris Packham wrote: On 28/05/14 18:14, Jeremiah Mahler wrote: From signal(2) The behavior of signal() varies across UNIX versions, and has also var‐ ied historically across different versions of Linux. Avoid its use: use sigaction(2

Re: [PATCH 0/5] replace signal() with sigaction()

2014-05-28 Thread Jeremiah Mahler
On Wed, May 28, 2014 at 09:40:55AM +0200, Johannes Sixt wrote: Am 5/28/2014 8:14, schrieb Jeremiah Mahler: From signal(2) The behavior of signal() varies across UNIX versions, and has also var‐ ied historically across different versions of Linux. Avoid its use: use sigaction

[PATCH v2 2/2] connect.c: replace signal() with sigaction()

2014-05-30 Thread Jeremiah Mahler
From signal(2) man page: The behavior of signal() varies across UNIX versions, and has also var‐ ied historically across different versions of Linux. Avoid its use: use sigaction(2) instead. Replaced signal() with sigaction() in connect.c Signed-off-by: Jeremiah Mahler jmmah

[PATCH v2 1/2] compat/mingw.c: expand MinGW support for sigaction

2014-05-30 Thread Jeremiah Mahler
signal() in other cases. This patch expands the faux sigaction function so that it calls signal in cases other than SIGALRM. Now sigaction can be used across the entire Git project and MinGW will still work with signal as it did before. Signed-off-by: Jeremiah Mahler jmmah...@gmail.com

[PATCH v2 0/2] replace signal() with sigaction()

2014-05-30 Thread Jeremiah Mahler
SIGALRM. Now it works as expected. I have tested these changes under Linux and under Windows 7 using Msysgit. [1]: http://marc.info/?l=gitm=140125769223552w=2 [2]: http://marc.info/?l=gitm=140126288325213w=2 Jeremiah Mahler (2): compat/mingw.c: expand MinGW support for sigaction connect.c: replace

Re: [PATCH v2 2/2] connect.c: replace signal() with sigaction()

2014-05-31 Thread Jeremiah Mahler
Chris, On Sat, May 31, 2014 at 10:39:39PM +1200, Chris Packham wrote: On 31/05/14 08:58, Jeremiah Mahler wrote: From signal(2) man page: ... - signal(SIGCHLD, SIG_DFL); + memset(sa, 0, sizeof(sa)); + sa.sa_handler = SIG_DFL; + sigaction(SIGCHLD, sa, 0); I think this got

[PATCH v3 2/9] connect.c: replace signal() with sigaction()

2014-06-01 Thread Jeremiah Mahler
From the signal(2) man page: The behavior of signal() varies across UNIX versions, and has also var‐ ied historically across different versions of Linux. Avoid its use: use sigaction(2) instead. Replaced signal() with sigaction() in connect.c Signed-off-by: Jeremiah Mahler jmmah

[PATCH v3 1/9] compat/mingw.c: expand MinGW support for sigaction

2014-06-01 Thread Jeremiah Mahler
signal() in other cases. This patch expands the faux sigaction function so that it calls signal in cases other than SIGALRM. Now sigaction can be used across the entire Git project and MinGW will still work with signal as it did before. Signed-off-by: Jeremiah Mahler jmmah...@gmail.com

[PATCH v3 0/9] replace signal() with sigaction()

2014-06-01 Thread Jeremiah Mahler
be SIG_ERR if an error occurred. sigaction() just returns -1 in this case. Jeremiah Mahler (9): compat/mingw.c: expand MinGW support for sigaction connect.c: replace signal() with sigaction() progress.c: replace signal() with sigaction() write_or_die.c: replace signal

[PATCH v3 4/9] write_or_die.c: replace signal() with sigaction()

2014-06-01 Thread Jeremiah Mahler
From the signal(2) man page: The behavior of signal() varies across UNIX versions, and has also var‐ ied historically across different versions of Linux. Avoid its use: use sigaction(2) instead. Replaced signal() with sigaction() in write_or_die.c Signed-off-by: Jeremiah Mahler jmmah

[PATCH v3 3/9] progress.c: replace signal() with sigaction()

2014-06-01 Thread Jeremiah Mahler
From the signal(2) man page: The behavior of signal() varies across UNIX versions, and has also var‐ ied historically across different versions of Linux. Avoid its use: use sigaction(2) instead. Replaced signal() with sigaction() in progress.c Signed-off-by: Jeremiah Mahler jmmah

[PATCH v3 5/9] daemon.c: replace signal() with sigaction()

2014-06-01 Thread Jeremiah Mahler
From the signal(2) man page: The behavior of signal() varies across UNIX versions, and has also var‐ ied historically across different versions of Linux. Avoid its use: use sigaction(2) instead. Replaced signal() with sigaction() in daemon.c Signed-off-by: Jeremiah Mahler jmmah

[PATCH v3 6/9] builtin/log.c: replace signal() with sigaction()

2014-06-01 Thread Jeremiah Mahler
From the signal(2) man page: The behavior of signal() varies across UNIX versions, and has also var‐ ied historically across different versions of Linux. Avoid its use: use sigaction(2) instead. Replaced signal() with sigaction() in builtin/log.c Signed-off-by: Jeremiah Mahler jmmah

[PATCH v3 9/9] sigchain.c: replace signal() with sigaction()

2014-06-01 Thread Jeremiah Mahler
From the signal(2) man page: The behavior of signal() varies across UNIX versions, and has also var‐ ied historically across different versions of Linux. Avoid its use: use sigaction(2) instead. Replaced signal() with sigaction() in sigchain.c Signed-off-by: Jeremiah Mahler jmmah

[PATCH v3 8/9] builtin/verify-tag.c: replace signal() with sigaction()

2014-06-01 Thread Jeremiah Mahler
From the signal(2) man page: The behavior of signal() varies across UNIX versions, and has also var‐ ied historically across different versions of Linux. Avoid its use: use sigaction(2) instead. Replaced signal() with sigaction() in builtin/verify-tag.c Signed-off-by: Jeremiah Mahler

[PATCH v3 7/9] builtin/merge-index.c: replace signal() with sigaction()

2014-06-01 Thread Jeremiah Mahler
From the signal(2) man page: The behavior of signal() varies across UNIX versions, and has also var‐ ied historically across different versions of Linux. Avoid its use: use sigaction(2) instead. Replaced signal() with sigaction() in builtin/merge-index.c Signed-off-by: Jeremiah Mahler

Re: [PATCH v3 0/9] replace signal() with sigaction()

2014-06-02 Thread Jeremiah Mahler
Hannes, On Mon, Jun 02, 2014 at 01:28:25PM +0200, Johannes Sixt wrote: Am 6/1/2014 20:10, schrieb Jeremiah Mahler: This is version 3 of the patch set to convert signal(2) to sigaction(2) (previous discussion [1]). ... sigchain.c: replace signal() with sigaction() The series without

Re: [PATCH v3 0/9] replace signal() with sigaction()

2014-06-02 Thread Jeremiah Mahler
On Mon, Jun 02, 2014 at 12:05:29PM -0700, Junio C Hamano wrote: Johannes Sixt j.s...@viscovery.net writes: Jeremiah Mahler (9): compat/mingw.c: expand MinGW support for sigaction connect.c: replace signal() with sigaction() progress.c: replace signal() with sigaction

[PATCH] t/t7810-grep.sh: remove duplicate test_config()

2014-06-04 Thread Jeremiah Mahler
t/t7810-grep.sh had its own test_config() function which served the same purpose as the one in t/test-lib-functions.sh. Removed, all tests pass. Signed-off-by: Jeremiah Mahler jmmah...@gmail.com --- t/t7810-grep.sh | 5 - 1 file changed, 5 deletions(-) diff --git a/t/t7810-grep.sh b/t

[PATCH] api-strbuf.txt minor typos

2014-06-08 Thread Jeremiah Mahler
Fixed some minor typos in api-strbuf.txt: 'A' instead of 'An', 'have' instead of 'has', a overlong line, and 'another' instead of 'an other'. Signed-off-by: Jeremiah Mahler jmmah...@gmail.com --- Documentation/technical/api-strbuf.txt | 10 +- 1 file changed, 5 insertions(+), 5 deletions

[PATCH/RFC v1 4/5] fast-import.c: cleanup using strbuf_set operations

2014-06-09 Thread Jeremiah Mahler
Simplified cases where a strbuf_reset was immediately followed by a strbuf_add using the new strbuf_set operations. Signed-off-by: Jeremiah Mahler jmmah...@gmail.com --- fast-import.c | 19 ++- 1 file changed, 6 insertions(+), 13 deletions(-) diff --git a/fast-import.c b/fast

[PATCH/RFC v1 1/5] add strbuf_set operations

2014-06-09 Thread Jeremiah Mahler
to be performed in one line instead of two. strbuf_set(buf, cb.buf.buf, cb.buf.len); Signed-off-by: Jeremiah Mahler jmmah...@gmail.com --- strbuf.c | 21 + strbuf.h | 14 ++ 2 files changed, 35 insertions(+) diff --git a/strbuf.c b/strbuf.c index ac62982

[PATCH/RFC v1 3/5] sha1_name.c: cleanup using strbuf_set operations

2014-06-09 Thread Jeremiah Mahler
Simplified cases where a strbuf_reset was immediately followed by a strbuf_add using the new strbuf_set operations. Signed-off-by: Jeremiah Mahler jmmah...@gmail.com --- sha1_name.c | 15 +-- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/sha1_name.c b/sha1_name.c

[PATCH/RFC v1 5/5] builtin/remote.c: cleanup using strbuf_set operations

2014-06-09 Thread Jeremiah Mahler
Simplified cases where a strbuf_reset was immediately followed by a strbuf_add using the new strbuf_set operations. Signed-off-by: Jeremiah Mahler jmmah...@gmail.com --- builtin/remote.c | 51 +-- 1 file changed, 17 insertions(+), 34 deletions

[PATCH/RFC v1 2/5] add strbuf_set operations documentation

2014-06-09 Thread Jeremiah Mahler
Add documentation of the strbuf_set operations to technical/api-strbuf.txt. Signed-off-by: Jeremiah Mahler jmmah...@gmail.com --- Documentation/technical/api-strbuf.txt | 18 ++ 1 file changed, 18 insertions(+) diff --git a/Documentation/technical/api-strbuf.txt b/Documentation

[PATCH/RFC v1 0/5] add strbuf_set operations

2014-06-09 Thread Jeremiah Mahler
this common sequence to be performed in one line instead of two. strbuf_set(buf, cb.buf.buf, cb.buf.len); Only the first few files have been converted in this preliminary patch set. Jeremiah Mahler (5): add strbuf_set operations add strbuf_set operations documentation sha1_name.c: cleanup

Re: [PATCH/RFC v1 2/5] add strbuf_set operations documentation

2014-06-09 Thread Jeremiah Mahler
Eric, On Mon, Jun 09, 2014 at 05:53:49AM -0400, Eric Sunshine wrote: On Mon, Jun 9, 2014 at 4:36 AM, Jeremiah Mahler jmmah...@gmail.com wrote: Add documentation of the strbuf_set operations to technical/api-strbuf.txt. Since this patch is concise and so closely related to patch 1/5

Re: [PATCH/RFC v1 4/5] fast-import.c: cleanup using strbuf_set operations

2014-06-09 Thread Jeremiah Mahler
Eric, On Mon, Jun 09, 2014 at 06:12:12AM -0400, Eric Sunshine wrote: On Mon, Jun 9, 2014 at 4:36 AM, Jeremiah Mahler jmmah...@gmail.com wrote: Subject: fast-import.c: cleanup using strbuf_set operations ... Signed-off-by: Jeremiah Mahler jmmah...@gmail.com --- fast-import.c | 19

Re: [PATCH/RFC v1 0/5] add strbuf_set operations

2014-06-09 Thread Jeremiah Mahler
Duy, On Mon, Jun 09, 2014 at 05:39:12PM +0700, Duy Nguyen wrote: On Mon, Jun 9, 2014 at 3:36 PM, Jeremiah Mahler jmmah...@gmail.com wrote: Currently, the data in a strbuf is modified using add operations. To set the buffer to some data a reset must be performed before an add

[PATCH v2 00/19] add strbuf_set operations

2014-06-09 Thread Jeremiah Mahler
everything. */ Several single line replacements were made for this reason. Additional files have also been converted compared to version 1 [1]. [1]: http://marc.info/?l=gitm=140230874124060w=2 Jeremiah Mahler (19): add strbuf_set operations sha1_name: simplify via strbuf_set() fast-import

[PATCH v2 01/19] add strbuf_set operations

2014-06-09 Thread Jeremiah Mahler
to be performed in one line instead of two. strbuf_set(buf, cb.buf.buf, cb.buf.len); Signed-off-by: Jeremiah Mahler jmmah...@gmail.com --- Documentation/technical/api-strbuf.txt | 18 ++ strbuf.c | 21 + strbuf.h

[PATCH v2 07/19] builtin/checkout: simplify via strbuf_set()

2014-06-09 Thread Jeremiah Mahler
Simplify cases where a strbuf_reset is immediately followed by a strbuf_add by using strbuf_set operations. Signed-off-by: Jeremiah Mahler jmmah...@gmail.com --- builtin/checkout.c | 18 ++ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/builtin/checkout.c b

[PATCH v2 05/19] branch: simplify via strbuf_set()

2014-06-09 Thread Jeremiah Mahler
Simplify cases where a strbuf_reset is immediately followed by a strbuf_add by using strbuf_set operations. Signed-off-by: Jeremiah Mahler jmmah...@gmail.com --- branch.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/branch.c b/branch.c index 660097b..bc7cc7e 100644

[PATCH v2 06/19] builtin/branch: simplify via strbuf_set()

2014-06-09 Thread Jeremiah Mahler
Simplify cases where a strbuf_reset is immediately followed by a strbuf_add by using strbuf_set operations. Signed-off-by: Jeremiah Mahler jmmah...@gmail.com --- builtin/branch.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/builtin/branch.c b/builtin/branch.c index

[PATCH v2 02/19] sha1_name: simplify via strbuf_set()

2014-06-09 Thread Jeremiah Mahler
Simplify cases where a strbuf_reset is immediately followed by a strbuf_add by using strbuf_set operations. Signed-off-by: Jeremiah Mahler jmmah...@gmail.com --- sha1_name.c | 15 +-- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/sha1_name.c b/sha1_name.c index

[PATCH v2 04/19] builtin/remote: simplify via strbuf_set()

2014-06-09 Thread Jeremiah Mahler
Simplify cases where a strbuf_reset is immediately followed by a strbuf_add by using strbuf_set operations. Signed-off-by: Jeremiah Mahler jmmah...@gmail.com --- builtin/remote.c | 59 1 file changed, 21 insertions(+), 38 deletions

[PATCH v2 03/19] fast-import: simplify via strbuf_set()

2014-06-09 Thread Jeremiah Mahler
Simplify cases where a strbuf_reset is immediately followed by a strbuf_add by using strbuf_set operations. Signed-off-by: Jeremiah Mahler jmmah...@gmail.com --- fast-import.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/fast-import.c b/fast-import.c index e8ec34d

[PATCH v2 10/19] date: simplify via strbuf_set()

2014-06-09 Thread Jeremiah Mahler
Simplify cases where a strbuf_reset is immediately followed by a strbuf_add by using strbuf_set operations. Signed-off-by: Jeremiah Mahler jmmah...@gmail.com --- date.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/date.c b/date.c index 782de95..0b723a4 100644

[PATCH v2 12/19] http-backend: simplify via strbuf_set()

2014-06-09 Thread Jeremiah Mahler
Simplify cases where a strbuf_reset is immediately followed by a strbuf_add by using strbuf_set operations. Signed-off-by: Jeremiah Mahler jmmah...@gmail.com --- http-backend.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/http-backend.c b/http-backend.c index d2c0a62

  1   2   >