[PATCH v2 15/23] refs-common.c: move prettify_refname to the common code

2014-08-13 Thread Ronnie Sahlberg
Signed-off-by: Ronnie Sahlberg sahlb...@google.com --- refs-common.c | 9 + refs.c| 9 - 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/refs-common.c b/refs-common.c index 6eef80b..d8a295c 100644 --- a/refs-common.c +++ b/refs-common.c @@ -3,6 +3,15

[PATCH v2 03/23] refs-common.c: move update_ref to refs-common.c

2014-08-13 Thread Ronnie Sahlberg
This change moves update_ref() to the refs-common.c file since this function does not contain any backend specific code. Signed-off-by: Ronnie Sahlberg sahlb...@google.com --- refs-common.c | 25 + refs.c| 23 --- 2 files changed, 25 insertions

[PATCH v2 01/23] refs.c: create a public function for is_refname_available

2014-08-13 Thread Ronnie Sahlberg
Export a generic is_refname_available() function. We will need this as a public shared function later when we add additional refs backends since we want to keep using the same rules for ref naming across all backends. Signed-off-by: Ronnie Sahlberg sahlb...@google.com --- refs.c | 29

[PATCH v2 22/23] refs.c: add methods for the ref iterators

2014-08-13 Thread Ronnie Sahlberg
Signed-off-by: Ronnie Sahlberg sahlb...@google.com --- refs-common.c | 36 refs.c| 21 ++--- refs.h| 19 +++ 3 files changed, 69 insertions(+), 7 deletions(-) diff --git a/refs-common.c b/refs-common.c index

[PATCH v2 10/23] refs-common.c: move read_ref, read_ref_full and ref_exists to common

2014-08-13 Thread Ronnie Sahlberg
These functions do not depend on the backend implementation so we can move them to the common code. Signed-off-by: Ronnie Sahlberg sahlb...@google.com --- refs-common.c | 18 ++ refs.c| 18 -- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git

[PATCH v2 14/23] refs-common.c: move names_conflict to the common code

2014-08-13 Thread Ronnie Sahlberg
Signed-off-by: Ronnie Sahlberg sahlb...@google.com --- refs-common.c | 8 refs.c| 14 -- refs.h| 9 + 3 files changed, 17 insertions(+), 14 deletions(-) diff --git a/refs-common.c b/refs-common.c index 5f83d7e..6eef80b 100644 --- a/refs-common.c

Re: [PATCH v2 00/23] backend-struct-db

2014-08-13 Thread Ronnie Sahlberg
On Wed, Aug 13, 2014 at 2:18 PM, Junio C Hamano gits...@pobox.com wrote: Ronnie Sahlberg sahlb...@google.com writes: 15 of the patches, the refs-common.c patches, focuses on moving all backend agnostic refs functions to a common file. This file will contain all backend agnostic refs functions

Re: [PATCH 17/22] refs.c: add a backend method structure with transaction functions

2014-08-11 Thread Ronnie Sahlberg
On Fri, Aug 8, 2014 at 11:17 AM, David Turner dtur...@twopensource.com wrote: On Fri, 2014-08-08 at 09:45 -0700, Ronnie Sahlberg wrote: +struct ref_be refs_files = { + .transaction_begin = files_transaction_begin, + .transaction_update_sha1

Re: [PATCH 01/22] refs.c: create a public function for is_refname_available

2014-08-11 Thread Ronnie Sahlberg
Fixed. Thanks! On Fri, Aug 8, 2014 at 10:27 AM, David Turner dtur...@twopensource.com wrote: On Fri, 2014-08-08 at 09:44 -0700, Ronnie Sahlberg wrote: + * Check is a particular refname is available for creation. skip contains s/Check is/Check that/' + * a list of refnames to exclude from

Re: Pluggable backends for refs,wip

2014-08-08 Thread Ronnie Sahlberg
On Thu, Aug 7, 2014 at 5:57 AM, Michael Haggerty mhag...@alum.mit.edu wrote: On 08/05/2014 02:40 PM, Ronnie Sahlberg wrote: Please see https://github.com/rsahlberg/git/tree/backend-struct-db-2 for an example of a pluggable backend for refs storage. This series contain changes to make

Re: [PATCH 0/5] ref-transactions-send-pack

2014-08-08 Thread Ronnie Sahlberg
Ping On Thu, Jul 31, 2014 at 2:39 PM, Ronnie Sahlberg sahlb...@google.com wrote: List, This small patch series adds atomic-push support to for pushes. By default git will use the old style non-atomic updates for pushes, as not to cause disruption in client scripts that may depend

Re: [PATCH 0/5] ref-transactions-req-strbuf-err

2014-08-08 Thread Ronnie Sahlberg
Ping ? On Thu, Jul 31, 2014 at 2:25 PM, Ronnie Sahlberg sahlb...@google.com wrote: List, This is the next patch series in the ref transaction work. This patch series is called ref-transactions-req-strbuf-err and builds ontop of the series called ref-transactions-req-packed-refs which

[PATCH 01/22] refs.c: create a public function for is_refname_available

2014-08-08 Thread Ronnie Sahlberg
Export a generic is_refname_available() function. We will need this as a public shared function later when we add additional refs backends since we want to keep using the same rules for ref naming across all backends. Signed-off-by: Ronnie Sahlberg sahlb...@google.com --- refs.c | 29

[PATCH 03/22] refs-common.c: move update_ref to refs-common.c

2014-08-08 Thread Ronnie Sahlberg
This change moves update_ref() to the refs-common.c file since this function does not contain any backend specific code. Signed-off-by: Ronnie Sahlberg sahlb...@google.com --- refs-common.c | 25 + refs.c| 23 --- 2 files changed, 25 insertions

[PATCH 06/22] refs-common.c: move read_ref_at to the refs common file

2014-08-08 Thread Ronnie Sahlberg
This change moves read_ref_at() to the refs-common.c file since this function does not contain any backend specific code. Signed-off-by: Ronnie Sahlberg sahlb...@google.com --- refs-common.c | 114 ++ refs.c| 114

[PATCH 07/22] refs-common.c: move the hidden refs functions to the common code

2014-08-08 Thread Ronnie Sahlberg
This change moves the hidden refs functions to the refs-common.c file since these functions do not contain any backend specific code. Signed-off-by: Ronnie Sahlberg sahlb...@google.com --- refs-common.c | 44 refs.c| 43

[PATCH 00/22] backend-struct-db

2014-08-08 Thread Ronnie Sahlberg
a defined set of methods needed for a refs backend and we can start building and adding new types of ref backends to git. Ronnie Sahlberg (22): refs.c: create a public function for is_refname_available refs-common.c: create a file to host all common refs code refs-common.c: move update_ref

[PATCH 09/22] refs-common.c: move warn_if_dangling_symref* to refs-common

2014-08-08 Thread Ronnie Sahlberg
These functions do not use any backend specific code so we can move them to the common code. Signed-off-by: Ronnie Sahlberg sahlb...@google.com --- refs-common.c | 52 refs.c| 52 2

[PATCH 20/22] refs.c: add methods for head_ref*

2014-08-08 Thread Ronnie Sahlberg
Add methods for the head_ref* functions. Signed-off-by: Ronnie Sahlberg sahlb...@google.com --- refs-common.c | 15 +++ refs.c| 10 +++--- refs.h| 8 3 files changed, 30 insertions(+), 3 deletions(-) diff --git a/refs-common.c b/refs-common.c index

[PATCH 11/22] refs-common.c: move resolve_refdup to common

2014-08-08 Thread Ronnie Sahlberg
This function can be shared across all refs backends so move it to the common code. Signed-off-by: Ronnie Sahlberg sahlb...@google.com --- refs-common.c | 6 ++ refs.c| 6 -- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/refs-common.c b/refs-common.c index

[PATCH 08/22] refs-common.c: move dwim and friend functions to refs common

2014-08-08 Thread Ronnie Sahlberg
These functions do not contain any backend specific code so we can move them to the common code and share across all backends. Signed-off-by: Ronnie Sahlberg sahlb...@google.com --- refs-common.c | 202 ++ refs.c| 202

[PATCH 18/22] refs.c: add reflog backend methods

2014-08-08 Thread Ronnie Sahlberg
Add methods for the reflog functions. Signed-off-by: Ronnie Sahlberg sahlb...@google.com --- refs-common.c | 32 refs.c| 19 +-- refs.h| 18 ++ 3 files changed, 63 insertions(+), 6 deletions(-) diff --git a/refs

[PATCH 17/22] refs.c: add a backend method structure with transaction functions

2014-08-08 Thread Ronnie Sahlberg
-by: Ronnie Sahlberg sahlb...@google.com --- refs-common.c | 54 +++ refs.c| 68 +++ refs.h| 35 ++ 3 files changed, 130 insertions(+), 27 deletions(-) diff --git

[PATCH 13/22] refs-common.c: move is_branch to the common code

2014-08-08 Thread Ronnie Sahlberg
Signed-off-by: Ronnie Sahlberg sahlb...@google.com --- refs-common.c | 5 + refs.c| 5 - 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/refs-common.c b/refs-common.c index f8b79e0..5f83d7e 100644 --- a/refs-common.c +++ b/refs-common.c @@ -3,6 +3,11 @@ #include

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

2014-08-08 Thread Ronnie Sahlberg
Signed-off-by: Ronnie Sahlberg sahlb...@google.com --- refs-common.c | 81 +++ refs.c| 81 --- 2 files changed, 81 insertions(+), 81 deletions(-) diff --git a/refs-common.c b

[PATCH 21/22] refs.c: add methods for the ref iterators

2014-08-08 Thread Ronnie Sahlberg
Signed-off-by: Ronnie Sahlberg sahlb...@google.com --- refs-common.c | 36 refs.c| 22 +++--- refs.h| 20 3 files changed, 71 insertions(+), 7 deletions(-) diff --git a/refs-common.c b/refs-common.c index

[PATCH 12/22] refs-common.c: move check_refname_component to the common code

2014-08-08 Thread Ronnie Sahlberg
This function does not contain any backend specific code so we can move it to the common code. Signed-off-by: Ronnie Sahlberg sahlb...@google.com --- refs-common.c | 110 ++ refs.c| 110

[PATCH 15/22] refs-common.c: move prettify_refname to the common code

2014-08-08 Thread Ronnie Sahlberg
Signed-off-by: Ronnie Sahlberg sahlb...@google.com --- refs-common.c | 9 + refs.c| 9 - 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/refs-common.c b/refs-common.c index 6eef80b..d8a295c 100644 --- a/refs-common.c +++ b/refs-common.c @@ -3,6 +3,15

[PATCH 10/22] refs-common.c: move read_ref, read_ref_full and ref_exists to common

2014-08-08 Thread Ronnie Sahlberg
These functions do not depend on the backend implementation so we can move them to the common code. Signed-off-by: Ronnie Sahlberg sahlb...@google.com --- refs-common.c | 18 ++ refs.c| 18 -- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git

[PATCH 14/22] refs-common.c: move names_conflict to the common code

2014-08-08 Thread Ronnie Sahlberg
Signed-off-by: Ronnie Sahlberg sahlb...@google.com --- refs-common.c | 8 refs.c| 14 -- refs.h| 9 + 3 files changed, 17 insertions(+), 14 deletions(-) diff --git a/refs-common.c b/refs-common.c index 5f83d7e..6eef80b 100644 --- a/refs-common.c

[PATCH 02/22] refs-common.c: create a file to host all common refs code

2014-08-08 Thread Ronnie Sahlberg
Create refs-common.c which will hold all backend agnostic refs code. Signed-off-by: Ronnie Sahlberg sahlb...@google.com --- Makefile | 1 + refs-common.c | 2 ++ 2 files changed, 3 insertions(+) create mode 100644 refs-common.c diff --git a/Makefile b/Makefile index 07ea105..7705136

[PATCH 19/22] refs.c: add methods for misc ref operations

2014-08-08 Thread Ronnie Sahlberg
-by: Ronnie Sahlberg sahlb...@google.com --- refs-common.c | 33 + refs.c| 23 --- refs.h| 21 + 3 files changed, 70 insertions(+), 7 deletions(-) diff --git a/refs-common.c b/refs-common.c index 083964f

[PATCH 05/22] refs-common.c: move rename_ref to the common code

2014-08-08 Thread Ronnie Sahlberg
This change moves rename_ref() to the refs-common.c file since this function does not contain any backend specific code. Signed-off-by: Ronnie Sahlberg sahlb...@google.com --- refs-common.c | 92 +++ refs.c| 92

[PATCH 04/22] refs-common.c: move delete_ref to the common code

2014-08-08 Thread Ronnie Sahlberg
This change moves delete_ref() to the refs-common.c file since this function does not contain any backend specific code. Signed-off-by: Ronnie Sahlberg sahlb...@google.com --- refs-common.c | 18 ++ refs.c| 19 --- 2 files changed, 18 insertions(+), 19

Re: Transaction patch series overview

2014-08-08 Thread Ronnie Sahlberg
for refs. This series concludes the work to define pluggable backends for refs. At this stage it will now be possible to start building and adding new types of ref backends to git. Sent to the list regards ronnie sahlberg -- To unsubscribe from this list: send the line unsubscribe git in the body

Pluggable backends for refs,wip

2014-08-05 Thread Ronnie Sahlberg
some-repo foo ./foo should now contain a git repository that store its refs in a separate database. (teh databases are store under /tmp so don't use this for anything important because bad things happens to things stored under /tmp) regards ronnie sahlberg -- To unsubscribe from this list: send

Re: Pluggable backends for refs,wip

2014-08-05 Thread Ronnie Sahlberg
-class SQL* backend. regards ronnie sahlberg -- To unsubscribe from this list: send the line unsubscribe git in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: Git Help needed

2014-08-01 Thread Ronnie Sahlberg
This looks more like a packaging/build issue than a git issue. It looks like whomever built your version of git built it against a specific version of the OpenSSL library. You should probably contact the folks that built your binary and ask them to update and build against the version that the

[PATCH 1/5] refs.c: replace the onerr argument in update_ref with a strbuf err

2014-07-31 Thread Ronnie Sahlberg
Signed-off-by: Ronnie Sahlberg sahlb...@google.com --- builtin/checkout.c | 7 +-- builtin/clone.c | 23 +++ builtin/merge.c | 20 +--- builtin/notes.c | 24 ++-- builtin/reset.c | 12 builtin/update

[PATCH 0/5] ref-transactions-req-strbuf-err

2014-07-31 Thread Ronnie Sahlberg
to pass errors back to callers. The only thing noteworthy is that we finally get to remove -enum action_on_err { - UPDATE_REFS_MSG_ON_ERR, - UPDATE_REFS_DIE_ON_ERR, - UPDATE_REFS_QUIET_ON_ERR -}; aside from that there is little/nothing much interesting in there. Ronnie Sahlberg (5

[PATCH 5/5] refs.c: add an err argument to pack_refs

2014-07-31 Thread Ronnie Sahlberg
Signed-off-by: Ronnie Sahlberg sahlb...@google.com --- builtin/pack-refs.c | 8 +++- refs.c | 13 ++--- refs.h | 3 ++- 3 files changed, 15 insertions(+), 9 deletions(-) diff --git a/builtin/pack-refs.c b/builtin/pack-refs.c index b20b1ec..da5d46a 100644

[PATCH 2/5] refs.c: make add_packed_ref return an error instead of calling die

2014-07-31 Thread Ronnie Sahlberg
() will fail which protects us from calling add_packed_ref() with the bad name. Signed-off-by: Ronnie Sahlberg sahlb...@google.com --- refs.c | 23 +-- 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/refs.c b/refs.c index 65eee72..0aad8c8 100644 --- a/refs.c +++ b

[PATCH 3/5] refs.c: make lock_packed_refs take an err argument

2014-07-31 Thread Ronnie Sahlberg
Signed-off-by: Ronnie Sahlberg sahlb...@google.com --- refs.c | 25 + 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/refs.c b/refs.c index 0aad8c8..cfe1292 100644 --- a/refs.c +++ b/refs.c @@ -2270,13 +2270,17 @@ static int write_packed_entry_fn(struct

[PATCH 4/5] refs.c: add an err argument to commit_packed_refs

2014-07-31 Thread Ronnie Sahlberg
Signed-off-by: Ronnie Sahlberg sahlb...@google.com --- refs.c | 85 +++--- 1 file changed, 50 insertions(+), 35 deletions(-) diff --git a/refs.c b/refs.c index cfe1292..19e73f3 100644 --- a/refs.c +++ b/refs.c @@ -2232,8 +2232,8

[PATCH 1/5] receive-pack.c: add protocol support to negotiate atomic-push

2014-07-31 Thread Ronnie Sahlberg
Signed-off-by: Ronnie Sahlberg sahlb...@google.com --- builtin/receive-pack.c | 6 +- send-pack.c| 12 +--- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/builtin/receive-pack.c b/builtin/receive-pack.c index 0565b94..f6b20cb 100644 --- a/builtin/receive

[PATCH 0/5] ref-transactions-send-pack

2014-07-31 Thread Ronnie Sahlberg
called ref-transactions-req-strbuf-err Ronnie Sahlberg (5): receive-pack.c: add protocol support to negotiate atomic-push send-pack.c: add an --atomic-push command line argument receive-pack.c: use a single transaction when atomic-push is negotiated receive-pack.c: add

[PATCH 3/5] receive-pack.c: use a single transaction when atomic-push is negotiated

2014-07-31 Thread Ronnie Sahlberg
that there are no client scripts that depend on the old behaviour we can change git to default to use atomic pushes by default and instead offer an opt-out argument for people that do not want atomic updates at all. Signed-off-by: Ronnie Sahlberg sahlb...@google.com --- builtin/receive-pack.c | 55

[PATCH 5/5] push.c: add an --atomic-push argument

2014-07-31 Thread Ronnie Sahlberg
Signed-off-by: Ronnie Sahlberg sahlb...@google.com --- Documentation/git-push.txt | 7 ++- builtin/push.c | 2 ++ transport.c| 1 + transport.h| 1 + 4 files changed, 10 insertions(+), 1 deletion(-) diff --git a/Documentation/git-push.txt b

[PATCH 2/5] send-pack.c: add an --atomic-push command line argument

2014-07-31 Thread Ronnie Sahlberg
Signed-off-by: Ronnie Sahlberg sahlb...@google.com --- Documentation/git-send-pack.txt | 7 ++- builtin/send-pack.c | 6 +- send-pack.c | 8 +++- send-pack.h | 1 + 4 files changed, 19 insertions(+), 3 deletions(-) diff --git

[PATCH 4/5] receive-pack.c: add receive.atomicpush configuration option

2014-07-31 Thread Ronnie Sahlberg
Signed-off-by: Ronnie Sahlberg sahlb...@google.com --- Documentation/config.txt | 5 + builtin/receive-pack.c | 5 + 2 files changed, 10 insertions(+) diff --git a/Documentation/config.txt b/Documentation/config.txt index 1d718bd..75ce157 100644 --- a/Documentation/config.txt +++ b

Re: Transaction patch series overview

2014-07-31 Thread Ronnie Sahlberg
List, please see here an overview and ordering of the ref transaction patch series. These series build on each other and needs to be applied in the order listed below. This is an update. rs/ref-transaction-0 --- Early part of the ref transaction topic. *

Transaction patch series overview

2014-07-30 Thread Ronnie Sahlberg
patches are in. regards ronnie sahlberg -- To unsubscribe from this list: send the line unsubscribe git in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH 2/5] refs.c: write updates to packed refs when a transaction has more than one ref

2014-07-30 Thread Ronnie Sahlberg
On Tue, Jul 29, 2014 at 2:09 PM, Junio C Hamano gits...@pobox.com wrote: Ronnie Sahlberg sahlb...@google.com writes: + /* + * Always copy loose refs that are to be deleted to the packed refs. + * If we are updating multiple refs then copy all non symref refs

Re: [PATCH 2/5] refs.c: write updates to packed refs when a transaction has more than one ref

2014-07-30 Thread Ronnie Sahlberg
On Tue, Jul 29, 2014 at 2:11 PM, Junio C Hamano gits...@pobox.com wrote: Ronnie Sahlberg sahlb...@google.com writes: + packed = get_packed_refs(ref_cache);; s/;;/;/; ;-) Sorry, I couldn't resist the urge to type many semicolons ;-) Fixed, thanks! -- To unsubscribe from

[PATCH v2 5/5] refs.c: rollback the lockfile before we die() in repack_without_refs

2014-07-30 Thread Ronnie Sahlberg
Signed-off-by: Ronnie Sahlberg sahlb...@google.com --- refs.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/refs.c b/refs.c index 9c813f9..3e98ca1 100644 --- a/refs.c +++ b/refs.c @@ -2574,8 +2574,10 @@ int repack_without_refs(const char **refnames, int n, struct strbuf

[PATCH v2 1/5] refs.c: allow passing raw git_committer_info as email to _update_reflog

2014-07-30 Thread Ronnie Sahlberg
, also go over and change all references from email to id where the code actually refers to a committer id and not just an email address. I.e. where the string is : NAME EMAIL Signed-off-by: Ronnie Sahlberg sahlb...@google.com --- builtin/reflog.c | 19 +-- refs.c | 21

[PATCH v2 4/5] refs.c: update rename_ref to use a transaction

2014-07-30 Thread Ronnie Sahlberg
perform renames even if the reflog is a symbolic link and thus can remove the check and fail for that condition. Signed-off-by: Ronnie Sahlberg sahlb...@google.com --- refs.c| 197 -- t/t3200-branch.sh | 7 -- 2 files changed, 71

[PATCH v2 0/5] ref-transactions-rename

2014-07-30 Thread Ronnie Sahlberg
- refs.c: make ref_transaction_create a wrapper to ref_transaction_update (this branch uses rs/ref-transaction and rs/ref-transaction-1.) Ronnie Sahlberg (5): refs.c: allow passing raw git_committer_info as email to _update_reflog refs.c: return error instead of dying when locking

[PATCH v2 2/5] refs.c: return error instead of dying when locking fails during transaction

2014-07-30 Thread Ronnie Sahlberg
Change lock_ref_sha1_basic to return an error instead of dying when we fail to lock a file during a transaction. This function is only called from transaction_commit() and it knows how to handle these failures. Signed-off-by: Ronnie Sahlberg sahlb...@google.com --- refs.c | 7 +-- 1 file

[PATCH v2 3/5] refs.c: use packed refs when deleting refs during a transaction

2014-07-30 Thread Ronnie Sahlberg
the packed refs file, do other stuff, and later be able to call repack_without_refs with the lock already taken. This means we need some additional changes in remote.c to reflect the changes to the repack_without_refs semantics. Signed-off-by: Ronnie Sahlberg sahlb...@google.com --- builtin/remote.c

[PATCH v2 2/5] refs.c: write updates to packed refs when a transaction has more than one ref

2014-07-30 Thread Ronnie Sahlberg
as a single atomic change to any external observers instead of a sequence of discreete changes. Signed-off-by: Ronnie Sahlberg sahlb...@google.com --- builtin/clone.c | 16 +++--- refs.c| 83 --- t/t5516-fetch-push.sh | 2 +- 3

[PATCH v2 1/5] refs.c: move reflog updates into its own function

2014-07-30 Thread Ronnie Sahlberg
write_ref_sha1 tries to update the reflog while updating the ref. Move these reflog changes out into its own function so that we can do the same thing if we write a sha1 ref differently, for example by writing a ref to the packed refs file instead. Signed-off-by: Ronnie Sahlberg sahlb

[PATCH v2 3/5] remote.c: use a transaction for deleting refs

2014-07-30 Thread Ronnie Sahlberg
Transactions now use packed refs when deleting multiple refs so there is no need to do it manually from remote.c any more. Signed-off-by: Ronnie Sahlberg sahlb...@google.com --- builtin/remote.c | 69 +++- 1 file changed, 38 insertions(+), 31

[PATCH v2 0/5] use packed refs for ref-transactions

2014-07-30 Thread Ronnie Sahlberg
today as : Version 2: -- Updated to address Junio's concerns Ronnie Sahlberg (5): refs.c: move reflog updates into its own function refs.c: write updates to packed refs when a transaction has more than one ref remote.c: use a transaction for deleting refs refs.c: make

[PATCH v2 4/5] refs.c: make repack_without_refs static

2014-07-30 Thread Ronnie Sahlberg
Signed-off-by: Ronnie Sahlberg sahlb...@google.com --- refs.c | 2 +- refs.h | 3 --- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/refs.c b/refs.c index bacce94..fc445e8 100644 --- a/refs.c +++ b/refs.c @@ -2538,7 +2538,7 @@ static int curate_packed_ref_fn(struct ref_entry *entry

[PATCH v2 5/5] refs.c: make the *_packed_refs functions static

2014-07-30 Thread Ronnie Sahlberg
We no longer need to expose the lock/add/commit/rollback functions for packed refs anymore so make them static and remove them from the public api. Signed-off-by: Ronnie Sahlberg sahlb...@google.com --- refs.c | 8 refs.h | 30 -- 2 files changed, 4

Re: [PATCH 1/5] refs.c: allow passing raw git_committer_info as email to _update_reflog

2014-07-28 Thread Ronnie Sahlberg
On Fri, Jul 25, 2014 at 12:37 PM, Jonathan Nieder jrnie...@gmail.com wrote: Ronnie Sahlberg wrote: Add a new flag REFLOG_EMAIL_IS_COMMITTER to _update_reflog to tell it that what we pass in as email is already the fully baked committer string we can use as-is. With and without the new flag

Re: [PATCH 2/5] refs.c: return error instead of dying when locking fails during transaction

2014-07-28 Thread Ronnie Sahlberg
On Fri, Jul 25, 2014 at 12:40 PM, Jonathan Nieder jrnie...@gmail.com wrote: Ronnie Sahlberg wrote: --- a/refs.c +++ b/refs.c @@ -2214,7 +2214,7 @@ static struct ref_lock *lock_ref_sha1_basic(const char *refname, */ goto retry

Re: [PATCH 3/4] refs.c: move ref parsing code out of resolve_ref()

2014-07-25 Thread Ronnie Sahlberg
Nice. On Fri, Jul 25, 2014 at 3:43 AM, Nguyễn Thái Ngọc Duy pclo...@gmail.com wrote: Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com --- cache.h | 11 refs.c | 204 ++-- 2 files changed, 120 insertions(+), 95

[PATCH 1/5] refs.c: allow passing raw git_committer_info as email to _update_reflog

2014-07-25 Thread Ronnie Sahlberg
-by: Ronnie Sahlberg sahlb...@google.com --- refs.c | 20 refs.h | 1 + 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/refs.c b/refs.c index 2662ef6..6c55032 100644 --- a/refs.c +++ b/refs.c @@ -3522,14 +3522,18 @@ int transaction_update_reflog(struct

[PATCH 4/5] refs.c: update rename_ref to use a transaction

2014-07-25 Thread Ronnie Sahlberg
perform renames even if the reflog is a symbolic link and thus can remove the check and fail for that condition. Signed-off-by: Ronnie Sahlberg sahlb...@google.com --- refs.c| 192 ++ t/t3200-branch.sh | 7 -- 2 files changed, 65

[PATCH 5/5] refs.c: rollback the lockfile before we die() in repack_without_refs

2014-07-25 Thread Ronnie Sahlberg
Signed-off-by: Ronnie Sahlberg sahlb...@google.com --- refs.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/refs.c b/refs.c index a5053bf..619725a 100644 --- a/refs.c +++ b/refs.c @@ -2570,8 +2570,10 @@ int repack_without_refs(const char **refnames, int n, struct strbuf

[PATCH 2/5] refs.c: return error instead of dying when locking fails during transaction

2014-07-25 Thread Ronnie Sahlberg
Change lock_ref_sha1_basic to return an error instead of dying when we fail to lock a file during a transaction. Signed-off-by: Ronnie Sahlberg sahlb...@google.com --- refs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/refs.c b/refs.c index 6c55032..2ea85a8 100644

[PATCH 0/5] ref-transactions-rename

2014-07-25 Thread Ronnie Sahlberg
to ref_transaction_update (this branch uses rs/ref-transaction and rs/ref-transaction-1.) Ronnie Sahlberg (5): refs.c: allow passing raw git_committer_info as email to _update_reflog refs.c: return error instead of dying when locking fails during transaction refs.c: use packed refs when deleting

[PATCH 3/5] refs.c: use packed refs when deleting refs during a transaction

2014-07-25 Thread Ronnie Sahlberg
the packed refs file, do other stuff, and later be able to call repack_without_refs with the lock already taken. This means we need some additional changes in remote.c to reflect the changes to the repack_without_refs semantics. Signed-off-by: Ronnie Sahlberg sahlb...@google.com --- builtin/remote.c

[PATCH 4/5] refs.c: make repack_without_refs static

2014-07-25 Thread Ronnie Sahlberg
Signed-off-by: Ronnie Sahlberg sahlb...@google.com --- refs.c | 2 +- refs.h | 3 --- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/refs.c b/refs.c index efa4f0d..5696d18 100644 --- a/refs.c +++ b/refs.c @@ -2534,7 +2534,7 @@ static int curate_packed_ref_fn(struct ref_entry *entry

[PATCH 1/5] refs.c: move reflog updates into its own function

2014-07-25 Thread Ronnie Sahlberg
write_ref_sha1 tries to update the reflog while updating the ref. Move these reflog changes out into its own function so that we can do the same thing if we write a sha1 ref differently, for example by writing a ref to the packed refs file instead. Signed-off-by: Ronnie Sahlberg sahlb

[PATCH 2/5] refs.c: write updates to packed refs when a transaction has more than one ref

2014-07-25 Thread Ronnie Sahlberg
as a single atomic change to any external observers instead of a sequence of discreete changes. Signed-off-by: Ronnie Sahlberg sahlb...@google.com --- builtin/clone.c | 16 +++--- refs.c| 83 +-- t/t5516-fetch-push.sh | 2 +- 3

[PATCH 0/5] use packed refs for ref-transactions

2014-07-25 Thread Ronnie Sahlberg
earlier today as : [PATCH 0/5] ref-transactions-rename Ronnie Sahlberg (5): refs.c: move reflog updates into its own function refs.c: write updates to packed refs when a transaction has more than one ref remote.c: use a transaction for deleting refs refs.c: make repack_without_refs static

[PATCH 3/5] remote.c: use a transaction for deleting refs

2014-07-25 Thread Ronnie Sahlberg
Transactions now use packed refs when deleting multiple refs so there is no need to do it manually from remote.c any more. Signed-off-by: Ronnie Sahlberg sahlb...@google.com --- builtin/remote.c | 70 +++- 1 file changed, 39 insertions(+), 31

[PATCH 5/5] refs.c: make the *_packed_refs functions static

2014-07-25 Thread Ronnie Sahlberg
We no longer need to expose the lock/add/commit/rollback functions for packed refs anymore so make them static and remove them from the public api. Signed-off-by: Ronnie Sahlberg sahlb...@google.com --- refs.c | 8 refs.h | 30 -- 2 files changed, 4

[PATCH 00/15] ref-transactions for reflogs

2014-07-23 Thread Ronnie Sahlberg
message to _create/delete/update instead of _commit refs.c: add an err argument to delete_ref_loose wrapper.c: add a new function unlink_or_msg wrapper.c: simplify warn_if_unremovable === Ronnie Sahlberg (15): refs.c make ref_transaction_create a wrapper to ref_transaction_update

[PATCH 04/15] refs.c: add a new update_type field to ref_update

2014-07-23 Thread Ronnie Sahlberg
Add a field that describes what type of update this refers to. For now the only type is UPDATE_SHA1 but we will soon add more types. Signed-off-by: Ronnie Sahlberg sahlb...@google.com --- refs.c | 25 + 1 file changed, 21 insertions(+), 4 deletions(-) diff --git a/refs.c

[PATCH 01/15] refs.c make ref_transaction_create a wrapper to ref_transaction_update

2014-07-23 Thread Ronnie Sahlberg
Signed-off-by: Ronnie Sahlberg sahlb...@google.com --- refs.c | 18 ++ refs.h | 7 --- 2 files changed, 6 insertions(+), 19 deletions(-) diff --git a/refs.c b/refs.c index 6dcb920..8f2aa3a 100644 --- a/refs.c +++ b/refs.c @@ -3490,28 +3490,14 @@ int ref_transaction_create

[PATCH 06/15] lockfile.c: make hold_lock_file_for_append preserve meaningful errno

2014-07-23 Thread Ronnie Sahlberg
Update hold_lock_file_for_append and copy_fd to return a meaningful errno on failure. Signed-off-by: Ronnie Sahlberg sahlb...@google.com --- copy.c | 20 +--- lockfile.c | 7 ++- 2 files changed, 19 insertions(+), 8 deletions(-) diff --git a/copy.c b/copy.c index

[PATCH 08/15] refs.c: add a flag to allow reflog updates to truncate the log

2014-07-23 Thread Ronnie Sahlberg
Add a flag that allows us to truncate the reflog before we write the update. Signed-off-by: Ronnie Sahlberg sahlb...@google.com --- refs.c | 17 +++-- refs.h | 10 +- 2 files changed, 24 insertions(+), 3 deletions(-) diff --git a/refs.c b/refs.c index b010d6d..181c957 100644

[PATCH 07/15] refs.c: add a transaction function to append a reflog entry

2014-07-23 Thread Ronnie Sahlberg
Define a new transaction update type, UPDATE_LOG, and a new function transaction_update_reflog. This function will lock the reflog and append an entry to it during transaction commit. Signed-off-by: Ronnie Sahlberg sahlb...@google.com --- refs.c | 103

[PATCH 11/15] reflog.c: use a reflog transaction when writing during expire

2014-07-23 Thread Ronnie Sahlberg
Use a transaction for all updates during expire_reflog. Signed-off-by: Ronnie Sahlberg sahlb...@google.com --- builtin/reflog.c | 84 refs.c | 4 +-- refs.h | 2 +- 3 files changed, 39 insertions(+), 51 deletions

[PATCH 03/15] refs.c: rename the transaction functions

2014-07-23 Thread Ronnie Sahlberg
Rename the transaction functions. Remove the leading ref_ from the names and append _sha1 to the names for functions that create/delete/ update sha1 refs. Signed-off-by: Ronnie Sahlberg sahlb...@google.com --- branch.c | 11 --- builtin/commit.c | 14 - builtin

[PATCH 05/15] refs.c: add a function to append a reflog entry to a fd

2014-07-23 Thread Ronnie Sahlberg
with only a single place where we write a reflog entry to a file instead of the current two places (log_ref_write and builtin/reflog.c). Signed-off-by: Ronnie Sahlberg sahlb...@google.com --- refs.c | 48 ++-- 1 file changed, 30 insertions(+), 18 deletions

[PATCH 12/15] refs.c: rename log_ref_setup to create_reflog

2014-07-23 Thread Ronnie Sahlberg
(). Signed-off-by: Ronnie Sahlberg sahlb...@google.com --- builtin/checkout.c | 8 +--- refs.c | 22 +- refs.h | 8 +++- 3 files changed, 17 insertions(+), 21 deletions(-) diff --git a/builtin/checkout.c b/builtin/checkout.c index f1dc56e..808c58f

[PATCH 09/15] refs.c: only write reflog update if msg is non-NULL

2014-07-23 Thread Ronnie Sahlberg
When performing a reflog transaction update, only write to the reflog iff msg is non-NULL. This can then be combined with REFLOG_TRUNCATE to perform an update that only truncates but does not write. Signed-off-by: Ronnie Sahlberg sahlb...@google.com --- refs.c | 5 +++-- refs.h | 1 + 2 files

[PATCH 02/15] refs.c: make ref_transaction_delete a wrapper for ref_transaction_update

2014-07-23 Thread Ronnie Sahlberg
Signed-off-by: Ronnie Sahlberg sahlb...@google.com --- refs.c | 17 + refs.h | 2 +- 2 files changed, 6 insertions(+), 13 deletions(-) diff --git a/refs.c b/refs.c index 8f2aa3a..74fb797 100644 --- a/refs.c +++ b/refs.c @@ -3506,24 +3506,17 @@ int ref_transaction_delete(struct

[PATCH 10/15] refs.c: allow multiple reflog updates during a single transaction

2014-07-23 Thread Ronnie Sahlberg
code such as: t = transaction_begin() transaction_reflog_update(t, foo, REFLOG_TRUNCATE, NULL); loop-over-somehting... transaction_reflog_update(t, foo, 0, message); transaction_commit(t) where we first truncate the reflog and then build the new content one line at a time. Signed-off-by: Ronnie

[PATCH 13/15] refs.c: make unlock_ref/close_ref/commit_ref static

2014-07-23 Thread Ronnie Sahlberg
unlock|close|commit_ref can be made static since there are no more external callers. Signed-off-by: Ronnie Sahlberg sahlb...@google.com --- refs.c | 24 refs.h | 9 - 2 files changed, 12 insertions(+), 21 deletions(-) diff --git a/refs.c b/refs.c index b7940e0

[PATCH 15/15] refs.c: allow deleting refs with a broken sha1

2014-07-23 Thread Ronnie Sahlberg
ref .git/refs/heads/foo-broken-1 Use this flag when calling from branch.c dusing a ref delete so that we only allow locking those broken refs IFF when called during a branch delete. Signed-off-by: Ronnie Sahlberg sahlb...@google.com --- builtin/branch.c | 6 -- refs.c | 10

[PATCH 14/15] refs.c: remove lock_any_ref_for_update

2014-07-23 Thread Ronnie Sahlberg
No one is using this function so we can delete it. Signed-off-by: Ronnie Sahlberg sahlb...@google.com --- refs.c | 7 --- refs.h | 10 +- 2 files changed, 1 insertion(+), 16 deletions(-) diff --git a/refs.c b/refs.c index b74e5ff..0ead11f 100644 --- a/refs.c +++ b/refs.c

Re: inotify support, nearly there

2014-07-22 Thread Ronnie Sahlberg
to help out reviewing the patches. regards ronnie sahlberg -- To unsubscribe from this list: send the line unsubscribe git in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH 02/12] wrapper.c: add a new function unlink_or_msg

2014-07-22 Thread Ronnie Sahlberg
feelings about this I can remove the unlink_or_msg patch and rework the rest of the series to cope with it. regards ronnie sahlberg I dunno... On Fri, Jul 18, 2014 at 3:25 PM, Junio C Hamano gits...@pobox.com wrote: Ronnie Sahlberg sahlb...@google.com writes: Signed-off-by: Ronnie

Re: [PATCH 05/12] refs.c: pass NULL as *flags to read_ref_full

2014-07-22 Thread Ronnie Sahlberg
On Fri, Jul 18, 2014 at 3:31 PM, Junio C Hamano gits...@pobox.com wrote: Ronnie Sahlberg sahlb...@google.com writes: We call read_ref_full with a pointer to flags from rename_ref but since we never actually use the returned flags we can just pass NULL here instead. Sensible, at least

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