On Sat, Jan 2, 2016 at 4:06 PM, David Aguilar <dav...@gmail.com> wrote:
> Apologies for the late review, and this review should probably
> go on patch 01 or 02 but I don't have it in my mbox atm...
>
> On Wed, Dec 02, 2015 at 07:35:08PM -0500, David Turner wrote:
>> From
On Fri, Dec 12, 2014 at 11: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
of
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 is locked only during transaction_commit()
If you don't want to lock the
.rc2.23.gca0107e
LGTM
Reviewed-by: Ronnie Sahlberg sahlb...@google.com
Nit:
While it does not hurt to allow passing NULL, at some stage later
this function will become
private to refs.c and ONLY be called from within transaction_commit()
which will always
pass a non-NULL err argument.
At that stage
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 with preparing error messages.
Please no.
We tried this with the ref transaction code. When someone wants
to
On Tue, Nov 18, 2014 at 3:26 AM, Michael Haggerty mhag...@alum.mit.edu wrote:
On 11/18/2014 02:35 AM, Stefan Beller wrote:
The following patch series updates the reflog handling to use transactions.
This patch series has previously been sent to the list[1].
[...]
I was reviewing this patch
On Tue, Nov 11, 2014 at 2:34 AM, Jeff King p...@peff.net wrote:
On Tue, Oct 21, 2014 at 01:36:47PM -0700, Ronnie Sahlberg wrote:
commit e193c10fc4f9274d1e751cfcdcc4507818e8d498 upstream.
Change lock_ref_sha1_basic to return an error instead of dying when
we fail to lock a file during
reflog backend will provide optimized
versions for these read whole reflog write whole reflog functions.
Version 3:
- Rename and redo the API for updating a whole reflog in one single operation
to transaction_rename_reflog()
Ronnie Sahlberg (16):
refs.c: allow passing raw git_committer_info
Signed-off-by: Ronnie Sahlberg sahlb...@google.com
---
builtin/remote.c | 23 ---
refs.c | 42 +-
refs.h | 2 +-
3 files changed, 30 insertions(+), 37 deletions(-)
diff --git a/builtin/remote.c b/builtin/remote.c
, 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
Signed-off-by: Jonathan Nieder jrnie...@gmail.com
---
builtin/reflog.c | 19
Signed-off-by: Ronnie Sahlberg sahlb...@google.com
Signed-off-by: Jonathan Nieder jrnie...@gmail.com
---
refs.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/refs.c b/refs.c
index 9a3c7fe..5a8f3da 100644
--- a/refs.c
+++ b/refs.c
@@ -2707,8 +2707,10 @@ int
Signed-off-by: Ronnie Sahlberg sahlb...@google.com
---
builtin/pack-refs.c | 8 +++-
refs.c | 7 +++
refs.h | 3 ++-
3 files changed, 12 insertions(+), 6 deletions(-)
diff --git a/builtin/pack-refs.c b/builtin/pack-refs.c
index b20b1ec..299768e 100644
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 c1db86f..2c6b0f6 100644
--- a/refs.c
+++ b/refs.c
@@ -2668,7 +2668,7 @@ static int curate_packed_ref_fn(struct ref_entry *entry
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 | 80
1 file changed, 40 insertions(+), 40
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
Signed-off-by: Jonathan Nieder
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
Signed-off
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| 89 ++-
t/t5516-fetch-push.sh | 2 +-
3
Change refs.c to use a single transaction to perform the rename.
Change the function to return 1 on failure instead of either -1 or 1.
These changes make the rename_ref operation atomic.
Signed-off-by: Ronnie Sahlberg sahlb...@google.com
---
refs.c| 168
failed to update since the
atomic push operation failed.
Signed-off-by: Ronnie Sahlberg sahlb...@google.com
---
Documentation/git-send-pack.txt | 7 ++-
builtin/send-pack.c | 6 +-
remote.h| 3 ++-
send-pack.c | 39
Signed-off-by: Ronnie Sahlberg sahlb...@google.com
---
builtin/branch.c | 7 +--
builtin/checkout.c | 13 ++---
builtin/clone.c| 15 +++
builtin/init-db.c | 8 ++--
builtin/notes.c| 7 ---
builtin/remote.c | 26
a typo in a commit message.
Ronnie Sahlberg (7):
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
t5543
.
Signed-off-by: Ronnie Sahlberg sahlb...@google.com
---
builtin/checkout.c | 8 +++---
refs.c | 71 +++---
refs.h | 4 +--
3 files changed, 42 insertions(+), 41 deletions(-)
diff --git a/builtin/checkout.c b/builtin
Signed-off-by: Ronnie Sahlberg sahlb...@google.com
---
t/t5543-atomic-push.sh | 101 +
1 file changed, 101 insertions(+)
create mode 100755 t/t5543-atomic-push.sh
diff --git a/t/t5543-atomic-push.sh b/t/t5543-atomic-push.sh
new file mode 100755
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
---
builtin/receive-pack.c | 73
Add a new transaction function transaction_rename_reflog.
Signed-off-by: Ronnie Sahlberg sahlb...@google.com
---
refs.c | 72 +-
refs.h | 8
2 files changed, 79 insertions(+), 1 deletion(-)
diff --git a/refs.c b/refs.c
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
---
refs.c | 21 +
1 file changed, 17 insertions(+), 4 deletions(-)
diff --git a/refs.c b
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 0829c55..1314a9a 100644
--- a/refs.c
+++ b/refs.c
@@ -2398,13 +2398,17 @@ static int write_packed_entry_fn(struct
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
Get rid of the action_on_err enum and replace the action argument to
update_ref with a strbuf *err for error reporting.
Update all callers to the new api including two callers in transport*.c
which used the literal 0 instead of an enum.
Signed-off-by: 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
---
Documentation/git-push.txt | 7 ++-
builtin/push.c | 2 ++
transport.c| 1 +
transport.h| 1 +
4 files changed, 10
Fixed. Thanks
On Tue, Nov 4, 2014 at 2:17 PM, Stefan Beller sbel...@google.com wrote:
On Mon, Nov 3, 2014 at 11:12 AM, Ronnie Sahlberg sahlb...@google.com wrote:
This adds support to send-pack to to negotiate and use atomic pushes
/s/to to/to/
iff the server supports it. Atomic pushes
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
---
builtin/reflog.c | 85
refs.c | 4 +--
refs.h | 2 +-
3
objects. Such as
..git/config and .gitmodule.
Signed-off-by: Ronnie Sahlberg sahlb...@google.com
Signed-off-by: Jonathan Nieder jrnie...@gmail.com
---
branch.c | 14 -
builtin/commit.c | 10 +++
builtin/fetch.c| 12
builtin/receive-pack.c | 13
not actually be resolved to a sha1, they instead resolve
to null_sha1 when these flags are used.
For example, the ref:
echo Broken ref .git/refs/heads/foo-broken-1
can now be deleted using git branch -d foo-broken-1
Signed-off-by: Ronnie Sahlberg sahlb...@google.com
Signed-off-by: Jonathan Nieder
othogonal
features.
- Improve the comments for the transaction flags field in refs.c: allow
multiple reflog updates during a single transaction.
Ronnie Sahlberg (15):
refs.c make ref_transaction_create a wrapper to ref_transaction_update
refs.c: make ref_transaction_delete a wrapper
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
---
refs.c | 24
refs.h | 9 -
2 files changed, 12 insertions(+), 21
().
Signed-off-by: Ronnie Sahlberg sahlb...@google.com
Signed-off-by: Jonathan Nieder jrnie...@gmail.com
---
builtin/checkout.c | 8 +---
refs.c | 22 +-
refs.h | 8 +++-
3 files changed, 17 insertions(+), 21 deletions(-)
diff --git a/builtin
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: Jonathan Nieder jrnie...@gmail.com
---
refs.c | 27 +++
1 file changed
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: Jonathan Nieder jrnie...@gmail.com
---
refs.c | 48 ++--
1
... + REFLOG_TRUNCATE
and have it truncate the log and have it start fresh with an initial message
that explains the log was truncated. This API allows that.
Signed-off-by: Ronnie Sahlberg sahlb...@google.com
Signed-off-by: Jonathan Nieder jrnie...@gmail.com
---
refs.c | 5 +++--
refs.h | 1 +
2 files
the whole expire
becomes O(n) instead of O(n2). If in the future we start doing this for many
refs in one single transaction we might want to optimize this.
But there is no need to complexify the code and optimize for future usecases
that might never materialize at this stage.
Signed-off-by: Ronnie
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
Signed-off-by: Jonathan Nieder jrnie...@gmail.com
---
refs.c
Update copy_fd to return a meaningful errno on failure.
Signed-off-by: Ronnie Sahlberg sahlb...@google.com
Signed-off-by: Jonathan Nieder jrnie...@gmail.com
---
copy.c | 15 ++-
1 file changed, 10 insertions(+), 5 deletions(-)
diff --git a/copy.c b/copy.c
index f2970ec..a8d366e
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
---
refs.c | 17 +++--
refs.h | 10 +-
2 files changed, 24 insertions(+), 3 deletions(-)
diff
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: Jonathan Nieder jrnie...@gmail.com
---
refs.c
Signed-off-by: Ronnie Sahlberg sahlb...@google.com
Signed-off-by: Jonathan Nieder jrnie...@gmail.com
---
refs.c | 22 ++
refs.h | 2 +-
2 files changed, 3 insertions(+), 21 deletions(-)
diff --git a/refs.c b/refs.c
index ed0485e..c607ab7 100644
--- a/refs.c
+++ b/refs.c
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
---
refs.c | 7 ---
refs.h | 9 +
2 files changed, 1 insertion(+), 15 deletions(-)
diff --git a/refs.c b/refs.c
index e4ad4f4
, 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
Signed-off-by: Jonathan Nieder jrnie...@gmail.com
---
builtin/reflog.c | 19
reflog backend will provide optimized
versions for these read whole reflog write whole reflog functions.
Ronnie Sahlberg (17):
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
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
Signed-off-by: Jonathan Nieder
Add a new transaction function transaction_replace_reflog.
This function takes a blob and replaces the new or existing reflog with the
content of this blob. This will be used by rename_ref where we basically want
to copy the existing blob as is.
Signed-off-by: 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
---
builtin/remote.c | 80
1 file changed, 40 insertions(+), 40
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
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
Signed-off
Change refs.c to use a single transaction to perform the rename.
Change the function to return 1 on failure instead of either -1 or 1.
These changes make the rename_ref operation atomic.
Signed-off-by: Ronnie Sahlberg sahlb...@google.com
---
refs.c| 173
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 0b9cb8d..92e7714 100644
--- a/refs.c
+++ b/refs.c
@@ -2398,13 +2398,17 @@ static int write_packed_entry_fn(struct
Signed-off-by: Ronnie Sahlberg sahlb...@google.com
---
builtin/remote.c | 23 ---
refs.c | 42 +-
refs.h | 2 +-
3 files changed, 30 insertions(+), 37 deletions(-)
diff --git a/builtin/remote.c b/builtin/remote.c
read_in_full
the whole file into a strbuf. When we add other types of backends for refs
we will need to implement similarly optimized versions of this functions for
them.
Signed-off-by: Ronnie Sahlberg sahlb...@google.com
---
refs.c | 31 +++
1 file changed, 31 insertions
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 57e5d2f..56b0360 100644
--- a/refs.c
+++ b/refs.c
@@ -2668,7 +2668,7 @@ static int curate_packed_ref_fn(struct ref_entry *entry
some code out into a separate
function.
Signed-off-by: Ronnie Sahlberg sahlb...@google.com
---
refs.c | 60 +++-
1 file changed, 35 insertions(+), 25 deletions(-)
diff --git a/refs.c b/refs.c
index becf188..a3815d1 100644
--- a/refs.c
+++ b
Signed-off-by: Ronnie Sahlberg sahlb...@google.com
---
builtin/pack-refs.c | 8 +++-
refs.c | 7 +++
refs.h | 3 ++-
3 files changed, 12 insertions(+), 6 deletions(-)
diff --git a/builtin/pack-refs.c b/builtin/pack-refs.c
index b20b1ec..299768e 100644
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
---
refs.c | 21 +
1 file changed, 17 insertions(+), 4 deletions(-)
diff --git a/refs.c b
Signed-off-by: Ronnie Sahlberg sahlb...@google.com
Signed-off-by: Jonathan Nieder jrnie...@gmail.com
---
refs.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/refs.c b/refs.c
index 44d38ab..becf188 100644
--- a/refs.c
+++ b/refs.c
@@ -2707,8 +2707,10 @@ int
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| 89 ++-
t/t5516-fetch-push.sh | 2 +-
3
Get rid of the action_on_err enum and replace the action argument to
update_ref with a strbuf *err for error reporting.
Update all callers to the new api including two callers in transport*.c
which used the literal 0 instead of an enum.
Signed-off-by: Ronnie Sahlberg sahlb...@google.com
Signed-off-by: Ronnie Sahlberg sahlb...@google.com
---
t/t5543-atomic-push.sh | 101 +
1 file changed, 101 insertions(+)
create mode 100755 t/t5543-atomic-push.sh
diff --git a/t/t5543-atomic-push.sh b/t/t5543-atomic-push.sh
new file mode 100755
Add a command line argument to the git push command to request atomic
pushes.
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
.
With this series we can now perform atomic pushes to a repository.
Version 2:
- Reordered the capabilities we send so that agent= remains the last
capability listed.
- Reworded the paragraph for atomic push in git-send-pack.txt
- Dropped the patch for receive.preferatomicpush
Ronnie Sahlberg (7
failed to update since the
atomic push operation failed.
Signed-off-by: Ronnie Sahlberg sahlb...@google.com
---
Documentation/git-send-pack.txt | 7 ++-
builtin/send-pack.c | 6 +-
remote.h| 3 ++-
send-pack.c | 39
Signed-off-by: Ronnie Sahlberg sahlb...@google.com
---
builtin/branch.c | 7 +--
builtin/checkout.c | 13 ++---
builtin/clone.c| 15 +++
builtin/init-db.c | 8 ++--
builtin/notes.c| 7 ---
builtin/remote.c | 26
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
---
builtin/receive-pack.c | 73
. This only adds protocol capability not ability
for the user to activate it.
Signed-off-by: Ronnie Sahlberg sahlb...@google.com
---
Documentation/technical/protocol-capabilities.txt | 12 ++--
builtin/receive-pack.c| 6 +-
send-pack.c
.
Signed-off-by: Ronnie Sahlberg sahlb...@google.com
---
builtin/checkout.c | 8 +++---
refs.c | 71 +++---
refs.h | 4 +--
3 files changed, 42 insertions(+), 41 deletions(-)
diff --git a/builtin/checkout.c b/builtin
On Wed, Oct 29, 2014 at 11:43 AM, Junio C Hamano gits...@pobox.com wrote:
Ronnie Sahlberg sahlb...@google.com writes:
On Tue, Oct 28, 2014 at 2:12 PM, Junio C Hamano gits...@pobox.com wrote:
More importantly, when you know that the end result you want to see
is that the old and new log files
On Thu, Oct 30, 2014 at 12:59 PM, Junio C Hamano gits...@pobox.com wrote:
Ronnie Sahlberg sahlb...@google.com writes:
@@ -337,6 +341,8 @@ int send_pack(struct send_pack_args *args,
strbuf_addstr(cap_buf, quiet);
if (agent_supported)
strbuf_addf(cap_buf
On Thu, Oct 30, 2014 at 1:04 PM, Junio C Hamano gits...@pobox.com wrote:
Ronnie Sahlberg sahlb...@google.com writes:
diff --git a/Documentation/git-send-pack.txt
b/Documentation/git-send-pack.txt
index 2a0de42..8f64feb 100644
--- a/Documentation/git-send-pack.txt
+++ b/Documentation/git
On Thu, Oct 30, 2014 at 1:11 PM, Junio C Hamano gits...@pobox.com wrote:
Ronnie Sahlberg sahlb...@google.com writes:
Add receive.preferatomicpush setting to receive-pack.c. This triggers
a new capability prefer-atomic-push to be sent back to the send-pack
client, requesting the client
On Thu, Oct 30, 2014 at 3:03 PM, Junio C Hamano gits...@pobox.com wrote:
Ronnie Sahlberg sahlb...@google.com writes:
At some stage it may becomes too many preferences and over-engineered.
Maybe I should drop this patch and then just require the plain if you
want a push to be atomic, then use
On Tue, Oct 28, 2014 at 2:12 PM, Junio C Hamano gits...@pobox.com wrote:
Ronnie Sahlberg sahlb...@google.com writes:
I timed a git branch -m for a branch with ~2400 log entries and it
takes neglible time :
real 0m0.008s
user 0m0.000s
sys 0m0.007s
I really hate this line of reasoning
On Thu, Oct 23, 2014 at 11:32 AM, Junio C Hamano gits...@pobox.com wrote:
Ronnie Sahlberg sahlb...@google.com writes:
commit 020ed65a12838bdead64bc3c5de249d3c8f5cfd8 upstream.
When performing a reflog transaction update, only write to the reflog iff
msg is non-NULL. This can then be combined
On Thu, Oct 23, 2014 at 11:54 AM, Junio C Hamano gits...@pobox.com wrote:
Ronnie Sahlberg sahlb...@google.com writes:
@@ -3531,7 +3537,7 @@ struct ref_update {
enum transaction_update_type update_type;
unsigned char new_sha1[20];
unsigned char old_sha1[20];
- int flags
On Tue, Oct 28, 2014 at 12:56 PM, Junio C Hamano gits...@pobox.com wrote:
Junio C Hamano gits...@pobox.com writes:
Ronnie Sahlberg sahlb...@google.com writes:
commit 0295e9cebc41020ee84da275549b164a8770ffba upstream.
Change refs.c to use a single transaction to copy/rename both the refs
On Thu, Oct 23, 2014 at 10:42 AM, Junio C Hamano gits...@pobox.com wrote:
Ronnie Sahlberg sahlb...@google.com writes:
Subject: Re: [PATCH 01/15] refs.c make ref_transaction_create a wrapper to
ref_transaction_update
Missing colon after refs.c
commit
On Thu, Oct 23, 2014 at 10:51 AM, Junio C Hamano gits...@pobox.com wrote:
Ronnie Sahlberg sahlb...@google.com writes:
commit 306805ccd147bfdf160b288a8d51fdf9b77ae0fa upstream.
Update copy_fd to return a meaningful errno on failure.
These two are good changes, but makes me wonder if more
commit 8d0a342375fbd926ae6ae93f9be42a436a787fb6 upstream.
Add a flag that allows us to truncate the reflog before we write the
update.
Change-Id: I187b22e0910499b1976689b46866698b6fd46eb3
Signed-off-by: Ronnie Sahlberg sahlb...@google.com
Signed-off-by: Jonathan Nieder jrnie...@gmail.com
Signed-off-by: Ronnie Sahlberg sahlb...@google.com
Signed-off-by: Jonathan Nieder jrnie...@gmail.com
---
refs.c | 102 +++--
refs.h | 12
2 files changed, 112 insertions(+), 2 deletions(-)
diff --git a/refs.c b/refs.c
index
a single lstat()
instead of a open(O_CREAT)+lstat()+close().
Change-Id: Ib9493b3b81a97a0e154cc44303a5ed7cdceaaca7
Signed-off-by: Ronnie Sahlberg sahlb...@google.com
Signed-off-by: Jonathan Nieder jrnie...@gmail.com
---
builtin/checkout.c | 8 +---
refs.c | 22
Signed-off-by: Ronnie Sahlberg sahlb...@google.com
Signed-off-by: Jonathan Nieder jrnie...@gmail.com
---
refs.c | 27 ++-
1 file changed, 2 insertions(+), 25 deletions(-)
diff --git a/refs.c b/refs.c
index 0368ed4..ed0485e 100644
--- a/refs.c
+++ b/refs.c
@@ -3623,31 +3623,8
commit a4369f77d1975566bcd29bfa46720d48372c241d upstream.
unlock|close|commit_ref can be made static since there are no more external
callers.
Change-Id: I743f9daaa1c101fdc781a76283c2e8b462591d07
Signed-off-by: Ronnie Sahlberg sahlb...@google.com
Signed-off-by: Jonathan Nieder jrnie...@gmail.com
reflog 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).
Change-Id: I178e84a52af18c800844596af33dbc21bc076c1f
Signed-off-by: Ronnie Sahlberg sahlb...@google.com
Signed
commit 0beeda259297c92d411ecc92fa508ec7cfd87cc5 upstream.
Change-Id: I685291986e544a8dc14f94c73b6a7c6400acd9d2
Signed-off-by: Ronnie Sahlberg sahlb...@google.com
Signed-off-by: Jonathan Nieder jrnie...@gmail.com
---
refs.c | 22 ++
refs.h | 2 +-
2 files changed, 3
of the series since we no longer need those functions.
This series can also be found at
https://github.com/rsahlberg/git/tree/ref-transactions-reflog
Ronnie Sahlberg (15):
refs.c make ref_transaction_create a wrapper to ref_transaction_update
refs.c: make ref_transaction_delete a wrapper
never materialize at this stage.
Change-Id: Ibe703310e33a4db07e5bcc704310211268b788fc
Signed-off-by: Ronnie Sahlberg sahlb...@google.com
Signed-off-by: Jonathan Nieder jrnie...@gmail.com
---
refs.c | 46 +-
1 file changed, 37 insertions(+), 9 deletions
discussed when the transactions could also operate on non ref objects. Such as
..git/config and .gitmodule.
Change-Id: Iffdc56536be71c5061caa23040ce0d89efd52196
Signed-off-by: Ronnie Sahlberg sahlb...@google.com
Signed-off-by: Jonathan Nieder jrnie...@gmail.com
---
branch.c | 14
: I44c89caa7e7c4960777b79cfb5d339a5aa3ddf7a
Signed-off-by: Ronnie Sahlberg sahlb...@google.com
Signed-off-by: Jonathan Nieder jrnie...@gmail.com
---
refs.c | 5 +++--
refs.h | 1 +
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/refs.c b/refs.c
index d54c3b9..f14b76e 100644
--- a/refs.c
+++ b/refs.c
@@ -3895,8
commit 3a2f55c247ff290943fd552674e226062c13fd00 upstream.
No one is using this function so we can delete it.
Change-Id: I524dac239da500e5d4432328b997ed8ab34f6803
Signed-off-by: Ronnie Sahlberg sahlb...@google.com
Signed-off-by: Jonathan Nieder jrnie...@gmail.com
---
refs.c | 7 ---
refs.h
: I4e744d9e7d8b7e81dde5479965819117d03c98db
Signed-off-by: Ronnie Sahlberg sahlb...@google.com
Signed-off-by: Jonathan Nieder jrnie...@gmail.com
---
builtin/branch.c| 5 +++--
cache.h | 7 +++
refs.c | 6 ++
refs.h | 6 --
t
commit 5ac378cd8fad09a836d17fec379780854838bde5 upstream.
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
---
builtin/reflog.c | 85
commit 306805ccd147bfdf160b288a8d51fdf9b77ae0fa upstream.
Update copy_fd to return a meaningful errno on failure.
Change-Id: I771f9703acc816902affcf35ff2a56d9426315ac
Signed-off-by: Ronnie Sahlberg sahlb...@google.com
Signed-off-by: Jonathan Nieder jrnie...@gmail.com
---
copy.c | 15
: I1e4f58050acaabc6bcfa3409fbc0c2b866bb59aa
Signed-off-by: Ronnie Sahlberg sahlb...@google.com
Signed-off-by: Jonathan Nieder jrnie...@gmail.com
---
builtin/remote.c | 20 ++-
refs.c | 155 ++-
2 files changed, 138 insertions(+), 37
1 - 100 of 1402 matches
Mail list logo