On 14/05/14 09:24, Jens Lehmann wrote:
Since git 2.0.0 starting git gui in a submodule using a gitfile fails with
the following error:
No working directory ../../../path
couldn't change working directory
to ../../../path: no such file or
directory
This is because git
Junio, I believe this issue needs to be fixed before 2.0 final. Otherwise
git gui will not work inside submodules anymore due to the major version
number change from 1 to 2. I'd like to hear Pat's opinion on this; even
though I think my patch is less risky (as it doesn't change behavior for
pre-2
On Tue, May 13, 2014 at 11:13 PM, Jeff Sipek jef...@josefsipek.net wrote:
On Tue, May 13, 2014 at 10:30:42PM +0200, Per Cederqvist wrote:
A patch file consists of:
(1) the description
(2) optional diffstat
(3) the patches
When extracting the patch, we only want part 3. The do_get_patch
On Tue, May 13, 2014 at 11:30 PM, Jeff Sipek jef...@josefsipek.net wrote:
On Tue, May 13, 2014 at 10:30:43PM +0200, Per Cederqvist wrote:
Test that we can combine any combination of patches with empty and
non-empty messages, both with and without guilt.diffstat. (All
patches are empty.)
On Wed, May 14, 2014 at 10:45 AM, Stepan Kasal ka...@ucw.cz wrote:
Hello kusma,
On Tue, May 13, 2014 at 08:56:54AM +0200, Erik Faye-Lund wrote:
--- a/contrib/credential/wincred/Makefile
+++ b/contrib/credential/wincred/Makefile
@@ -1,12 +1,12 @@
all: git-credential-wincred.exe
-CC
On Wed, May 14, 2014 at 12:09 AM, Jeff Sipek jef...@josefsipek.net wrote:
On Tue, May 13, 2014 at 10:30:52PM +0200, Per Cederqvist wrote:
The 'echo %s' construct sometimes processes escape sequences. (This
%s? Should this be $s?
Yes. Will fix that typo in v3 of the patch series.
/ceder
It is *way* beyond the quality of any other tool in 'contrib/' and even
some tools in the core, like 'git-request-pull' (which has known bugs),
and probably even 'git-pt'.
Junio, can you comment on this? I understand this probably doesn't
really affect the issue at hand, but it'd help
On Tue, May 13, 2014 at 11:41 PM, Jeff Sipek jef...@josefsipek.net wrote:
On Tue, May 13, 2014 at 10:31:01PM +0200, Per Cederqvist wrote:
This makes it easier to script operations on the entire queue, for
example run the test suite on each patch in the queue:
guilt pop -a;while guilt
Philippe Vaucher philippe.vauc...@gmail.com writes:
Thanks for the explanation. I think it underlines well the A)
technical issues (quality commits) and the B) social issues (ability
to communicate in a friendly way respond constructively), which we
discovered are both *essential* for
Thanks for the explanation. I think it underlines well the A)
technical issues (quality commits) and the B) social issues (ability
to communicate in a friendly way respond constructively), which we
discovered are both *essential* for contributing to git.
I'm not entirely convinced of that:
On Tue, May 13, 2014 at 11:29 PM, Per Cederqvist ced...@opera.com wrote:
On Tue, May 13, 2014 at 10:54 PM, Jeff Sipek jef...@josefsipek.net wrote:
On Tue, May 13, 2014 at 04:45:47PM -0400, Theodore Ts'o wrote:
On Tue, May 13, 2014 at 10:30:36PM +0200, Per Cederqvist wrote:
...
- Changed
Philippe Vaucher philippe.vauc...@gmail.com writes:
Thanks for the explanation. I think it underlines well the A)
technical issues (quality commits) and the B) social issues (ability
to communicate in a friendly way respond constructively), which we
discovered are both *essential* for
On Sat, May 10, 2014 at 10:02:59AM -0400, Jeff King wrote:
On Fri, May 09, 2014 at 02:08:27PM -0700, Junio C Hamano wrote:
3. Just disable the http tests when run as root.
I think I'd favor 3. But I'd like to be sure that being root is the
problem.
I agree with both the
On Wed, May 14, 2014 at 6:44 AM, David Turner dtur...@twopensource.com wrote:
I'm not so happy that git now needs to link to libjansson.so and
libwatchman.so. I would load libwatchman.so at runtime only when
core.usewatchman is on, but this is more of personal taste.
I assume you mean
One more thing I think we can solve with watchman is the racy
timestamp issue (see 29e4d36 and 407c8eb). Basically if a file is
updated within a second (and the system only supports timestamp
granuarity down to a second) then git can't know if a file is changed
by comparing stat data, so it
Basically you have to write in a manner if a seedy stranger gave me
that code on a street corner, I would have no problem checking it in.
In practice, the shortcuts offering themselves through civil behavior
and mutual trust get a lot more work done.
My point was more that it's very hard to
Philippe Vaucher philippe.vauc...@gmail.com writes:
Basically you have to write in a manner if a seedy stranger gave me
that code on a street corner, I would have no problem checking it
in. In practice, the shortcuts offering themselves through civil
behavior and mutual trust get a lot more
I have had patches and contributions rejected in the past, sometimes
rudely. Same has happened to many others, if you contribute long
enough, it is pretty much guaranteed that it will happen to you.
Maintainer is wrong, or you are wrong, or someone is just having a bad
day.
This is not
On Wed, May 14, 2014 at 10:56:18AM +0200, Per Cederqvist wrote:
On Wed, May 14, 2014 at 12:09 AM, Jeff Sipek jef...@josefsipek.net wrote:
On Tue, May 13, 2014 at 10:30:52PM +0200, Per Cederqvist wrote:
The 'echo %s' construct sometimes processes escape sequences. (This
%s? Should this
On Wed, May 14, 2014 at 11:27:19AM +0200, Per Cederqvist wrote:
On Tue, May 13, 2014 at 11:41 PM, Jeff Sipek jef...@josefsipek.net wrote:
On Tue, May 13, 2014 at 10:31:01PM +0200, Per Cederqvist wrote:
This makes it easier to script operations on the entire queue, for
example run the test
My point was more that it's very hard to produce high quality commits
without social interaction with others explaining what you missed,
stuffs you overlooked, etc.
You are overgeneralizing. You are assuming that it's easier for
everybody to interact with humans rather than the Tao of
Philippe Vaucher philippe.vauc...@gmail.com writes:
I'm sorry that my words aren't clear enough for you to infer the point
I'm trying to make. Let's try something simpler: what I was saying is
that bad behavior will get you into trouble when contributing (and
thus it's important to behave
Thanks.
I changed the commit message.
On Tue, May 13, 2014 at 3:44 PM, Jonathan Nieder jrnie...@gmail.com wrote:
Ronnie Sahlberg wrote:
Allow ref_transaction_free to be called with NULL and in extension allow
ref_transaction_rollback to be called for a NULL transaction.
In extension = as a
Thanks.
Comment added and whitespace fixed.
On Tue, May 13, 2014 at 4:10 PM, Jonathan Nieder jrnie...@gmail.com wrote:
Ronnie Sahlberg wrote:
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
Thanks.
I updated the commit message to highlight that this means the error
string can now be passed all the way back to the caller.
On Tue, May 13, 2014 at 5:04 PM, Jonathan Nieder jrnie...@gmail.com wrote:
Ronnie Sahlberg wrote:
Make ref_update_reject_duplicates return any error that occurs
The following changes since commit 6308767f0bb58116cb405e1f4f77f5dfc1589920:
Merge branch 'fc/prompt-zsh-read-from-file' (2014-05-13 11:53:14 -0700)
are available in the git repository at:
https://github.com/devzero2000/git-core.git ep/shell-command-substitution-v4
for you to fetch
From: Johannes Schindelin johannes.schinde...@gmx.de
Date: Mon, 8 Nov 2010 16:10:43 +0100
Incidentally, this makes grep -I respect the binary attribute (actually,
the -text attribute, but binary implies that).
Since the attributes are not thread-safe, we now need to switch off
threading if -I
From: Johannes Schindelin johannes.schinde...@gmx.de
Date: Tue, 8 Feb 2011 00:17:24 -0600
Signed-off-by: Johannes Schindelin johannes.schinde...@gmx.de
Signed-off-by: Stepan Kasal ka...@ucw.cz
---
Hi,
this patch has been in msysgit for 3 1/4 years.
Stepan
builtin/grep.c | 3 +++
1 file
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 current version of Guilt with no issues.
At a future time, maybe a year
I'm sorry that my words aren't clear enough for you to infer the point
I'm trying to make. Let's try something simpler: what I was saying is
that bad behavior will get you into trouble when contributing (and
thus it's important to behave nicely), where Felipe usualy says bad
behavior is
On Tue, May 13, 2014 at 4:37 PM, Felipe Contreras
felipe.contre...@gmail.com wrote:
Ronnie Sahlberg wrote:
Could you please calm down and adjust your behavior. This constant
hostility and rudeness makes the mailing list very unpleasant.
I explaind that to him multiple times. In the mail I
On Tue, May 13, 2014 at 10:30:44PM +0200, Per Cederqvist wrote:
Test that empty patches are handled correctly, both with and without
the guilt.diffstat configuration option.
Signed-off-by: Per Cederqvist ced...@opera.com
---
regression/t-020.out | 250
Elia Pinto gitter.spi...@gmail.com writes:
The following changes since commit 6308767f0bb58116cb405e1f4f77f5dfc1589920:
Merge branch 'fc/prompt-zsh-read-from-file' (2014-05-13 11:53:14 -0700)
are available in the git repository at:
https://github.com/devzero2000/git-core.git
Jeff King p...@peff.net writes:
On Sat, May 10, 2014 at 10:02:59AM -0400, Jeff King wrote:
On Fri, May 09, 2014 at 02:08:27PM -0700, Junio C Hamano wrote:
3. Just disable the http tests when run as root.
I think I'd favor 3. But I'd like to be sure that being root is the
Stepan Kasal ka...@ucw.cz writes:
From: Johannes Schindelin johannes.schinde...@gmx.de
Date: Mon, 8 Nov 2010 16:10:43 +0100
Incidentally, this makes grep -I respect the binary attribute (actually,
the -text attribute, but binary implies that).
Since the attributes are not thread-safe, we
Stepan Kasal ka...@ucw.cz writes:
From: Johannes Schindelin johannes.schinde...@gmx.de
Date: Tue, 8 Feb 2011 00:17:24 -0600
Signed-off-by: Johannes Schindelin johannes.schinde...@gmx.de
Signed-off-by: Stepan Kasal ka...@ucw.cz
---
Hi,
this patch has been in msysgit for 3 1/4 years.
Junio C Hamano gits...@pobox.com writes:
Stepan Kasal ka...@ucw.cz writes:
From: Johannes Schindelin johannes.schinde...@gmx.de
Date: Tue, 8 Feb 2011 00:17:24 -0600
Signed-off-by: Johannes Schindelin johannes.schinde...@gmx.de
Signed-off-by: Stepan Kasal ka...@ucw.cz
---
Hi,
this patch
Hi,
Junio C Hamano wrote:
Stepan Kasal ka...@ucw.cz writes:
--- a/builtin/grep.c
+++ b/builtin/grep.c
@@ -897,6 +897,9 @@ int cmd_grep(int argc, const char **argv, const char
*prefix)
if (len 4 is_dir_sep(pager[len - 5]))
pager += len - 4;
+
Hello,
On Wed, May 14, 2014 at 11:26:54AM -0700, Jonathan Nieder wrote:
But as is, it's an improvement, so (except that -i should be
replaced by -I) it seems like a good change.
indeed, -I would match the semantics of git-grep -i .
Stepan
--
To unsubscribe from this list: send the line
Jonathan Nieder jrnie...@gmail.com writes:
+ if (opt.ignore_case !strcmp(less, pager))
+ string_list_append(path_list, -i);
I have a feeling that this goes against the recent trend of not
mucking with the expectation of the users on their pagers, if I
recall
Perl has an internal encoding used to store text strings. Currently, trying to
view files with UTF-8 encoded names results in an error (either 404 - Cannot
find file [blob_plain] or XML Parsing Error [blob]). Converting these UTF-8
encoded file names into Perl's internal format resolves these
On Wed, May 14, 2014 at 11:26:54AM -0700, Jonathan Nieder wrote:
git grep has other options that affect interpretation of the pattern
which this patch does not help with:
* -v / --ignore-match: probably should disable this feature of -O.
* -E / --extended-regexp
* -P / --perl-regexp
*
Marius Storm-Olsen msto...@gmail.com writes:
On 5/13/2014 5:47 PM, Felipe Contreras wrote:
I was going to do more than pointing to commits, I was going to
provide the fixes with test cases and a detailed explanation. But
then you made your decision.
I believe the regression in question,
Jens Lehmann jens.lehm...@web.de writes:
Junio, I believe this issue needs to be fixed before 2.0 final. Otherwise
git gui will not work inside submodules anymore due to the major version
number change from 1 to 2. I'd like to hear Pat's opinion on this; even
though I think my patch is less
On Wed, May 14, 2014 at 10:11:11AM -0700, Junio C Hamano wrote:
A bit more disturbing is that I did not get the impression that we
know the exact reason why these http tests, especially the getwpuid
call, fail for Fabio when run as root. And if my impression is
correct, then do not run tests
Ronnie Sahlberg wrote:
On Tue, May 13, 2014 at 4:37 PM, Felipe Contreras
felipe.contre...@gmail.com wrote:
But if I have to adjust for saying that (which was true), what do you
say to Junio for saying this? (which was not)
I know I shouldn't but I will respond anyway.
The problem is
On Wed, May 14, 2014 at 05:44:19PM +0200, Stepan Kasal wrote:
From: Johannes Schindelin johannes.schinde...@gmx.de
Date: Mon, 8 Nov 2010 16:10:43 +0100
Incidentally, this makes grep -I respect the binary attribute (actually,
the -text attribute, but binary implies that).
Since the
On Wed, May 14, 2014 at 10:52:28AM -0700, Junio C Hamano wrote:
I do not think checking 'text' is the right way to do this. The
attribute controls the eof normalization, and people sometimes want
to keep CRLF terminated files in the repository no matter what the
platform is (an example I
Philippe Vaucher wrote:
I have had patches and contributions rejected in the past, sometimes
rudely. Same has happened to many others, if you contribute long
enough, it is pretty much guaranteed that it will happen to you.
Maintainer is wrong, or you are wrong, or someone is just having a
Junio C Hamano wrote:
So at this point, I would have to say that the users of remote-hg is
taken hostage by its author.
The users of remote-hg are being affected negatively *because* of your
decisions.
You have the power to help them by answering a simple question. Yet you
refuse to do that.
On Wed, May 14, 2014 at 3:35 PM, Felipe Contreras
felipe.contre...@gmail.com wrote:
You are not paying attention at all.
Junio may have been trying to be polite and not tell you directly that
attitude was a factor. Whatever. He is the maintainer. Of all the
folks in this list, he gets to call
Felipe Contreras felipe.contre...@gmail.com writes:
Junio C Hamano wrote:
So at this point, I would have to say that the users of remote-hg is
taken hostage by its author.
The users of remote-hg are being affected negatively *because* of your
decisions.
You have the power to help them by
On Wed, May 14, 2014 at 02:35:08PM -0500, Felipe Contreras wrote:
Prior to his decision there were no complaints about my manners since
I returned. It was his *TECHNICAL* decision that triggered this.
There have been several complaints about your behavior since you
returned[1,2,3,4], in
Philippe Vaucher wrote:
I'm sorry that my words aren't clear enough for you to infer the point
I'm trying to make. Let's try something simpler: what I was saying is
that bad behavior will get you into trouble when contributing (and
thus it's important to behave nicely), where Felipe usualy
On Wed, May 14, 2014 at 7:10 PM, Jeff Sipek jef...@josefsipek.net wrote:
On Tue, May 13, 2014 at 10:30:44PM +0200, Per Cederqvist wrote:
Test that empty patches are handled correctly, both with and without
the guilt.diffstat configuration option.
Signed-off-by: Per Cederqvist ced...@opera.com
Felipe Contreras felipe.contre...@gmail.com writes:
Philippe Vaucher wrote:
[...]
Do you feel Felipe is in control of what you label bad behavior? Do you
feel you are in control over how you react to his behavior?
I feel that Felipe cannot control this (or decided not to),
I am
Felipe Contreras felipe.contre...@gmail.com writes:
Philippe Vaucher wrote:
I have had patches and contributions rejected in the past, sometimes
rudely. Same has happened to many others, if you contribute long
enough, it is pretty much guaranteed that it will happen to you.
Maintainer is
Junio C Hamano wrote:
Felipe Contreras felipe.contre...@gmail.com writes:
Junio C Hamano wrote:
So at this point, I would have to say that the users of remote-hg is
taken hostage by its author.
The users of remote-hg are being affected negatively *because* of your
decisions.
You
Jeff King p...@peff.net writes:
On Wed, May 14, 2014 at 05:44:19PM +0200, Stepan Kasal wrote:
From: Johannes Schindelin johannes.schinde...@gmx.de
Date: Mon, 8 Nov 2010 16:10:43 +0100
Incidentally, this makes grep -I respect the binary attribute (actually,
the -text attribute, but binary
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_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
---
Change the update_ref helper function to use a ref transaction internally.
Signed-off-by: Ronnie Sahlberg sahlb...@google.com
---
refs.c | 25 +
1 file changed, 21 insertions(+), 4 deletions(-)
diff --git a/refs.c b/refs.c
index 64e3d53..55aa5a9 100644
--- a/refs.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
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
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 |
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 6556417..a376dd6
Move the check for check_refname_format from lock_any_ref_for_update
to lock_ref_sha1_basic. At some later stage we will get rid of
lock_any_ref_for_update completely.
This leaves lock_any_ref_for_updates as a no-op wrapper which could be removed.
But this wrapper is also called from an external
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
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
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
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
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 8e12386..aed700b 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
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
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 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 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
---
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 | 37 +
1
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
+++
Since we only call update_ref_write from a single place and we only call it
with onerr==QUIET_ON_ERR we can just as well get rid of it and just call
write_ref_sha1 directly.
Signed-off-by: Ronnie Sahlberg sahlb...@google.com
---
refs.c | 35 +--
1 file changed, 9
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 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
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
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 0e88197..b7fa79b 100644
--- a/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
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
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 4673cf4..0e88197 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
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
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.
Signed-off-by: Ronnie Sahlberg sahlb...@google.com
---
builtin/update-ref.c | 3 +--
refs.c | 22
On Wed, May 14, 2014 at 1:14 PM, Matthieu Moy
matthieu@grenoble-inp.fr wrote:
Elia Pinto gitter.spi...@gmail.com writes:
The following changes since commit 6308767f0bb58116cb405e1f4f77f5dfc1589920:
Merge branch 'fc/prompt-zsh-read-from-file' (2014-05-13 11:53:14 -0700)
are available in
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
+++
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
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
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.
Signed-off-by: Ronnie Sahlberg sahlb...@google.com
---
refs.c | 9 ++---
1 file
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
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..11dc2e1 100644
---
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(-)
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
Allow ref_transaction_free to be called with NULL and as a result allow
ref_transaction_rollback to be called for a NULL transaction.
This allows us to write code that will
if ( (!transaction ||
ref_transaction_update(...)) ||
(ref_transaction_commit(...) !(transaction = NULL))
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
1 - 100 of 166 matches
Mail list logo