[PATCH] fetch: add a config option to always use the depth argument

2014-12-01 Thread Stefan Beller
of having large amounts of data around, you probably want to use the depth option at any fetch you do, so it would be convenient to have an option for this. Change-Id: I45a569239639f20e24fbae32fb2046bc478c5f07 Signed-off-by: Stefan Beller sbel...@google.com --- Documentation/config.txt| 6

Re: Bug in reflog of length 0x2BFF

2014-12-01 Thread Stefan Beller
Hi, so I have installed git version 2.2.0 currently, because I was trying to reproduce Bug in reflog of length 0x2BFF. Now I was using git as a normal user, rebasing some stuff (incidentally the reflog improvements) and an error occurred: $ git rebase --continue error: Ref

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

2014-12-01 Thread Stefan Beller
... 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. Change-Id: I83923b2dcfa29aadb86a942826060180ac6f3d07 Signed-off-by: Stefan Beller sbel...@google.com --- refs.c | 112

[PATCH 2/4] refs.c: rename transaction.updates to ref_updates

2014-12-01 Thread Stefan Beller
The updates are only holding refs not reflogs, so express it to the reader. Change-Id: Ifdc87722f0e7314f3d0febb970aa7769eada6d33 Signed-off-by: Stefan Beller sbel...@google.com --- refs.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/refs.c b/refs.c index

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

2014-12-01 Thread Stefan Beller
From: Ronnie Sahlberg sahlb...@google.com Use a transaction for all updates during expire_reflog. Change-Id: Ieb81b2660cefeeecf0bcb3cdbc1ef3cbb86e7eb8 Signed-off-by: Ronnie Sahlberg sahlb...@google.com Signed-off-by: Jonathan Nieder jrnie...@gmail.com Signed-off-by: Stefan Beller sbel

[PATCH 1/4] refs.c: rename the transaction functions

2014-12-01 Thread Stefan Beller
: Iffdc56536be71c5061caa23040ce0d89efd52196 Signed-off-by: Ronnie Sahlberg sahlb...@google.com Signed-off-by: Jonathan Nieder jrnie...@gmail.com Signed-off-by: Stefan Beller sbel...@google.com --- branch.c | 13 + builtin/commit.c | 10 +++ builtin/fetch.c| 12 builtin/receive-pack.c | 13

Re: [PATCH 1/4] refs.c: rename the transaction functions

2014-12-01 Thread Stefan Beller
This patch series is not really ready for public digestion, I messed up sending it to the list anyway. Please ignore this series. -- 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

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

2014-12-01 Thread Stefan Beller
From: Ronnie Sahlberg sahlb...@google.com Use a transaction for all updates during expire_reflog. Signed-off-by: Ronnie Sahlberg sahlb...@google.com Signed-off-by: Stefan Beller sbel...@google.com --- no changes since sending it 5 days ago. builtin/reflog.c | 86

[PATCH 1/4] refs.c: rename the transaction functions

2014-12-01 Thread Stefan Beller
From: Ronnie Sahlberg sahlb...@google.com Rename the transaction functions. Remove the leading ref_ from the names and append _ref to the names for functions that create/delete/ update sha1 refs. Signed-off-by: Ronnie Sahlberg sahlb...@google.com Signed-off-by: Stefan Beller sbel...@google.com

[PATCHv2 0/4] refs.c: use transactions for the reflog

2014-12-01 Thread Stefan Beller
This is the core part of the refs-transactions-reflog series[1], which was in discussion for a bit already. The idea is to have the reflog being part of the transactions, which the refs are already using, so the we're moving towards a database like API in the long run. This makes git easier to

[PATCH 2/4] refs.c: rename transaction.updates to transaction.ref_updates

2014-12-01 Thread Stefan Beller
The updates are only holding refs not reflogs, so express it to the reader. Signed-off-by: Stefan Beller sbel...@google.com --- * only renaming, no extra code in this patch. * new to the series. refs.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/refs.c b

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

2014-12-01 Thread Stefan Beller
... 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 Sahlberg sahlb...@google.com Signed-off-by: Stefan Beller sbel...@google.com --- This is a complete rewrite of the patch you would

Re: Our cumbersome mailing list workflow

2014-12-02 Thread Stefan Beller
On Sun, Nov 30, 2014 at 6:46 PM, Junio C Hamano gits...@pobox.com wrote: Michael Haggerty mhag...@alum.mit.edu writes: It seems like a few desirable features are being talked about here, and summarizing the discussion as centralized vs decentralized is too simplistic. What is really

Re: [PATCH 03/14] copy_fd: pass error message back through a strbuf

2014-12-03 Thread Stefan Beller
On Wed, Dec 3, 2014 at 12:02 PM, Junio C Hamano gits...@pobox.com wrote: Jonathan Nieder jrnie...@gmail.com writes: This way, callers can put the message in context or even avoid printing the message altogether. Currently hold_lock_file_for_append tries to save errno in order to produce a

Re: [PATCH 14/14] lockfile: make 'unable_to_lock_message' private

2014-12-03 Thread Stefan Beller
On Tue, Dec 02, 2014 at 09:27:34PM -0800, Jonathan Nieder wrote: The old external callers now use the message passed back by hold_lock_file_for_update / hold_lock_file_for_append instead of trying to interpret errno. Signed-off-by: Jonathan Nieder jrnie...@gmail.com --- That's the end of

Re: [PATCH 3/4] refs.c: add a transaction function to append a reflog entry

2014-12-03 Thread Stefan Beller
On Tue, Dec 02, 2014 at 07:15:19PM -0800, Jonathan Nieder wrote: I'll think about rewriting the commit message, so it is easier to digest. I'll follow your suggestions except for the following annotations +int transaction_update_reflog(struct transaction *transaction, +

Re: Our cumbersome mailing list workflow

2014-12-03 Thread Stefan Beller
Editing text files isn't that hard, we do it all the time. It is not indeed. But doing it all over again and again is hard and error prone. I did re-read the man page on git format-patch and found the --notes option, which I am going to try to use in my workflow. That way I only need to update

[PATCHv3 00/13] the refs-transactions-reflog series

2014-12-04 Thread Stefan Beller
writing during expire refs.c: rename log_ref_setup to create_reflog refs.c: remove unlock_ref/close_ref/commit_ref from the refs api refs.c: remove lock_any_ref_for_update refs.c: allow deleting refs with a broken sha1 Stefan Beller (4): refs.c: rename transaction.updates

[PATCH 01/13] refs.c: make ref_transaction_create a wrapper for ref_transaction_update

2014-12-04 Thread Stefan Beller
From: Ronnie Sahlberg sahlb...@google.com The ref_transaction_update function can already be used to create refs by passing null_sha1 as the old_sha1 parameter. Simplify by replacing transaction_create with a thin wrapper. Signed-off-by: Ronnie Sahlberg sahlb...@google.com Signed-off-by: Stefan

[PATCH 12/13] refs.c: use a bit for ref_update have_old

2014-12-04 Thread Stefan Beller
Signed-off-by: Stefan Beller sbel...@google.com --- Notes: Also a patch, which hasn't been posted on the mailing list before. refs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/refs.c b/refs.c index b54b5b3..2942227 100644 --- a/refs.c +++ b/refs.c @@ -3532,7 +3532,7

[PATCH 10/13] refs.c: remove lock_any_ref_for_update

2014-12-04 Thread Stefan Beller
From: Ronnie Sahlberg sahlb...@google.com No one is using this function so we can delete it. Signed-off-by: Ronnie Sahlberg sahlb...@google.com Signed-off-by: Stefan Beller sbel...@google.com --- refs.c | 7 --- refs.h | 9 + 2 files changed, 1 insertion(+), 15 deletions(-) diff

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

2014-12-04 Thread Stefan Beller
...@google.com Signed-off-by: Stefan Beller sbel...@google.com --- builtin/branch.c | 5 +++-- cache.h | 7 +++ refs.c| 6 ++ refs.h| 6 -- t/t3200-branch.sh | 8 5 files changed, 28 insertions(+), 4 deletions(-) diff --git a/builtin/branch.c b

[PATCH 09/13] refs.c: remove unlock_ref/close_ref/commit_ref from the refs api

2014-12-04 Thread Stefan Beller
From: Ronnie Sahlberg sahlb...@google.com unlock|close|commit_ref can be made static since there are no more external callers. Signed-off-by: Ronnie Sahlberg sahlb...@google.com Signed-off-by: Stefan Beller sbel...@google.com --- refs.c | 24 refs.h | 9 - 2

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

2014-12-04 Thread Stefan Beller
From: Ronnie Sahlberg sahlb...@google.com Signed-off-by: Ronnie Sahlberg sahlb...@google.com Signed-off-by: Stefan Beller sbel...@google.com Reviewed-by: Michael Haggerty mhag...@alum.mit.edu Reviewed-by: Jonathan Nieder jrnie...@gmail.com --- Notes: origin/sb/ref-transaction-unify-to-update

[PATCH 07/13] reflog.c: use a reflog transaction when writing during expire

2014-12-04 Thread Stefan Beller
From: Ronnie Sahlberg sahlb...@google.com Use a transaction for all updates during expire_reflog. Signed-off-by: Ronnie Sahlberg sahlb...@google.com Signed-off-by: Stefan Beller sbel...@google.com --- Notes: Jonathan writes: This doesn't match the signature of each_reflog_ent_fn

[PATCH 08/13] refs.c: rename log_ref_setup to create_reflog

2014-12-04 Thread Stefan Beller
lstat() instead of a open(O_CREAT)+lstat()+close(). Signed-off-by: Ronnie Sahlberg sahlb...@google.com Signed-off-by: Stefan Beller sbel...@google.com --- builtin/checkout.c | 8 +--- refs.c | 22 +- refs.h | 8 +++- 3 files changed, 17

[PATCH 04/13] refs.c: rename the transaction functions

2014-12-04 Thread Stefan Beller
From: Ronnie Sahlberg sahlb...@google.com Rename the transaction functions. Remove the leading ref_ from the names and append _ref to the names for functions that create/delete/ update sha1 refs. Signed-off-by: Ronnie Sahlberg sahlb...@google.com Signed-off-by: Stefan Beller sbel...@google.com

[PATCH 05/13] refs.c: rename transaction.updates to transaction.ref_updates

2014-12-04 Thread Stefan Beller
The updates are only holding refs not reflogs, so express it to the reader. Signed-off-by: Stefan Beller sbel...@google.com Reviewed-by: Jonathan Nieder jrnie...@gmail.com --- Notes: remotes/origin/sb/ref-transaction-reflog no changes since last review refs.c | 14

[PATCH 11/13] refs.c: don't expose the internal struct ref_lock in the header file

2014-12-04 Thread Stefan Beller
Now the struct ref_lock is used completely internally, so let's remove it from the header file. Signed-off-by: Stefan Beller sbel...@google.com --- Notes: This patch is brand new in this series, so digest it while it's hot! refs.c | 9 + refs.h | 9 - 2 files changed, 9

[PATCH 06/13] refs.c: add a transaction function to truncate or append a reflog entry

2014-12-04 Thread Stefan Beller
... if (want_reflog_entry(...)) 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: Stefan Beller sbel...@google.com --- Notes: This is a complete rewrite of this patch, lots

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

2014-12-04 Thread Stefan Beller
transactions too, which means that we will end up 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 Signed-off-by: Stefan Beller sbel...@google.com Reviewed

Re: [PATCH 03/14] copy_fd: pass error message back through a strbuf

2014-12-04 Thread Stefan Beller
Your solution adds a strbuf. That helps with context and stomping, but loses readability and adds allocation. If we changed the strbuf to a fixed-size buffer, that would help the allocation issue. Some messages might be truncated, but it seems unlikely in practice. It still loses

Re: [PATCHv3 00/13] the refs-transactions-reflog series

2014-12-04 Thread Stefan Beller
On Thu, Dec 04, 2014 at 10:14:04AM -0800, Jonathan Nieder wrote: Michael Haggerty wrote: I am still unhappy with the approach of this series, for the reasons that I explained earlier [1]. In short, I think that the abstraction level is wrong. In my opinion, consumers of the refs API

Re: [PATCHv3 00/13] the refs-transactions-reflog series

2014-12-04 Thread Stefan Beller
On Thu, Dec 4, 2014 at 10:41 AM, Junio C Hamano gits...@pobox.com wrote: Stefan Beller sbel...@google.com writes: This is the whole refs-transactions-reflog series[1], which was in discussion for a bit already. It applies to origin/master. The idea is to have the reflog being part

Re: [PATCH 07/23] expire_reflog(): use a lock_file for rewriting the reflog file

2014-12-04 Thread Stefan Beller
On Thu, Dec 04, 2014 at 04:23:31PM -0800, Jonathan Nieder wrote: Michael Haggerty wrote: We don't actually need the locking functionality, because we already hold the lock on the reference itself, which is how the reflog file is locked. But the lock_file code still does some of the

Re: [PATCH 07/23] expire_reflog(): use a lock_file for rewriting the reflog file

2014-12-05 Thread Stefan Beller
On Thu, Dec 04, 2014 at 06:51:36PM -0800, ronnie sahlberg wrote: On Thu, Dec 4, 2014 at 3:08 PM, Michael Haggerty mhag...@alum.mit.edu wrote: We don't actually need the locking functionality, because we already hold the lock on the reference itself, No. You do need the lock. The ref

Re: [PATCH 09/23] expire_reflog(): extract two policy-related functions

2014-12-05 Thread Stefan Beller
expiration. This change requires a couple of local variables from expire_reflog() to be turned into fields of struct expire_reflog_cb. More reorganization of the callback data will follow in later commits. Signed-off-by: Michael Haggerty mhag...@alum.mit.edu Reviewed-by: Stefan Beller sbel

Re: [PATCH 07/23] expire_reflog(): use a lock_file for rewriting the reflog file

2014-12-05 Thread Stefan Beller
On Thu, Dec 04, 2014 at 04:23:31PM -0800, Jonathan Nieder wrote: Michael Haggerty wrote: We don't actually need the locking functionality, because we already hold the lock on the reference itself, which is how the reflog file is locked. But the lock_file code still does some of the

Re: [PATCH 07/23] expire_reflog(): use a lock_file for rewriting the reflog file

2014-12-05 Thread Stefan Beller
On Fri, Dec 5, 2014 at 11:32 AM, Junio C Hamano gits...@pobox.com wrote: Stefan Beller sbel...@google.com writes: +static struct lock_file reflog_lock; If this lockfile is only used in that one function, it can be declared inside the function. If it is meant to be used throughout the 'git

[PATCH] refs.c: let fprintf handle the formatting

2014-12-05 Thread Stefan Beller
Instead of calculating, whether to put a plus or minus sign, offload the responsibilty to the fprintf function. Signed-off-by: Stefan Beller sbel...@google.com --- refs.c | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/refs.c b/refs.c index 40c5591..1147216 100644

Re: [PATCH] refs.c: let fprintf handle the formatting

2014-12-05 Thread Stefan Beller
On Fri, Dec 5, 2014 at 11:53 AM, Stefan Beller sbel...@google.com wrote: Instead of calculating, whether to put a plus or minus sign, offload the responsibilty to the fprintf function. Signed-off-by: Stefan Beller sbel...@google.com --- Ah! I forgot the --notes switch when sending out

[PATCH] document string_list_clear

2014-12-05 Thread Stefan Beller
Signed-off-by: Stefan Beller sbel...@google.com --- Just stumbled accross this one and wasn't sure if it also frees up the memory involved. string-list.h | 5 + 1 file changed, 5 insertions(+) diff --git a/string-list.h b/string-list.h index 494eb5d..99ecc44 100644 --- a/string-list.h

[PATCH 1/8] refs.c: let fprintf handle the formatting

2014-12-05 Thread Stefan Beller
Instead of calculating, whether to put a plus or minus sign, offload the responsibilty to the fprintf function. Signed-off-by: Stefan Beller sbel...@google.com --- Notes: This patch was already sent as a single patch to the list, but not yet acknowledge in any way, so I am including

[PATCH 4/8] refs.c: add transaction function to append to the reflog

2014-12-05 Thread Stefan Beller
reflog updates, but this will be deferred to a later patch for simplicity. Signed-off-by: Stefan Beller sbel...@google.com --- Notes: This has been sent to the list before, but now it is split up into this and the next patch. The commit message was overhauled, a huge thanks

[PATCH 7/8] refs.c: rename log_ref_setup to create_reflog

2014-12-05 Thread Stefan Beller
lstat() instead of a open(O_CREAT)+lstat()+close(). Signed-off-by: Ronnie Sahlberg sahlb...@google.com Signed-off-by: Stefan Beller sbel...@google.com --- Notes: This is also just carried along from sending it last time. builtin/checkout.c | 8 +--- refs.c | 22

[PATCH 3/8] refs.c: rename transaction.updates to transaction.ref_updates

2014-12-05 Thread Stefan Beller
The updates are only holding refs not reflogs, so express it to the reader. Signed-off-by: Stefan Beller sbel...@google.com Reviewed-by: Jonathan Nieder jrnie...@gmail.com --- Notes: no changes since last sending it. refs.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions

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

2014-12-05 Thread Stefan Beller
...@google.com Signed-off-by: Stefan Beller sbel...@google.com --- Notes: Changes to previously sent version: * do not introduce yet another flag, but stick with REF_DELETING which was meant for this purpose. builtin/branch.c | 5 +++-- cache.h | 7 +++ refs.c

[PATCH 2/8] refs.c: rename the transaction functions

2014-12-05 Thread Stefan Beller
-off-by: Stefan Beller sbel...@google.com Reviewed-by: Jonathan Nieder jrnie...@gmail.com --- Notes: no changes since last sending it. branch.c | 13 + builtin/commit.c | 10 +++ builtin/fetch.c| 12 builtin/receive-pack.c | 13 - builtin

[PATCH 5/8] refs.c: add transaction function to delete the reflog

2014-12-05 Thread Stefan Beller
indicates. The other purpose is truncation of the reflog and rewriting it. Signed-off-by: Stefan Beller sbel...@google.com --- refs.c | 62 +- 1 file changed, 61 insertions(+), 1 deletion(-) diff --git a/refs.c b/refs.c index d767418

[PATCH 0/8] Making reflog modifications part of the transactions API

2014-12-05 Thread Stefan Beller
deleting refs with a broken sha1 Stefan Beller (5): refs.c: let fprintf handle the formatting refs.c: rename the transaction functions refs.c: rename transaction.updates to transaction.ref_updates refs.c: add transaction function to append to the reflog refs.c: add transaction function to delete

[PATCH 6/8] refs.c: use a reflog transaction when writing during expire

2014-12-05 Thread Stefan Beller
-by: Ronnie Sahlberg sahlb...@google.com Signed-off-by: Stefan Beller sbel...@google.com --- Notes: Maybe we can leave out the first patch of the series as this one deletes the changes made in the first patch of the series. Originally authored by Ronnie for the reflogs.c file

Re: [PATCH 0/8] Making reflog modifications part of the transactions API

2014-12-08 Thread Stefan Beller
So I reviewed and examined this series and run into some problems. How do we view an empty reflog, i.e. an empty file at logs/refs/heads/master? I was told this is not a valid state for a reflog. However even the test suite sometimes produces an empty reflog files. Below there is a patch, which

Re: [PATCH 08/23] Extract function should_expire_reflog_ent()

2014-12-08 Thread Stefan Beller
towards the goal of encapsulating reflog expiry within the refs API, with policy decided by a callback function passed to it by its caller. Signed-off-by: Michael Haggerty mhag...@alum.mit.edu Reviewed-by: Stefan Beller sbel...@google.com The comments below are just thoughts, which don't need

Re: [PATCH 10/23] expire_reflog(): add a flags argument

2014-12-08 Thread Stefan Beller
On Fri, Dec 05, 2014 at 12:08:22AM +0100, Michael Haggerty wrote: We want to separate the options relevant to the expiry machinery from the options affecting the expiration policy. So add a flags argument to expire_reflog() to hold the former. The argument doesn't yet do anything.

Re: [PATCH 11/23] expire_reflog(): move dry_run to flags argument

2014-12-08 Thread Stefan Beller
On Fri, Dec 05, 2014 at 12:08:23AM +0100, Michael Haggerty wrote: The policy objects don't care about --dry-run. So move it to expire_reflog()'s flags parameter. Signed-off-by: Michael Haggerty mhag...@alum.mit.edu Reviewed-by: sbel...@google.com --- builtin/reflog.c | 13 -

Re: [PATCH 12/23] expire_reflog(): move updateref to flags argument

2014-12-08 Thread Stefan Beller
On Fri, Dec 05, 2014 at 12:08:24AM +0100, Michael Haggerty wrote: The policy objects don't care about --updateref. So move it to expire_reflog()'s flags parameter. Signed-off-by: Michael Haggerty mhag...@alum.mit.edu Reviewed-by: sbel...@google.com --- builtin/reflog.c | 12 ++--

Re: [PATCH 13/23] Rename expire_reflog_cb to expire_reflog_policy_cb

2014-12-08 Thread Stefan Beller
On Fri, Dec 05, 2014 at 12:08:25AM +0100, Michael Haggerty wrote: This is the first step towards separating the data needed by the policy code from the data needed by the reflog expiration machinery. Signed-off-by: Michael Haggerty mhag...@alum.mit.edu Reviewed-by: sbel...@google.com ---

Re: [PATCH 14/23] struct expire_reflog_cb: a new callback data type

2014-12-08 Thread Stefan Beller
On Fri, Dec 05, 2014 at 12:08:26AM +0100, Michael Haggerty wrote: Add a new data type, struct expire_reflog_cb, for holding the data that expire_reflog() passes to expire_reflog_ent() via for_each_reflog_ent(). For now it only holds a pointer to struct expire_reflog_policy_cb. In future

Re: [PATCH 15/23] expire_reflog(): pass flags through to expire_reflog_ent()

2014-12-08 Thread Stefan Beller
On Fri, Dec 05, 2014 at 12:08:27AM +0100, Michael Haggerty wrote: Add a flags field to struct expire_reflog_cb, and pass the flags argument through to expire_reflog_ent(). In a moment we will start using it to pass through flags that expire_reflog_ent() needs. Signed-off-by: Michael Haggerty

Re: [PATCH 16/23] expire_reflog(): move verbose to flags argument

2014-12-08 Thread Stefan Beller
On Fri, Dec 05, 2014 at 12:08:28AM +0100, Michael Haggerty wrote: The policy objects don't care about --verbose. So move it to expire_reflog()'s flags parameter. Signed-off-by: Michael Haggerty mhag...@alum.mit.edu Reviewed-by: Stefan Beller sbel...@google.com --- builtin/reflog.c | 24

Re: [PATCH 17/23] expire_reflog(): move rewrite to flags argument

2014-12-08 Thread Stefan Beller
On Fri, Dec 05, 2014 at 12:08:29AM +0100, Michael Haggerty wrote: The policy objects don't care about --rewrite. So move it to expire_reflog()'s flags parameter. Signed-off-by: Michael Haggerty mhag...@alum.mit.edu Reviewed-by: Stefan Beller sbel...@google.com --- builtin/reflog.c | 10

Re: [PATCH 18/23] Move newlog and last_kept_sha1 to struct expire_reflog_cb

2014-12-08 Thread Stefan Beller
On Fri, Dec 05, 2014 at 12:08:30AM +0100, Michael Haggerty wrote: These members are not needed by the policy functions. Signed-off-by: Michael Haggerty mhag...@alum.mit.edu Reviewed-by: Stefan Beller sbel...@google.com --- builtin/reflog.c | 20 ++-- 1 file changed, 10

Re: [PATCH 19/23] expire_reflog(): treat the policy callback data as opaque

2014-12-08 Thread Stefan Beller
...@alum.mit.edu Reviewed-by: Stefan Beller sbel...@google.com --- builtin/reflog.c | 73 1 file changed, 36 insertions(+), 37 deletions(-) diff --git a/builtin/reflog.c b/builtin/reflog.c index 01b76d0..c30936bb 100644 --- a/builtin

Re: [PATCH 20/23] reflog_expire(): new function in the reference API

2014-12-08 Thread Stefan Beller
-by: Michael Haggerty mhag...@alum.mit.edu With or without the nits fixed Reviewed-by: Stefan Beller sbel...@google.com as the nits are not degrading functionality. --- builtin/reflog.c | 133 +++ refs.c | 114

Re: [PATCH 22/23] lock_any_ref_for_update(): inline function

2014-12-08 Thread Stefan Beller
sign off is missing? If that sign off is found again, Reviewed-by: Stefan Beller sbel...@google.com --- refs.c | 9 + refs.h | 9 + 2 files changed, 2 insertions(+), 16 deletions(-) -- To unsubscribe from this list: send the line unsubscribe git in the body of a message

Re: [PATCH] document string_list_clear

2014-12-09 Thread Stefan Beller
On Tue, Dec 9, 2014 at 11:37 AM, Junio C Hamano gits...@pobox.com wrote: Perhaps the API doc that currently says Free is the only thing that needs fixing? And perhaps add See $doc at the beginning of the header and remove duplicated comments we already have in the file? The reason I wrote

Re: [PATCH] document string_list_clear

2014-12-09 Thread Stefan Beller
On Tue, Dec 9, 2014 at 12:27 PM, Jeff King p...@peff.net wrote: In which case can we simply start migrating api-strbuf.txt into in-header comments, without worrying about a parsing tool? -Peff That would be my preference as well. Putting the API documentation into the header files.

Re: [PATCH] document string_list_clear

2014-12-09 Thread Stefan Beller
On Tue, Dec 09, 2014 at 02:49:50PM -0800, Jonathan Nieder wrote: Jonathan Nieder wrote: Stefan Beller wrote: On Tue, Dec 9, 2014 at 11:37 AM, Junio C Hamano gits...@pobox.com wrote: Perhaps the API doc that currently says Free is the only thing that needs fixing? And perhaps add See

Re: [PATCH 1/2] t1400: add some more tests of update-ref --stdin's verify command

2014-12-10 Thread Stefan Beller
...@alum.mit.edu --- Reviewed-By: Stefan Beller sbel...@google.com The two failing tests have to restore the $m reference when they're done because otherwise the bug deletes it, causing subsequent tests to fail. t/t1400-update-ref.sh | 92 +++ 1 file

Re: [PATCH 2/2] update-ref: fix verify command with missing oldvalue

2014-12-10 Thread Stefan Beller
have_old unconditionally and set old_sha1 to null_sha1. Signed-off-by: Michael Haggerty mhag...@alum.mit.edu This is reviewed by me as well. Reviewed-by: Stefan Beller sbel...@google.com --- builtin/update-ref.c | 14 +- t/t1400-update-ref.sh | 4 ++-- 2 files changed, 7

Re: [PATCH 2/8] refs.c: rename the transaction functions

2014-12-11 Thread Stefan Beller
On Thu, Dec 11, 2014 at 1:42 PM, Junio C Hamano gits...@pobox.com wrote: Stefan Beller sbel...@google.com writes: Rename the transaction functions. Remove the leading ref_ from the names and append _ref to the names for functions that create/delete/ update sha1 refs. The goal in the long

Re: [PATCH v2 04/24] expire_reflog(): it's not an each_ref_fn anymore

2014-12-12 Thread Stefan Beller
parameter (which took the place of flags, but was really unused). * Declare the last parameter to be (struct cmd_reflog_expire_cb *) rather than (void *). Helped-by: Jonathan Nieder jrnie...@gmail.com Signed-off-by: Michael Haggerty mhag...@alum.mit.edu Reviewed-by: Stefan Beller sbel

Re: [PATCH v2 06/24] expire_reflog(): return early if the reference has no reflog

2014-12-12 Thread Stefan Beller
do the cleanup and return inline. Signed-off-by: Michael Haggerty mhag...@alum.mit.edu Reviewed-by: Jonathan Nieder jrnie...@gmail.com Reviewed-by: Stefan Beller sbel...@google.com --- builtin/reflog.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/builtin

Re: [PATCH v2 07/24] expire_reflog(): use a lock_file for rewriting the reflog file

2014-12-12 Thread Stefan Beller
On Fri, Dec 12, 2014 at 12:56 AM, Michael Haggerty mhag...@alum.mit.edu wrote: We don't actually need the locking functionality, because we already hold the lock on the reference itself, which is how the reflog file is locked. But the lock_file code can do some of the bookkeeping for us, and

Re: [PATCH] document string_list_clear

2014-12-12 Thread Stefan Beller
On Fri, Dec 12, 2014 at 10:31 AM, Jonathan Nieder jrnie...@gmail.com wrote: Jeff King wrote: I'm not sure any such thought as intended to be out of date went into it. Junio started the documentation in v1.5.4-rc1~49 (2007-11-24). I'm not sure if there was a discussion preceding that

Re: [PATCH v2 08/24] Extract function should_expire_reflog_ent()

2014-12-12 Thread Stefan Beller
are working towards the goal of encapsulating reflog expiry within the refs API, with policy decided by a callback function passed to it by its caller. Signed-off-by: Michael Haggerty mhag...@alum.mit.edu Reviewed-by: Stefan Beller sbel...@google.com --- builtin/reflog.c | 70

Re: [PATCH v2 22/24] lock_any_ref_for_update(): inline function

2014-12-12 Thread Stefan Beller
On Fri, Dec 12, 2014 at 12:57 AM, Michael Haggerty mhag...@alum.mit.edu wrote: Inline the function at its one remaining caller (which is within refs.c) and remove it. Signed-off-by: Michael Haggerty mhag...@alum.mit.edu Reviewed-by: Stefan Beller sbel...@google.com --- refs.c | 9

Re: [PATCH 0/8] Making reflog modifications part of the transactions API

2014-12-12 Thread Stefan Beller
On Fri, Dec 12, 2014 at 8:17 AM, Michael Haggerty mhag...@alum.mit.edu wrote: On 12/06/2014 03:46 AM, Stefan Beller wrote: This goes on top of Michaels series. The idea of this series is make the reflogs being part of the transaction API, so it will be part of the contract

Re: [PATCH] document string_list_clear

2014-12-12 Thread Stefan Beller
5d0f98aba65e8b1415ebfcd8e06b67203e9305a7 Mon Sep 17 00:00:00 2001 From: Stefan Beller sbel...@google.com Date: Fri, 12 Dec 2014 14:27:15 -0800 Subject: [PATCH] strbuf.h: Unify documentation comments beginnings We want to preserve the meaning of /** to start a documentary in depth comment, so all

[PATCH 3/5] receive-pack.c: use a single ref_transaction for atomic pushes

2014-12-15 Thread Stefan Beller
for people that do not want atomic pushes. Signed-off-by: Ronnie Sahlberg sahlb...@google.com Signed-off-by: Stefan Beller sbel...@google.com --- builtin/receive-pack.c | 73 +++--- 1 file changed, 58 insertions(+), 15 deletions(-) diff --git a/builtin

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

2014-12-15 Thread Stefan Beller
request that atomic pushes are to be used yet. This only adds protocol capability not ability for the user to activate it. Signed-off-by: Ronnie Sahlberg sahlb...@google.com Signed-off-by: Stefan Beller sbel...@google.com --- Documentation/technical/protocol-capabilities.txt | 12

[PATCH 0/5] Add a flag to push atomically

2014-12-15 Thread Stefan Beller
-push-v1 Ronnie Sahlberg (4): 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 push.c: add an --atomic-push argument Stefan Beller (1): t5543

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

2014-12-15 Thread Stefan Beller
back to the end user to flag that these refs failed to update since the atomic push operation failed. Signed-off-by: Ronnie Sahlberg sahlb...@google.com Signed-off-by: Stefan Beller sbel...@google.com --- Documentation/git-send-pack.txt | 7 ++- builtin/send-pack.c | 6

[PATCH 5/5] t5543-atomic-push.sh: add basic tests for atomic pushes

2014-12-15 Thread Stefan Beller
This adds tests for the atomic push option. The first four tests check if the atomic option works in good conditions and the last three patches check if the atomic option prevents any change to be pushed if just one ref cannot be updated. Signed-off-by: Stefan Beller sbel...@google.com --- Notes

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

2014-12-15 Thread Stefan Beller
From: Ronnie Sahlberg sahlb...@google.com Add a command line argument to the git push command to request atomic pushes. Signed-off-by: Ronnie Sahlberg sahlb...@google.com Signed-off-by: Stefan Beller sbel...@google.com --- Documentation/git-push.txt | 8 +++- builtin/push.c | 2

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

2014-12-15 Thread Stefan Beller
On Mon, Dec 15, 2014 at 12:53 PM, Junio C Hamano gits...@pobox.com wrote: Hmph, am I reading the patch to send-pack.c correctly? It detects if the other side supports the capability and leaves it in atomic_push_supported variable for later use, and also requests the feature to be activated

[PATCH] t5400: remove dead code

2014-12-15 Thread Stefan Beller
Signed-off-by: Stefan Beller sbel...@google.com --- Notes: When debugging the atomic push series I wondered if we want to have tests for the atomic push as well as for atomic send-pack. So I looked at the t5400 test if I could easily add tests for send-pack. I don't think I

[PATCHv2 6/6] t5543-atomic-push.sh: add basic tests for atomic pushes

2014-12-16 Thread Stefan Beller
This adds tests for the atomic push option. The first four tests check if the atomic option works in good conditions and the last three patches check if the atomic option prevents any change to be pushed if just one ref cannot be updated. Signed-off-by: Stefan Beller sbel...@google.com --- Notes

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

2014-12-16 Thread Stefan Beller
request that atomic pushes are to be used yet. This only adds protocol capability not ability for the user to activate it. Signed-off-by: Ronnie Sahlberg sahlb...@google.com Signed-off-by: Stefan Beller sbel...@google.com --- Notes: Changes v1 - v2: * Name it atomic instead of atomic-push

[PATCHv2 3/6] send-pack.c: add --atomic command line argument

2014-12-16 Thread Stefan Beller
to the end user to flag that these refs failed to update since the atomic push operation failed. Signed-off-by: Ronnie Sahlberg sahlb...@google.com Signed-off-by: Stefan Beller sbel...@google.com --- Notes: Changes v1 - v2: * Now we only need a very small change in the existing code

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

2014-12-16 Thread Stefan Beller
From: Ronnie Sahlberg sahlb...@google.com Add a command line argument to the git push command to request atomic pushes. Signed-off-by: Ronnie Sahlberg sahlb...@google.com Signed-off-by: Stefan Beller sbel...@google.com --- Notes: Changes v1 - v2 It's --atomic now! (dropping

[PATCHv2 4/6] receive-pack.c: use a single ref_transaction for atomic pushes

2014-12-16 Thread Stefan Beller
for people that do not want atomic pushes. Signed-off-by: Ronnie Sahlberg sahlb...@google.com Signed-off-by: Stefan Beller sbel...@google.com --- Notes: Changes v1 - v2: * update(...) assumes to be always in a transaction * Caring about when to begin/commit transactions is put

[PATCHv2 2/6] send-pack: Invert the return value of ref_update_to_be_sent

2014-12-16 Thread Stefan Beller
Having the return value inverted we can have different values for the error codes. This is useful in a later patch when we want to know if we hit the REF_STATUS_REJECT_* case. Signed-off-by: Stefan Beller sbel...@google.com --- Notes: New in the series. For consistency with all the other

[PATCH] receive-pack: refuse all commands if one fails in atomic mode

2014-12-16 Thread Stefan Beller
This patch will be incorporated into the right places in v3 of the series. Signed-off-by: Stefan Beller sbel...@google.com --- Notes: I don't want to resend the patch series today to accumulate comments, but this makes the last test pass, which is the whole point of the series

Re: [PATCHv2 6/6] t5543-atomic-push.sh: add basic tests for atomic pushes

2014-12-16 Thread Stefan Beller
On Tue, Dec 16, 2014 at 11:46 AM, Junio C Hamano gits...@pobox.com wrote: Seeing that all callers of test_ref_upstream computes $2 as git -C workbench rev-parse --verify something Only in the first tests, where this should be the case after push. In the failure tests, we go with

Re: [PATCHv2 6/6] t5543-atomic-push.sh: add basic tests for atomic pushes

2014-12-16 Thread Stefan Beller
On Tue, Dec 16, 2014 at 12:30 PM, Junio C Hamano gits...@pobox.com wrote: Stefan Beller sbel...@google.com writes: What's the value of this test? Isn't it a non-fast-forward check you already tested in the previous one? I messed up there. Originally I wanted to test the 2

Re: [PATCHv2 6/6] t5543-atomic-push.sh: add basic tests for atomic pushes

2014-12-16 Thread Stefan Beller
On Tue, Dec 16, 2014 at 12:46 PM, Junio C Hamano gits...@pobox.com wrote: Stefan Beller sbel...@google.com writes: On Tue, Dec 16, 2014 at 11:46 AM, Junio C Hamano gits...@pobox.com wrote: Seeing that all callers of test_ref_upstream computes $2 as git -C workbench rev-parse

[PATCHv3 4/6] receive-pack.c: use a single ref_transaction for atomic pushes

2014-12-17 Thread Stefan Beller
for people that do not want atomic pushes. Signed-off-by: Ronnie Sahlberg sahlb...@google.com Signed-off-by: Stefan Beller sbel...@google.com --- Notes: Changes v1 - v2: * update(...) assumes to be always in a transaction * Caring about when to begin/commit transactions is put

[PATCHv3 6/6] t5543-atomic-push.sh: add basic tests for atomic pushes

2014-12-17 Thread Stefan Beller
This adds tests for the atomic push option. The first four tests check if the atomic option works in good conditions and the last three patches check if the atomic option prevents any change to be pushed if just one ref cannot be updated. Signed-off-by: Stefan Beller sbel...@google.com --- Notes

[PATCHv3 3/6] send-pack.c: add --atomic command line argument

2014-12-17 Thread Stefan Beller
to the end user to flag that these refs failed to update since the atomic push operation failed. Signed-off-by: Ronnie Sahlberg sahlb...@google.com Signed-off-by: Stefan Beller sbel...@google.com --- Notes: Notes: Changes v1 - v2: * Now we only need a very small change

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