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

2014-07-14 Thread Junio C Hamano
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 > update-index --rebuild-cache-tree" after running > git-add--interactive.perl. We could check if the cach

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

2014-07-14 Thread Johannes Sixt
Am 14.07.2014 14:53, schrieb Ephrim Khong: > diff --git a/t/t7702-repack-cyclic-alternate.sh > b/t/t7702-repack-cyclic-alternate.sh > new file mode 100755 > index 000..3771613 > --- /dev/null > +++ b/t/t7702-repack-cyclic-alternate.sh > @@ -0,0 +1,24 @@ > +#!/bin/sh > +# > +# Copyright (c) 201

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

2014-07-14 Thread Duy Nguyen
On Tue, Jul 15, 2014 at 5:16 AM, Junio C Hamano wrote: > Ramsay Jones writes: > >> On 14/07/14 18:51, Junio C Hamano wrote: >>> Ramsay Jones writes: >>> that the merge commit 7608c87e fails. Looking at the details of the merge resolution, made me think of Duy's split index work. >>> >>

Re: [msysGit] Re: Topic sk/mingw-unicode-spawn-args breaks tests

2014-07-14 Thread Johannes Schindelin
Hi Stepan, On Sat, 12 Jul 2014, Stepan Kasal wrote: > > Am 10.07.2014 22:05, schrieb Johannes Sixt: > > > It looks like I totally missed the topic sk/mingw-unicode-spawn-args. > ... > > > Am I doing something wrong? Does the topic depend on a particular > > > version of MSYS (or DLL)? > > unfort

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

2014-07-14 Thread David Turner
On Mon, 2014-07-14 at 15:16 -0700, Junio C Hamano wrote: > Ramsay Jones writes: > > > On 14/07/14 18:51, Junio C Hamano wrote: > >> Ramsay Jones writes: > >> > >>> that the merge commit 7608c87e fails. Looking at the details of the > >>> merge resolution, made me think of Duy's split index work

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

2014-07-14 Thread 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 two lines show the same name in a very different way), but ho

Re: [PATCH v20 27/48] sequencer.c: use ref transactions for all ref updates

2014-07-14 Thread Ronnie Sahlberg
On Tue, Jul 8, 2014 at 5:23 AM, Michael Haggerty wrote: > On 06/20/2014 04:43 PM, Ronnie Sahlberg wrote: >> Change to use ref transactions for all updates to refs. >> >> Reviewed-by: Jonathan Nieder >> Signed-off-by: Ronnie Sahlberg >> --- >> sequencer.c | 24 >> 1 file

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

2014-07-14 Thread Junio C Hamano
Ramsay Jones writes: > On 14/07/14 18:51, Junio C Hamano wrote: >> Ramsay Jones writes: >> >>> that the merge commit 7608c87e fails. Looking at the details of the >>> merge resolution, made me think of Duy's split index work. >> >> Yes, there is a deliberately dropped hunk from dt/cache-tree-r

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

2014-07-14 Thread Keller, Jacob E
> -Original Message- > From: Junio C Hamano [mailto:gits...@pobox.com] > Sent: Sunday, July 13, 2014 10:01 AM > To: Jeff King > Cc: Keller, Jacob E; git@vger.kernel.org > Subject: Re: [PATCH 3/3 v5] tag: support configuring --sort via .gitconfig > > Jeff King writes: > > > On Fri, Jul

RE: [Bug] data loss with cyclic alternates

2014-07-14 Thread Keller, Jacob E
> -Original Message- > From: Jeff King [mailto:p...@peff.net] > Sent: Friday, July 11, 2014 10:57 PM > To: Keller, Jacob E > Cc: gits...@pobox.com; dr.kh...@gmail.com; git@vger.kernel.org > Subject: Re: [Bug] data loss with cyclic alternates > > On Fri, Jul 11, 2014 at 06:01:46PM +,

Re: [PATCH v20 25/48] replace.c: use the ref transaction functions for updates

2014-07-14 Thread Ronnie Sahlberg
On Tue, Jul 8, 2014 at 5:35 AM, Michael Haggerty wrote: > On 06/20/2014 04:43 PM, Ronnie Sahlberg wrote: >> Update replace.c to use ref transactions for updates. >> >> Reviewed-by: Jonathan Nieder >> Signed-off-by: Ronnie Sahlberg >> --- >> builtin/replace.c | 15 +-- >> 1 file chan

Re: [PATCH 00/14] Add submodule test harness

2014-07-14 Thread Junio C Hamano
Jens Lehmann writes: > So what about adding "Currently only submodules living in the > root directory of the superproject with the default name (same > as the path) are supported." to the comment above the function? OK, done, and merged to 'next'. Thanks. -- To unsubscribe from this list: send

Re: No fchmod() under msygit - Was: Re: [PATCH 00/14] Add submodule test harness

2014-07-14 Thread Junio C Hamano
Karsten Blees writes: > 1.) Permissions of files in .git are controlled by the core.sharedRepository > setting, and your patch seems to break that (i.e. if someone accidentally > has made .git/config world readable, git-config no longer fixes that, even > if core.sharedRepository=0600). For any

What's cooking in git.git (Jul 2014, #02; Mon, 14)

2014-07-14 Thread Junio C Hamano
Here are the topics that have been cooking. Commits prefixed with '-' are only in 'pu' (proposed updates) while commits prefixed with '+' are in 'next'. We would need to start slowing down to prepare for -rc0 preview at the end of next week and then feature freeze. Some topics that joined 'next'

[PATCH v21 14/19] refs.c: log_ref_write should try to return meaningful errno

2014-07-14 Thread Ronnie Sahlberg
Making errno from write_ref_sha1() meaningful, which should fix * a bug in "git checkout -b" where it prints strerror(errno)  despite errno possibly being zero or clobbered * a bug in "git fetch"'s s_update_ref, which trusts the result of an  errno == ENOTDIR check to detect D/F conflicts Sign

[PATCH v21 18/19] refs.c: remove the onerr argument to ref_transaction_commit

2014-07-14 Thread Ronnie Sahlberg
Since all callers now use QUIET_ON_ERR we no longer need to provide an onerr argument any more. Remove the onerr argument from the ref_transaction_commit signature. Reviewed-by: Jonathan Nieder Reviewed-by: Michael Haggerty Signed-off-by: Ronnie Sahlberg --- builtin/update-ref.c | 3 +-- refs

[PATCH v21 15/19] refs.c: make ref_update_reject_duplicates take a strbuf argument for errors

2014-07-14 Thread Ronnie Sahlberg
Make ref_update_reject_duplicates return any error that occurs through a new strbuf argument. This means that when a transaction commit fails in this function we will now be able to pass a helpful error message back to the caller. Reviewed-by: Jonathan Nieder Reviewed-by: Michael Haggerty Signed

[PATCH v21 19/19] refs.c: change ref_transaction_update() to do error checking and return status

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

[PATCH v21 13/19] refs.c: make resolve_ref_unsafe set errno to something meaningful on error

2014-07-14 Thread Ronnie Sahlberg
Making errno when returning from resolve_ref_unsafe() meaningful, which should fix * a bug in lock_ref_sha1_basic, where it assumes EISDIR means it failed due to a directory being in the way Signed-off-by: Ronnie Sahlberg Reviewed-by: Michael Haggerty --- cache.h | 2 +- refs.c | 19

[PATCH v21 17/19] update-ref: use err argument to get error from ref_transaction_commit

2014-07-14 Thread Ronnie Sahlberg
Call ref_transaction_commit with QUIET_ON_ERR and use the strbuf that is returned to print a log message if/after the transaction fails. Reviewed-by: Jonathan Nieder Reviewed-by: Michael Haggerty Signed-off-by: Ronnie Sahlberg --- builtin/update-ref.c | 10 +- 1 file changed, 5 inserti

[PATCH v21 12/19] refs.c: commit_packed_refs to return a meaningful errno on failure

2014-07-14 Thread Ronnie Sahlberg
Making errno when returning from commit_packed_refs() meaningful, which should fix * a bug in "git clone" where it prints strerror(errno) based on errno, despite errno possibly being zero and potentially having been clobbered by that point * the same kind of bug in "git pack-refs" and pre

[PATCH v21 09/19] refs.c: make sure log_ref_setup returns a meaningful errno

2014-07-14 Thread Ronnie Sahlberg
Making errno when returning from log_ref_setup() meaningful, Signed-off-by: Ronnie Sahlberg Reviewed-by: Michael Haggerty --- refs.c | 27 +++ refs.h | 4 +++- 2 files changed, 22 insertions(+), 9 deletions(-) diff --git a/refs.c b/refs.c index 67a0217..9ea519c 100644

[PATCH v21 08/19] refs.c: add an err argument to repack_without_refs

2014-07-14 Thread Ronnie Sahlberg
Update repack_without_refs to take an err argument and update it if there is a failure. Pass the err variable from ref_transaction_commit to this function so that callers can print a meaningful error message if _commit fails due to this function. Signed-off-by: Ronnie Sahlberg Reviewed-by: Michae

[PATCH v21 07/19] lockfile.c: make lock_file return a meaningful errno on failure

2014-07-14 Thread Ronnie Sahlberg
Making errno when returning from lock_file() meaningful, which should fix * an existing almost-bug in lock_ref_sha1_basic where it assumes errno==ENOENT is meaningful and could waste some work on retries * an existing bug in repack_without_refs where it prints strerror(errno) and picks ad

[PATCH v21 16/19] refs.c: make update_ref_write update a strbuf on failure

2014-07-14 Thread Ronnie Sahlberg
Change update_ref_write to also update an error strbuf on failure. This makes the error available to ref_transaction_commit callers if the transaction failed due to update_ref_sha1/write_ref_sha1 failures. Reviewed-by: Jonathan Nieder Reviewed-by: Michael Haggerty Signed-off-by: Ronnie Sahlberg

[PATCH v21 00/19] Use ref transactions

2014-07-14 Thread Ronnie Sahlberg
List, Jun Here is a resend of the first part of the ref transactions patches. This new series consists of the first 19 patches in the series and have been reviewed by mhagger. This series should be good to go now. I will resend the remaining part of the series separately once I have addressed Mic

[PATCH v21 06/19] lockfile.c: add a new public function unable_to_lock_message

2014-07-14 Thread Ronnie Sahlberg
Introducing a new unable_to_lock_message helper, which has nicer semantics than unable_to_lock_error and cleans up lockfile.c a little. Signed-off-by: Ronnie Sahlberg Reviewed-by: Michael Haggerty --- cache.h| 2 ++ lockfile.c | 22 -- 2 files changed, 14 insertions(+),

[PATCH v21 10/19] refs.c: verify_lock should set errno to something meaningful

2014-07-14 Thread Ronnie Sahlberg
Making errno when returning from verify_lock() meaningful, which should almost but not completely fix * a bug in "git fetch"'s s_update_ref, which trusts the result of an errno == ENOTDIR check to detect D/F conflicts ENOTDIR makes sense as a sign that a file was in the way of a directory we

[PATCH v21 04/19] refs.c: allow passing NULL to ref_transaction_free

2014-07-14 Thread Ronnie Sahlberg
Allow ref_transaction_free(NULL) as a no-op. This makes ref_transaction_free easier to use and more similar to plain 'free'. In particular, it lets us rollback unconditionally as part of cleanup code after setting 'transaction = NULL' if a transaction has been committed or rolled back already. Re

[PATCH v21 11/19] refs.c: make remove_empty_directories always set errno to something sane

2014-07-14 Thread Ronnie Sahlberg
Making errno when returning from remove_empty_directories() more obviously meaningful, which should provide some peace of mind for people auditing lock_ref_sha1_basic. Signed-off-by: Ronnie Sahlberg Reviewed-by: Michael Haggerty --- refs.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(

[PATCH v21 05/19] refs.c: add a strbuf argument to ref_transaction_commit for error logging

2014-07-14 Thread Ronnie Sahlberg
Add a strbuf argument to _commit so that we can pass an error string back to the caller. So that we can do error logging from the caller instead of from _commit. Longer term plan is to first convert all callers to use onerr==QUIET_ON_ERR and craft any log messages from the callers themselves and f

[PATCH v21 03/19] refs.c: constify the sha arguments for ref_transaction_create|delete|update

2014-07-14 Thread Ronnie Sahlberg
ref_transaction_create|delete|update has no need to modify the sha1 arguments passed to it so it should use const unsigned char* instead of unsigned char*. Some functions, such as fast_forward_to(), already have its old/new sha1 arguments as consts. This function will at some point need to use ref

[PATCH v21 02/19] refs.c: ref_transaction_commit should not free the transaction

2014-07-14 Thread Ronnie Sahlberg
Reviewed-by: Jonathan Nieder Reviewed-by: Michael Haggerty Signed-off-by: Ronnie Sahlberg --- builtin/update-ref.c | 1 + refs.c | 1 - refs.h | 5 ++--- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/builtin/update-ref.c b/builtin/update-ref.c index

[PATCH v21 01/19] refs.c: remove ref_transaction_rollback

2014-07-14 Thread Ronnie Sahlberg
We do not yet need both a rollback and a free function for transactions. Remove ref_transaction_rollback and use ref_transaction_free instead. At a later stage we may reintroduce a rollback function if we want to start adding reusable transactions and similar. Reviewed-by: Jonathan Nieder Review

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

2014-07-14 Thread Heiko Voigt
On Wed, Jul 09, 2014 at 03:04:50PM -0700, Junio C Hamano wrote: > Heiko Voigt writes: > > > On Tue, Jul 08, 2014 at 01:14:20PM -0700, Junio C Hamano wrote: > >> Heiko Voigt writes: > >> > >> > diff --git a/builtin/checkout.c b/builtin/checkout.c > >> > index 07cf555..03ea20d 100644 > >> > --- a

Re: [PATCH v20 39/48] refs.c: make delete_ref use a transaction

2014-07-14 Thread Ronnie Sahlberg
On Tue, Jul 8, 2014 at 6:52 AM, Michael Haggerty wrote: > On 06/20/2014 04:43 PM, Ronnie Sahlberg wrote: >> 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 de

[PATCH v2] lockfile: allow reopening a closed but still locked file

2014-07-14 Thread Junio C Hamano
In some code paths (e.g. giving "add -i" to prepare the contents to be committed interactively inside "commit -p") where a caller takes a lock, writes the new content, give chance for others to use it while still holding the lock, and then releases the lock when all is done. As an extension, allow

[BUG] checkout --orphan breaks HEAD reflog

2014-07-14 Thread Aleksander Nitecki
Hi, this is my first mail to this list (and I'm not a native English speaker), so let me apologise from the start for any slips in following message. Ok, so I think I've found a bug in git. It concerns orphan checkouts breaking (gapping in non-traversable way) the HEAD reflog display. % git --v

Re: No fchmod() under msygit - Was: Re: [PATCH 00/14] Add submodule test harness

2014-07-14 Thread Karsten Blees
Am 09.07.2014 22:00, schrieb Eric Wong: > Torsten Bögershausen wrote: >> (And why is it "& 0" and not "& 0777") > > This is to preserve the uncommon sticky/sgid/suid bits. Probably not > needed, but better to keep as much intact as possible. > >> Can we avoid the fchmod() all together ?

Re: [PATCH v20 31/48] receive-pack.c: use a reference transaction for updating the refs

2014-07-14 Thread Ronnie Sahlberg
On Tue, Jul 8, 2014 at 6:20 AM, Michael Haggerty wrote: > On 06/20/2014 04:43 PM, Ronnie Sahlberg wrote: >> Wrap all the ref updates inside a transaction. >> >> Signed-off-by: Ronnie Sahlberg >> --- >> builtin/receive-pack.c | 96 >> +- >> 1 file

Re: [PATCH v20 30/48] refs.c: change update_ref to use a transaction

2014-07-14 Thread Ronnie Sahlberg
On Tue, Jul 8, 2014 at 5:54 AM, Michael Haggerty wrote: > On 06/20/2014 04:43 PM, Ronnie Sahlberg wrote: >> Change the update_ref helper function to use a ref transaction internally. >> >> Reviewed-by: Jonathan Nieder >> Signed-off-by: Ronnie Sahlberg >> --- >> refs.c | 28 +

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

2014-07-14 Thread Ramsay Jones
On 14/07/14 18:51, Junio C Hamano wrote: > Ramsay Jones writes: > >> that the merge commit 7608c87e fails. Looking at the details of the >> merge resolution, made me think of Duy's split index work. > > Yes, there is a deliberately dropped hunk from dt/cache-tree-repair > in that merge, because

Re: [PATCH 00/14] Add submodule test harness

2014-07-14 Thread Jens Lehmann
Am 14.07.2014 03:01, schrieb Junio C Hamano: > Jens Lehmann writes: > >>> Perhaps squashing this to 7e8e5af9 instead? >> >> Yes please, this is much better than my first attempt. > > One thing that I found troubling is the ../../../ "three levels up" > is hardcoded. Would it be always true for

Re: [PATCH v20 33/48] walker.c: use ref transaction for ref updates

2014-07-14 Thread Ronnie Sahlberg
On Tue, Jul 8, 2014 at 6:33 AM, Michael Haggerty wrote: > On 06/20/2014 04:43 PM, Ronnie Sahlberg wrote: >> 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_s

Re: [PATCH v20 23/48] refs.c: add transaction.status and track OPEN/CLOSED/ERROR

2014-07-14 Thread Ronnie Sahlberg
I updated the comments. Status is used in a later series to track certain errno settings. This used to be done here but was moved to a later series. I removed the status field for now and will re add it later when we start using it. Thanks! On Tue, Jul 8, 2014 at 5:00 AM, Michael Haggerty wrot

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

2014-07-14 Thread Junio C Hamano
Ramsay Jones writes: > that the merge commit 7608c87e fails. Looking at the details of the > merge resolution, made me think of Duy's split index work. Yes, there is a deliberately dropped hunk from dt/cache-tree-repair in that merge, because the topic relied on being able to say "here is the fi

Re: [PATCH v20 22/48] refs.c: make ref_transaction_begin take an err argument

2014-07-14 Thread Ronnie Sahlberg
Thanks. Fixed. On Tue, Jul 8, 2014 at 4:53 AM, Michael Haggerty wrote: > On 06/20/2014 04:43 PM, Ronnie Sahlberg wrote: >> 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

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

2014-07-14 Thread Ronnie Sahlberg
I have changed the comment. Thanks. On Tue, Jul 8, 2014 at 4:48 AM, Michael Haggerty wrote: > I'm in my next attempt to get through your patch series. Sorry for the > long hiatus. > > Patches 1-19 look OK aside from a minor typo that I just reported. > > See below for a comment on this patch. >

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

2014-07-14 Thread Junio C Hamano
Junio C Hamano writes: > Duy Nguyen writes: > >> On Sat, Jul 12, 2014 at 11:44 AM, David Turner >> wrote: >>> @@ -342,6 +342,15 @@ static char *prepare_index(int argc, const char >>> **argv, const char *prefix, >>> >>> discard_cache(); >>> read_cache_from(index

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

2014-07-14 Thread Ramsay Jones
On 14/07/14 16:54, Junio C Hamano wrote: > Duy Nguyen writes: > >> On Sat, Jul 12, 2014 at 11:44 AM, David Turner >> wrote: >>> @@ -342,6 +342,15 @@ static char *prepare_index(int argc, const char >>> **argv, const char *prefix, >>> >>> discard_cache(); >>> read

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

2014-07-14 Thread Junio C Hamano
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 >> probably some gotcha or case that makes this ugly, or perhaps it just

Re: [PATCH v7 00/31] Support multiple checkouts

2014-07-14 Thread Junio C Hamano
Duy Nguyen writes: > On Mon, Jul 14, 2014 at 11:45 AM, Junio C Hamano wrote: >> Nguyễn Thái Ngọc Duy writes: >> >>> fd = open(git_path("repos/%s/gitdir", id), O_RDONLY); >>> ... >>> - while (path[len - 1] == '\n' || path[len - 1] == '\r') >>> + while (len && (path[len - 1] == '\n

Re: [PATCH v20 00/48] Use ref transactions

2014-07-14 Thread Ronnie Sahlberg
On Tue, Jul 8, 2014 at 11:48 AM, Junio C Hamano wrote: > Michael Haggerty writes: > >> Patches 01-19 -- ACK mhagger >> Patches 20-42 -- I sent various comments, small to large, concerning >> these patches >> Patch 43 -- Needs more justification if it is to be acceptable >> Patch 44 -- Depends on

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

2014-07-14 Thread Junio C Hamano
Duy Nguyen writes: > On Sat, Jul 12, 2014 at 11:44 AM, David Turner > wrote: >> @@ -342,6 +342,15 @@ static char *prepare_index(int argc, const char **argv, >> const char *prefix, >> >> discard_cache(); >> read_cache_from(index_lock.filename); >> +

Re: [PATCH v20 00/48] Use ref transactions

2014-07-14 Thread Ronnie Sahlberg
On Tue, Jul 8, 2014 at 9:29 AM, Michael Haggerty wrote: > On 06/20/2014 04:42 PM, Ronnie Sahlberg wrote: >> This patch series can also be found at >> https://github.com/rsahlberg/git/tree/ref-transactions >> >> This patch series is based on current master and expands on the transaction >> API. It

Re: No fchmod() under msygit - Was: Re: [PATCH 00/14] Add submodule test harness

2014-07-14 Thread Nico Williams
> Still, git might like to know what ACLs to apply to files at checkout > time. That would be a vast new feature, I think, and probably not > worth it, particularly since that would require dealing with the > different types of ACLs: NTFS/NFSv4/ZFS on the one hand, POSIX Draft > on the other, plus

Re: No fchmod() under msygit - Was: Re: [PATCH 00/14] Add submodule test harness

2014-07-14 Thread Nico Williams
On Mon, Jul 14, 2014 at 6:31 AM, Erik Faye-Lund wrote: > On Wed, Jul 9, 2014 at 10:00 PM, Eric Wong wrote: >> Torsten Bögershausen wrote: >> > > You're saying this as if Windows is a single-user system. It's not, > but it uses ACLs rather than POSIX permissions to manage file-system > permission

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

2014-07-14 Thread Ephrim Khong
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 Khong --- As proposed by Duy, v2 of the patch normalizes the object

Re: No fchmod() under msygit - Was: Re: [PATCH 00/14] Add submodule test harness

2014-07-14 Thread Erik Faye-Lund
On Wed, Jul 9, 2014 at 10:00 PM, Eric Wong wrote: > Torsten Bögershausen wrote: >> (And why is it "& 0" and not "& 0777") > > This is to preserve the uncommon sticky/sgid/suid bits. Probably not > needed, but better to keep as much intact as possible. > >> Can we avoid the fchmod() all to

Re: [PATCH v7 00/31] Support multiple checkouts

2014-07-14 Thread Duy Nguyen
On Mon, Jul 14, 2014 at 11:45 AM, Junio C Hamano wrote: > Nguyễn Thái Ngọc Duy writes: > >> fd = open(git_path("repos/%s/gitdir", id), O_RDONLY); >> ... >> - while (path[len - 1] == '\n' || path[len - 1] == '\r') >> + while (len && (path[len - 1] == '\n' || path[len - 1] == '\r'))

Re: [PATCH 2/7] move setting of object->type to alloc_* functions

2014-07-14 Thread Ramsay Jones
On 14/07/14 06:57, Jeff King wrote: > On Sun, Jul 13, 2014 at 08:27:51PM +0100, Ramsay Jones wrote: > >>> Thinking on this more, writing out the definitions is the only sane >>> thing to do here, now that alloc_commit_node does not use the macro. >>> Otherwise you are inviting people to modify the

Re: [PATCH/RFH 0/3] stable priority-queue

2014-07-14 Thread David Kastrup
Jeff King writes: > As Junio and I discussed earlier in [1], this series makes the > prio_queue struct stable with respect to object insertion (which in turn > means we can use it to replace commit_list in more places). I don't think that this makes sense in general since it assumes the appropri

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

2014-07-14 Thread Duy Nguyen
On Mon, Jul 14, 2014 at 4:02 PM, 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. Not blaming anyone. I'm simpl

Re: [PATCH/RFH 0/3] stable priority-queue

2014-07-14 Thread Duy Nguyen
On Mon, Jul 14, 2014 at 12:40 PM, Jeff King wrote: > As Junio and I discussed earlier in [1], this series makes the > prio_queue struct stable with respect to object insertion (which in turn > means we can use it to replace commit_list in more places). > > I think everything here is correct, but t

[PATCH v1 3/3] prep_exclude: remove the artificial PATH_MAX limit

2014-07-14 Thread Karsten Blees
From: =?UTF-8?q?Nguy=E1=BB=85n=20Th=C3=A1i=20Ng=E1=BB=8Dc=20Duy?= This fixes a segfault in git-status with long paths on Windows, where PATH_MAX is only 260. This also fixes the problem of silently ignoring .gitignore if the full path exceeds PATH_MAX. Now add_excludes_from_file() will report i

[PATCH v1 2/3] dir.h: move struct exclude declaration to top level

2014-07-14 Thread Karsten Blees
From: =?UTF-8?q?Nguy=E1=BB=85n=20Th=C3=A1i=20Ng=E1=BB=8Dc=20Duy?= There is no actual nested struct here. Move it out for clarity. Signed-off-by: Nguyễn Thái Ngọc Duy Signed-off-by: Karsten Blees --- dir.h | 42 ++ 1 file changed, 22 insertions(+), 20 d

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

2014-07-14 Thread Karsten Blees
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 --- dir.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/dir.c b/dir.c index e65888d..3068ca8 100644 --- a/dir.c +++ b/dir.c @@

[PATCH v1 0/3] dir.[ch]: remove PATH_MAX limitation

2014-07-14 Thread Karsten Blees
As discussed in [1], here's the first three patches of Duy's untracked cache series, which fixes a segfault with long paths on Windows. [1] http://article.gmane.org/gmane.comp.version-control.msysgit/20702 Nguyễn Thái Ngọc Duy (3): dir.c: coding style fix dir.h: move struct exclude declarati

I'VE A FINANCIAL PROPOSAL FOR YOU. ARE YOU INTERESTED?

2014-07-14 Thread Peter. K
I'M SORRY I CANNOT GIVE YOU IMMEDIATE DETAILS ON THE ISSUE UNTIL I CONFIRM YOUR INTEREST. BE ATTENTIVE TO THE SUBJECT LINE AND SEND YOUR REPLY ON SAME MAIL TRAIL TO AID CONTINUITY. REGARDS, MR. PETER KREMER -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a messa

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

2014-07-14 Thread Ephrim Khong
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 Khong --- My first patch, so be harsh. I'm not sure about the file