implementations of these two functions return values returned by
memcmp(3) when the one string is not a prefix of the other string, and
the only thing memcmp(3) guarantees its callers is the sign of the
returned value, not the magnitude.
Signed-off-by: Jeremiah Mahler
---
cache.h| 2
().
This avoids renaming cache_name_compare() to name_compare() in a
later patch.
- Cleanup of log message by Junio C Humano.
Jeremiah Mahler (2):
name-hash.c: replace cache_name_compare() with memcmp()
cleanup duplicate name_compare() functions
cache.h| 2 +-
dir.c | 3
When cache_name_compare() is used on counted strings of the same
length, it is equivalent to a memcmp(). Since the one use of
cache_name_compare() in name-hash.c requires that the lengths are
equal, just replace it with memcmp().
Signed-off-by: Jeremiah Mahler
---
name-hash.c | 2 +-
1 file
ring is not a prefix of the
> other string, and the only thing memcmp(3) guarantees its callers is
> the sign of the returned value, not the magnitude.
>
> or something like that, perhaps?
Yes, that looks good. It is a bit clearer than my message. I like how
you used "th
Junio,
On Thu, Jun 19, 2014 at 11:03:03AM -0700, Junio C Hamano wrote:
> Jeremiah Mahler writes:
>
> > Both unpack-trees.c and read-cache.c have their own name_compare()
> > function, which are identical. And read-cache.c has a
> > cache_name_compare() function whic
new name, name_compare(), makes it clear that no
cache is involved.
Signed-off-by: Jeremiah Mahler
---
cache.h| 2 +-
dir.c | 3 +--
name-hash.c| 2 +-
read-cache.c | 23 +--
tree-walk.c| 10 --
unpack-trees.c | 11 ---
6 files
].
[1]: http://marc.info/?l=git&m=140311885416615&w=2
Jeremiah Mahler (1):
cleanup duplicate name_compare() functions
cache.h| 2 +-
dir.c | 3 +--
name-hash.c| 2 +-
read-cache.c | 23 +--
tree-walk.c| 10 --
unpack-tree
Jonathan,
On Wed, Jun 18, 2014 at 12:14:07PM -0700, Jonathan Nieder wrote:
> Jeremiah Mahler wrote:
>
> > Jeremiah Mahler (5):
> > cache: rename cache_name_compare() to name_compare()
> > tree-walk.c: remove name_compare() function
> > unpack-trees.c:
Jonathan,
On Wed, Jun 18, 2014 at 12:03:59PM -0700, Jonathan Nieder wrote:
> Jeremiah Mahler wrote:
>
> > Remove the duplicate name_compare() function and use the one provided by
> > read-cache.c.
>
> I'd squash this into patch 1/5.
>
> > ---
> >
Rename the call to cache_name_compare() to name_compare().
Signed-off-by: Jeremiah Mahler
---
Notes:
This is a case where cache_name_compare() was used even though it had
nothing to do with a cache. The new name makes it clear that no cache
is involved.
dir.c | 3 +--
1 file
Remove the duplicate name_compare() function and use the one provided by
read-cache.c.
Signed-off-by: Jeremiah Mahler
---
Notes:
There is one small difference between the old function and the new one.
The old one returned -N and +N whereas the new one returns -1 and +1.
However
Remove the duplicate name_compare() function and use the one provided by
read-cache.c.
Signed-off-by: Jeremiah Mahler
---
Notes:
There is one small difference between the old function and the new one.
The old one returned -N and +N whereas the new one returns -1 and +1.
However
Rename the call to cache_name_compare() to name_compare().
Signed-off-by: Jeremiah Mahler
---
name-hash.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/name-hash.c b/name-hash.c
index be7c4ae..e2bea88 100644
--- a/name-hash.c
+++ b/name-hash.c
@@ -179,7 +179,7 @@ static
The cache_name_compare() function is not specific to a cache.
Make its name more general by renaming it to name_compare().
Simplify cache_name_stage_compare() via name_compare().
Where lengths are involved, change int to size_t.
Signed-off-by: Jeremiah Mahler
---
cache.h | 2 +-
read
http://marc.info/?l=git&m=140299051431479&w=2
[2]: http://marc.info/?l=git&m=140300329403706&w=2
Jeremiah Mahler (5):
cache: rename cache_name_compare() to name_compare()
tree-walk.c: remove name_compare() function
unpack-trees.c: remove name_compare() function
dir.c: rename t
Junio,
On Tue, Jun 17, 2014 at 10:55:18AM -0700, Junio C Hamano wrote:
> Jeremiah Mahler writes:
>
> > Add a strnncmp() function which behaves like strncmp() except it takes
> > the length of both strings instead of just one. It behaves the same as
> > strncmp() up to t
Jonathan,
On Tue, Jun 17, 2014 at 10:48:17AM -0700, Jonathan Nieder wrote:
> >> On 2014-06-17 09.34, Jeremiah Mahler wrote:
>
> >>> Also, strnncmp() was switched from using memcmp() to strncmp()
> >>> internally to make it clear that this is meant for strings,
Torsten,
On Tue, Jun 17, 2014 at 01:08:05PM +0200, Torsten Bögershausen wrote:
> On 2014-06-17 09.34, Jeremiah Mahler wrote:
> > Add a strnncmp() function which behaves like strncmp() except it takes
> > the length of both strings instead of just one.
> >
> > Then simp
Erik,
On Tue, Jun 17, 2014 at 11:09:59AM +0200, Erik Faye-Lund wrote:
> On Tue, Jun 17, 2014 at 9:34 AM, Jeremiah Mahler wrote:
> > Add a strnncmp() function which behaves like strncmp() except it takes
> > the length of both strings instead of just one. It behaves the same as
&
Torsten,
On Tue, Jun 17, 2014 at 10:23:14AM +0200, Torsten Bögershausen wrote:
> On 2014-06-17 09.34, Jeremiah Mahler wrote:
> > Add a strnncmp() function which behaves like strncmp() except it takes
> > the length of both strings instead of just one. It behaves the same as
>
returned.
Signed-off-by: Jeremiah Mahler
---
strbuf.c | 9 +
strbuf.h | 2 ++
2 files changed, 11 insertions(+)
diff --git a/strbuf.c b/strbuf.c
index ac62982..4eb7954 100644
--- a/strbuf.c
+++ b/strbuf.c
@@ -600,3 +600,12 @@ char *xstrdup_tolower(const char *string)
result[i
Simplify unpack-trees.c using the strnncmp() function and remove the
name_compare() function.
Signed-off-by: Jeremiah Mahler
---
unpack-trees.c | 13 +
1 file changed, 1 insertion(+), 12 deletions(-)
diff --git a/unpack-trees.c b/unpack-trees.c
index 4a9cdf2..9a71b5a 100644
--- a
Simplify tree-walk.c using the strnncmp() function and remove the
name_compare() function.
Signed-off-by: Jeremiah Mahler
---
tree-walk.c | 16 +++-
1 file changed, 3 insertions(+), 13 deletions(-)
diff --git a/tree-walk.c b/tree-walk.c
index 4dc86c7..efbd3b7 100644
--- a/tree
() to strncmp()
internally to make it clear that this is meant for strings, not
general buffers.
[1]: http://marc.info/?l=git&m=140294981320743&w=2
Jeremiah Mahler (3):
add strnncmp() function
tree-walk: simplify via strnncmp()
unpack-trees: simplify via strnncmp()
strbuf.c
Jonathan,
On Mon, Jun 16, 2014 at 01:18:06PM -0700, Jonathan Nieder wrote:
> Jeremiah Mahler wrote:
>
> > --- a/tree-walk.c
> > +++ b/tree-walk.c
> [...]
> > @@ -174,7 +164,7 @@ static int check_entry_match(const char *a, int a_len,
> > const char *b, int b
Simplify tree-walk.c using the strnncmp() function and remove the
name_compare() function.
Signed-off-by: Jeremiah Mahler
---
tree-walk.c | 16 +++-
1 file changed, 3 insertions(+), 13 deletions(-)
diff --git a/tree-walk.c b/tree-walk.c
index 4dc86c7..efbd3b7 100644
--- a/tree
Add a strnncmp() function which behaves like strncmp() except it uses
the length of both strings instead of just one.
Signed-off-by: Jeremiah Mahler
---
strbuf.c | 6 ++
strbuf.h | 2 ++
2 files changed, 8 insertions(+)
diff --git a/strbuf.c b/strbuf.c
index ac62982..bd486c3 100644
--- a
Simplify unpack-trees.c using the strnncmp() function and remove the
name_compare() function.
Signed-off-by: Jeremiah Mahler
---
unpack-trees.c | 13 +
1 file changed, 1 insertion(+), 12 deletions(-)
diff --git a/unpack-trees.c b/unpack-trees.c
index 4a9cdf2..9a71b5a 100644
--- a
identical copies of.
Jeremiah Mahler (3):
add strnncmp() function
tree-walk: simplify via strnncmp()
unpack-trees: simplify via strnncmp()
strbuf.c | 6 ++
strbuf.h | 2 ++
tree-walk.c| 16 +++-
unpack-trees.c | 13 +
4 files changed, 12 insertions
Peff,
On Fri, Jun 13, 2014 at 03:15:50AM -0400, Jeff King wrote:
> On Thu, Jun 12, 2014 at 04:46:37PM -0700, Jeremiah Mahler wrote:
>
> > > Although strbuf_set() does make the code a bit easier to read
> > > when strbufs are repeatedly re-used, re-using a variable
On Fri, Jun 13, 2014 at 11:49:10AM -0500, Caleb Thompson wrote:
> On Thu, Jun 12, 2014 at 01:30:10PM -0700, Jeremiah Mahler wrote:
> > On Thu, Jun 12, 2014 at 02:38:58PM -0500, Caleb Thompson wrote:
> > > This patch allows people to set commit.verbose to implicitly send
>
Michael,
On Thu, Jun 12, 2014 at 12:21:48PM +0200, Michael Haggerty wrote:
> On 06/12/2014 09:10 AM, Jeremiah Mahler wrote:
> > On Wed, Jun 11, 2014 at 02:05:35PM +0200, Michael Haggerty wrote:
> >> [...]
> >> If there were a function like strbuf_grow_to(sb, len):
&g
Eric,
On Thu, Jun 12, 2014 at 05:48:52PM -0400, Eric Sunshine wrote:
> On Thu, Jun 12, 2014 at 3:31 PM, Jeremiah Mahler wrote:
> > On Thu, Jun 12, 2014 at 11:50:41AM -0700, Junio C Hamano wrote:
> >> I am on the fence.
> >>
> >> I have this suspicion that the
On Thu, Jun 12, 2014 at 05:18:29PM -0400, Eric Sunshine wrote:
> On Thu, Jun 12, 2014 at 3:36 PM, Jeremiah Mahler wrote:
> > On Thu, Jun 12, 2014 at 11:51:19AM -0700, Junio C Hamano wrote:
> >> Jeremiah Mahler writes:
> >>
> >> > Thomas,
> >> &
On Thu, Jun 12, 2014 at 02:38:58PM -0500, Caleb Thompson wrote:
> This patch allows people to set commit.verbose to implicitly send
> --verbose to git-commit.
>
> This version incorporates changes suggested by Eric Sunshine, Duy
> Nguyen, and Jeremiah Mahler.
>
> It intro
Junio,
On Thu, Jun 12, 2014 at 11:51:19AM -0700, Junio C Hamano wrote:
> Jeremiah Mahler writes:
>
> > Thomas,
> >
> > On Thu, Jun 12, 2014 at 10:11:36AM +0200, Thomas Braun wrote:
> >> Am 12.06.2014 09:29, schrieb Jeremiah Mahler:
> >> > A common us
Junio,
Comments below...
On Thu, Jun 12, 2014 at 11:50:41AM -0700, Junio C Hamano wrote:
> Jeremiah Mahler writes:
>
> > A common use case with strubfs is to set the buffer to a new value.
> > This must be done in two steps: a reset followed by an add.
> >
Caleb,
On Thu, Jun 12, 2014 at 01:23:41PM -0500, Caleb Thompson wrote:
> Jeremiah,
>
> On Thu, Jun 12, 2014 at 11:04:59AM -0700, Jeremiah Mahler wrote:
> >
...
> >
> > How are you preparing your patches. 'git format-patch' with a 'git
> > send-
On Thu, Jun 12, 2014 at 11:04:59AM -0700, Jeremiah Mahler wrote:
> Caleb,
>
...
>
> Thanks for checking. Unfortunately the problem persists for me.
>
> It seems to be related to there not being a space at the left most part
> of the patch. It is just a tab with no spac
gt;
> On Thu, Jun 12, 2014 at 01:41:52AM -0700, Jeremiah Mahler wrote:
> > On Wed, Jun 11, 2014 at 01:24:36PM -0500, ca...@calebthompson.io wrote:
> > > Some of the tests in t/t7507-commit-verbose.sh were still using
> > > git-config to set configuration. Change them
of git-config
The copy of the patch that failed is found in:
/home/jeri/git/.git/rebase-apply/patch
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop p
Thomas,
On Thu, Jun 12, 2014 at 10:11:36AM +0200, Thomas Braun wrote:
> Am 12.06.2014 09:29, schrieb Jeremiah Mahler:
> > A common use case with strubfs is to set the buffer to a new value.
> > This must be done in two steps: a reset followed by an add.
> >
&
builtin/remote.c has many cases where a strbuf was being set to a new
value. Improve its readability by using strbuf_set() operations instead
of reset + add.
Signed-off-by: Jeremiah Mahler
---
builtin/remote.c | 63 +---
1 file changed, 23
) {
strbuf_set(buf, data3, len3);
}
Signed-off-by: Jeremiah Mahler
---
Documentation/technical/api-strbuf.txt | 18 ++
strbuf.c | 21 +
strbuf.h | 13 +
3 files changed, 52 insertions
on
as suggested by Michael Haggerty [2] has been left for a later patch.
[1]: http://marc.info/?l=git&m=140247618416057&w=2
[2]: http://marc.info/?l=git&m=140248834420244&w=2
Jeremiah Mahler (2):
add strbuf_set operations
builtin/remote: improve readability via strbuf_
Michael,
On Wed, Jun 11, 2014 at 02:05:35PM +0200, Michael Haggerty wrote:
> On 06/10/2014 12:19 AM, Jeremiah Mahler 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.
> >
On Wed, Jun 11, 2014 at 04:42:56AM -0400, Eric Sunshine wrote:
> On Mon, Jun 9, 2014 at 6:19 PM, Jeremiah Mahler 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.
> >
&
Eric,
On Wed, Jun 11, 2014 at 04:09:17AM -0400, Eric Sunshine wrote:
> On Mon, Jun 9, 2014 at 6:19 PM, Jeremiah Mahler wrote:
> > Version 2 of the patch set to add strbuf_set operations.
> >
> > Includes suggestions from Eric Sunshine [1]:
> >
> > [...snip...]
&g
(sizeof(*imap), 1);
Why wasn't the second instance swapped? It is still this way in the
latest 'pu' branch.
--
Jeremiah Mahler
jmmah...@gmail.com
http://github.com/jmahler
--
To unsubscribe from this list: send the line "unsubsc
Simplify cases where a strbuf_reset is immediately followed by a
strbuf_add by using strbuf_set operations.
Signed-off-by: Jeremiah Mahler
---
wt-status.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/wt-status.c b/wt-status.c
index 318a191..a89cd73 100644
--- a/wt
Simplify cases where a strbuf_reset is immediately followed by a
strbuf_add by using strbuf_set operations.
Signed-off-by: Jeremiah Mahler
---
ident.c | 6 ++
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/ident.c b/ident.c
index 1d9b6e7..523e249 100644
--- a/ident.c
+++ b
Simplify cases where a strbuf_reset is immediately followed by a
strbuf_add by using strbuf_set operations.
Signed-off-by: Jeremiah Mahler
---
submodule.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/submodule.c b/submodule.c
index 3402af6..878cc48 100644
--- a
Simplify cases where a strbuf_reset is immediately followed by a
strbuf_add by using strbuf_set operations.
Signed-off-by: Jeremiah Mahler
---
vcs-svn/svndump.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/vcs-svn/svndump.c b/vcs-svn/svndump.c
index 31d1d83..7fbf5d8
Simplify cases where a strbuf_reset is immediately followed by a
strbuf_add by using strbuf_set operations.
Signed-off-by: Jeremiah Mahler
---
remote-curl.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/remote-curl.c b/remote-curl.c
index 4493b38..49d27f5 100644
--- a
Simplify cases where a strbuf_reset is immediately followed by a
strbuf_add by using strbuf_set operations.
Signed-off-by: Jeremiah Mahler
---
transport.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/transport.c b/transport.c
index 172b3d8..e8f5dfa 100644
--- a
Simplify cases where a strbuf_reset is immediately followed by a
strbuf_add by using strbuf_set operations.
Signed-off-by: Jeremiah Mahler
---
diffcore-order.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/diffcore-order.c b/diffcore-order.c
index 97dd3d0..5a93971 100644
Simplify cases where a strbuf_reset is immediately followed by a
strbuf_add by using strbuf_set operations.
Signed-off-by: Jeremiah Mahler
---
http.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/http.c b/http.c
index 2b4f6a3..626fed7 100644
--- a/http.c
+++ b/http.c
Simplify cases where a strbuf_reset is immediately followed by a
strbuf_add by using strbuf_set operations.
Signed-off-by: Jeremiah Mahler
---
builtin/mailinfo.c | 18 ++
1 file changed, 6 insertions(+), 12 deletions(-)
diff --git a/builtin/mailinfo.c b/builtin/mailinfo.c
index
Simplify cases where a strbuf_reset is immediately followed by a
strbuf_add by using strbuf_set operations.
Signed-off-by: Jeremiah Mahler
---
builtin/tag.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/builtin/tag.c b/builtin/tag.c
index c6e8a71..b545c21 100644
--- a
Simplify cases where a strbuf_reset is immediately followed by a
strbuf_add by using strbuf_set operations.
Signed-off-by: Jeremiah Mahler
---
date.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/date.c b/date.c
index 782de95..0b723a4 100644
--- a/date.c
+++ b/date.c
Simplify cases where a strbuf_reset is immediately followed by a
strbuf_add by using strbuf_set operations.
Signed-off-by: Jeremiah Mahler
---
http-backend.c | 6 ++
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/http-backend.c b/http-backend.c
index d2c0a62..25c7435 100644
Simplify cases where a strbuf_reset is immediately followed by a
strbuf_add by using strbuf_set operations.
Signed-off-by: Jeremiah Mahler
---
fast-import.c | 6 ++
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/fast-import.c b/fast-import.c
index e8ec34d..cfe9404 100644
Simplify cases where a strbuf_reset is immediately followed by a
strbuf_add by using strbuf_set operations.
Signed-off-by: Jeremiah Mahler
---
builtin/remote.c | 59
1 file changed, 21 insertions(+), 38 deletions(-)
diff --git a/builtin
ations which allow this common sequence
to be performed in one line instead of two.
strbuf_set(buf, cb.buf.buf, cb.buf.len);
Signed-off-by: Jeremiah Mahler
---
Documentation/technical/api-strbuf.txt | 18 ++
strbuf.c | 21 +
Simplify cases where a strbuf_reset is immediately followed by a
strbuf_add by using strbuf_set operations.
Signed-off-by: Jeremiah Mahler
---
builtin/checkout.c | 18 ++
1 file changed, 6 insertions(+), 12 deletions(-)
diff --git a/builtin/checkout.c b/builtin/checkout.c
index
Simplify cases where a strbuf_reset is immediately followed by a
strbuf_add by using strbuf_set operations.
Signed-off-by: Jeremiah Mahler
---
branch.c | 6 ++
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/branch.c b/branch.c
index 660097b..bc7cc7e 100644
--- a/branch.c
Simplify cases where a strbuf_reset is immediately followed by a
strbuf_add by using strbuf_set operations.
Signed-off-by: Jeremiah Mahler
---
builtin/branch.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/builtin/branch.c b/builtin/branch.c
index 2d1c57c..ad641b6 100644
Simplify cases where a strbuf_reset is immediately followed by a
strbuf_add by using strbuf_set operations.
Signed-off-by: Jeremiah Mahler
---
sha1_name.c | 15 +--
1 file changed, 5 insertions(+), 10 deletions(-)
diff --git a/sha1_name.c b/sha1_name.c
index 2b6322f..f88b66c 100644
amp;mybuf, ...); /* Replace 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=git&m=140230874124060&w=2
Jeremiah Mahler (19):
add strbuf_set operations
sha1_name: sim
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 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.
> >
&
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 wrote:
> > Subject: fast-import.c: cleanup using strbuf_set operations
>
...
>
> > Signed-off-by: Jeremiah Mahler
> > ---
> > fast-import.
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 wrote:
> > Add documentation of the strbuf_set operations to
> > technical/api-strbuf.txt.
>
> Since this patch is concise and so closely related to pat
Simplified cases where a strbuf_reset was immediately followed by a
strbuf_add using the new strbuf_set operations.
Signed-off-by: Jeremiah Mahler
---
sha1_name.c | 15 +--
1 file changed, 5 insertions(+), 10 deletions(-)
diff --git a/sha1_name.c b/sha1_name.c
index 2b6322f
Simplified cases where a strbuf_reset was immediately followed by a
strbuf_add using the new strbuf_set operations.
Signed-off-by: Jeremiah Mahler
---
builtin/remote.c | 51 +--
1 file changed, 17 insertions(+), 34 deletions(-)
diff --git a
Add documentation of the strbuf_set operations to
technical/api-strbuf.txt.
Signed-off-by: Jeremiah Mahler
---
Documentation/technical/api-strbuf.txt | 18 ++
1 file changed, 18 insertions(+)
diff --git a/Documentation/technical/api-strbuf.txt
b/Documentation/technical/api
buf_set operations which allow 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 operatio
Simplified cases where a strbuf_reset was immediately followed by a
strbuf_add using the new strbuf_set operations.
Signed-off-by: Jeremiah Mahler
---
fast-import.c | 19 ++-
1 file changed, 6 insertions(+), 13 deletions(-)
diff --git a/fast-import.c b/fast-import.c
index
ations which allow this common sequence
to be performed in one line instead of two.
strbuf_set(buf, cb.buf.buf, cb.buf.len);
Signed-off-by: Jeremiah Mahler
---
strbuf.c | 21 +
strbuf.h | 14 ++
2 files changed, 35 insertions(+)
diff --git a/strbuf.c b/strbuf.c
index
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
---
Documentation/technical/api-strbuf.txt | 10 +-
1
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
---
t/t7810-grep.sh | 5 -
1 file changed, 5 deletions(-)
diff --git a/t/t7810-grep.sh b/t/t7810-grep.sh
index
On Mon, Jun 02, 2014 at 12:05:29PM -0700, Junio C Hamano wrote:
> Johannes Sixt writes:
>
> >> Jeremiah Mahler (9):
> >> compat/mingw.c: expand MinGW support for sigaction
> >> connect.c: replace signal() with sigaction()
> >> p
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(
>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: Jerem
>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 Mah
>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 Mah
>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 Mah
>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 Mah
which would 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 s
>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 Mah
>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 Mah
>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 Mah
to use 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
---
compat/mingw.c
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;
>
SIGALRM. Now it works as expected.
I have tested these changes under Linux and under Windows 7 using Msysgit.
[1]: http://marc.info/?l=git&m=140125769223552&w=2
[2]: http://marc.info/?l=git&m=140126288325213&w=2
Jeremiah Mahler (2):
compat/mingw.c: expand MinGW support for sigac
to use 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
---
compat/mingw.c
>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 Mah
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.
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.
>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 Mah
>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 Mah
1 - 100 of 161 matches
Mail list logo