Re: [PATCH] copy.c: make copy_fd preserve meaningful errno

2014-11-17 Thread Stefan Beller
On Mon, Nov 17, 2014 at 3:35 PM, Jonathan Nieder jrnie...@gmail.com wrote: Hi, Stefan Beller wrote: This patch was sent previously to the list as part of that series[2], but it seems to be unrelated to me. Thanks. Good call. [...] From: Ronnie Sahlberg sahlb...@google.com Update

Re: [PATCH] copy.c: make copy_fd preserve meaningful errno

2014-11-17 Thread Stefan Beller
On Mon, Nov 17, 2014 at 4:48 PM, Jonathan Nieder jrnie...@gmail.com wrote: (meta-comment: please snip out the context you are not responding to, to make reading easier) will do After this patch, setting errno is not part of the contract of copy_fd, so the bug Ronnie was fixing is gone.

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

2014-11-17 Thread Stefan Beller
From: Ronnie Sahlberg sahlb...@google.com Signed-off-by: Ronnie Sahlberg sahlb...@google.com Signed-off-by: Jonathan Nieder jrnie...@gmail.com Signed-off-by: Stefan Beller sbel...@google.com --- refs.c | 22 ++ refs.h | 2 +- 2 files changed, 3 insertions(+), 21 deletions

[PATCH v3 00/14] ref-transactions-reflog

2014-11-17 Thread Stefan Beller
Hi, The following patch series updates the reflog handling to use transactions. This patch series has previously been sent to the list[1]. This series converts the reflog handling and builtin/reflog.c to use a transaction for both the ref as well as the reflog updates. As a side effect of this

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

2014-11-17 Thread Stefan Beller
...@google.com Signed-off-by: Jonathan Nieder jrnie...@gmail.com Signed-off-by: Stefan Beller sbel...@google.com --- builtin/branch.c| 5 +++-- cache.h | 7 +++ refs.c | 6 ++ refs.h | 6 -- t/t1402-check-ref

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

2014-11-17 Thread Stefan Beller
Signed-off-by: Stefan Beller sbel...@google.com --- branch.c | 13 + builtin/commit.c | 10 +++ builtin/fetch.c| 12 builtin/receive-pack.c | 13 - builtin/replace.c | 10 +++ builtin/tag.c | 10 +++ builtin/update

[PATCH v3 10/14] reflog.c: use a reflog transaction when writing during expire

2014-11-17 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: Jonathan Nieder jrnie...@gmail.com Signed-off-by: Stefan Beller sbel...@google.com --- builtin/reflog.c | 85

[PATCH v3 05/14] refs.c: add a new update_type field to ref_update

2014-11-17 Thread Stefan Beller
-by: Stefan Beller sbel...@google.com --- refs.c | 27 +++ 1 file changed, 23 insertions(+), 4 deletions(-) diff --git a/refs.c b/refs.c index f0f0d23..84e086f 100644 --- a/refs.c +++ b/refs.c @@ -3516,6 +3516,10 @@ int for_each_reflog(each_ref_fn fn, void *cb_data) return

[PATCH v3 08/14] refs.c: only write reflog update if msg is non-NULL

2014-11-17 Thread Stefan Beller
-off-by: Stefan Beller sbel...@google.com --- refs.c | 5 +++-- refs.h | 1 + 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/refs.c b/refs.c index d21ecb9..3572977 100644 --- a/refs.c +++ b/refs.c @@ -3895,8 +3895,9 @@ int transaction_commit(struct transaction *transaction

[PATCH v3 09/14] refs.c: allow multiple reflog updates during a single transaction

2014-11-17 Thread Stefan Beller
materialize at this stage. Signed-off-by: Ronnie Sahlberg sahlb...@google.com Signed-off-by: Jonathan Nieder jrnie...@gmail.com Signed-off-by: Stefan Beller sbel...@google.com --- refs.c | 48 +++- 1 file changed, 39 insertions(+), 9 deletions(-) diff --git

[PATCH v3 11/14] refs.c: rename log_ref_setup to create_reflog

2014-11-17 Thread Stefan Beller
lstat() instead of a open(O_CREAT)+lstat()+close(). Signed-off-by: Ronnie Sahlberg sahlb...@google.com Signed-off-by: Jonathan Nieder jrnie...@gmail.com Signed-off-by: Stefan Beller sbel...@google.com --- builtin/checkout.c | 8 +--- refs.c | 22 +- refs.h

[PATCH v3 06/14] refs.c: add a transaction function to append a reflog entry

2014-11-17 Thread Stefan Beller
-by: Jonathan Nieder jrnie...@gmail.com Signed-off-by: Stefan Beller sbel...@google.com --- refs.c | 102 +++-- refs.h | 12 2 files changed, 112 insertions(+), 2 deletions(-) diff --git a/refs.c b/refs.c index 84e086f..9a46e1c 100644

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

2014-11-17 Thread Stefan Beller
-by: Jonathan Nieder jrnie...@gmail.com Signed-off-by: Stefan Beller sbel...@google.com --- refs.c | 27 ++- 1 file changed, 2 insertions(+), 25 deletions(-) diff --git a/refs.c b/refs.c index 5ff457e..005eb18 100644 --- a/refs.c +++ b/refs.c @@ -3623,31 +3623,8 @@ int

[PATCH v3 13/14] refs.c: remove lock_any_ref_for_update

2014-11-17 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: Jonathan Nieder jrnie...@gmail.com Signed-off-by: Stefan Beller sbel...@google.com --- refs.c | 7 --- refs.h | 9 + 2 files

[PATCH v3 07/14] refs.c: add a flag to allow reflog updates to truncate the log

2014-11-17 Thread Stefan Beller
From: Ronnie Sahlberg sahlb...@google.com Add a flag that allows us to truncate the reflog before we write the update. Signed-off-by: Ronnie Sahlberg sahlb...@google.com Signed-off-by: Jonathan Nieder jrnie...@gmail.com Signed-off-by: Stefan Beller sbel...@google.com --- refs.c | 17

[PATCH v3 04/14] refs.c: add a function to append a reflog entry to a fd

2014-11-17 Thread Stefan Beller
-by: Stefan Beller sbel...@google.com --- refs.c | 48 ++-- 1 file changed, 30 insertions(+), 18 deletions(-) diff --git a/refs.c b/refs.c index 2044d8f..f0f0d23 100644 --- a/refs.c +++ b/refs.c @@ -2990,15 +2990,37 @@ int log_ref_setup(const char *refname

[PATCH v3 12/14] refs.c: Remove unlock_ref/close_ref/commit_ref from the refs api

2014-11-17 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: Jonathan Nieder jrnie...@gmail.com Signed-off-by: Stefan Beller sbel...@google.com --- refs.c | 24

[PATCH v4 01/16] refs.c: allow passing raw git_committer_info as email to _update_reflog

2014-11-17 Thread Stefan Beller
jrnie...@gmail.com Signed-off-by: Stefan Beller sbel...@google.com --- builtin/reflog.c | 19 +-- refs.c | 21 - refs.h | 25 +++-- 3 files changed, 48 insertions(+), 17 deletions(-) diff --git a/builtin/reflog.c b/builtin

[PATCH v4 04/16] refs.c: use a stringlist for repack_without_refs

2014-11-17 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 --- builtin/remote.c | 23 --- refs.c | 42 +- refs.h | 2 +- 3 files

[PATCH v4 11/16] refs.c: make repack_without_refs static

2014-11-17 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 --- refs.c | 2 +- refs.h | 3 --- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/refs.c b/refs.c index 130d240..899c33e 100644 --- a/refs.c

[PATCH v4 03/16] refs.c: use packed refs when deleting refs during a transaction

2014-11-17 Thread Stefan Beller
sahlb...@google.com Signed-off-by: Jonathan Nieder jrnie...@gmail.com Signed-off-by: Stefan Beller sbel...@google.com --- builtin/remote.c | 20 ++- refs.c | 155 ++- 2 files changed, 138 insertions(+), 37 deletions(-) diff --git

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

2014-11-17 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 --- builtin/pack-refs.c | 8 +++- refs.c | 7 +++ refs.h | 3 ++- 3 files changed, 12 insertions(+), 6 deletions(-) diff

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

2014-11-17 Thread Stefan Beller
From: Ronnie Sahlberg sahlb...@google.com Signed-off-by: Ronnie Sahlberg sahlb...@google.com Signed-off-by: Jonathan Nieder jrnie...@gmail.com Signed-off-by: Stefan Beller sbel...@google.com --- refs.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/refs.c b/refs.c index

[PATCH v4 14/16] refs.c: make add_packed_ref return an error instead of calling die

2014-11-17 Thread Stefan Beller
From: Ronnie Sahlberg sahlb...@google.com Change add_packed_ref to return an error instead of calling die(). Update all callers to check the return value of add_packed_ref. Signed-off-by: Ronnie Sahlberg sahlb...@google.com Signed-off-by: Stefan Beller sbel...@google.com --- refs.c | 21

[PATCH v4 13/16] refs.c: replace the onerr argument in update_ref with a strbuf err

2014-11-17 Thread Stefan Beller
-by: Ronnie Sahlberg sahlb...@google.com Signed-off-by: Stefan Beller sbel...@google.com --- builtin/checkout.c | 7 +-- builtin/clone.c | 20 builtin/merge.c | 20 +--- builtin/notes.c | 24 ++-- builtin/reset.c | 12

[PATCH v4 08/16] refs.c: move reflog updates into its own function

2014-11-17 Thread Stefan Beller
. No functional changes intended. We only move some code out into a separate function. Signed-off-by: Ronnie Sahlberg sahlb...@google.com Signed-off-by: Stefan Beller sbel...@google.com --- refs.c | 60 +++- 1 file changed, 35 insertions(+), 25

[PATCH v4 12/16] refs.c: make the *_packed_refs functions static

2014-11-17 Thread Stefan Beller
From: Ronnie Sahlberg sahlb...@google.com 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 Signed-off-by: Stefan Beller sbel...@google.com

[PATCH v4 10/16] remote.c: use a transaction for deleting refs

2014-11-17 Thread Stefan Beller
From: Ronnie Sahlberg sahlb...@google.com 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 Signed-off-by: Stefan Beller sbel...@google.com --- builtin/remote.c | 80

[PATCH v4 05/16] refs.c: add transaction support for renaming a reflog

2014-11-17 Thread Stefan Beller
From: Ronnie Sahlberg sahlb...@google.com Add a new transaction function transaction_rename_reflog. Signed-off-by: Ronnie Sahlberg sahlb...@google.com Signed-off-by: Stefan Beller sbel...@google.com --- refs.c | 72 +- refs.h | 8

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

2014-11-17 Thread Stefan Beller
that multi-ref updates will now appear as a single atomic change to any external observers instead of a sequence of discreete changes. Signed-off-by: Ronnie Sahlberg sahlb...@google.com Signed-off-by: Stefan Beller sbel...@google.com --- builtin/clone.c | 16 ++--- refs.c

[PATCH v4 15/16] refs.c: make lock_packed_refs take an err argument

2014-11-17 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 --- refs.c | 25 + 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/refs.c b/refs.c index c59cc3f..725945e 100644

[PATCH v4 02/16] refs.c: return error instead of dying when locking fails during transaction

2014-11-17 Thread Stefan Beller
...@google.com Signed-off-by: Jonathan Nieder jrnie...@gmail.com Signed-off-by: Stefan Beller sbel...@google.com --- refs.c | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/refs.c b/refs.c index f30512f..78eb46f 100644 --- a/refs.c +++ b/refs.c @@ -2340,6 +2340,7 @@ static

[PATCH v4 00/16] ref-transaction-rename

2014-11-17 Thread Stefan Beller
Hi, This series builds on the previous series : ref-transaction-reflog as applied to master. This series has been sent to the list before[1] This series can also be found at github[2] as well as googlesource[3]. This series converts ref rename to use a transaction. This addesses several issues

[PATCH v4 06/16] refs.c: update rename_ref to use a transaction

2014-11-17 Thread Stefan Beller
-by: Stefan Beller sbel...@google.com --- refs.c| 168 ++ t/t3200-branch.sh | 7 --- 2 files changed, 43 insertions(+), 132 deletions(-) diff --git a/refs.c b/refs.c index c721184..780acd5 100644 --- a/refs.c +++ b/refs.c @@ -2757,60

[PATCH v4 0/7] ref-transaction-send-pack

2014-11-17 Thread Stefan Beller
Hi, This series has been posted before[1], but is now rebased on the previous ref-transaction-rename. It can also be found at github[2] and googlesource[3] This series finishes the transaction work to provide atomic pushes. With this series we can now perform atomic pushes to a repository.

[PATCH v4 7/7] refs.c: add an err argument to create_symref

2014-11-17 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 --- builtin/branch.c | 7 +-- builtin/checkout.c | 13 ++--- builtin/clone.c| 15 +++ builtin/init-db.c

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

2014-11-17 Thread Stefan Beller
. If it turns out over time that there are no client scripts that depend on the old behavior we can change git to default to use atomic pushes and instead offer an opt-out argument for people that do not want atomic pushes. Signed-off-by: Ronnie Sahlberg sahlb...@google.com Signed-off-by: Stefan Beller

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

2014-11-17 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 | 7 ++- builtin/push.c | 2

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

2014-11-17 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 v4 6/7] refs.c: add an err argument to create_reflog

2014-11-17 Thread Stefan Beller
write_sha1_update_reflog to also take an err argument. Signed-off-by: Ronnie Sahlberg sahlb...@google.com Signed-off-by: Stefan Beller sbel...@google.com --- builtin/checkout.c | 8 +++--- refs.c | 71 +++--- refs.h | 4 +-- 3

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

2014-11-17 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 v4 5/7] t5543-atomic-push.sh: add basic tests for atomic pushes

2014-11-17 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 --- t/t5543-atomic-push.sh | 101 + 1 file changed, 101 insertions(+) create mode 100755 t/t5543-atomic

Re: [PATCH] Introduce a hook to run after formatting patches

2014-11-17 Thread Stefan Beller
...@pobox.com writes: Stefan Beller sbel...@google.com writes: +post-format-patch + + +This hook is called after format-patch created a patch and it is +invoked with the filename of the patch as the first parameter. Such an interface would not work well with --stdout mode, would

Re: [PATCH v3 1/1] create_default_files(): don't set u+x bit on $GIT_DIR/config

2014-11-18 Thread Stefan Beller
Reviewed-by: Stefan Beller sbel...@google.com On Tue, Nov 18, 2014 at 5:50 AM, Michael Haggerty mhag...@alum.mit.edu wrote: Since time immemorial, the test of whether to set core.filemode has been done by trying to toggle the u+x bit on $GIT_DIR/config and then testing whether the change took

[PATCH] date.c: phrase a comment gender neutral

2014-11-18 Thread Stefan Beller
When looking for suitable functions to print dates, I found this gem. Let's make it gender neutral as nowadays people get upset by this gender debate. Signed-off-by: Stefan Beller sbel...@google.com --- date.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/date.c b/date.c

Re: [PATCH] date.c: phrase a comment gender neutral

2014-11-18 Thread Stefan Beller
ok. I'll stop sending such gender related nits. On Tue, Nov 18, 2014 at 12:03 PM, Junio C Hamano gits...@pobox.com wrote: Stefan Beller sbel...@google.com writes: When looking for suitable functions to print dates, I found this gem. Let's make it gender neutral as nowadays people get upset

[PATCH] refs.c: use a stringlist for repack_without_refs

2014-11-18 Thread Stefan Beller
, which replaces a char** array by a stringlist in the function repack_without_refs. [1] https://www.mail-archive.com/git@vger.kernel.org/msg60604.html Idea-by: Ronnie Sahlberg sahlb...@google.com Signed-off-by: Stefan Beller sbel...@google.com --- builtin/remote.c | 22

[PATCH] refs.c: handle locking failure during transaction better

2014-11-18 Thread Stefan Beller
jrnie...@gmail.com Cherry-picked-to-master: Stefan Beller sbel...@google.com Signed-off-by: Stefan Beller sbel...@google.com --- refs.c | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) This was part of the ref-transactions-rename series[1], but it makes sense to send this one

Re: [PATCH] refs.c: handle locking failure during transaction better

2014-11-18 Thread Stefan Beller
I messed up authorship on this one. This was of course found and authored by Ronnie. On Tue, Nov 18, 2014 at 3:17 PM, Stefan Beller sbel...@google.com wrote: 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

Re: [PATCH] refs.c: use a stringlist for repack_without_refs

2014-11-18 Thread Stefan Beller
-by: Ronnie Sahlberg sahlb...@google.com Signed-off-by: Stefan Beller sbel...@google.com Isn't the patch by Ronnie? As it was part of the ref-transaction-rename series, it was authored by Ronnie. Porting it back to the master branch brought up so many conflicts, that I decided to rewrite it from scratch

[PATCH] refs.c: use a stringlist for repack_without_refs

2014-11-18 Thread Stefan Beller
Sahlberg sahlb...@google.com Signed-off-by: Stefan Beller sbel...@google.com - This patch was heavily inspired by a part of the ref-transactions-rename series[1], but people tend to dislike large series and this part is relatively easy to take out and unrelated, so I'll send it as a single patch. [1

[PATCH] refs.c: handle locking failure during transaction better

2014-11-18 Thread Stefan Beller
series, cherry-picked to master] Signed-off-by: Ronnie Sahlberg sahlb...@google.com Signed-off-by: Jonathan Nieder jrnie...@gmail.com Signed-off-by: Stefan Beller sbel...@google.com --- refs.c | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/refs.c b/refs.c index 5ff457e

Re: [PATCH 1/4] error: save and restore errno

2014-11-18 Thread Stefan Beller
This one makes my day. A really good fix as it minimizes maintenance burden for checking incoming patches for that pattern. Reviewed-by: Stefan Beller sbel...@google.com On Tue, Nov 18, 2014 at 5:37 PM, Jeff King p...@peff.net wrote: It's common to use error() to return from a function, like

[PATCH] refs.c: use a stringlist for repack_without_refs

2014-11-19 Thread Stefan Beller
of code and less pointers. [sb: ported this patch from a larger patch series to the master branch, added documentary comments in refs.h] Signed-off-by: Ronnie Sahlberg sahlb...@google.com Signed-off-by: Stefan Beller sbel...@google.com --- On Wed, Nov 19, 2014 at 10:00 AM, Junio C Hamano gits

[PATCH 0/2] Breaking the ref-transactions-reflog series in smaller parts

2014-11-19 Thread Stefan Beller
Hi, so I think the patch series ref-transactions-reflog[1] sent previously to the list is still too large for easy review and I want to break it up more. So in this series we'll digest only 2 small patches, which do not seem to be controversial (yet;) and seem to be useful no matter how the

[PATCH 1/2] refs.c: make ref_transaction_create a wrapper for ref_transaction_update

2014-11-19 Thread Stefan Beller
-by: Jonathan Nieder jrnie...@gmail.com Signed-off-by: Stefan Beller sbel...@google.com --- The same as sent 2 days before as part of the ref-transactions-reflog series http://thread.gmane.org/gmane.comp.version-control.git/259712 no changes since then. refs.c | 27 ++- 1 file

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

2014-11-19 Thread Stefan Beller
From: Ronnie Sahlberg sahlb...@google.com Signed-off-by: Ronnie Sahlberg sahlb...@google.com Signed-off-by: Jonathan Nieder jrnie...@gmail.com Signed-off-by: Stefan Beller sbel...@google.com --- The same as sent 2 days before as part of the ref-transactions-reflog series http

[PATCH] refs.c: use a stringlist for repack_without_refs

2014-11-19 Thread Stefan Beller
of code and less pointers. [sb: ported this patch from a larger patch series to the master branch, added documentary comments in refs.h] Signed-off-by: Ronnie Sahlberg sahlb...@google.com Signed-off-by: Stefan Beller sbel...@google.com --- version 3 includes all nits by Jonathan. Changes to version 1

[PATCH v4] refs.c: use a stringlist for repack_without_refs

2014-11-19 Thread Stefan Beller
of code and less pointers. [sb: ported this patch from a larger patch series to the master branch, added documentary comments in refs.h] Signed-off-by: Ronnie Sahlberg sahlb...@google.com Signed-off-by: Stefan Beller sbel...@google.com --- Changes to version 1: * removed the double blank line

Re: [PATCH v3 00/14] ref-transactions-reflog

2014-11-19 Thread Stefan Beller
Sorry for the long delay. Thanks for the explanation and discussion. So do I understand it right, that you are not opposing the introduction of everything should go through transactions but rather the detail and abstraction level of the API? So starting from Michaels proposal in the first

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

2014-11-19 Thread Stefan Beller
-06-17, Log ref updates to logs/refs/ref), but got lost in (8ac65937d032ad, 2007-01-26, Make sure we do not write bogus reflog entries.) ] Signed-off-by: Ronnie Sahlberg sahlb...@google.com Signed-off-by: Jonathan Nieder jrnie...@gmail.com Signed-off-by: Stefan Beller sbel...@google.com

Re: [PATCH 1/2] refs.c: make ref_transaction_create a wrapper for ref_transaction_update

2014-11-19 Thread Stefan Beller
I am sorry for not having asked before. As I picked up the patches, you had sign offs pretty much at any patch. I'll remove them from future patches when sending to the list. On Wed, Nov 19, 2014 at 5:10 PM, Jonathan Nieder jrnie...@gmail.com wrote: Stefan Beller wrote: From: Ronnie Sahlberg

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

2014-11-19 Thread Stefan Beller
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 --- refs.c | 48

[PATCH v2 1/2] refs.c: make ref_transaction_create a wrapper for ref_transaction_update

2014-11-20 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 v2 2/2] refs.c: make ref_transaction_delete a wrapper for ref_transaction_update

2014-11-20 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 --- no changes in code, just removing Jonathans sign off

[PATCH v5 1/1] refs.c: use a stringlist for repack_without_refs

2014-11-20 Thread Stefan Beller
of code and more lines of documentation. [sb: ported this patch from a larger patch series to the master branch, added documentary comments in refs.h] Change-Id: Id7eaa821331f2ab89df063e1e76c8485dbcc3aed Signed-off-by: Ronnie Sahlberg sahlb...@google.com Signed-off-by: Stefan Beller sbel...@google.com

[PATCH] refs.c: repack_without_refs may be called without error string buffer

2014-11-20 Thread Stefan Beller
If we don't pass in the error string buffer, we skip over all parts dealing with preparing error messages. Signed-off-by: Stefan Beller sbel...@google.com --- This goes ontop of [PATCH v5] refs.c: use a stringlist for repack_without_refs if that makes sense. refs.c | 8 refs.h | 1

[PATCH v3] refs.c: add a function to append a reflog entry to a fd

2014-11-20 Thread Stefan Beller
from reflog transactions too. That 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

Re: [PATCH] refs.c: repack_without_refs may be called without error string buffer

2014-11-20 Thread Stefan Beller
ok, will drop the patch due to bad design. On Thu, Nov 20, 2014 at 10:36 AM, Ronnie Sahlberg sahlb...@google.com wrote: On Thu, Nov 20, 2014 at 10:35 AM, Jonathan Nieder jrnie...@gmail.com wrote: Stefan Beller wrote: If we don't pass in the error string buffer, we skip over all parts dealing

Re: [PATCH v5 1/1] refs.c: use a stringlist for repack_without_refs

2014-11-20 Thread Stefan Beller
On Thu, Nov 20, 2014 at 11:01 AM, Junio C Hamano gits...@pobox.com wrote: I think this matches more-or-less what I've locally tweaked after following the discussion between you and Jonathan. Thanks. Do you want me to resend the patch with Jonathans nits fixed? Jonathan wrote: Change-Id:

[PATCH v6] refs.c: use a string_list for repack_without_refs

2014-11-20 Thread Stefan Beller
of code and more lines of documentation. [sb: ported this patch from a larger patch series to the master branch, added documentary comments in refs.h] Signed-off-by: Ronnie Sahlberg sahlb...@google.com Signed-off-by: Stefan Beller sbel...@google.com Reviewed-by: Jonathan Nieder jrnie...@gmail.com

Re: [PATCH v3] refs.c: add a function to append a reflog entry to a fd

2014-11-20 Thread Stefan Beller
On Thu, Nov 20, 2014 at 1:20 PM, Jonathan Nieder jrnie...@gmail.com wrote: For now the new function is only used from log_ref_write, but later on we will call this function from reflog transactions too. That means that we will end up with only a single place, where we write a reflog entry to

Re: [PATCH v3] refs.c: add a function to append a reflog entry to a fd

2014-11-20 Thread Stefan Beller
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 --- Changes in version 3: * reword the commit message to make it more understandable. * no changes in code * wait

[PATCH v4] refs.c: add a function to append a reflog entry to a fd

2014-11-20 Thread Stefan Beller
from reflog transactions too. That 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

Re: [PATCH] Introduce a hook to run after formatting patches

2014-11-20 Thread Stefan Beller
On Tue, Nov 18, 2014 at 07:40:07AM +0100, Christian Couder wrote: On Mon, Nov 17, 2014 at 8:20 PM, Junio C Hamano gits...@pobox.com wrote: Junio C Hamano gits...@pobox.com writes: (I am not saying that there should be an easy way to drop cruft left by third-party systems such as

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

2014-11-20 Thread Stefan Beller
. No functional changes intended. We only move some code out into a separate function. Signed-off-by: Ronnie Sahlberg sahlb...@google.com Signed-off-by: Stefan Beller sbel...@google.com --- Examining the refs-transaction-reflog series a bit closer, this seems to be one of the last independant patches

Re: [PATCH 0/6] repack_without_refs(): convert to string_list

2014-11-21 Thread Stefan Beller
On Fri, Nov 21, 2014 at 10:00 AM, Junio C Hamano gits...@pobox.com wrote: Michael Haggerty mhag...@alum.mit.edu writes: I don't think that those iterations changed anything substantial that overlaps with my version, but TBH it's such a pain in the ass working with patches in email that I

[PATCH 3/3] string_list: Remove string_list_insert_at_index from its API

2014-11-24 Thread Stefan Beller
this function throughout the codebase, get rid of it. Signed-off-by: Stefan Beller sbel...@google.com --- string-list.c | 8 +--- string-list.h | 2 -- 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/string-list.c b/string-list.c index c5aa076..9584fa6 100644 --- a/string-list.c

[PATCH 1/3] string_list: document string_list_(insert,lookup)

2014-11-24 Thread Stefan Beller
Signed-off-by: Stefan Beller sbel...@google.com --- string-list.h | 10 ++ 1 file changed, 10 insertions(+) diff --git a/string-list.h b/string-list.h index 494eb5d..40ffe0c 100644 --- a/string-list.h +++ b/string-list.h @@ -55,9 +55,19 @@ void string_list_remove_empty_items(struct

[PATCH 2/3] mailmap: use higher level string list functions

2014-11-24 Thread Stefan Beller
if it is already part of the list or not. Once looked up, insertion comes for free. Signed-off-by: Stefan Beller sbel...@google.com --- mailmap.c | 11 +++ 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/mailmap.c b/mailmap.c index 81890a6..f0df350 100644 --- a/mailmap.c +++ b/mailmap.c

Re: [PATCH] refs.c: move reflog updates into its own function

2014-11-24 Thread Stefan Beller
Anything holding this back? On Thu, Nov 20, 2014 at 4:38 PM, Stefan Beller sbel...@google.com wrote: From: Ronnie Sahlberg sahlb...@google.com 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

[PATCH 2/3 v2] mailmap: use higher level string list functions

2014-11-24 Thread Stefan Beller
if it is already part of the list or not. Once looked up, insertion comes for free. Signed-off-by: Stefan Beller sbel...@google.com --- Changes since Version 1: * Remove declaration-after-statement. mailmap.c | 12 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/mailmap.c b

Re: [PATCH 3/3] string_list: Remove string_list_insert_at_index from its API

2014-11-24 Thread Stefan Beller
On Mon, Nov 24, 2014 at 4:25 PM, Junio C Hamano gits...@pobox.com wrote: Stefan Beller sbel...@google.com writes: This function behaves the same as string_list_insert, just the starting indexes for searching, where to insert into the list is also a parameter. So if you have knowledge on where

[PATCHv2 3/3] string_list: Remove string_list_insert_at_index from its API

2014-11-24 Thread Stefan Beller
Nobody is using this function any more, let's get rid of it. Signed-off-by: Stefan Beller sbel...@google.com --- string-list.c | 8 +--- string-list.h | 2 -- 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/string-list.c b/string-list.c index c5aa076..9584fa6 100644

Re: How safe are signed git tags? Only as safe as SHA-1 or somehow safer?

2014-11-24 Thread Stefan Beller
That's not *as* painful, because you'd have the beautiful fast-{import/export} tools in your new and old version control system. But yeah, there might be better ways to do so. On Mon, Nov 24, 2014 at 5:52 PM, Duy Nguyen pclo...@gmail.com wrote: On Tue, Nov 25, 2014 at 8:23 AM, Jonathan Nieder

[PATCHv3 2/3] mailmap: use higher level string list functions

2014-11-24 Thread Stefan Beller
if it is already part of the list or not. Once looked up, insertion comes for free. Signed-off-by: Stefan Beller sbel...@google.com --- Changes since Version 1: * Remove declaration-after-statement. Changes Version 1 to Version 2: * typo in commit message mailmap.c | 12 1 file changed, 4

[PATCH] t1402: check to delete broken refs

2014-11-25 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 --- This was also part of the ongoing series from Ronnie. But I think the patch in this form is rather independant, documenting the current state

Re: [PATCH] t1402: check to delete broken refs

2014-11-25 Thread Stefan Beller
On Tue, Nov 25, 2014 at 4:35 PM, Jonathan Nieder jrnie...@gmail.com wrote: Hi, Stefan Beller wrote: This was also part of the ongoing series from Ronnie. But I think the patch in this form is rather independant, documenting the current state of git branch -d, so it's fine to have it in now

[PATCHv2] branch -d: test if we can delete broken refs

2014-11-25 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 --- Changes v1-v2 * relocated the test from t1402 to t3200 * reword the commit message title to fit in with similar commits touching t/t3200-branch.sh

Re: [PATCH v2 0/7] repack_without_refs(): convert to string_list

2014-11-25 Thread Stefan Beller
the function everywhere rather than going to the trouble of deprecating the old function and adding the new function. Thanks to Junio, Jonathan, and Stefan for their reviews of v1. This series is also Reviewed-By: Stefan Beller sbel...@google.com As this is in conflict with origin/sb/simplify

Re: RCS Keywords in Git done right

2014-11-26 Thread Stefan Beller
On Wed, Nov 26, 2014 at 8:44 AM, Derek Moore derek.p.mo...@gmail.com wrote: Junio, et al., I've completed my first pass at RCS Keywords in Git. I believe I've come up with a solution that is accurate, performant and complete (but I have not tested it on big repos yet, I'm doing that

[PATCHv3] branch -d: test if we can delete broken refs

2014-11-26 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 --- Changes v1-v2 * relocated the test from t1402 to t3200 * reword the commit message title to fit in with similar commits touching t/t3200-branch.sh

Re: RCS Keywords in Git done right

2014-11-26 Thread Stefan Beller
On Wed, Nov 26, 2014 at 11:22 AM, Derek Moore derek.p.mo...@gmail.com wrote: Now knowing the edge cases won't work, I did not get an idea about the standard case of what should work with this. Would you mind to write a more detailed example or a more advertising paragraph of what this can do?

[PATCH 0/4] Using transactions for the reflog

2014-11-26 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: add a new update_type field to ref_update

2014-11-26 Thread Stefan Beller
From: Ronnie Sahlberg sahlb...@google.com 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 Signed-off-by: Stefan Beller sbel...@google.com --- refs.c | 27

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

2014-11-26 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 4/4] reflog.c: use a reflog transaction when writing during expire

2014-11-26 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 --- builtin/reflog.c | 85 1 file changed

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

2014-11-26 Thread Stefan Beller
. Signed-off-by: Ronnie Sahlberg sahlb...@google.com Signed-off-by: Stefan Beller sbel...@google.com --- This is a complete rewrite from previous series. Sorry no diff to previous versions. refs.c | 148 - refs.h | 21 ++ 2

Re: [PATCHv3 2/3] mailmap: use higher level string list functions

2014-11-30 Thread Stefan Beller
On 30.11.2014 16:47, Junio C Hamano wrote: Eric Sunshine sunsh...@sunshineco.com writes: On Thu, Nov 27, 2014 at 1:44 PM, Michael Blume blume.m...@gmail.com wrote: The variable index seems to be unused/uninitialized now -- it's still printed in debug messages, but if I'm reading correctly,

Re: Bug in reflog of length 0x2BFF

2014-12-01 Thread Stefan Beller
So I am running a 3.13.0-40-generic x86_64 linux (so its's amd64) and git version 2.1.2 and I cannot reproduce the bug you are describing. :( $ git rev-parse 'master@{52}' 0035 What I noticed though is there are 2 linefeeds at the end of each line, is that

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