[PATCH] verify_pack: do not ignore return value of verification function

2015-11-30 Thread David Turner
might return a different error code (with more detail). This would happen in the unlikely event that a commit or tree that is a valid git object but not a valid instance of its type gets into a pack. Signed-off-by: David Turner <dtur...@twopensource.com> --- pack-check.c | 2 +- 1 file chan

verify_pack ignores return value of verify_fn

2015-11-17 Thread David Turner
In pack-check.c, line 129, a caller-supplied verification function is called. The function returns an int, but that return value is ignored. The only caller of verify_pack is in builtin/fsck.c, whose verify_fn *does* return a meaningful error code (which is then ignored). If it were not

Re: [PATCH v8 00/10] refs backend pre-vtable

2015-11-16 Thread David Turner
On Tue, 2015-11-10 at 12:42 +0100, Michael Haggerty wrote: > Another re-roll of this patch series, to address the comments of > Ramsay Jones (thanks!) about v7 [1]. > > This version has the following changes compared to v7: > > * Drop "refs: make is_branch public" patch. This was already done >

Re: [PATCH 2/2] contrib/git-candidate: Add README

2015-11-11 Thread David Turner
On Wed, 2015-11-11 at 09:48 +, Richard Ipsum wrote: > > > > > + (master)$ git candidate submit origin archiverepo > > > + Review added successfully > > > > Is the contributor automatically (optionally) emailed on this? If not, > > consider this a feature request for this. > > There's no

Re: [PATCH 0/5] Use watchman to reduce index refresh time

2015-11-10 Thread David Turner
On Mon, 2015-11-09 at 21:06 +0100, Christian Couder wrote: > Using David's series I get worse results than all of the above but I > guess it's because his series is based on an ancient git version > (v2.0.0-rc0). My more-recent series is on top of 2.4, but (for webkit): mine: 0m0.206s duy's:

Re: [PATCH 2/2] contrib/git-candidate: Add README

2015-11-10 Thread David Turner
I didn't actually read the code. Instead, I started with the README and decided to provide both text and UX comments all mixed up. These are mostly my personal preferences; take them or leave them as you choose. I'm really excited about this tool and I think it's got great potential! On Tue,

Re: [PATCH v7 01/11] refs: make is_branch public

2015-11-09 Thread David Turner
On Mon, 2015-11-09 at 18:54 +, Ramsay Jones wrote: > > On 09/11/15 17:03, Michael Haggerty wrote: > > From: David Turner <dtur...@twopensource.com> > > > > is_branch was already non-static, but this patch declares it in the > > header. > >

Re: [PATCH v7 00/11] refs backend pre-vtable

2015-11-09 Thread David Turner
On Mon, 2015-11-09 at 18:03 +0100, Michael Haggerty wrote: > This is another reroll of the pre-vtable part of the refs-backend > patch series dt/refs-backend-pre-vtable. v6 [1] proved cumbersome > because it conflicted messily with lf/ref-is-hidden-namespace [2]. The > conflicts were partly due to

Re: File owner/group and git

2015-11-05 Thread David Turner
On Wed, 2015-11-04 at 18:38 -0800, Junio C Hamano wrote: > David Turner <dtur...@twopensource.com> writes: > > > In unpack-trees.c, in verify_uptodate_1, we check ie_match_stat. This > > returns OWNER_CHANGED if a file has changed ownership since the index > > was

Re: [PATCH v6 25/25] refs: break out ref conflict checks

2015-11-05 Thread David Turner
On Thu, 2015-11-05 at 05:00 +0100, Michael Haggerty wrote: > On 11/04/2015 10:01 PM, David Turner wrote: > > On Tue, 2015-11-03 at 08:40 +0100, Michael Haggerty wrote: > >> + * extras and skip must be sorted lists of reference names. Either one > >> + * can be NULL

Re: [PATCH v6 25/25] refs: break out ref conflict checks

2015-11-04 Thread David Turner
On Tue, 2015-11-03 at 08:40 +0100, Michael Haggerty wrote: > + * extras and skip must be sorted lists of reference names. Either one > + * can be NULL, signifying the empty list. > + */ My version had: "skip can be NULL; extras cannot." The first thing that function does is:

File owner/group and git

2015-11-04 Thread David Turner
In unpack-trees.c, in verify_uptodate_1, we check ie_match_stat. This returns OWNER_CHANGED if a file has changed ownership since the index was updated. Do we actually care about that particular case? Or really anything other than DATA_CHANGED? (We noticed this due to a bug in our watchman

Re: Watchman/inotify support and other ways to speed up git status

2015-11-03 Thread David Turner
On Tue, 2015-11-03 at 08:09 +0100, Christian Couder wrote: > On Tue, Nov 3, 2015 at 6:45 AM, Duy Nguyen <pclo...@gmail.com> wrote: > > On Mon, Nov 2, 2015 at 9:56 PM, David Turner <dtur...@twopensource.com> > > wrote: > >> On Thu, 2015-10-29 at 09:10 +0100, C

Re: [PATCH 1/5] read-cache: add watchman 'WAMA' extension

2015-11-03 Thread David Turner
On Tue, 2015-11-03 at 20:17 +0100, Duy Nguyen wrote: > On Mon, Nov 2, 2015 at 11:03 PM, David Turner <dtur...@twopensource.com> > wrote: > > On Sun, 2015-11-01 at 14:55 +0100, Nguyễn Thái Ngọc Duy wrote: > >> > >>+#define CE_NO_WATCH (0x0001) > >

[PATCH v3] http.c: use CURLOPT_RANGE for range requests

2015-11-02 Thread David Turner
that a range request is being made. By manually setting the range header instead of using CURLOPT_RANGE, we were hiding the fact that this was a range request from libcurl. This could cause corruption. Signed-off-by: David Turner <dtur...@twopensource.com> --- This version breaks the range

Re: Watchman/inotify support and other ways to speed up git status

2015-11-02 Thread David Turner
On Thu, 2015-10-29 at 09:10 +0100, Christian Couder wrote: > > We're using Watchman at Twitter. A week or two ago posted a dump of our > > code to github, but I would advise waiting a day or two to use it, as > > I'm about to pull a large number of bugfixes into it (I'll update this > > thread

Re: [PATCH 2/5] Add watchman support to reduce index refresh cost

2015-11-02 Thread David Turner
On Sun, 2015-11-01 at 14:55 +0100, Nguyễn Thái Ngọc Duy wrote: > The previous patch has the logic to clear bits in 'WAMA' bitmap. This > patch has logic to set bits as told by watchman. The missing bit, > _using_ these bits, are not here yet. > > A lot of this code is written

Re: [PATCH v4 4/9] index-helper: new daemon for caching index and related stuff

2015-11-02 Thread David Turner
On Sun, 2015-11-01 at 14:42 +0100, Nguyễn Thái Ngọc Duy wrote: > + memcpy(new_mmap, istate->mmap, istate->mmap_size - 20); > + > + /* > + * The trailing hash must be written last after everything is > + * written. It's the indication that the shared memory is now > + *

Re: [PATCH v5 18/26] refs: move transaction functions into common code

2015-11-02 Thread David Turner
On Sun, 2015-11-01 at 09:17 +0100, Michael Haggerty wrote: > On 10/28/2015 03:14 AM, David Turner wrote: > > The common ref code will build up a ref transaction. Backends will > > then commit it. So the transaction creation and update functions should > > be in the commo

[PATCH v4] http.c: use CURLOPT_RANGE for range requests

2015-11-02 Thread David Turner
that a range request is being made. By manually setting the range header instead of using CURLOPT_RANGE, we were hiding the fact that this was a range request from libcurl. This could cause corruption. Signed-off-by: David Turner <dtur...@twopensource.com> --- This one incorporates Jeff's suggestions

Re: [PATCH 1/5] read-cache: add watchman 'WAMA' extension

2015-11-02 Thread David Turner
On Sun, 2015-11-01 at 14:55 +0100, Nguyễn Thái Ngọc Duy wrote: > >+#define CE_NO_WATCH (0x0001) This name seems very confusing to me. CE_NO_WATCHMAN_STAT? CE_UNKNOWN_TO_WATCHMAN? (one reason it may seem more confusing to me than to others is that Twitter's code has a concept of files that we

Re: [PATCH v3] http.c: use CURLOPT_RANGE for range requests

2015-11-02 Thread David Turner
On Mon, 2015-11-02 at 17:10 -0500, Jeff King wrote: > On Mon, Nov 02, 2015 at 10:50:10PM +0100, Andreas Schwab wrote: > > > Jeff King writes: > > > > > 4. Fix all of the callers. I suspect this would involve calling > > > fstat(fileno(fh)) to get a real off_t. > > > > You

Re: Strange diff-index output

2015-11-02 Thread David Turner
On Tue, 2015-11-03 at 12:59 +1300, Ch'Gans wrote: > Hi there, > > We're using a script to verify that what we are building is clean > against our git repository, for this we're using "git rev-parse > --short HEAD" to get the current hash and "git diff-index --quiet > HEAD" to check for local

[PATCH v2] http.c: use CURLOPT_RANGE for range requests

2015-10-30 Thread David Turner
that a range request is being made. By manually setting the range header instead of using CURLOPT_RANGE, we were hiding the fact that this was a range request from libcurl. This could cause corruption. Signed-off-by: David Turner <dtur...@twopensource.com> --- This version applies on top of pu. I

Re: [PATCH] http.c: use CURLOPT_RANGE for range requests

2015-10-30 Thread David Turner
Please disregard this; I noticed I missed a few instances. Will reroll shortly. On Fri, 2015-10-30 at 18:41 -0400, David Turner wrote: > A HTTP server is permitted to return a non-range response to a HTTP > range request (and Apache httpd in fact does this in some cases). > While libc

[PATCH] http.c: use CURLOPT_RANGE for range requests

2015-10-30 Thread David Turner
that a range request is being made. By manually setting the range header instead of using CURLOPT_RANGE, we were hiding the fact that this was a range request from libcurl. This could cause corruption. Signed-off-by: David Turner <dtur...@twopensource.com> --- http.c | 5 +++-- 1 file changed, 3 inse

Re: Watchman/inotify support and other ways to speed up git status

2015-10-27 Thread David Turner
On Thu, 2015-10-22 at 07:59 +0200, Christian Couder wrote: > Hi everyone, > > I am starting to investigate ways to speed up git status and other git > commands for Booking.com (thanks to AEvar) and I'd be happy to discuss > the current status or be pointed to relevant documentation or mailing >

[PATCH v5 15/26] refs.c: move prettify_refname to the common code

2015-10-27 Thread David Turner
From: Ronnie Sahlberg Signed-off-by: Ronnie Sahlberg Signed-off-by: Junio C Hamano --- refs-be-files.c | 9 - refs.c | 9 + 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/refs-be-files.c

[PATCH v5 08/26] refs.c: move the hidden refs functions to the common code

2015-10-27 Thread David Turner
From: Ronnie Sahlberg <sahlb...@google.com> Move the hidden refs functions to the refs.c file since these functions do not contain any backend specific code. Signed-off-by: Ronnie Sahlberg <sahlb...@google.com> Signed-off-by: David Turner <dtur...@twopensource.com> Signed-off-

[PATCH v5 05/26] refs.c: move update_ref to refs.c

2015-10-27 Thread David Turner
ed-off-by: Ronnie Sahlberg <sahlb...@google.com> Signed-off-by: David Turner <dtur...@twopensource.com> Signed-off-by: Junio C Hamano <gits...@pobox.com> --- refs-be-files.c | 117 +--

[PATCH v5 12/26] refs.c: move resolve_refdup to common

2015-10-27 Thread David Turner
From: Ronnie Sahlberg <sahlb...@google.com> This function can be shared across all refs backends so move it to the common code. Signed-off-by: Ronnie Sahlberg <sahlb...@google.com> Signed-off-by: David Turner <dtur...@twopensource.com> Signed-off-by: Junio C Hamano <gits...

[PATCH v5 21/26] refs.c: move peel_object to the common code

2015-10-27 Thread David Turner
This function does not contain any backend specific code so we move it to the common code. Signed-off-by: David Turner <dtur...@twopensource.com> Signed-off-by: Junio C Hamano <gits...@pobox.com> Signed-off-by: Michael Haggerty <mhag...@alum.mit.edu> --- re

[PATCH v5 19/26] refs.c: move refname_is_safe to the common code

2015-10-27 Thread David Turner
ed-off-by: David Turner <dtur...@twopensource.com> Signed-off-by: Junio C Hamano <gits...@pobox.com> Signed-off-by: Michael Haggerty <mhag...@alum.mit.edu> --- refs-be-files.c | 33 - refs.c | 24 refs.h | 11

[PATCH v5 17/26] refs.c: move head_ref_namespaced to the common code

2015-10-27 Thread David Turner
From: Ronnie Sahlberg Signed-off-by: Ronnie Sahlberg Signed-off-by: Junio C Hamano --- refs-be-files.c | 15 --- refs.c | 15 +++ 2 files changed, 15 insertions(+), 15 deletions(-) diff --git

[PATCH v5 26/26] introduce "extensions" form of core.repositoryformatversion

2015-10-27 Thread David Turner
From: Jeff King Normally we try to avoid bumps of the whole-repository core.repositoryformatversion field. However, it is unavoidable if we want to safely change certain aspects of git in a backwards-incompatible way (e.g., modifying the set of ref tips that we must traverse to

[PATCH v5 24/26] refs: make files_log_ref_write functions public

2015-10-27 Thread David Turner
Because HEAD and stash are per-worktree, refs.c needs to go through the files backend to write these refs. In this patch, we make one files_log_ref_write public. Later, we will use this to handle reflog updates for per-worktree symbolic refs (HEAD). Signed-off-by: David Turner <d

[PATCH v5 25/26] refs: break out ref conflict checks

2015-10-27 Thread David Turner
no files-backend-specific code. Signed-off-by: David Turner <dtur...@twopensource.com> Signed-off-by: Junio C Hamano <gits...@pobox.com> Signed-off-by: Michael Haggerty <mhag...@alum.mit.edu> --- refs-be-files.c | 49 - re

[PATCH v5 11/26] refs.c: move read_ref, read_ref_full and ref_exists to the common code

2015-10-27 Thread David Turner
From: Ronnie Sahlberg <sahlb...@google.com> These functions do not depend on the backend implementation so we move them to the common code. Signed-off-by: Ronnie Sahlberg <sahlb...@google.com> Signed-off-by: David Turner <dtur...@twopensource.com> Signed-off-by: Junio C Hamano

[PATCH v5 10/26] refs.c: move warn_if_dangling_symref* to the common code

2015-10-27 Thread David Turner
From: Ronnie Sahlberg <sahlb...@google.com> These functions do not use any backend specific code so we move them to the common code. Signed-off-by: Ronnie Sahlberg <sahlb...@google.com> Signed-off-by: David Turner <dtur...@twopensource.com> Signed-off-by: Junio C Hamano

[PATCH v5 09/26] refs.c: move dwim and friend functions to the common refs code

2015-10-27 Thread David Turner
From: Ronnie Sahlberg <sahlb...@google.com> These functions do not contain any backend specific code so we move them to the common code and share across all backends. Signed-off-by: Ronnie Sahlberg <sahlb...@google.com> Signed-off-by: David Turner <dtur...@twopensource.com> Si

[PATCH v5 04/26] refs.c: add a new refs.c file to hold all common refs code

2015-10-27 Thread David Turner
From: Ronnie Sahlberg Create a new refs.c file that will be used to hold all the refs code that is backend agnostic and will be shared across all backends. Signed-off-by: Ronnie Sahlberg Signed-off-by: Junio C Hamano --- Makefile |

[PATCH v5 16/26] refs.c: move ref iterators to the common code

2015-10-27 Thread David Turner
From: Ronnie Sahlberg <sahlb...@google.com> Signed-off-by: Ronnie Sahlberg <sahlb...@google.com> Signed-off-by: Junio C Hamano <gits...@pobox.com> Signed-off-by: David Turner <dtur...@twopensource.com> --- refs-be-files.c | 82 -

[PATCH v5 03/26] refs-be-files.c: rename refs to refs-be-files

2015-10-27 Thread David Turner
From: Ronnie Sahlberg Rename refs.c to refs-be-files.c to indicate that this file now holds the implementation for the files based refs backend. A smaller portion of the code in this file is backend agnostic and will be moved to a new refs.c file that will hold all the

[PATCH v5 18/26] refs: move transaction functions into common code

2015-10-27 Thread David Turner
ref_update to support alternate backends. Signed-off-by: David Turner <dtur...@twopensource.com> Signed-off-by: Junio C Hamano <gits...@pobox.com> --- refs-be-files.c | 198 refs.c | 108 +++

[PATCH v5 14/26] refs.c: move is_branch to the common code

2015-10-27 Thread David Turner
From: Ronnie Sahlberg <sahlb...@google.com> Signed-off-by: Ronnie Sahlberg <sahlb...@google.com> Signed-off-by: David Turner <dtur...@twopensource.com> Signed-off-by: Junio C Hamano <gits...@pobox.com> --- refs-be-files.c | 5 - refs.c | 5 + 2 files cha

[PATCH v5 00/26] refs backend pre-vtable

2015-10-27 Thread David Turner
and Junio for the reviews. The rest of the patches: David Turner (9): refs: make is_branch public refs: move transaction functions into common code refs.c: move refname_is_safe to the common code refs.c: move copy_msg to the common code refs.c: move peel_object to the common code refs.c

[PATCH v5 07/26] refs.c: move read_ref_at to the common refs file

2015-10-27 Thread David Turner
From: Ronnie Sahlberg <sahlb...@google.com> Move read_ref_at() to the refs.c file since this function does not contain any backend specific code. Signed-off-by: Ronnie Sahlberg <sahlb...@google.com> Signed-off-by: David Turner <dtur...@twopensource.com> Signed-off-by: Ju

[PATCH v5 13/26] refs.c: move check_refname_format to the common code

2015-10-27 Thread David Turner
From: Ronnie Sahlberg <sahlb...@google.com> This function does not contain any backend specific code so we move it to the common code. Signed-off-by: Ronnie Sahlberg <sahlb...@google.com> Signed-off-by: David Turner <dtur...@twopensource.com> Signed-off-by: Junio C Hamano

[PATCH v5 02/26] refs: make is_branch public

2015-10-27 Thread David Turner
is_branch was already non-static, but this patch declares it in the header. Signed-off-by: Ronnie Sahlberg <sahlb...@google.com> Signed-off-by: David Turner <dtur...@twopensource.com> Signed-off-by: Junio C Hamano <gits...@pobox.com> --- refs.h | 2 ++ 1 file changed, 2 inserti

[PATCH v5 22/26] refs.c: move should_autocreate_reflog to common code

2015-10-27 Thread David Turner
Signed-off-by: David Turner <dtur...@twopensource.com> Signed-off-by: Junio C Hamano <gits...@pobox.com> Signed-off-by: Michael Haggerty <mhag...@alum.mit.edu> --- refs-be-files.c | 10 -- refs.c | 10 ++ refs.h | 2 ++ 3 files changed, 12

[PATCH v5 01/26] refs.c: create a public version of verify_refname_available

2015-10-27 Thread David Turner
From: Ronnie Sahlberg <sahlb...@google.com> Create a public version of verify_refname_available that backends can provide. Signed-off-by: Ronnie Sahlberg <sahlb...@google.com> Signed-off-by: David Turner <dtur...@twopensource.com> Signed-off-by: Junio C Hamano <gits...@p

[PATCH v5 23/26] initdb: move safe_create_dir into common code

2015-10-27 Thread David Turner
In a moment, we'll create initdb functions for ref backends, and code from initdb that calls this function needs to move into the files backend. So this function needs to be public. Signed-off-by: David Turner <dtur...@twopensource.com> Signed-off-by: Junio C Hamano <gits...@pobox.co

[PATCH v5 06/26] refs.c: move delete_pseudoref and delete_ref to the common code

2015-10-27 Thread David Turner
Ronnie Sahlberg. Signed-off-by: David Turner <dtur...@twopensource.com> Signed-off-by: Ronnie Sahlberg <sahlb...@google.com> Signed-off-by: Junio C Hamano <gits...@pobox.com> --- refs-be-files.c | 56 --

[PATCH v5 20/26] refs.c: move copy_msg to the common code

2015-10-27 Thread David Turner
Rename copy_msg to copy_reflog_msg and make it public. Signed-off-by: David Turner <dtur...@twopensource.com> Signed-off-by: Junio C Hamano <gits...@pobox.com> Signed-off-by: Michael Haggerty <mhag...@alum.mit.edu> --- refs-be-files.c | 28 +--- re

Re: [PATCH] fix flaky untracked-cache test

2015-10-21 Thread David Turner
On Wed, 2015-10-21 at 07:42 +0200, Torsten Bögershausen wrote: > On 19.10.15 21:48, David Turner wrote: > > > + echo test >base && #we need to ensure that the root dir is touched > > + rm base > > ' > Thanks for working on this, (I can run the tes

[PATCH v4] name-hash: don't reuse cache_entry in dir_entry

2015-10-21 Thread David Turner
n does not use any of Keith's code. Helped-by: Keith McGuigan <kmcgui...@twitter.com> Helped-by: Junio C Hamano <gits...@pobox.com> Signed-off-by: David Turner <dtur...@twopensource.com> --- cache.h | 3 ++- dir.c| 22 -

Re: t7063-status-untracked-cache.sh test failure on next

2015-10-21 Thread David Turner
On Wed, 2015-10-21 at 18:05 +0200, Torsten Bögershausen wrote: > On 21.10.15 16:37, Ramsay Jones wrote: > > Hi Junio, > > > > While testing the next branch today, I had a test failure, viz: > > > > $ tail ntest-out-fail > > Test Summary Report > > --- > >

Re: [PATCH v4 06/26] refs.c: move delete_pseudoref and delete_ref to the common code

2015-10-21 Thread David Turner
On Thu, 2015-10-15 at 15:46 -0400, David Turner wrote: > --- a/refs.c > +++ b/refs.c > @@ -117,3 +117,60 @@ int update_ref(const char *msg, const char *refname, > ref_transaction_free(t); > return 0; > } > + > + > +static int delete_pseudoref(c

Re: [PATCH v4 05/26] refs.c: move update_ref to refs.c

2015-10-21 Thread David Turner
On Thu, 2015-10-15 at 15:46 -0400, David Turner wrote: > From: Ronnie Sahlberg <sahlb...@google.com> > > Move update_ref() to the refs.c file since this function does not > contain any backend specific code. Move the ref classifier functions and write_pseudoref (

Re: [PATCH v4 23/26] initdb: move safe_create_dir into common code

2015-10-21 Thread David Turner
On Wed, 2015-10-21 at 12:38 -0700, Junio C Hamano wrote: > David Turner <dtur...@twopensource.com> writes: > > > In a moment, we'll create initdb functions for ref backends, and code > > from initdb that calls this function needs to move into the files > > ba

[PATCH] fix flaky untracked-cache test

2015-10-19 Thread David Turner
and the status at 12346.001 seconds, meaning that the worktree's root directory would not be racily-dirty. And since it was not truly dirty, occasionally the test would fail. By making the root truly dirty, the test will always succeed. Tested by running a few hundred times. Signed-off-by: David

Re: [PATCH v3] merge: fix cache_entry use-after-free

2015-10-19 Thread David Turner
On Fri, 2015-10-16 at 09:04 -0700, Junio C Hamano wrote: > David Turner <dtur...@twopensource.com> writes: > > > We also do dozens or hundreds of merges per day and only saw this quite > > rarely. Interestingly, we could only trigger it with an alternate > > hash

Re: [PATCH v4 02/26] refs: make repack_without_refs and is_branch public

2015-10-19 Thread David Turner
On Fri, 2015-10-16 at 08:34 +0200, Michael Haggerty wrote: > On 10/15/2015 09:46 PM, David Turner wrote: > > is_branch was already non-static, but this patch declares it in the > > header. > > The commit message no longer reflects the patch. > > > Signed-

Re: [BUG] t7063-status-untracked-cache flaky?

2015-10-16 Thread David Turner
On Fri, 2015-10-16 at 17:22 +0200, Torsten Bögershausen wrote: > On 15.10.15 09:52, Lars Schneider wrote: > > Hi, > > > > I noticed that "t7063-status-untracked-cache.sh" occasionally fails with > > "not ok 24 - test sparse status with untracked cache". > > I can't reproduce it here. > Do you

Re: [BUG] t7063-status-untracked-cache flaky?

2015-10-16 Thread David Turner
On Fri, 2015-10-16 at 13:34 -0700, Junio C Hamano wrote: > David Turner <dtur...@twopensource.com> writes: > > > The problem is: > > > > trash directory.t7063-status-untracked-cache$ diff trace trace.expect > > 3,4c3,4 > > < directory invalidati

Re: [PATCH v3] merge: fix cache_entry use-after-free

2015-10-16 Thread David Turner
On Thu, 2015-10-15 at 13:51 -0700, Junio C Hamano wrote: > David Turner <dtur...@twopensource.com> writes: > > >> > +static inline void drop_ce_ref(struct cache_entry *ce) > >> > +{ > >> > +if (ce != NULL) { > >> > +

Re: [BUG] t7063-status-untracked-cache flaky?

2015-10-15 Thread David Turner
On Thu, 2015-10-15 at 09:52 +0200, Lars Schneider wrote: > Hi, > > I noticed that "t7063-status-untracked-cache.sh" occasionally fails with "not > ok 24 - test sparse status with untracked cache". > > E.g. on OS X compiled with gcc: > https://travis-ci.org/larsxschneider/git/jobs/85432514 > >

[PATCH v4 14/26] refs.c: move is_branch to the common code

2015-10-15 Thread David Turner
From: Ronnie Sahlberg <sahlb...@google.com> Signed-off-by: Ronnie Sahlberg <sahlb...@google.com> Signed-off-by: David Turner <dtur...@twopensource.com> Signed-off-by: Junio C Hamano <gits...@pobox.com> --- refs-be-files.c | 5 - refs.c | 5 + 2 files cha

[PATCH v4 03/26] refs-be-files.c: rename refs to refs-be-files

2015-10-15 Thread David Turner
From: Ronnie Sahlberg Rename refs.c to refs-be-files.c to indicate that this file now holds the implementation for the files based refs backend. A smaller portion of the code in this file is backend agnostic and will be moved to a a new refs.c file that will hold all the

[PATCH v4 16/26] refs.c: move ref iterators to the common code

2015-10-15 Thread David Turner
From: Ronnie Sahlberg Signed-off-by: Ronnie Sahlberg Signed-off-by: Junio C Hamano --- refs-be-files.c | 82 - refs.c | 81

[PATCH v4 12/26] refs.c: move resolve_refdup to common

2015-10-15 Thread David Turner
From: Ronnie Sahlberg <sahlb...@google.com> This function can be shared across all refs backends so move it to the common code. Signed-off-by: Ronnie Sahlberg <sahlb...@google.com> Signed-off-by: David Turner <dtur...@twopensource.com> Signed-off-by: Junio C Hamano <gits...

[PATCH v4 18/26] refs: move transaction functions into common code

2015-10-15 Thread David Turner
ref_update to support alternate backends. Signed-off-by: David Turner <dtur...@twopensource.com> Signed-off-by: Junio C Hamano <gits...@pobox.com> --- refs-be-files.c | 198 refs.c | 108 +++

[PATCH v4 00/26] refs backend pre-vtable patches

2015-10-15 Thread David Turner
, since it should be relatively non-controversial. David Turner (9): refs: make repack_without_refs and is_branch public refs: move transaction functions into common code refs.c: move refname_is_safe to the common code refs.c: move copy_msg to the common code refs.c: move peel_object

[PATCH v4 02/26] refs: make repack_without_refs and is_branch public

2015-10-15 Thread David Turner
is_branch was already non-static, but this patch declares it in the header. Signed-off-by: Ronnie Sahlberg <sahlb...@google.com> Signed-off-by: David Turner <dtur...@twopensource.com> Signed-off-by: Junio C Hamano <gits...@pobox.com> --- refs.c | 5 +++-- refs.h | 2 ++

[PATCH v4 19/26] refs.c: move refname_is_safe to the common code

2015-10-15 Thread David Turner
This function does not contain any backend specific code so we move it to the common code. This function might be used by other refs backends. Signed-off-by: Ronnie Sahlberg <sahlb...@google.com> Signed-off-by: David Turner <dtur...@twopensource.com> Signed-off-by: Junio C

[PATCH v4 10/26] refs.c: move warn_if_dangling_symref* to the common code

2015-10-15 Thread David Turner
From: Ronnie Sahlberg <sahlb...@google.com> These functions do not use any backend specific code so we move them to the common code. Signed-off-by: Ronnie Sahlberg <sahlb...@google.com> Signed-off-by: David Turner <dtur...@twopensource.com> Signed-off-by: Junio C Hamano

[PATCH v4 07/26] refs.c: move read_ref_at to the common refs file

2015-10-15 Thread David Turner
From: Ronnie Sahlberg <sahlb...@google.com> Move read_ref_at() to the refs.c file since this function does not contain any backend specific code. Signed-off-by: Ronnie Sahlberg <sahlb...@google.com> Signed-off-by: David Turner <dtur...@twopensource.com> Signed-off-by: Ju

[PATCH v4 01/26] refs.c: create a public version of verify_refname_available

2015-10-15 Thread David Turner
From: Ronnie Sahlberg <sahlb...@google.com> Create a public version of verify_refname_available that backends can provide. Signed-off-by: Ronnie Sahlberg <sahlb...@google.com> Signed-off-by: David Turner <dtur...@twopensource.com> Signed-off-by: Junio C Hamano <gits...@p

[PATCH v4 21/26] refs.c: move peel_object to the common code

2015-10-15 Thread David Turner
This function does not contain any backend specific code so we move it to the common code. Signed-off-by: David Turner <dtur...@twopensource.com> Signed-off-by: Junio C Hamano <gits...@pobox.com> Signed-off-by: Michael Haggerty <mhag...@alum.mit.edu> --- re

[PATCH v4 05/26] refs.c: move update_ref to refs.c

2015-10-15 Thread David Turner
<sahlb...@google.com> Signed-off-by: David Turner <dtur...@twopensource.com> Signed-off-by: Junio C Hamano <gits...@pobox.com> --- refs-be-files.c | 117 +--- refs.c | 116

[PATCH v4 26/26] introduce "extensions" form of core.repositoryformatversion

2015-10-15 Thread David Turner
From: Jeff King Normally we try to avoid bumps of the whole-repository core.repositoryformatversion field. However, it is unavoidable if we want to safely change certain aspects of git in a backwards-incompatible way (e.g., modifying the set of ref tips that we must traverse to

[PATCH v4 24/26] refs: make files_log_ref_write functions public

2015-10-15 Thread David Turner
Because HEAD and stash are per-worktree, refs.c needs to go through the files backend to write these refs. In this patch, we make one files backend internal functions public. Later, we will use this to handle reflog updates for per-worktree symbolic refs (HEAD). Signed-off-by: David Turner <d

[PATCH v4 08/26] refs.c: move the hidden refs functions to the common code

2015-10-15 Thread David Turner
From: Ronnie Sahlberg <sahlb...@google.com> Move the hidden refs functions to the refs.c file since these functions do not contain any backend specific code. Signed-off-by: Ronnie Sahlberg <sahlb...@google.com> Signed-off-by: David Turner <dtur...@twopensource.com> Signed-off-

[PATCH v4 13/26] refs.c: move check_refname_format to the common code

2015-10-15 Thread David Turner
From: Ronnie Sahlberg <sahlb...@google.com> This function does not contain any backend specific code so we move it to the common code. Signed-off-by: Ronnie Sahlberg <sahlb...@google.com> Signed-off-by: David Turner <dtur...@twopensource.com> Signed-off-by: Junio C Hamano

[PATCH v4 04/26] refs.c: add a new refs.c file to hold all common refs code

2015-10-15 Thread David Turner
From: Ronnie Sahlberg Create a new refs.c file that will be used to hold all the refs code that is backend agnostic and will be shared across all backends. Signed-off-by: Ronnie Sahlberg Signed-off-by: Junio C Hamano --- Makefile |

[PATCH v4 15/26] refs.c: move prettify_refname to the common code

2015-10-15 Thread David Turner
From: Ronnie Sahlberg Signed-off-by: Ronnie Sahlberg Signed-off-by: Junio C Hamano --- refs-be-files.c | 9 - refs.c | 9 + 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/refs-be-files.c

[PATCH v4 20/26] refs.c: move copy_msg to the common code

2015-10-15 Thread David Turner
Rename copy_msg to copy_reflog_msg and make it public. Signed-off-by: David Turner <dtur...@twopensource.com> Signed-off-by: Junio C Hamano <gits...@pobox.com> Signed-off-by: Michael Haggerty <mhag...@alum.mit.edu> --- refs-be-files.c | 28 +--- re

[PATCH v4 06/26] refs.c: move delete_pseudoref and delete_ref to the common code

2015-10-15 Thread David Turner
Ronnie Sahlberg. Signed-off-by: David Turner <dtur...@twopensource.com> Signed-off-by: Ronnie Sahlberg <sahlb...@google.com> Signed-off-by: Junio C Hamano <gits...@pobox.com> --- refs-be-files.c | 56 --

[PATCH v4 11/26] refs.c: move read_ref, read_ref_full and ref_exists to the common code

2015-10-15 Thread David Turner
From: Ronnie Sahlberg <sahlb...@google.com> These functions do not depend on the backend implementation so we move them to the common code. Signed-off-by: Ronnie Sahlberg <sahlb...@google.com> Signed-off-by: David Turner <dtur...@twopensource.com> Signed-off-by: Junio C Hamano

[PATCH v4 22/26] refs.c: move should_autocreate_reflog to common code

2015-10-15 Thread David Turner
Signed-off-by: David Turner <dtur...@twopensource.com> Signed-off-by: Junio C Hamano <gits...@pobox.com> Signed-off-by: Michael Haggerty <mhag...@alum.mit.edu> --- refs-be-files.c | 10 -- refs.c | 10 ++ refs.h | 2 ++ 3 files changed, 12

[PATCH v4 25/26] refs: break out ref conflict checks

2015-10-15 Thread David Turner
no files-backend-specific code. Signed-off-by: David Turner <dtur...@twopensource.com> Signed-off-by: Junio C Hamano <gits...@pobox.com> Signed-off-by: Michael Haggerty <mhag...@alum.mit.edu> --- refs-be-files.c | 49 - re

[PATCH v4 23/26] initdb: move safe_create_dir into common code

2015-10-15 Thread David Turner
In a moment, we'll create initdb functions for ref backends, and code from initdb that calls this function needs to move into the files backend. So this function needs to be public. Signed-off-by: David Turner <dtur...@twopensource.com> Signed-off-by: Junio C Hamano <gits...@pobox.co

[PATCH v4 17/26] refs.c: move head_ref_namespaced to the common code

2015-10-15 Thread David Turner
From: Ronnie Sahlberg Signed-off-by: Ronnie Sahlberg Signed-off-by: Junio C Hamano --- refs-be-files.c | 15 --- refs.c | 15 +++ 2 files changed, 15 insertions(+), 15 deletions(-) diff --git

[PATCH v4 09/26] refs.c: move dwim and friend functions to the common refs code

2015-10-15 Thread David Turner
From: Ronnie Sahlberg <sahlb...@google.com> These functions do not contain any backend specific code so we move them to the common code and share across all backends. Signed-off-by: Ronnie Sahlberg <sahlb...@google.com> Signed-off-by: David Turner <dtur...@twopensource.com> Si

Re: [PATCH v3] merge: fix cache_entry use-after-free

2015-10-15 Thread David Turner
On Thu, 2015-10-15 at 05:35 +0200, René Scharfe wrote: > Am 15.10.2015 um 00:07 schrieb David Turner: > > From: Keith McGuigan <kmcgui...@twitter.com> > > > > During merges, we would previously free entries that we no longer need > > in the destination ind

Re: [PATCH v2] merge: fix cache_entry use-after-free

2015-10-14 Thread David Turner
On Wed, 2015-10-14 at 14:17 -0700, Junio C Hamano wrote: > David Turner <dtur...@twopensource.com> writes: > > > + unsigned int ref_count; /* count the number of refs to this in dir_hash > > */ > > Me makes a mental note of the type used... > > >

[PATCH v3] merge: fix cache_entry use-after-free

2015-10-14 Thread David Turner
lt;kmcgui...@twitter.com> Signed-off-by: David Turner <dtur...@twopensource.com> --- Fix type of ref_count (from unsigned int to int). cache.h| 27 +++ name-hash.c| 7 ++- read-cache.c | 6 +- split-index.c | 13 - unpack-trees.c | 6 -

Re: [PATCH v2] merge: fix cache_entry use-after-free

2015-10-13 Thread David Turner
On Mon, 2015-10-12 at 15:28 -0700, Junio C Hamano wrote: > David Turner <dtur...@twopensource.com> writes: > > > From: Keith McGuigan <kmcgui...@twitter.com> > > > > During merges, we would previously free entries that we no longer need > > in the destin

Re: [PATCH v3 19/44] refs-be-files.c: add a backend method structure with transaction functions

2015-10-13 Thread David Turner
On Tue, 2015-10-13 at 09:56 +0200, Michael Haggerty wrote: > On 10/12/2015 11:51 PM, David Turner wrote: > > From: Ronnie Sahlberg <sahlb...@google.com> > > > > Add a ref structure for backend methods. Start by adding a method pointer > > for the transact

Re: [PATCH v3 37/44] refs: break out a ref conflict check

2015-10-13 Thread David Turner
On Tue, 2015-10-13 at 12:25 +0200, Michael Haggerty wrote: > On 10/12/2015 11:51 PM, David Turner wrote: > > Create new function verify_no_descendants, to hold one of the ref > > conflict checks used in verify_refname_available. Multiple backends > > will need this

<    4   5   6   7   8   9   10   11   12   13   >