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

[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

[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

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

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

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

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 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 42/43] refs: add LMDB refs backend

2015-10-07 Thread David Turner
On Wed, 2015-10-07 at 20:31 +0200, Michael Haggerty wrote: > On 10/07/2015 03:51 AM, David Turner wrote: > > On Mon, 2015-10-05 at 17:47 +0200, Michael Haggerty wrote: > >> On 09/29/2015 12:02 AM, David Turner wrote: > >>> Add a database backend for refs using LMDB

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

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

[PATCH v3 01/44] refs.c: create a public version of verify_refname_available

2015-10-12 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>

[PATCH v3 05/44] refs.c: move update_ref to refs.c

2015-10-12 Thread David Turner
<sahlb...@google.com> Signed-off-by: David Turner <dtur...@twopensource.com> --- refs-be-files.c | 117 +--- refs.c | 115 +++ 2 files changed, 116 insertions(+), 116 deleti

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

2015-10-12 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> --- re

[PATCH v3 18/44] refs: move transaction functions into common code

2015-10-12 Thread David Turner
ref_update to support alternate backends. Signed-off-by: David Turner <dtur...@twopensource.com> --- refs-be-files.c | 198 refs.c | 108 +++ refs.h | 91 +- 3

[PATCH v3 20/44] refs-be-files.c: add methods for misc ref operations

2015-10-12 Thread David Turner
From: Ronnie Sahlberg <sahlb...@google.com> Add ref backend methods for: resolve_ref_unsafe, verify_refname_available, pack_refs, peel_ref, create_symref, resolve_gitlink_ref. Signed-off-by: Ronnie Sahlberg <sahlb...@google.com> Signed-off-by: David Turner <dtur...@twitter.com>

[PATCH v3 32/44] initdb: move safe_create_dir into common code

2015-10-12 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> --- builtin/init-db.c | 12 c

[PATCH v3 26/44] refs.c: move copy_msg to the common code

2015-10-12 Thread David Turner
Rename copy_msg to copy_reflog_msg and make it public. Signed-off-by: David Turner <dtur...@twopensource.com> --- refs-be-files.c | 28 +--- refs.c | 26 ++ refs.h | 2 ++ 3 files changed, 29 insertions(+), 27 deletions(-)

[PATCH v3 06/44] refs.c: move delete_ref and delete_refs to the common code

2015-10-12 Thread David Turner
From: Ronnie Sahlberg <sahlb...@google.com> Move delete_pseudoref, delete_ref() and delete_refs() to the refs.c file since these functions do not contain any backend specific code. Based on a patch by Ronnie Sahlberg. Signed-off-by: David Turner <dtur...@twopensource.com> Signed-of

[PATCH v3 21/44] refs-be-files.c: add methods for the ref iterators

2015-10-12 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> --- refs-be-files.c | 41 -- re

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

2015-10-12 Thread David Turner
<sahlb...@google.com> Signed-off-by: David Turner <dtur...@twopensource.com> --- refs-be-files.c | 10 -- refs.c | 30 ++ refs.h | 15 +++ 3 files changed, 53 insertions(+), 2 deletions(-) diff --git a/refs-be-files.c b/ref

[PATCH v3 03/44] refs-be-files.c: rename refs to refs-be-files

2015-10-12 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 v3 19/44] refs: add a backend method structure with transaction functions

2015-10-12 Thread David Turner
<sahlb...@google.com> Signed-off-by: David Turner <dtur...@twopensource.com> --- refs-be-files.c | 10 -- refs.c | 30 ++ refs.h | 15 +++ 3 files changed, 53 insertions(+), 2 deletions(-) diff --git a/refs-be-files.c b/ref

[PATCH v3 07/44] refs.c: move read_ref_at to the common refs file

2015-10-12 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> --- ref

[PATCH v3 23/44] refs-be-files.c: add do_for_each_per_worktree_ref

2015-10-12 Thread David Turner
Alternate refs backends might still use files to store per-worktree refs. So the files backend's ref-loading infrastructure should be available to those backends, just for use on per-worktree refs. Add do_for_each_per_worktree_ref, which iterates over per-worktree refs. Signed-off-by: David

[PATCH v3 28/44] refs.c: move should_autocreate_reflog to common code

2015-10-12 Thread David Turner
Signed-off-by: David Turner <dtur...@twopensource.com> --- refs-be-files.c | 10 -- refs.c | 10 ++ refs.h | 2 ++ 3 files changed, 12 insertions(+), 10 deletions(-) diff --git a/refs-be-files.c b/refs-be-files.c index bf2fd7a..73111e7 100644 ---

[PATCH v3 30/44] refs.c: add methods for reflog

2015-10-12 Thread David Turner
In the file-based backend, the reflog piggybacks on the ref lock. Since other backends won't have the same sort of ref lock, ref backends must also handle reflogs. Signed-off-by: Ronnie Sahlberg <rsahlb...@google.com> Signed-off-by: David Turner <dtur...@twopensource.com> --- ref

[PATCH v3 27/44] refs.c: move peel_object to the common code

2015-10-12 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> --- refs-be-files.c | 53 - refs.c | 31 +++

[PATCH v3 34/44] refs-be-files.c: add method to rename refs

2015-10-12 Thread David Turner
We also have to make rename_ref_available public, since alternate backends for rename_ref will need it. Signed-off-by: David Turner <dtur...@twopensource.com> --- refs-be-files.c | 20 +++- refs.c | 21 + refs.h | 7 ++- 3 files c

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

2015-10-12 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> --- re

[PATCH v3 14/44] refs.c: move is_branch to the common code

2015-10-12 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> --- refs-be-files.c | 5 - refs.c | 5 + 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/refs

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

2015-10-12 Thread David Turner
Please disregard this one; I rewrorded the commit message and forgot to delete this patch. On Mon, 2015-10-12 at 17:51 -0400, David Turner wrote: > From: Ronnie Sahlberg <sahlb...@google.com> > > Add a ref structure for backend methods. Start by adding a method pointer > f

[PATCH v3 13/44] refs.c: move check_refname_format to the common code

2015-10-12 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> --- ref

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

2015-10-12 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> --- re

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

2015-10-12 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 --- Makefile | 1 + refs.c | 3 +++ 2 files changed, 4

[PATCH v3 15/44] refs.c: move prettify_refname to the common code

2015-10-12 Thread David Turner
From: Ronnie Sahlberg Signed-off-by: Ronnie Sahlberg --- refs-be-files.c | 9 - refs.c | 9 + 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/refs-be-files.c b/refs-be-files.c index 1214d9e..ecf2b33 100644 ---

[PATCH v3 17/44] refs.c: move head_ref_namespaced to the common code

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

[PATCH v3 00/44] alternate refs backends

2015-10-12 Thread David Turner
code (to simplify the implementation of ref backends, and to simplify the next patch) refs: always handle non-normal refs in files backend (cross-backend transactions) David Turner (24): refs: make repack_without_refs and is_branch public refs: move transaction functions into common code refs

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

2015-10-12 Thread David Turner
From: Ronnie Sahlberg Signed-off-by: Ronnie Sahlberg --- refs-be-files.c | 82 - refs.c | 81 2 files changed, 81 insertions(+),

[PATCH v3 02/44] refs: make repack_without_refs and is_branch public

2015-10-12 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> --- refs.c | 9 + refs.h | 13 + 2 files changed, 14 insertions(+), 8 deleti

[PATCH v3 43/44] refs: add LMDB refs backend

2015-10-12 Thread David Turner
. If those tests are changed to use the update-ref machinery or test-refs-be-db (or, in the case of packed-refs, corrupt refs, and dumb fetch tests, are skipped), the only remaining failing tests are the git-new-workdir tests and the gitweb tests. Signed-off-by: David Turner <dtur...@twopensource.

[PATCH v3 22/44] refs-be-files.c: add method for for_each_reftype_...

2015-10-12 Thread David Turner
Add method for for_each_reftype_fullpath. Signed-off-by: David Turner <dtur...@twopensource.com> --- refs-be-files.c | 11 +++ refs.c | 7 +++ refs.h | 3 +++ 3 files changed, 21 insertions(+) diff --git a/refs-be-files.c b/refs-be-files.c index 2e2399e..c

[PATCH v3 36/44] refs: make files_log_ref_write functions public

2015-10-12 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 v3 29/44] refs.c: add ref backend init function

2015-10-12 Thread David Turner
The file backend doesn't need this function, but other backends might. Signed-off-by: David Turner <dtur...@twopensource.com> Signed-off-by: Ronnie Sahlberg <rsahlb...@google.com> --- refs-be-files.c | 6 ++ refs.c | 3 ++- refs.h | 4 +++- 3 files changed, 1

[PATCH v3 31/44] refs.c: add method for initial ref transaction commit

2015-10-12 Thread David Turner
Signed-off-by: Ronnie Sahlberg <rsahlb...@google.com> Signed-off-by: David Turner <dtur...@twopensource.com> --- refs-be-files.c | 5 +++-- refs.c | 6 ++ refs.h | 1 + 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/refs-be-files.c b/refs-be-f

[PATCH v3 40/44] refs: allow ref backend to be set for clone

2015-10-12 Thread David Turner
Add a new option, --refs-backend-type, to allow the ref backend type to be set on new clones. Submodules must use the same ref backend as the parent repository, so we also pass the --refs-backend-type option option when cloning submodules. Signed-off-by: David Turner <dtur...@twopensource.

[PATCH v3 44/44] refs: tests for db backend

2015-10-12 Thread David Turner
Add tests for the database backend. Signed-off-by: David Turner <dtur...@twopensource.com> Helped-by: Dennis Kaarsemaker <den...@kaarsemaker.net> --- t/t1460-refs-be-db.sh| 1109 ++ t/t1470-refs-be-db-reflog.sh | 359 ++ t

[PATCH v3 24/44] refs.c: move refname_is_safe to the common code

2015-10-12 Thread David Turner
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> --- refs-be-files.c | 33 - refs.c

[PATCH v3 38/44] refs: move duplicate check to common code

2015-10-12 Thread David Turner
The check for duplicate refnames in a transaction is needed for all backends, so move it to the common code. ref_transaction_commit_fn gains a new argument, the sorted string_list of affected refnames. Signed-off-by: David Turner <dtur...@twopensource.com> --- refs-be-files.

[PATCH v3 39/44] refs: always handle non-normal refs in files backend

2015-10-12 Thread David Turner
to the base ref then goes through the ordinary backend, while the files backend is directly called to update the symref's reflog. Signed-off-by: David Turner <dtur...@twopensource.com> --- refs.c | 141 - 1 file changed, 139 insertions

<    1   2   3   4   5   6   7   8   9   10   >