Re: [PATCH] refs.c: handle REFNAME_REFSPEC_PATTERN at end of page

2014-07-09 Thread Øyvind A . Holm
On 7 July 2014 20:05, Junio C Hamano gits...@pobox.com wrote:
 David Turner dtur...@twopensource.com writes:
  When a ref crosses a memory page boundary, we restart the parsing at
  the beginning with the bytewise code.  Pass the original flags to
  that code, rather than the current flags.

 Good.

I've run the whole test suite with this patch applied, and it fixes the
problem on 64-bit Debian 7.5.

 I probably should add:
 Reported-by: Øyvind A. Holm su...@sunbase.org

 before your sign-off.

Thanks. :)

Cheers,
Øyvind
--
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


[PATCH] refs.c: handle REFNAME_REFSPEC_PATTERN at end of page

2014-07-05 Thread David Turner
When a ref crosses a memory page boundary, we restart the parsing
at the beginning with the bytewise code.  Pass the original flags
to that code, rather than the current flags.

Signed-off-by: David Turner dtur...@twitter.com
---
 refs.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/refs.c b/refs.c
index 20e2bf1..82e4842 100644
--- a/refs.c
+++ b/refs.c
@@ -153,6 +153,7 @@ int check_refname_format(const char *refname, int flags)
const __m128i tilde_lb = _mm_set1_epi8('~' - 1);
 
int component_count = 0;
+   int orig_flags = flags;
 
if (refname[0] == 0 || refname[0] == '/') {
/* entirely empty ref or initial ref component */
@@ -178,7 +179,7 @@ int check_refname_format(const char *refname, int flags)
 * End-of-page; fall back to slow method for
 * this entire ref.
 */
-   return check_refname_format_bytewise(refname, flags);
+   return check_refname_format_bytewise(refname, 
orig_flags);
 
tmp = _mm_loadu_si128((__m128i *)cp);
tmp1 = _mm_loadu_si128((__m128i *)(cp + 1));
-- 
2.0.0.390.gcb682f8

--
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