Felipe Contreras felipe.contre...@gmail.com writes:
David Kastrup wrote:
Shouting your God is an imaginary shithead every time you see Mark
There's no point in discussing with an unconstructive person as you.
So go to a constructive person you call your friend and show him one of
your calm
Stepan Kasal wrote:
From: Sverre Rabbelier srabbel...@gmail.com
Date: Sat, 28 Aug 2010 20:49:01 -0500
[PT: ensure we add an additional element to the argv array]
Signed-off-by: Stepan Kasal ka...@ucw.cz
---
Hi,
this patch was present in msysgit from Mar 2012.
Do you like it?
Stepan Kasal wrote:
From: Johannes Schindelin johannes.schinde...@gmx.de
Date: Mon, 9 Apr 2012 13:04:35 -0500
After importing anything with fast-import, we should always let the
garbage collector do its job, since the objects are written to disk
inefficiently.
I'm not sure how slow `git gc
We are Christian organization, we give loan or financial help to those in
need, contact us at marieloanlend...@gmail.com
--
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
On Wed, May 14, 2014 at 5:53 PM, Jeff Sipek jef...@josefsipek.net wrote:
On Tue, May 13, 2014 at 10:31:04PM +0200, Per Cederqvist wrote:
When the option is true (the default), Guilt does not create a new Git
branch when patches are applied. This way, you can switch between
Guilt 0.35 and the
Eric Sunshine sunsh...@sunshineco.com writes:
On Wed, May 14, 2014 at 1:14 PM, Matthieu Moy
I do not understand the use of the \ in front of the ` in the original
code.
The second argument of test_expect_success is double-quoted, so a bare
`...` would be evaluated before
The memory ownership of the argv array of a struct child_process can
be tricky. The child_process does not own the memory, but it must remain
valid until finish_command runs. That's easy for cases where we call
start_command and finish_command in the same function: you can use a
local array
All child_process structs need to point to an argv. For
flexibility, we do not mandate the use of a dynamic
argv_array. However, because the child_process does not own
the memory, this can make memory management with a
separate argv_array difficult.
For example, if a function calls start_command
We currently set up the argv array by hand in a fixed-size
stack-local array. Using an argv array is more readable, as
it handles buffer allocation us (not to mention makes it
obvious we do not overflow the array).
However, there's a more subtle benefit, too. We leave the
function having run
This simplifies the code and avoids a fixed array size that
we might accidentally overflow. It also prevents a leak
after finish_command is run, by using the argv_array that
run-command manages for us.
Signed-off-by: Jeff King p...@peff.net
---
transport-helper.c | 26 ++
This avoids magic numbers when we allocate fixed-size argv
arrays, and makes it more obvious that we are not
overflowing.
It is also the first step to fixing a memory leak. When
git_connect returns a child_process struct, the argv array
in the struct is dynamically allocated, but the individual
The get_helper functions dynamically allocates an
argv_array, feeds it to start_command, and then returns. We
then have to later clean up the memory manually after
calling finish_command. We can make this simpler by just
using run-command's internal argv_array, which handles
cleanup for us.
This
This saves a few lines and lets us avoid having to clean up
the memory manually when the command finishes.
Signed-off-by: Jeff King p...@peff.net
---
transport-helper.c | 9 +++--
1 file changed, 3 insertions(+), 6 deletions(-)
diff --git a/transport-helper.c b/transport-helper.c
index
The argv_array_detach function (and associated free() function) was
really only useful for transferring ownership of the memory to a struct
child_process. Now that we have an internal argv_array in that struct,
there are no callers left.
Signed-off-by: Jeff King p...@peff.net
---
This is a bonus
When we try to open a loose object file, we first attempt to
open in the local object database, and then try any
alternates. This means that the errno value when we return
will be from the last place we looked (and due to the way
the code is structured, simply ENOENT if we do not have have
any
On Thu, May 15, 2014 at 07:32:14AM +0200, Stepan Kasal wrote:
From: Sverre Rabbelier srabbel...@gmail.com
Date: Sat, 28 Aug 2010 20:49:01 -0500
[PT: ensure we add an additional element to the argv array]
Signed-off-by: Stepan Kasal ka...@ucw.cz
---
Hi,
this patch was present in
Michael Wagner:
Decoding the UTF-8 encoded file name (again with an additional print
statement):
$ REQUEST_METHOD=GET
QUERY_STRING='p=notes.git;a=blob_plain;f=work/G%C3%83%C2%BCtekriterien.txt;hb=HEAD'
./gitweb.cgi
work/Gütekriterien.txt
Content-disposition: inline;
Hi Peff,
On Thu, May 15, 2014 at 05:00:13AM -0400, Jeff King wrote:
I just posted a series that addresses those leaks and converts this
site. I do not want to hold your patch hostage to my series, [...]
no problem, let's return to it later.
Stepan
--
To unsubscribe from this list: send the
On Thu, May 15, 2014 at 7:08 AM, Michael Wagner accou...@mwagner.org wrote:
On Thu, May 15, 2014 at 12:25:45AM +0200, Jakub Narębski wrote:
On Wed, May 14, 2014 at 11:57 PM, Junio C Hamano gits...@pobox.com wrote:
Michael Wagner accou...@mwagner.org writes:
Perl has an internal encoding used
Even though POSIX.1 lists -a/-o as options to test, they are
marked Obsolescent XSI. Scripts using these expressions
should be converted as follow:
test $1 -a $2
should be written as:
test $1 test $2
Likewise
test $1 -o $2
should be written as:
test $1 test $2
But note that, in test, -a
Even though POSIX.1 lists -a/-o as options to test, they are
marked Obsolescent XSI. Scripts using these expressions
should be converted as follow:
test $1 -a $2
should be written as:
test $1 test $2
Likewise
test $1 -o $2
should be written as:
test $1 test $2
But note that, in test, -a
Even though POSIX.1 lists -a/-o as options to test, they are
marked Obsolescent XSI. Scripts using these expressions
should be converted as follow:
test $1 -a $2
should be written as:
test $1 test $2
Likewise
test $1 -o $2
should be written as:
test $1 test $2
But note that, in test, -a
Even though POSIX.1 lists -a/-o as options to test, they are
marked Obsolescent XSI. Scripts using these expressions
should be converted as follow:
test $1 -a $2
should be written as:
test $1 test $2
Likewise
test $1 -o $2
should be written as:
test $1 test $2
But note that, in test, -a
Even though POSIX.1 lists -a/-o as options to test, they are
marked Obsolescent XSI. Scripts using these expressions
should be converted as follow:
test $1 -a $2
should be written as:
test $1 test $2
Likewise
test $1 -o $2
should be written as:
test $1 test $2
But note that, in test, -a
Even though POSIX.1 lists -a/-o as options to test, they are
marked Obsolescent XSI. Scripts using these expressions
should be converted as follow:
test $1 -a $2
should be written as:
test $1 test $2
Likewise
test $1 -o $2
should be written as:
test $1 test $2
But note that, in test, -a
Even though POSIX.1 lists -a/-o as options to test, they are
marked Obsolescent XSI. Scripts using these expressions
should be converted as follow:
test $1 -a $2
should be written as:
test $1 test $2
Likewise
test $1 -o $2
should be written as:
test $1 test $2
But note that, in test, -a
Even though POSIX.1 lists -a/-o as options to test, they are
marked Obsolescent XSI. Scripts using these expressions
should be converted as follow:
test $1 -a $2
should be written as:
test $1 test $2
Likewise
test $1 -o $2
should be written as:
test $1 test $2
But note that, in test, -a
Even though POSIX.1 lists -a/-o as options to test, they are
marked Obsolescent XSI. Scripts using these expressions
should be converted as follow:
test $1 -a $2
should be written as:
test $1 test $2
Likewise
test $1 -o $2
should be written as:
test $1 test $2
But note that, in test, -a
Even though POSIX.1 lists -a/-o as options to test, they are
marked Obsolescent XSI. Scripts using these expressions
should be converted as follow:
test $1 -a $2
should be written as:
test $1 test $2
Likewise
test $1 -o $2
should be written as:
test $1 test $2
But note that, in test, -a
I am very sorry : the comment is wrong. I will repost shortly.
Best regards
2014-05-15 16:17 GMT+02:00 Elia Pinto gitter.spi...@gmail.com:
Even though POSIX.1 lists -a/-o as options to test, they are
marked Obsolescent XSI. Scripts using these expressions
should be converted as follow:
Even though POSIX.1 lists -a/-o as options to test, they are
marked Obsolescent XSI. Scripts using these expressions
should be converted as follow:
test $1 -a $2
should be written as:
test $1 test $2
Likewise
test $1 -o $2
should be written as:
test $1 test $2
But note that, in test, -a
Even though POSIX.1 lists -a/-o as options to test, they are
marked Obsolescent XSI. Scripts using these expressions
should be converted as follow:
test $1 -a $2
should be written as:
test $1 test $2
Likewise
test $1 -o $2
should be written as:
test $1 test $2
But note that, in test, -a
Even though POSIX.1 lists -a/-o as options to test, they are
marked Obsolescent XSI. Scripts using these expressions
should be converted as follow:
test $1 -a $2
should be written as:
test $1 test $2
Likewise
test $1 -o $2
should be written as:
test $1 test $2
But note that, in test, -a
Even though POSIX.1 lists -a/-o as options to test, they are
marked Obsolescent XSI. Scripts using these expressions
should be converted as follow:
test $1 -a $2
should be written as:
test $1 test $2
Likewise
test $1 -o $2
should be written as:
test $1 test $2
But note that, in test, -a
Even though POSIX.1 lists -a/-o as options to test, they are
marked Obsolescent XSI. Scripts using these expressions
should be converted as follow:
test $1 -a $2
should be written as:
test $1 test $2
Likewise
test $1 -o $2
should be written as:
test $1 test $2
But note that, in test, -a
Even though POSIX.1 lists -a/-o as options to test, they are
marked Obsolescent XSI. Scripts using these expressions
should be converted as follow:
test $1 -a $2
should be written as:
test $1 test $2
Likewise
test $1 -o $2
should be written as:
test $1 test $2
But note that, in test, -a
Even though POSIX.1 lists -a/-o as options to test, they are
marked Obsolescent XSI. Scripts using these expressions
should be converted as follow:
test $1 -a $2
should be written as:
test $1 test $2
Likewise
test $1 -o $2
should be written as:
test $1 test $2
But note that, in test, -a
Even though POSIX.1 lists -a/-o as options to test, they are
marked Obsolescent XSI. Scripts using these expressions
should be converted as follow:
test $1 -a $2
should be written as:
test $1 test $2
Likewise
test $1 -o $2
should be written as:
test $1 test $2
But note that, in test, -a
Even though POSIX.1 lists -a/-o as options to test, they are
marked Obsolescent XSI. Scripts using these expressions
should be converted as follow:
test $1 -a $2
should be written as:
test $1 test $2
Likewise
test $1 -o $2
should be written as:
test $1 test $2
But note that, in test, -a
Even though POSIX.1 lists -a/-o as options to test, they are
marked Obsolescent XSI. Scripts using these expressions
should be converted as follow:
test $1 -a $2
should be written as:
test $1 test $2
Likewise
test $1 -o $2
should be written as:
test $1 test $2
But note that, in test, -a
On Thu, May 15, 2014 at 09:37:05AM +0200, Per Cederqvist wrote:
On Wed, May 14, 2014 at 5:53 PM, Jeff Sipek jef...@josefsipek.net wrote:
On Tue, May 13, 2014 at 10:31:04PM +0200, Per Cederqvist wrote:
...
+
+for i in `seq 5`; do
+ if [ $i -ge 5 ]; then
+ shouldfail guilt
On Wed, May 14, 2014 at 3:08 PM, Jonathan Nieder jrnie...@gmail.com wrote:
Hi,
Ronnie Sahlberg wrote:
--- a/builtin/update-ref.c
+++ b/builtin/update-ref.c
@@ -342,6 +342,7 @@ int cmd_update_ref(int argc, const char **argv, const
char *prefix)
[...]
@@ -359,17 +360,16 @@ int
--
Kedves felhasználók e-mailben;
Túllépte 23432 box set
Web Service / Admin, és akkor nem lesz probléma a küldő és
fogadhat e-maileket, amíg újra ellenőrizni. Kérjük, frissítse kattintva
linkre, és töltse ki az adatokat, hogy ellenőrizze a számla
Kérjük, kövesse az alábbi linkre, és majd
Elia Pinto wrote:
Even though POSIX.1 lists -a/-o as options to test, they are
marked Obsolescent XSI. Scripts using these expressions
should be converted as follow:
[... many lines snipped ...]
This is a very long description, and it doesn't leave me excited by
the change.
Is there some
On Wed, May 14, 2014 at 4:40 PM, Jonathan Nieder jrnie...@gmail.com wrote:
Ronnie Sahlberg wrote:
Update ref_transaction_update() do some basic error checking and return
true on error. Update all callers to check ref_transaction_update() for
error.
There are currently no conditions in
From 7fd7360ef5b4f453ceb8e32b18f73f9fbcaa95b7 Mon Sep 17 00:00:00 2001
From: Sergei Golubchik vuv...@gmail.com
Date: Thu, 15 May 2014 17:50:16 +0200
Subject: [PATCH] git-remote-bzr: support bzr per-file comments
Bazaar supports per-file comments in revisions - using bzr-gtk one can
write a global
Elia Pinto gitter.spi...@gmail.com writes:
$ test -z $x -a a = b
bash: test: too many arguments
because it groups test -n = -a and is left with a = b.
I guess you meant -z, not -n.
--
Matthieu Moy
http://www-verimag.imag.fr/~moy/
--
To unsubscribe from this list: send the line
On Wed, May 14, 2014 at 5:04 PM, Jonathan Nieder jrnie...@gmail.com wrote:
Ronnie Sahlberg wrote:
Do basic error checking in ref_transaction_create() and make it return
status. Update all callers to check the result of ref_transaction_create()
There are currently no conditions in _create that
On Wed, May 14, 2014 at 5:19 PM, Jonathan Nieder jrnie...@gmail.com wrote:
Ronnie Sahlberg wrote:
Change ref_transaction_delete() to do basic error checking and return
status. Update all callers to check the return for ref_transaction_delete()
There are currently no conditions in _delete that
Thanks, will replace the topic.
--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Jeff King p...@peff.net writes:
Thanks for a thorough bug report. I was able to reproduce it. The
...
-- 8 --
Subject: run_diff_files: do not look at uninitialized stat data
...
We can fix both by splitting the CE_VALID and regular code
paths, and making sure only to look at the stat
On Wed, May 14, 2014 at 5:27 PM, Jonathan Nieder jrnie...@gmail.com wrote:
Ronnie Sahlberg wrote:
--- a/builtin/tag.c
+++ b/builtin/tag.c
@@ -701,11 +702,12 @@ int cmd_tag(int argc, const char **argv, const char
*prefix)
if (annotate)
create_tag(object, tag, buf, opt,
Jeff King p...@peff.net writes:
The memory ownership of the argv array of a struct child_process can
be tricky. The child_process does not own the memory, but it must remain
valid until finish_command runs. That's easy for cases where we call
start_command and finish_command in the same
On Wed, May 14, 2014 at 5:30 PM, Jonathan Nieder jrnie...@gmail.com wrote:
Ronnie Sahlberg wrote:
[...]
+++ b/builtin/replace.c
[...]
@@ -157,11 +158,12 @@ static int replace_object(const char *object_ref,
const char *replace_ref,
else if (!force)
die(replace ref '%s'
Ronnie Sahlberg wrote:
Instead of the suggestions above, would you accept an alternative
approach where I would
add an err argument to ref_transaction_begin() instead?
For a hypothetical mysql backend, this could then do something like :
[...]
fatal: refs/heads/master: cannot update the
On Wed, May 14, 2014 at 6:11 PM, Jonathan Nieder jrnie...@gmail.com wrote:
Ronnie Sahlberg wrote:
[...]
+++ b/builtin/commit.c
@@ -1541,11 +1541,12 @@ int cmd_commit(int argc, const char **argv, const
char *prefix)
[...]
@@ -1667,16 +1668,6 @@ int cmd_commit(int argc, const char **argv,
Ronnie Sahlberg wrote:
On Wed, May 14, 2014 at 5:04 PM, Jonathan Nieder jrnie...@gmail.com wrote:
If it were ever triggered, the message
error: some bad thing
fatal: failed transaction create for refs/heads/master
looks overly verbose and unclear. Something like
Jeff King p...@peff.net writes:
When we try to open a loose object file, we first attempt to
open in the local object database, and then try any
alternates. This means that the errno value when we return
will be from the last place we looked (and due to the way
the code is structured, simply
Elia Pinto gitter.spi...@gmail.com writes:
Even though POSIX.1 lists -a/-o as options to test, they are
marked Obsolescent XSI. Scripts using these expressions
should be converted as follow:
test $1 -a $2
should be written as:
test $1 test $2
Likewise
test $1 -o $2
should be
looks like pull requests with signed git got broken in git master:
[mst@robin qemu]$ /usr/bin/git --version
git version 1.8.3.1
[mst@robin qemu]$ git --version
git version 2.0.0.rc1.18.gac53fc6.dirty
[mst@robin qemu]$
[mst@robin qemu]$ /usr/bin/git request-pull origin/master
Peter Krefting pe...@softwolves.pp.se writes:
What is happening is that whatever is generating the URI us
UTF-8-encoding the string twice (i.e., it generates a string with the
proper C3 BC in it, and then interprets it as iso-8859-1 data and runs
that through a UTF-8 encoder again, yielding
Update repack_without_refs to take an err argument and update it if there
is a failure. Pass the err variable from ref_transaction_commit to this
function so that callers can print a meaningful error message if _commit
fails due to a problem in repack_without_refs.
Signed-off-by: Ronnie Sahlberg
ref_transaction_create|delete|update has no need to modify the sha1
arguments passed to it so it should use const unsigned char* instead
of unsigned char*.
Some functions, such as fast_forward_to(), already have its old/new
sha1 arguments as consts. This function will at some point need to
use
Wrap all the ref updates inside a transaction to make the update atomic.
Signed-off-by: Ronnie Sahlberg sahlb...@google.com
---
builtin/receive-pack.c | 20 ++--
1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/builtin/receive-pack.c b/builtin/receive-pack.c
index
We have to free the transaction before returning in the early check for
'return early if number of updates == 0' or else the following code would
create a memory leak with the transaction never being freed :
t = ref_transaction_begin()
ref_transaction_commit(t)
Signed-off-by: Ronnie
In s_update_ref there are two calls that when they fail we return an error
based on the errno value. In particular we want to return a specific error
if ENOTDIR happened. Both these functions do have failure modes where they
may return an error without updating errno, in which case a previous and
Change store_updated_refs to use a single ref transaction for all refs that
are updated during the fetch. This makes the fetch more atomic when update
failures occur.
Since ref update failures will now no longer occur in the code path for
updating a single ref in s_update_ref, we no longer have
Change update_branch() to use ref transactions for updates.
Signed-off-by: Ronnie Sahlberg sahlb...@google.com
---
fast-import.c | 22 ++
1 file changed, 14 insertions(+), 8 deletions(-)
diff --git a/fast-import.c b/fast-import.c
index 6707a66..79d219b 100644
---
No external users call write_ref_sha1 any more so lets declare it static.
Signed-off-by: Ronnie Sahlberg sahlb...@google.com
---
refs.c | 4 +++-
refs.h | 3 ---
2 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/refs.c b/refs.c
index 82a8d4e..e5729ad 100644
--- a/refs.c
+++ b/refs.c
Signed-off-by: Ronnie Sahlberg sahlb...@google.com
---
fast-import.c | 17 -
1 file changed, 12 insertions(+), 5 deletions(-)
diff --git a/fast-import.c b/fast-import.c
index 3e356da..5587cf6 100644
--- a/fast-import.c
+++ b/fast-import.c
@@ -1736,15 +1736,22 @@ static void
Do basic error checking in ref_transaction_create() and make it return
non-zero on error. Update all callers to check the result of
ref_transaction_create(). There are currently no conditions in _create that
will return error but there will be in the future.
Signed-off-by: Ronnie Sahlberg
Since we now only call update_ref_lock with onerr==QUIET_ON_ERR we no longer
need this function and can replace it with just calling lock_any_ref_for_update
directly.
Signed-off-by: Ronnie Sahlberg sahlb...@google.com
---
refs.c | 30 ++
1 file changed, 6
Change to use ref transactions for all updates to refs.
Signed-off-by: Ronnie Sahlberg sahlb...@google.com
---
sequencer.c | 24
1 file changed, 16 insertions(+), 8 deletions(-)
diff --git a/sequencer.c b/sequencer.c
index 0a80c58..9282a12 100644
--- a/sequencer.c
+++
Change ref_transaction_commit so that it does not free the transaction.
Instead require that a caller will end a transaction by either calling
ref_transaction_rollback or ref_transaction_free.
By having the transaction object remaining valid after _commit returns allows
us to write much nicer
No external callers reference lock_ref_sha1 any more so lets declare it static.
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 e5729ad..600f9b3 100644
--- a/refs.c
+++
Signed-off-by: Ronnie Sahlberg sahlb...@google.com
---
refs.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/refs.c b/refs.c
index 336df40..ed93b75 100644
--- a/refs.c
+++ b/refs.c
@@ -260,8 +260,6 @@ struct ref_entry {
};
static void read_loose_refs(const char *dirname, struct ref_dir
Add a strbuf argument to _commit so that we can pass an error string back to
the caller. So that we can do error logging from the caller instead of from
_commit.
Longer term plan is to first convert all callers to use onerr==QUIET_ON_ERR
and craft any log messages from the callers themselves and
Change rename_ref to use a single transaction to perform the ref rename.
Signed-off-by: Ronnie Sahlberg sahlb...@google.com
---
refs.c | 73 ++
1 file changed, 20 insertions(+), 53 deletions(-)
diff --git a/refs.c b/refs.c
index
Change prune_ref to delete the ref using a ref transaction. To do this we also
need to add a new flag REF_ISPRUNING that will tell the transaction that we
do not want to delete this ref from the packed refs. This flag is private to
refs.c and not exposed to external callers.
Signed-off-by: Ronnie
Add a new flag REF_ISPACKONLY that we can use in ref_transaction_delete.
This flag indicates that the ref does not exist as a loose ref andf only as
a packed ref. If this is the case we then change the commit code so that
we skip taking out a lock file and we skip calling delete_ref_loose.
Check
Skip using the lock_any_ref_for_update wrapper and call lock_ref_sha1_basic
directly from the commit function.
Signed-off-by: Ronnie Sahlberg sahlb...@google.com
---
refs.c | 12 ++--
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/refs.c b/refs.c
index 53fdbd1..69ad51d
We call read_ref_full with a pointer to flags from rename_ref but since
we never actually use the returned flags we can just pass NULL here instead.
Signed-off-by: Ronnie Sahlberg sahlb...@google.com
---
refs.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/refs.c b/refs.c
Allow passing a list of refs to skip checking to name_conflict_fn.
There are some conditions where we want to allow a temporary conflict and skip
checking those refs. For example if we have a transaction that
1, guarantees that m is a packed refs and there is no loose ref for m
2, the transaction
This means that most loose refs will no longer be present after the rename
which triggered a test failure since it assumes the file for an unrelated
ref would still be present after the rename.
Signed-off-by: Ronnie Sahlberg sahlb...@google.com
---
refs.c| 3 +++
t/t3200-branch.sh |
Change delete_ref to use a ref transaction for the deletion. At the same time
since we no longer have any callers of repack_without_ref we can now delete
this function.
Signed-off-by: Ronnie Sahlberg sahlb...@google.com
---
refs.c | 31 ++-
1 file changed, 10
Change the reference transactions so that we pass the reflog message
through to the create/delete/update function instead of the commit message.
This allows for individual messages for each change in a multi ref
transaction.
Signed-off-by: Ronnie Sahlberg sahlb...@google.com
---
branch.c
Update replace.c to use ref transactions for updates.
Signed-off-by: Ronnie Sahlberg sahlb...@google.com
---
builtin/replace.c | 14 --
1 file changed, 8 insertions(+), 6 deletions(-)
diff --git a/builtin/replace.c b/builtin/replace.c
index 3da1bae..ee34d5d 100644
---
lock_ref_sha1 was only called from one place in refc.c and only provided
a check that the refname was sane before adding back the initial refs/
part of the ref path name, the initial refs/ that this caller had already
stripped off before calling lock_ref_sha1.
Signed-off-by: Ronnie Sahlberg
Make ref_update_reject_duplicates return any error that occurs through a
new strbuf argument. This means that when a transaction commit fails in
this function we will now be able to pass a helpful error message back to the
caller.
Reviewed-by: Jonathan Nieder jrnie...@gmail.com
Signed-off-by:
Since all callers now use QUIET_ON_ERR we no longer need to provide an onerr
argument any more. Remove the onerr argument from the ref_transaction_commit
signature.
Reviewed-by: Jonathan Nieder jrnie...@gmail.com
Signed-off-by: Ronnie Sahlberg sahlb...@google.com
---
builtin/update-ref.c | 3
Change commit.c to use ref transactions for all ref updates.
Make sure we pass a NULL pointer to ref_transaction_update if have_old
is false.
Signed-off-by: Ronnie Sahlberg sahlb...@google.com
---
builtin/commit.c | 23 ++-
1 file changed, 10 insertions(+), 13 deletions(-)
Change create_branch to use a ref transaction when creating the new branch.
ref_transaction_create will check that the ref does not already exist and fail
otherwise meaning that we no longer need to keep a lock on the ref during the
setup_tracking. This simplifies the code since we can now do the
Track the status of a transaction in a new status field. Check the field for
sanity, i.e. that status must be OPEN when _commit/_create/_delete or
_update is called or else die(BUG:...)
Signed-off-by: Ronnie Sahlberg sahlb...@google.com
---
refs.c | 31 ++-
1 file
Change tag.c to use ref transactions for all ref updates.
Signed-off-by: Ronnie Sahlberg sahlb...@google.com
---
builtin/tag.c | 14 --
1 file changed, 8 insertions(+), 6 deletions(-)
diff --git a/builtin/tag.c b/builtin/tag.c
index c6e8a71..bf2a5c3 100644
--- a/builtin/tag.c
+++
Change s_update_ref to use a ref transaction for the ref update.
Signed-off-by: Ronnie Sahlberg sahlb...@google.com
---
builtin/fetch.c | 17 +
1 file changed, 9 insertions(+), 8 deletions(-)
diff --git a/builtin/fetch.c b/builtin/fetch.c
index a93c893..b41d7b7 100644
---
Update ref_transaction_update() do some basic error checking and return
non-zero on error. Update all callers to check ref_transaction_update() for
error. There are currently no conditions in _update that will return error but
there will be in the future.
Also check for BUGs during update and
Change ref_transaction_delete() to do basic error checking and return
non-zero of error. Update all callers to check the return for
ref_transaction_delete(). There are currently no conditions in _delete that
will return error but there will be in the future.
Signed-off-by: Ronnie Sahlberg
Change update_ref_write to also update an error strbuf on failure.
This makes the error available to ref_transaction_commit callers if the
transaction failed due to update_ref_sha1/write_ref_sha1 failures.
Reviewed-by: Jonathan Nieder jrnie...@gmail.com
Signed-off-by: Ronnie Sahlberg
This patch series can also be found at
https://github.com/rsahlberg/git/tree/ref-transactions
This patch series is based on next and expands on the transaction API. It
converts all ref updates, inside refs.c as well as external, to use the
transaction API for updates. This makes most of the ref
Switch to using ref transactions in walker_fetch(). As part of the refactoring
to use ref transactions we also fix a potential memory leak where in the
original code if write_ref_sha1() would fail we would end up returning from
the function without free()ing the msg string.
This changes the
1 - 100 of 209 matches
Mail list logo