Re: [PATCH v3] sha1_file: do not add own object directory as alternate

2014-07-15 Thread Ephrim Khong
On 15.07.2014 21:48, Junio C Hamano wrote: Ephrim Khong writes: +test_expect_success setup ' + GIT_OBJECT_DIRECTORY=.git//../.git/objects && + export GIT_OBJECT_DIRECTORY && Do you need this artificially strange environment settings for the problem to manifest itself, or is it suf

Re: [PATCH v3] sha1_file: do not add own object directory as alternate

2014-07-15 Thread Ephrim Khong
On 15.07.2014 21:26, Junio C Hamano wrote: + strbuf_addstr(&objdirbuf, absolute_path(get_object_directory())); + normalize_path_copy(objdirbuf.buf, objdirbuf.buf); This is somewhat a strange usage of a strbuf. There might be a more elegant way, but I tried to mimic the local codin

Re: [PATCH 2/2] config: use chmod() instead of fchmod()

2014-07-15 Thread Johannes Sixt
Am 16.07.2014 00:54, schrieb Karsten Blees: > There is no fchmod() on native Windows platforms (MinGW and MSVC), and the > equivalent Win32 API (SetFileInformationByHandle) requires Windows Vista. > > Use chmod() instead. > > Signed-off-by: Karsten Blees > --- > config.c | 8 > 1 file

Your mailbox is almost full.

2014-07-15 Thread Broginski, Jennifer
Your mailbox is almost full. 1961MB 2048MB Current sizeMaximum size Please reduce your mailbox size. There are some hidden files in your mailbox that you might not be able to delete thus we advise that you CLICK HERE to request for

Re: [PATCH 2/2 v4] tag: support configuring --sort via .gitconfig

2014-07-15 Thread Duy Nguyen
On Fri, Jul 11, 2014 at 6:52 AM, Jacob Keller wrote: > Add support for configuring default sort ordering for git tags. Command > line option will override this configured value, using the exact same > syntax. Kinda off topic, but I wish we could show these default overriding settings when GIT_TRA

Re: [PATCH v8 1/4] usage: make error functions a stack

2014-07-15 Thread Junio C Hamano
I actually am not a big fan of "stack" for a thing like this, to be honest. Wouldn't it be sufficient for the callers who want specific behaviour from its callees to - save away the current error/warning routines; - set error/warning routines to its own custom versions; - call the callees; - s

Re: [PATCH 1/2] MinGW: fix compile error due to missing ELOOP

2014-07-15 Thread Karsten Blees
Am 16.07.2014 01:42, schrieb Jonathan Nieder: > Karsten Blees wrote: > >> MinGW and MSVC before 2010 don't define ELOOP, use EMLINK (aka "Too many >> links") instead. > [...] >> +#ifndef ELOOP >> +#define ELOOP EMLINK >> +#endif > > This could use > > #define ELOOP WSAELOOP > > as an alte

Re: [PATCH v9 4/4] tag: support configuring --sort via .gitconfig

2014-07-15 Thread Keller, Jacob E
On Tue, 2014-07-15 at 19:42 -0400, Jeff King wrote: > On Tue, Jul 15, 2014 at 04:32:59PM -0700, Jacob Keller wrote: > > > +static void error_bad_sort_config(const char *err, va_list params) > > +{ > > + vreportf("warning: tag.sort has ", err, params); > > +} > > This feels a little like an abus

Re: [PATCH 1/2] MinGW: fix compile error due to missing ELOOP

2014-07-15 Thread Jonathan Nieder
Karsten Blees wrote: > MinGW and MSVC before 2010 don't define ELOOP, use EMLINK (aka "Too many > links") instead. [...] > +#ifndef ELOOP > +#define ELOOP EMLINK > +#endif This could use #define ELOOP WSAELOOP as an alternative. But it shouldn't matter since git doesn't look for EMLINK

Re: [PATCH v9 4/4] tag: support configuring --sort via .gitconfig

2014-07-15 Thread Jeff King
On Tue, Jul 15, 2014 at 04:32:59PM -0700, Jacob Keller wrote: > +static void error_bad_sort_config(const char *err, va_list params) > +{ > + vreportf("warning: tag.sort has ", err, params); > +} This feels a little like an abuse of the "prefix" field of vreportf, but as you probably saw in my

[PATCH 16/20] refs.c: remove the update_ref_lock function

2014-07-15 Thread Ronnie Sahlberg
Since we now only call update_ref_lock with onerr==QUIET_ON_ERR we no longer need this function and can replace it with just calling lock_any_ref_for_update directly. Reviewed-by: Jonathan Nieder Signed-off-by: Ronnie Sahlberg --- refs.c | 30 ++ 1 file changed, 6 in

Re: [PATCH 00/20] ref transactions part 2

2014-07-15 Thread Ronnie Sahlberg
Hi Michael, Here is the next set of 20 patches of those you already reviewed. I cut this patch off just before patch #40 in the previous series. These are the patches numbered 20-39 in the original series. I think I have addressed your concerns here so If you could take a quick look and hopefully

Re: [PATCH 3/3] tag: support configuring --sort via .gitconfig

2014-07-15 Thread Jeff King
On Tue, Jul 15, 2014 at 09:03:53AM -0700, Junio C Hamano wrote: > > Do we want to go this way? > > I do not speak for Peff, but I personally think this is just a "fun" > demonstration, nothing more, and my gut feeling is that it would > make things unnecessary complex without much real gain to pu

[PATCH 10/20] branch.c: use ref transaction for all ref updates

2014-07-15 Thread Ronnie Sahlberg
Change create_branch to use a ref transaction when creating the new branch. This also fixes a race condition in the old code where two concurrent create_branch could race since the lock_any_ref_for_update/write_ref_sha1 did not protect against the ref already existing. I.e. one thread could end up

[PATCH 00/20] ref transactions part 2

2014-07-15 Thread Ronnie Sahlberg
This is the next 20 patches from my originally big patch series and follow the previous 19 patches that is now in juns tree. These patches were numbered 20-39 in the original 48-patch series. Changes since these patches were in the original series: - Addressing concerns from mhagger's review Ro

[PATCH 08/20] sequencer.c: use ref transactions for all ref updates

2014-07-15 Thread Ronnie Sahlberg
Change to use ref transactions for all updates to refs. Reviewed-by: Jonathan Nieder Signed-off-by: Ronnie Sahlberg --- sequencer.c | 27 ++- 1 file changed, 18 insertions(+), 9 deletions(-) diff --git a/sequencer.c b/sequencer.c index 9230474..cf17c69 100644 --- a/sequ

[PATCH 05/20] tag.c: use ref transactions when doing updates

2014-07-15 Thread Ronnie Sahlberg
Change tag.c to use ref transactions for all ref updates. Reviewed-by: Jonathan Nieder Signed-off-by: Ronnie Sahlberg --- builtin/tag.c | 15 +-- 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/builtin/tag.c b/builtin/tag.c index c6e8a71..1aa88a2 100644 --- a/builtin/t

[PATCH 03/20] refs.c: make ref_transaction_begin take an err argument

2014-07-15 Thread Ronnie Sahlberg
Add an err argument to _begin so that on non-fatal failures in future ref backends we can report a nice error back to the caller. While _begin can currently never fail for other reasons than OOM, in which case we die() anyway, we may add other types of backends in the future. For example, a hypothe

[PATCH 09/20] fast-import.c: change update_branch to use ref transactions

2014-07-15 Thread Ronnie Sahlberg
Change update_branch() to use ref transactions for updates. Reviewed-by: Jonathan Nieder Signed-off-by: Ronnie Sahlberg --- fast-import.c | 24 ++-- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/fast-import.c b/fast-import.c index 6707a66..d5206ee 100644 --

[PATCH 06/20] replace.c: use the ref transaction functions for updates

2014-07-15 Thread Ronnie Sahlberg
Update replace.c to use ref transactions for updates. Reviewed-by: Jonathan Nieder Signed-off-by: Ronnie Sahlberg --- builtin/replace.c | 15 +-- 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/builtin/replace.c b/builtin/replace.c index 1bb491d..7528f3d 100644 --- a/b

[PATCH 11/20] refs.c: change update_ref to use a transaction

2014-07-15 Thread Ronnie Sahlberg
Change the update_ref helper function to use a ref transaction internally. Reviewed-by: Jonathan Nieder Signed-off-by: Ronnie Sahlberg --- refs.c | 28 1 file changed, 24 insertions(+), 4 deletions(-) diff --git a/refs.c b/refs.c index d015285..ff4e799 100644 --- a

[PATCH 01/20] refs.c: change ref_transaction_create to do error checking and return status

2014-07-15 Thread Ronnie Sahlberg
Do basic error checking in ref_transaction_create() and make it return non-zero on error. Update all callers to check the result of ref_transaction_create(). There are currently no conditions in _create that will return error but there will be in the future. Add an err argument that will be updated

[PATCH 14/20] walker.c: use ref transaction for ref updates

2014-07-15 Thread Ronnie Sahlberg
Switch to using ref transactions in walker_fetch(). As part of the refactoring to use ref transactions we also fix a potential memory leak where in the original code if write_ref_sha1() would fail we would end up returning from the function without free()ing the msg string. Note that this function

[PATCH 02/20] refs.c: update ref_transaction_delete to check for error and return status

2014-07-15 Thread Ronnie Sahlberg
Change ref_transaction_delete() to do basic error checking and return non-zero of error. Update all callers to check the return for ref_transaction_delete(). There are currently no conditions in _delete that will return error but there will be in the future. Add an err argument that will be updated

[PATCH 04/20] refs.c: add transaction.status and track OPEN/CLOSED/ERROR

2014-07-15 Thread Ronnie Sahlberg
Track the state of a transaction in a new state field. Check the field for sanity, i.e. that state must be OPEN when _commit/_create/_delete or _update is called or else die(BUG:...) Signed-off-by: Ronnie Sahlberg --- refs.c | 39 ++- 1 file changed, 38 insert

[PATCH 12/20] receive-pack.c: use a reference transaction for updating the refs

2014-07-15 Thread Ronnie Sahlberg
Wrap all the ref updates inside a transaction. Signed-off-by: Ronnie Sahlberg --- builtin/receive-pack.c | 96 +- 1 file changed, 63 insertions(+), 33 deletions(-) diff --git a/builtin/receive-pack.c b/builtin/receive-pack.c index c323081..91099ad

[PATCH 13/20] fast-import.c: use a ref transaction when dumping tags

2014-07-15 Thread Ronnie Sahlberg
Reviewed-by: Jonathan Nieder Signed-off-by: Ronnie Sahlberg --- fast-import.c | 29 +++-- 1 file changed, 23 insertions(+), 6 deletions(-) diff --git a/fast-import.c b/fast-import.c index d5206ee..a95e1be 100644 --- a/fast-import.c +++ b/fast-import.c @@ -1734,15 +1734,3

[PATCH 20/20] refs.c: make delete_ref use a transaction

2014-07-15 Thread Ronnie Sahlberg
Change delete_ref to use a ref transaction for the deletion. At the same time since we no longer have any callers of repack_without_ref we can now delete this function. Change delete_ref to return 0 on success and 1 on failure instead of the previous 0 on success either 1 or -1 on failure. Review

[PATCH 17/20] refs.c: remove the update_ref_write function

2014-07-15 Thread Ronnie Sahlberg
Since we only call update_ref_write from a single place and we only call it with onerr==QUIET_ON_ERR we can just as well get rid of it and just call write_ref_sha1 directly. This changes the return status for _commit from 1 to -1 on failures when writing to the ref. Eventually we will want _commit

[PATCH 15/20] refs.c: make lock_ref_sha1 static

2014-07-15 Thread Ronnie Sahlberg
No external callers reference lock_ref_sha1 any more so lets declare it static. Reviewed-by: Jonathan Nieder Signed-off-by: Ronnie Sahlberg --- refs.c | 2 +- refs.h | 6 -- 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/refs.c b/refs.c index ff4e799..10cea87 100644 --- a/ref

[PATCH 19/20] refs.c: make prune_ref use a transaction to delete the ref

2014-07-15 Thread Ronnie Sahlberg
Change prune_ref to delete the ref using a ref transaction. To do this we also need to add a new flag REF_ISPRUNING that will tell the transaction that we do not want to delete this ref from the packed refs. This flag is private to refs.c and not exposed to external callers. Reviewed-by: Jonathan

[PATCH 07/20] commit.c: use ref transactions for updates

2014-07-15 Thread Ronnie Sahlberg
Change commit.c to use ref transactions for all ref updates. Make sure we pass a NULL pointer to ref_transaction_update if have_old is false. Reviewed-by: Jonathan Nieder Signed-off-by: Ronnie Sahlberg --- builtin/commit.c | 24 +++- 1 file changed, 11 insertions(+), 13 dele

[PATCH 18/20] refs.c: remove lock_ref_sha1

2014-07-15 Thread Ronnie Sahlberg
lock_ref_sha1 was only called from one place in refc.c and only provided a check that the refname was sane before adding back the initial "refs/" part of the ref path name, the initial "refs/" that this caller had already stripped off before calling lock_ref_sha1. Reviewed-by: Jonathan Nieder Sig

[PATCH v9 3/4] tag: update parsing to be more precise regarding errors

2014-07-15 Thread Jacob Keller
Update the parsing of sort string specifications so that it is able to properly detect errors in the function type and allowed atoms. Cc: Jeff King Signed-off-by: Jacob Keller --- builtin/tag.c | 55 +-- 1 file changed, 41 insertions(+), 14 de

[PATCH v9 2/4] tag: fix --sort tests to use cat<<-\EOF format

2014-07-15 Thread Jacob Keller
The --sort tests should use the better format for >expect to maintain indenting and ensure that no substitution is occurring. This makes parsing and understanding the tests a bit easier. Signed-off-by: Jacob Keller --- t/t7004-tag.sh | 40 1 file changed,

[PATCH v9 1/4] usage: make error functions a stack

2014-07-15 Thread Jacob Keller
Rename set_error_routine to be push_error_routine, and add a new pop_error_routine. This allows temporary modifications of the error routine over a small block of code. Signed-off-by: Jacob Keller --- Renamed set_error_routine to push_error_routine in order to match the pop_error_routine. git-c

[PATCH v9 4/4] tag: support configuring --sort via .gitconfig

2014-07-15 Thread Jacob Keller
Add support for configuring default sort specification for git tags. Command line option will override the configured value. Both methods use the same syntax. Make use of (set/pop)_error_routine to temporarily modify error reporting when parsing as a configuration option. Cc: Jeff King Signed-off

Re: [PATCH v8 1/4] usage: make error functions a stack

2014-07-15 Thread Keller, Jacob E
On Tue, 2014-07-15 at 15:47 -0700, Junio C Hamano wrote: > Jacob Keller writes: > > > extern void set_error_routine(void (*routine)(const char *err, va_list > > params)); > > +extern void pop_error_routine(void); > > pop that undoes set smells somewhat weird. Perhaps we should rename > set to

Re: [PATCH v8 1/4] usage: make error functions a stack

2014-07-15 Thread Keller, Jacob E
On Tue, 2014-07-15 at 15:47 -0700, Junio C Hamano wrote: > Jacob Keller writes: > > > extern void set_error_routine(void (*routine)(const char *err, va_list > > params)); > > +extern void pop_error_routine(void); > > pop that undoes set smells somewhat weird. Perhaps we should rename > set to

Re: [PATCH] refs.c: add a public is_branch function

2014-07-15 Thread Jonathan Nieder
Ronnie Sahlberg wrote: > Signed-off-by: Ronnie Sahlberg > --- > builtin/fsck.c | 5 - > refs.c | 2 +- > refs.h | 2 ++ > 3 files changed, 3 insertions(+), 6 deletions(-) Makes sense -- thanks. (This is an old one: v1.5.4-rc4~27 (2008-01-15), v1.5.4-rc4~30 (2008-01-15). Mo

[PATCH] remove duplicate of is_branch

2014-07-15 Thread Ronnie Sahlberg
Jun, List Please find a trivial patch that makes refs.c:is_branch public. This allows us to delete the identical copy of is_branch in fsck.c Ronnie Sahlberg (1): refs.c: add a public is_branch function builtin/fsck.c | 5 - refs.c | 2 +- refs.h | 2 ++ 3 files changed, 3

[PATCH] refs.c: add a public is_branch function

2014-07-15 Thread Ronnie Sahlberg
Both refs.c and fsck.c have their own private copies of the is_branch function. Delete the is_branch function from fsck.c and make the version in refs.c public. Signed-off-by: Ronnie Sahlberg --- builtin/fsck.c | 5 - refs.c | 2 +- refs.h | 2 ++ 3 files changed, 3 insertion

[PATCH 2/2] config: use chmod() instead of fchmod()

2014-07-15 Thread Karsten Blees
There is no fchmod() on native Windows platforms (MinGW and MSVC), and the equivalent Win32 API (SetFileInformationByHandle) requires Windows Vista. Use chmod() instead. Signed-off-by: Karsten Blees --- config.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/config.

[PATCH 1/2] MinGW: fix compile error due to missing ELOOP

2014-07-15 Thread Karsten Blees
MinGW and MSVC before 2010 don't define ELOOP, use EMLINK (aka "Too many links") instead. Signed-off-by: Karsten Blees --- compat/mingw.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/compat/mingw.h b/compat/mingw.h index 405c08f..510530c 100644 --- a/compat/mingw.h +++ b/compat/mingw.h

Re: [PATCH 0/3] fix test suite with mingw-unicode patches

2014-07-15 Thread Karsten Blees
Am 15.07.2014 20:20, schrieb Junio C Hamano: > Stepan Kasal writes: > >> Hello Hannes, >> attached please find the patches that Karsten pointed out: >> >> 1) The unicode file name support was omitted from his unicode patch >> series; my mistake, sorry. There is still big part missing: support >>

Re: [PATCH v8 1/4] usage: make error functions a stack

2014-07-15 Thread Junio C Hamano
Jacob Keller writes: > extern void set_error_routine(void (*routine)(const char *err, va_list > params)); > +extern void pop_error_routine(void); pop that undoes set smells somewhat weird. Perhaps we should rename set to push? That would allow us catch possible topics that add new calls to s

Re: [PATCH v8 0/4] tag: configure default tag sort via .gitconfig

2014-07-15 Thread Junio C Hamano
Jacob Keller writes: > This patch series is hopefully the final version of a series of patches which > updates git-tag to allow the .gitconfig variable 'tag.sort' to be used as the > default sort parameter. This version uses a new set/pop error routine setup > which enables correctly modifying th

Re: [PATCH v2 3/4] use new config API for worktree configurations of submodules

2014-07-15 Thread Junio C Hamano
Heiko Voigt writes: >> Can there be any caller that include and use submodule-config.h that >> does not need anythjing from submodule.h? Or vice versa? >> >> It just did not look like these two headers describe independent >> subsystems but they almost always have to go hand-in-hand. And if >>

Re: [PATCH 3/3] tag: support configuring --sort via .gitconfig

2014-07-15 Thread Keller, Jacob E
On Tue, 2014-07-15 at 12:12 -0700, Junio C Hamano wrote: > "Keller, Jacob E" writes: > > > I am going to re-submit this with an enum-style return. I am also > > changing how we parse so that we can correctly report whether the sort > > function or sort atom is incorrect. > > Oh, our mails crosse

Re: [PATCH v9 1/4] cache-tree: Create/update cache-tree on checkout

2014-07-15 Thread Junio C Hamano
Torsten Bögershausen writes: > On 07/13/2014 10:28 PM, David Turner wrote: >> From: David Turner > [] >> diff --git a/cache-tree.c b/cache-tree.c >> index 7fa524a..f951d7d 100644 >> --- a/cache-tree.c >> +++ b/cache-tree.c >> @@ -239,9 +239,12 @@ static int update_one(struct cache_tree *it, >>

[PATCH v8 3/4] tag: update parsing to be more precise regarding errors

2014-07-15 Thread Jacob Keller
Update the parsing of sort string specifications so that it is able to properly detect errors in the function type and allowed atoms. Cc: Jeff King Signed-off-by: Jacob Keller --- This function should replace the one I think is already on one of the branches. This version fully updates the parse

[PATCH v8 1/4] usage: make error functions a stack

2014-07-15 Thread Jacob Keller
Let error routine be a stack of error functions so that callers can temporarily override the error_routine and then pop their modification off the stack. This enables customizing error for a small code segment. Signed-off-by: Jacob Keller --- This is a modification of Peff's original idea for han

[PATCH v8 4/4] tag: support configuring --sort via .gitconfig

2014-07-15 Thread Jacob Keller
Add support for configuring default sort specification for git tags. Command line option will override the configured value. Both methods use the same syntax. Make use of (set/pop)_error_routine to temporarily modify error reporting when parsing as a configuration option. Cc: Jeff King Signed-off

[PATCH v8 2/4] tag: fix --sort tests to use cat<<-\EOF format

2014-07-15 Thread Jacob Keller
The --sort tests should use the better format for >expect to maintain indenting and ensure that no substitution is occurring. This makes parsing and understanding the tests a bit easier. Signed-off-by: Jacob Keller --- t/t7004-tag.sh | 40 1 file changed,

[PATCH v8 0/4] tag: configure default tag sort via .gitconfig

2014-07-15 Thread Jacob Keller
This patch series is hopefully the final version of a series of patches which updates git-tag to allow the .gitconfig variable 'tag.sort' to be used as the default sort parameter. This version uses a new set/pop error routine setup which enables correctly modifying the error routine to handle the c

Re: [PATCH v20 43/48] refs.c: move the check for valid refname to lock_ref_sha1_basic

2014-07-15 Thread Ronnie Sahlberg
On Tue, Jul 15, 2014 at 12:34 PM, Ronnie Sahlberg wrote: > On Tue, Jul 15, 2014 at 11:04 AM, Jonathan Nieder wrote: >> Michael Haggerty wrote: >> >>> So...I like the idea of enforcing refname checks at the lowest level >>> possible, but I think that the change you propose is too abrupt. I >>> th

Re: [PATCH 3/3] tag: support configuring --sort via .gitconfig

2014-07-15 Thread Keller, Jacob E
On Tue, 2014-07-15 at 12:12 -0700, Junio C Hamano wrote: > "Keller, Jacob E" writes: > > > I am going to re-submit this with an enum-style return. I am also > > changing how we parse so that we can correctly report whether the sort > > function or sort atom is incorrect. > > Oh, our mails crosse

Re: [PATCH v2 3/8] move setting of object->type to alloc_* functions

2014-07-15 Thread Junio C Hamano
Jeff King writes: > diff --git a/alloc.c b/alloc.c > index 03e458b..fd2e32d 100644 > --- a/alloc.c > +++ b/alloc.c > @@ -52,6 +52,7 @@ static struct alloc_state blob_state; > void *alloc_blob_node(void) > { > struct blob *b = alloc_node(&blob_state, sizeof(struct blob)); > + b->object

Re: [PATCH v2 2/8] alloc: write out allocator definitions

2014-07-15 Thread Junio C Hamano
Jeff King writes: > Because the allocator functions for tree, blobs, etc are all > very similar, we originally used a macro to avoid repeating > ourselves. Since the prior commit, though, the heavy lifting > is done by an inline helper function. The macro does still > save us a few lines, but at

Re: [PATCH v2 1/8] alloc.c: remove the alloc_raw_commit_node() function

2014-07-15 Thread Junio C Hamano
Jeff King writes: > #define DEFINE_ALLOCATOR(name, type) \ > +static struct alloc_state name##_state; \ > void *alloc_##name##_node(void) \ > {\

Re: [PATCH v3] sha1_file: do not add own object directory as alternate

2014-07-15 Thread Junio C Hamano
Ephrim Khong writes: > diff --git a/t/t7702-repack-cyclic-alternate.sh > b/t/t7702-repack-cyclic-alternate.sh > new file mode 100755 > index 000..8341d46 > --- /dev/null > +++ b/t/t7702-repack-cyclic-alternate.sh > @@ -0,0 +1,24 @@ > +#!/bin/sh > +# > +# Copyright (c) 2014 Ephrim Khong > +#

Re: [PATCH 2/2] rebase: omit patch-identical commits with --fork-point

2014-07-15 Thread Ted Felix
Thanks, John. My test script is working fine for me now with these patches. -- 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 v9 1/4] cache-tree: Create/update cache-tree on checkout

2014-07-15 Thread Torsten Bögershausen
On 07/13/2014 10:28 PM, David Turner wrote: From: David Turner [] diff --git a/cache-tree.c b/cache-tree.c index 7fa524a..f951d7d 100644 --- a/cache-tree.c +++ b/cache-tree.c @@ -239,9 +239,12 @@ static int update_one(struct cache_tree *it, struct strbuf buffer; int missing_ok

Re: [PATCH v20 43/48] refs.c: move the check for valid refname to lock_ref_sha1_basic

2014-07-15 Thread Ronnie Sahlberg
On Tue, Jul 15, 2014 at 11:34 AM, Junio C Hamano wrote: > Jonathan Nieder writes: > >> How to take care of the recovery use case is another question. FWIW I >> also would prefer if "git update-ref -d" or "git branch -D" could be >> used to delete corrupt refs instead of having to use fsck (since

Re: [PATCH v20 43/48] refs.c: move the check for valid refname to lock_ref_sha1_basic

2014-07-15 Thread Ronnie Sahlberg
On Tue, Jul 15, 2014 at 11:04 AM, Jonathan Nieder wrote: > Michael Haggerty wrote: > >> So...I like the idea of enforcing refname checks at the lowest level >> possible, but I think that the change you propose is too abrupt. I >> think it needs either more careful analysis showing that it won't h

Re: [PATCH v3] sha1_file: do not add own object directory as alternate

2014-07-15 Thread Eric Sunshine
On Tue, Jul 15, 2014 at 7:29 AM, Ephrim Khong wrote: > When adding alternate object directories, we try not to add the > directory of the current repository to avoid cycles. Unfortunately, > that test was broken, since it compared an absolute with a relative > path. > > Signed-off-by: Ephrim Khon

Re: [PATCH] doc: State coding guideline for error message punctuation

2014-07-15 Thread Philip Oakley
From: "Junio C Hamano" Sent: Thursday, July 10, 2014 9:36 PM Jeff King writes: On Mon, Jun 16, 2014 at 01:55:57PM +0100, Philip Oakley wrote: +Error Messages + + - We typically do not end error messages with a full stop. While + we've been rather inconsistent in the past, these days we mo

Re: [PATCH v3] sha1_file: do not add own object directory as alternate

2014-07-15 Thread Junio C Hamano
Ephrim Khong writes: > @@ -320,7 +320,7 @@ static int link_alt_odb_entry(const char *entry, const > char *relative_base, int > return -1; > } > } > - if (!strcmp(ent->base, objdir)) { > + if (!strcmp_icase(ent->base, normalized_objdir)) { Not a

[PATCH 1/2] rebase--am: use --cherry-pick instead of --ignore-if-in-upstream

2014-07-15 Thread John Keeping
When using `git format-patch --ignore-if-in-upstream` we are only allowed to give a single revision range. In the next commit we will want to add an additional exclusion revision in order to handle fork points correctly, so convert `git-rebase--am` to use a symmetric difference with `--cherry-pick

Re: [PATCH 3/3] tag: support configuring --sort via .gitconfig

2014-07-15 Thread Junio C Hamano
"Keller, Jacob E" writes: > I am going to re-submit this with an enum-style return. I am also > changing how we parse so that we can correctly report whether the sort > function or sort atom is incorrect. Oh, our mails crossed, I guess. As long as it will leave the door open for later enhanceme

Re: [PATCH 3/3] tag: support configuring --sort via .gitconfig

2014-07-15 Thread Junio C Hamano
Junio C Hamano writes: > "Keller, Jacob E" writes: > >> On Tue, 2014-07-15 at 09:03 -0700, Junio C Hamano wrote: >> ... >>> >> Yes, that is fun. >>> >> >>> >> I actually think your "In 'version:pefname' and 'wersion:refname', >>> >> we want be able to report 'pefname' and 'wersion' are misspell

Re: [PATCH v1 1/3] dir.c: coding style fix

2014-07-15 Thread Junio C Hamano
Karsten Blees writes: > Am 15.07.2014 00:30, schrieb Junio C Hamano: >> Karsten Blees writes: >> >>> From: =?UTF-8?q?Nguy=E1=BB=85n=20Th=C3=A1i=20Ng=E1=BB=8Dc=20Duy?= >>> >>> >>> Signed-off-by: Nguyễn Thái Ngọc Duy >>> Signed-off-by: Karsten Blees >>> --- >> >> Thanks for forwarding. I'l

Re: [PATCH v1 1/3] dir.c: coding style fix

2014-07-15 Thread Karsten Blees
Am 15.07.2014 00:30, schrieb Junio C Hamano: > Karsten Blees writes: > >> From: =?UTF-8?q?Nguy=E1=BB=85n=20Th=C3=A1i=20Ng=E1=BB=8Dc=20Duy?= >> >> >> Signed-off-by: Nguyễn Thái Ngọc Duy >> Signed-off-by: Karsten Blees >> --- > > Thanks for forwarding. I'll fix-up the Yikes (see how these tw

Re: [PATCH v20 43/48] refs.c: move the check for valid refname to lock_ref_sha1_basic

2014-07-15 Thread Junio C Hamano
Jonathan Nieder writes: > How to take care of the recovery use case is another question. FWIW I > also would prefer if "git update-ref -d" or "git branch -D" could be > used to delete corrupt refs instead of having to use fsck (since a > fsck run can take a while), but that's a question for a la

Re: [PATCH 3/3] tag: support configuring --sort via .gitconfig

2014-07-15 Thread Keller, Jacob E
On Tue, 2014-07-15 at 11:17 -0700, Junio C Hamano wrote: > "Keller, Jacob E" writes: > > > On Tue, 2014-07-15 at 09:03 -0700, Junio C Hamano wrote: > > ... > >> >> Yes, that is fun. > >> >> > >> >> I actually think your "In 'version:pefname' and 'wersion:refname', > >> >> we want be able to repo

Re: [PATCH v9 2/2] test-config: add tests for the config_set API

2014-07-15 Thread Junio C Hamano
Tanay Abhra writes: > ... I need it for > test_expect_success 'proper error on error in default config files' ' > which requires me to compare the line no at which the error was found. I see. We may want to later rethink the way you validate the line numbers, but in the meantime I think the ver

Re: [PATCH 0/3] fix test suite with mingw-unicode patches

2014-07-15 Thread Junio C Hamano
Stepan Kasal writes: > Hello Hannes, > attached please find the patches that Karsten pointed out: > > 1) The unicode file name support was omitted from his unicode patch > series; my mistake, sorry. There is still big part missing: support > for unicode environment; I can only hope the tests wou

Re: [PATCH 3/3] tag: support configuring --sort via .gitconfig

2014-07-15 Thread Junio C Hamano
"Keller, Jacob E" writes: > On Tue, 2014-07-15 at 09:03 -0700, Junio C Hamano wrote: > ... >> >> Yes, that is fun. >> >> >> >> I actually think your "In 'version:pefname' and 'wersion:refname', >> >> we want be able to report 'pefname' and 'wersion' are misspelled, >> >> and returning -1 or enum

Re: [PATCH v20 43/48] refs.c: move the check for valid refname to lock_ref_sha1_basic

2014-07-15 Thread Jonathan Nieder
Ronnie Sahlberg wrote: > What I suggest doing here is to create a new patch towards the end of > the series that will : > * change the resolve_ref_unsafe(... , int reading, ...) argument to be > a bitmask of flags with > #define RESOLVE_REF_READING 0x01 (== current flag) > #define RESOLVE

Re: [PATCH v20 43/48] refs.c: move the check for valid refname to lock_ref_sha1_basic

2014-07-15 Thread Jonathan Nieder
Michael Haggerty wrote: > So...I like the idea of enforcing refname checks at the lowest level > possible, but I think that the change you propose is too abrupt. I > think it needs either more careful analysis showing that it won't hurt > anybody, or some kind of tooling or non-strict mode that p

Re: [PATCH 3/3] tag: support configuring --sort via .gitconfig

2014-07-15 Thread Keller, Jacob E
On Tue, 2014-07-15 at 09:03 -0700, Junio C Hamano wrote: > "Keller, Jacob E" writes: > > > On Mon, 2014-07-14 at 10:17 -0700, Junio C Hamano wrote: > >> Jeff King writes: > >> > >> > On Sun, Jul 13, 2014 at 01:33:56PM -0400, Jeff King wrote: > >> > > >> >> I realize that I am reinventing the er

Re: [PATCH v9 2/2] test-config: add tests for the config_set API

2014-07-15 Thread Tanay Abhra
On 7/15/2014 9:27 PM, Junio C Hamano wrote: >> +test_expect_success 'setup default config' ' >> +cat >.git/config <<\EOF > > So the default .git/config that was prepared by "git init" is > discarded and replaced with this? Shouldn't it be > > cat >>.git/config <<\EOF > > instead? >

Re: [PATCH v8 4/4] cache-tree: Write updated cache-tree after commit

2014-07-15 Thread Junio C Hamano
Duy Nguyen writes: > On Mon, Jul 14, 2014 at 11:38:06PM -0700, Junio C Hamano wrote: >> On Mon, Jul 14, 2014 at 7:15 PM, Duy Nguyen wrote: >> > >> > It makes me wonder if a cleaner way of rebuilding cache-treei in this >> > case is from git-add--interactive.perl, or by simply spawn "git >> > upd

Big repository cannot be reduced

2014-07-15 Thread Woody Wu
Hi, I have tried some methods introduced in the network, but always failed.  Some big files committed by me to a very old branch then the files deleted and new branches were continuously created. Now the checkout directory has grown to about 80 megabytes.  What's the right way to permenently er

Re: [PATCH v20 43/48] refs.c: move the check for valid refname to lock_ref_sha1_basic

2014-07-15 Thread Ronnie Sahlberg
On Tue, Jul 8, 2014 at 8:02 AM, Michael Haggerty wrote: > On 06/20/2014 04:43 PM, Ronnie Sahlberg wrote: >> Move the check for check_refname_format from lock_any_ref_for_update >> to lock_ref_sha1_basic. At some later stage we will get rid of >> lock_any_ref_for_update completely. >> >> If lock_re

[no subject]

2014-07-15 Thread Woody Wu
Hi, I have tried some methods introduced in the network, but always failed.  Some big files committed by me to a very old branch then the files deleted and new branches were continuously created. Now the checkout directory has grown to about 80 megabytes.  What's the right way to permenently er

Re: [PATCH v9 1/2] add `config_set` API for caching config-like files

2014-07-15 Thread Tanay Abhra
On 7/15/2014 9:16 PM, Junio C Hamano wrote: > Tanay Abhra writes: > >> diff --git a/config.c b/config.c >> index ba882a1..89e2d67 100644 >> --- a/config.c >> +++ b/config.c >> ... >> +const struct string_list *git_configset_get_value_multi(struct config_set >> *cs, const char *key) >> +{ >> +

Re: [PATCH 3/3] tag: support configuring --sort via .gitconfig

2014-07-15 Thread Junio C Hamano
"Keller, Jacob E" writes: > On Mon, 2014-07-14 at 10:17 -0700, Junio C Hamano wrote: >> Jeff King writes: >> >> > On Sun, Jul 13, 2014 at 01:33:56PM -0400, Jeff King wrote: >> > >> >> I realize that I am reinventing the error-reporting wheel on a sleepy >> >> Sunday afternoon without having tho

Re: [PATCH v9 2/2] test-config: add tests for the config_set API

2014-07-15 Thread Junio C Hamano
Tanay Abhra writes: > Expose the `config_set` C API as a set of simple commands in order to > facilitate testing. Add tests for the `config_set` API as well as for > `git_config_get_*()` family for the usual config files. > > Signed-off-by: Matthieu Moy > Signed-off-by: Tanay Abhra > --- > .gi

Re: [PATCH v9 1/2] add `config_set` API for caching config-like files

2014-07-15 Thread Junio C Hamano
Tanay Abhra writes: > diff --git a/config.c b/config.c > index ba882a1..89e2d67 100644 > --- a/config.c > +++ b/config.c > ... > +const struct string_list *git_configset_get_value_multi(struct config_set > *cs, const char *key) > +{ > + struct config_set_element *e = configset_find_element(c

Re: [PATCH 3/3] tag: support configuring --sort via .gitconfig

2014-07-15 Thread Keller, Jacob E
On Mon, 2014-07-14 at 10:17 -0700, Junio C Hamano wrote: > Jeff King writes: > > > On Sun, Jul 13, 2014 at 01:33:56PM -0400, Jeff King wrote: > > > >> I realize that I am reinventing the error-reporting wheel on a sleepy > >> Sunday afternoon without having thought about it much, so there is > >>

[PATCH v9 1/2] add `config_set` API for caching config-like files

2014-07-15 Thread Tanay Abhra
Currently `git_config()` uses a callback mechanism and file rereads for config values. Due to this approach, it is not uncommon for the config files to be parsed several times during the run of a git program, with different callbacks picking out different variables useful to themselves. Add a `con

[PATCH v9 2/2] test-config: add tests for the config_set API

2014-07-15 Thread Tanay Abhra
Expose the `config_set` C API as a set of simple commands in order to facilitate testing. Add tests for the `config_set` API as well as for `git_config_get_*()` family for the usual config files. Signed-off-by: Matthieu Moy Signed-off-by: Tanay Abhra --- .gitignore| 1 + Makefile

[PATCH v9 0/3] git config cache & special querying api utilizing the cache

2014-07-15 Thread Tanay Abhra
Hi, [PATCH v9]: Applied most of the review comments mentioned in [11]. Mostly asthetic changes. test-config now clears the config_set before exiting. Most of the tests now use the check-config function. check_config_init() now handles return values correctly. Diff betwee

Re: [PATCH 0/3] fix test suite with mingw-unicode patches

2014-07-15 Thread Stepan Kasal
Hello, I'm sorry that I have to reply to my own mail, but I forgot this: > Karsten Blees (2): > Win32: Unicode file name support (except dirent) .. has this one squashed in: Win32: fix detection of empty directories in is_dir_empty https://github.com/msysgit/git/commit/91db148 > Win32: Un

[PATCH] .gitignore: Add git-verify-commit

2014-07-15 Thread Øyvind A . Holm
builtin/verify-commit.c was added in commit d07b00b ("verify-commit: scriptable commit signature verification", 2014-06-23), update .gitignore to ignore the generated file. Signed-off-by: Øyvind A. Holm --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore in

[PATCH 1/3] Win32: Unicode file name support (except dirent)

2014-07-15 Thread Stepan Kasal
From: Karsten Blees Date: Thu, 15 Mar 2012 18:21:28 +0100 Replaces Windows "ANSI" APIs dealing with file- or path names with their Unicode equivalent, adding UTF-8/UTF-16LE conversion as necessary. The dirent API (opendir/readdir/closedir) is updated in a separate commit. Adds trivial wrappers

[PATCH 2/3] Win32: Unicode file name support (dirent)

2014-07-15 Thread Stepan Kasal
From: Karsten Blees Date: Sat, 14 Jan 2012 22:01:09 +0100 Changes opendir/readdir to use Windows Unicode APIs and convert between UTF-8/UTF-16. Removes parameter checks that are already covered by xutftowcs_path. This changes detection of ENAMETOOLONG from MAX_PATH - 2 to MAX_PATH (matching is_d

[PATCH 0/3] fix test suite with mingw-unicode patches

2014-07-15 Thread Stepan Kasal
Hello Hannes, attached please find the patches that Karsten pointed out: 1) The unicode file name support was omitted from his unicode patch series; my mistake, sorry. There is still big part missing: support for unicode environment; I can only hope the tests would choke on that. 2) Windows cann

[PATCH 3/3] tests: do not pass iso8859-1 encoded parameter

2014-07-15 Thread Stepan Kasal
From: Pat Thoyts Date: Mon, 2 Sep 2013 15:44:54 +0100 git commit -m with some iso8859-1 encoded stuff is doomed to fail in MinGW, because Windows don't let you pass encoded bytes to a process (CreateProcessW always takes a UTF-16LE encoded string). It is safe to pass the iso8859-1 message using

  1   2   >