On Tue, Jun 17, 2014 at 8:09 PM, Michael S. Tsirkin wrote:
>
> OK, after looking into this for a while, I realize
> this is a special property of the Signed-off-by footer.
> For now I think it's reasonable to just avoid de-duplicating
> other footers if any. Agree?
Not really. I'd rather see "git
Optimize check_refname_component using SSE2 on x86_64.
git rev-parse HEAD is a good test-case for this, since it does almost
nothing except parse refs. For one particular repo with about 60k
refs, almost all packed, the timings are:
Look up table: 29 ms
SSE2: 23 ms
This cuts about 20%
I'm using different signature tags for git am depending on the patch,
project and other factors.
Sometimes I add multiple tags as well, e.g. QEMU
wants both Reviewed-by and Signed-off-by tags.
This patch makes it easy to do so:
1. new parameter am.signoff can be used any number
of times:
jpyeron@black /projects/microsoft-smartcard-sign/tmp
$ git --version
git version 1.7.9
jpyeron@black /projects/microsoft-smartcard-sign/tmp
$ GIT_TRACE=1 git commit -S -m 'bin'
trace: built-in: git 'commit' '-S' '-m' 'bin'
trace: run_command: '/projects/microsoft-smartcard-sign/tmp/bin/logginggpg.s
On Mon, Jun 16, 2014 at 11:06:20AM -0700, Junio C Hamano wrote:
> "Michael S. Tsirkin" writes:
>
> > Now A wants to sign this patch.
> >
> > I think there are two reasonable ways to behave:
> > 1. What you describe above:
> > A
> > B
> > A
>
> That is the only sensible thing to do for Signed-off
Hello Karsten,
On Tue, Jun 17, 2014 at 11:06:52AM +0200, Karsten Blees wrote:
> Am 11.06.2014 11:37, schrieb Stepan Kasal:
> > This is the second part of the time-proven unicode suport branch from
> > msysgit.
> > This batch is a collection of small independent changes, limited to mingw.c.
> > Th
Torsten Bögershausen wrote:
> Unicode Version 7.0 was released yesterday.
> Run ./update_unicode.sh to update the zero_width table.
> Note: the double_width is unchanged.
>
> Signed-off-by: Torsten Bögershausen
> ---
> unicode_width.h | 49 ++---
> 1 f
Heiko Voigt writes:
> If this is such a controversial change for you I will drop this patch in
> the next round. I think it would make the callsite more readable without
> adding much clutter but I am fine with it either way.
OK, let's do that.
--
To unsubscribe from this list: send the line "un
From: Yi EungJun
extract_content_type() could not extract a charset parameter if the
parameter is not the first one and there is a whitespace and a following
semicolon just before the parameter. For example:
text/plain; format=fixed ;charset=utf-8
And it also could not handle correctly some
Tanay Abhra writes:
> On 06/16/2014 03:59 PM, Junio C Hamano wrote:
>> Tanay Abhra writes:
>>
>>> When a compound construct like a string_list within another
>>> struct is used, the default initializer macros are useless.
>>> For such cases add helper functions for string_list
>>> initializatio
From: "Junio C Hamano"
"Philip Oakley" writes:
---once
the reader
understands that Git reads all configuration varilables of the
same name and the code paths that *use* one of them pick the one
defined the last,
It's thi
On Wed, Jun 18, 2014 at 12:29:59AM +0900, Yi, EungJun wrote:
> From: Yi EungJun
>
> extract_content_type() could not extract a charset parameter if the
> parameter is not the first one and there is a whitespace and a following
> semicolon just before the parameter. For example:
>
> text/pla
On Tue, Jun 17, 2014 at 02:37:45PM -0700, Junio C Hamano wrote:
> Jeff King writes:
>
> > On Tue, Jun 17, 2014 at 02:39:00PM -0500, Caleb Thompson wrote:
> >
> >> diff --git a/t/t7507-commit-verbose.sh b/t/t7507-commit-verbose.sh
> >> index 35a4d06..471bd8f 100755
> >> --- a/t/t7507-commit-verbo
Jeff King writes:
> On Tue, Jun 17, 2014 at 02:39:00PM -0500, Caleb Thompson wrote:
>
>> diff --git a/t/t7507-commit-verbose.sh b/t/t7507-commit-verbose.sh
>> index 35a4d06..471bd8f 100755
>> --- a/t/t7507-commit-verbose.sh
>> +++ b/t/t7507-commit-verbose.sh
>> @@ -7,6 +7,10 @@ write_script check
Junio C Hamano writes:
> Caleb Thompson writes:
>
>> Some of the tests in t/t7507-commit-verbose.sh were still using
>> git-config to set configuration. Change them to use the test_config
>> helper.
>
> "were still using" is only a half of the story, and we need to be
> more careful than that, t
Caleb Thompson writes:
> Some of the tests in t/t7507-commit-verbose.sh were still using
> git-config to set configuration. Change them to use the test_config
> helper.
"were still using" is only a half of the story, and we need to be
more careful than that, though.
> Signed-off-by: Caleb Thomp
Jens Lehmann writes:
> Oh, I forgot to add a smiley there, I haven't been serious about
> that statement. I don't care too deeply about it but feel a bit
> more confident with the two explicit tests. Do you want me to
> change them to a single "test -e"?
I have no strong preference.
--
To unsubs
On Tue, Jun 17, 2014 at 11:51:35AM -0700, Tanay Abhra wrote:
> I have read your other two replies related to it. I suggest the following
> approach
> for git_config_get_string(), it will return,
>
> 1. Return null if no value was found for the entered key.
>
> 2. Empty string (""), returned for
On Tue, Jun 17, 2014 at 02:39:00PM -0500, Caleb Thompson wrote:
> diff --git a/t/t7507-commit-verbose.sh b/t/t7507-commit-verbose.sh
> index 35a4d06..471bd8f 100755
> --- a/t/t7507-commit-verbose.sh
> +++ b/t/t7507-commit-verbose.sh
> @@ -7,6 +7,10 @@ write_script check-for-diff <<-'EOF'
> e
Robert Dailey writes:
> Is there a config option or some way for `git tag -a` to be the
> default? I could create an alias but would make more sense to have a
> config:
>
> git config --global tag.alwaysannotate true
If you really wanted to, you could do the following (and you must to
do all of
Am 17.06.2014 20:44, schrieb Junio C Hamano:
> Jens Lehmann writes:
>
>> Am 17.06.2014 00:49, schrieb Junio C Hamano:
>>> Jens Lehmann writes:
+ GIT_WORK_TREE=. git config --unset core.worktree
>>>
>>> Hmph. What does GIT_WORK_TREE=. alone without GIT_DIR=
>>> do? It's not like i
--
Good day,
Permit my mode of initial contact with you. My initial letter to you
returned undelivered.
I am an investment relationship manager with Standard Chartered Bank,
Hong Kong and
It is essential we confirm you are still at this email address before
we divulge details
of the discreet pro
Is there a config option or some way for `git tag -a` to be the
default? I could create an alias but would make more sense to have a
config:
git config --global tag.alwaysannotate true
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kern
Agnes,
I'd like to re-emphasise Jason's excellent comments, below:
From: "Jason Pyeron"
From: agi
Sent: Tuesday, June 17, 2014 10:58
Hi Jason,
Thanks for the speedy reply. We are in the process of trying
to make our
software product ISO13485 compatible and we are assessing all systems
that w
Unicode Version 7.0 was released yesterday.
Run ./update_unicode.sh to update the zero_width table.
Note: the double_width is unchanged.
Signed-off-by: Torsten Bögershausen
---
unicode_width.h | 49 ++---
1 file changed, 42 insertions(+), 7 deletions(-
Add a new configuration variable commit.verbose to implicitly pass
--verbose to git-commit. Ensure that --no-verbose to git-commit
negates that setting.
Signed-off-by: Caleb Thompson
---
Documentation/config.txt | 5 +
Documentation/git-commit.txt | 8 +++-
buil
This patch allows people to set commit.verbose to implicitly send
--verbose to git-commit.
It introduces several cleanup patches to t/t7505-commit-verbose.sh to
bring it closer to the current state of the tests as they have been
explained to me, then adds the verbose config and --no-verbose flag.
Use write_script from t/test-lib-functions.sh instead of cat, shebang,
and chmod. This aids in readability for creating the script by using the
named function and allows us to turn off interpolation in the heredoc of
the script body to avoid extra escaping, since $SHELL_PATH is handled
for us.
Sig
t/t7507-commit-verbose.sh was using a global test_set_editor call to
build its environment. The $EDITOR being used was not necessary for
all tests, and was in fact circumvented using subshells in some
cases.
To improve robustness against global state changes and avoid the use of
subshells to tempo
Some of the tests in t/t7507-commit-verbose.sh were still using
git-config to set configuration. Change them to use the test_config
helper.
Signed-off-by: Caleb Thompson
Reviewed-by: Jeremiah Mahler
---
t/t7507-commit-verbose.sh | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --
Junio,
On Tue, Jun 17, 2014 at 10:55:18AM -0700, Junio C Hamano wrote:
> Jeremiah Mahler writes:
>
> > Add a strnncmp() function which behaves like strncmp() except it takes
> > the length of both strings instead of just one. It behaves the same as
> > strncmp() up to the minimum common length
Jonathan,
On Tue, Jun 17, 2014 at 10:48:17AM -0700, Jonathan Nieder wrote:
> >> On 2014-06-17 09.34, Jeremiah Mahler wrote:
>
> >>> Also, strnncmp() was switched from using memcmp() to strncmp()
> >>> internally to make it clear that this is meant for strings, not
> >>> general buffers.
>
> Why
On 06/16/2014 03:59 PM, Junio C Hamano wrote:
> Tanay Abhra writes:
>
>> When a compound construct like a string_list within another
>> struct is used, the default initializer macros are useless.
>> For such cases add helper functions for string_list
>> initialization for both DUP and NODUP modes
On Tue, Jun 17, 2014 at 10:30:35AM +0200, Karsten Blees wrote:
> Am 12.06.2014 21:12, schrieb Junio C Hamano:
> > Karsten Blees writes:
> >
> >> Am 10.06.2014 12:17, schrieb Heiko Voigt:
> >>> The intention of Jonathans critique here[1] was that you do not see what
> >>> this parameter does on th
On Mon, Jun 16, 2014 at 10:58:25AM -0700, Junio C Hamano wrote:
> Heiko Voigt writes:
>
> > On Thu, Jun 12, 2014 at 02:59:23PM -0700, Junio C Hamano wrote:
> >> Heiko Voigt writes:
> >>
> >> > t/t7410-submodule-config.sh | 141
> >>
> >> We already use 7410 for so
On 06/16/2014 10:43 PM, Jeff King wrote:
>
>> +v = git_config_get_string(alias_key);
>> +if (!v)
>> +config_error_nonbool(alias_key);
>
> What does a NULL output from git_config_get_string mean? I think with
> the current code, it means "no such key was found". In which case
Jens Lehmann writes:
> Am 17.06.2014 00:49, schrieb Junio C Hamano:
>> Jens Lehmann writes:
>>> + git checkout -b "add_sub1" &&
>>> + git submodule add ./. sub1 &&
>>
>> This is not technically wrong per-se, but having the project's
>> history itself as its own submodule *is
On Tue, 2014-06-17 at 11:03 -0700, Junio C Hamano wrote:
> David Turner writes:
>
> > Optimize check_refname_component using SSE2 on x86_64.
> >
> > git rev-parse HEAD is a good test-case for this, since it does almost
> > nothing except parse refs. For one particular repo with about 60k
> > ref
David Turner writes:
> Optimize check_refname_component using SSE2 on x86_64.
>
> git rev-parse HEAD is a good test-case for this, since it does almost
> nothing except parse refs. For one particular repo with about 60k
> refs, almost all packed, the timings are:
>
> Look up table: 29 ms
> SSE2:
Jeremiah Mahler writes:
> Add a strnncmp() function which behaves like strncmp() except it takes
> the length of both strings instead of just one. It behaves the same as
> strncmp() up to the minimum common length between the strings. When the
> strings are identical up to this minimum common l
>> On 2014-06-17 09.34, Jeremiah Mahler wrote:
>>> Also, strnncmp() was switched from using memcmp() to strncmp()
>>> internally to make it clear that this is meant for strings, not
>>> general buffers.
Why shouldn't I want to use this helper on arbitrary data? One of the
advantages of other hel
Am 16.06.2014 11:57, schrieb Eric Sunshine:
> On Sun, Jun 15, 2014 at 1:02 PM, Jens Lehmann wrote:
>> Test that the rebase command updates the work tree as expected for
>> changes which don't result in conflicts. To make that work add two
>> helper functions that add a commit only touching files a
David Turner writes:
> git-compat-util.h | 11 +++
> refs.c | 223
> -
> t/t5511-refspec.sh | 20 +
> 3 files changed, 236 insertions(+), 18 deletions(-)
Hmph, on what branch are you basing your patch? As a follow-up to
yo
Am 17.06.2014 00:49, schrieb Junio C Hamano:
> Jens Lehmann writes:
>
>> Add this test library to simplify covering all combinations of submodule
>> update scenarios without having to add those to a test of each work tree
>> manipulating command over and over again.
>>
>> The functions test_submo
Ronnie Sahlberg writes:
> Thanks.
>
> I have rebased it on current master and re-sent it as v18
>
> I passes all tests, except t0008 which is unrelated to this series.
I think You need to either have 97c1364b (t0008: do not depend on
'echo' handling backslashes specially, 2014-06-13), or avoid u
Optimize check_refname_component using SSE2 on x86_64.
git rev-parse HEAD is a good test-case for this, since it does almost
nothing except parse refs. For one particular repo with about 60k
refs, almost all packed, the timings are:
Look up table: 29 ms
SSE2: 23 ms
This cuts about 20%
This version changes only the commit message; there is no longer any
configure.ac code.
--
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
Karsten Blees writes:
> Simple use case (measure one code section):
>
> uint64_t start = getnanotime();
> /* code section to measure */
> trace_performance_since(start, "foobar");
>
> Medium use case (measure consecutive code sections):
>
> uint64_t start = getnanotime();
> /* first cod
Am 17.06.2014 00:05, schrieb Junio C Hamano:
> Jens Lehmann writes:
>
>> For the upcoming submodule test framework we often need to assert that an
>> empty directory exists in the work tree. Add the test_dir_is_empty()
>> function which asserts that the given argument is an empty directory.
>>
>>
Karsten Blees writes:
> Am 11.06.2014 10:01, schrieb Karsten Blees:
>> the epoch allows using the results (div 10e9) with other time-related APIs.
>
> s/10e9/1e9/
That replacement is fine but the "(div 1e9)" still wants to be
clarified. What did you exactly mean by that? If the result is
divid
No external callers reference lock_ref_sha1 any more so lets declare it static.
Reviewed-by: Jonathan Nieder
Signed-off-by: Ronnie Sahlberg
---
refs.c | 2 +-
refs.h | 6 --
2 files changed, 1 insertion(+), 7 deletions(-)
diff --git a/refs.c b/refs.c
index af211b6..56a52e0 100644
--- a/ref
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.
Reviewed-by: Jonathan Nieder
Sig
Change create_branch to use a ref transaction when creating the new branch.
This also fixes a race condition in the old code where two concurrent
create_branch could race since the lock_any_ref_for_update/write_ref_sha1
did not protect against the ref already existing. I.e. one thread could end up
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.
Reviewed-by: Jonathan Nieder
Signed-off-by: Ronnie Sahlberg
---
refs.c | 30 ++
1 file changed, 6 in
Change the update_ref helper function to use a ref transaction internally.
Reviewed-by: Jonathan Nieder
Signed-off-by: Ronnie Sahlberg
---
refs.c | 25 +
1 file changed, 21 insertions(+), 4 deletions(-)
diff --git a/refs.c b/refs.c
index be29f66..af211b6 100644
--- a/re
This patch series can also be found at
https://github.com/rsahlberg/git/tree/ref-transactions
This patch series is based on current master 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
Call ref_transaction_commit with QUIET_ON_ERR and use the strbuf that is
returned to print a log message if/after the transaction fails.
Reviewed-by: Jonathan Nieder
Signed-off-by: Ronnie Sahlberg
---
builtin/update-ref.c | 10 +-
1 file changed, 5 insertions(+), 5 deletions(-)
diff --
Making errno when returning from remove_empty_directories() more
obviously meaningful, which should provide some peace of mind for
people auditing lock_ref_sha1_basic.
Signed-off-by: Ronnie Sahlberg
---
refs.c | 5 -
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/refs.c b/refs.
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. Add an err argument that
will be updated
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 ref
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 this function.
Signed-off-by: Ronnie Sahlberg
---
builtin/remote
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 f
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
Signed-off-by: Ronnie Sahlberg
---
refs.c | 9 ++---
1 f
Making errno when returning from resolve_ref_unsafe() meaningful,
which should fix
* a bug in lock_ref_sha1_basic, where it assumes EISDIR
means it failed due to a directory being in the way
Signed-off-by: Ronnie Sahlberg
---
cache.h | 2 +-
refs.c | 19 +++
2 files change
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
Signed-off-by: Ronnie Sahlberg
---
Making errno when returning from log_ref_setup() meaningful,
Signed-off-by: Ronnie Sahlberg
---
refs.c | 27 +++
refs.h | 4 +++-
2 files changed, 22 insertions(+), 9 deletions(-)
diff --git a/refs.c b/refs.c
index 67a0217..9ea519c 100644
--- a/refs.c
+++ b/refs.c
@@ -2
Introducing a new unable_to_lock_message helper, which has nicer
semantics than unable_to_lock_error and cleans up lockfile.c a little.
Signed-off-by: Ronnie Sahlberg
---
cache.h| 2 ++
lockfile.c | 22 --
2 files changed, 14 insertions(+), 10 deletions(-)
diff --git a/
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
Signed-off-by: Ronnie Sahlberg
---
builtin/update-ref.c | 3 +--
refs.c | 22 +++--
Making errno when returning from commit_packed_refs() meaningful,
which should fix
* a bug in "git clone" where it prints strerror(errno) based on
errno, despite errno possibly being zero and potentially having
been clobbered by that point
* the same kind of bug in "git pack-refs"
and pre
Change to use ref transactions for all updates to refs.
Reviewed-by: Jonathan Nieder
Signed-off-by: Ronnie Sahlberg
---
sequencer.c | 24
1 file changed, 16 insertions(+), 8 deletions(-)
diff --git a/sequencer.c b/sequencer.c
index 0a80c58..fd8acaf 100644
--- a/sequenc
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. Add an err argument that will be updated on
Add an err argument to delete_loose_ref so that we can pass a descriptive
error string back to the caller. Pass the err argument from transaction
commit to this function so that transaction users will have a nice error
string if the transaction failed due to delete_loose_ref.
Add a new function un
Making errno from write_ref_sha1() meaningful, which should fix
* a bug in "git checkout -b" where it prints strerror(errno)
despite errno possibly being zero or clobbered
* a bug in "git fetch"'s s_update_ref, which trusts the result of an
errno == ENOTDIR check to detect D/F conflicts
Sign
Update replace.c to use ref transactions for updates.
Reviewed-by: Jonathan Nieder
Signed-off-by: Ronnie Sahlberg
---
builtin/replace.c | 17 ++---
1 file changed, 10 insertions(+), 7 deletions(-)
diff --git a/builtin/replace.c b/builtin/replace.c
index 1bb491d..054f5ef 100644
---
Thanks.
I have rebased it on current master and re-sent it as v18
I passes all tests, except t0008 which is unrelated to this series.
regards
ronnie sahlberg
On Tue, Jun 17, 2014 at 7:34 AM, Ronnie Sahlberg wrote:
> Let me redo it so it applies to current master.
>
> On Mon, Jun 16, 2014 at 5
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.
Reviewed-by: Jonathan Nieder
Signed-off-by: Ronnie Sahlberg
---
builtin/commit.c | 24 +++-
1 file changed, 11 insertions(+), 13 dele
Change s_update_ref to use a ref transaction for the ref update.
Signed-off-by: Ronnie Sahlberg
---
builtin/fetch.c | 33 +++--
1 file changed, 23 insertions(+), 10 deletions(-)
diff --git a/builtin/fetch.c b/builtin/fetch.c
index faa1233..52f1ebc 100644
--- a/builti
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.
Reviewed-by: Jonathan
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
---
refs.c | 40 +++-
1 file changed, 39 in
Wrap all the ref updates inside a transaction.
Signed-off-by: Ronnie Sahlberg
---
builtin/receive-pack.c | 96 +-
1 file changed, 63 insertions(+), 33 deletions(-)
diff --git a/builtin/receive-pack.c b/builtin/receive-pack.c
index c323081..b51f8ae
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.
Change delete_ref to return 0 on success and 1 on failure instead of the
previous 0 on success either 1 or -1 on failure.
Review
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. This changes the return status for _commit from
1 to -1 on failures when writing to the ref. Eventually we will want
_commit
Change update_branch() to use ref transactions for updates.
Reviewed-by: Jonathan Nieder
Signed-off-by: Ronnie Sahlberg
---
fast-import.c | 26 +++---
1 file changed, 15 insertions(+), 11 deletions(-)
diff --git a/fast-import.c b/fast-import.c
index 6707a66..cd929dc 100644
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. Add an err argument that
will be updated
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.
Note that this function
Reviewed-by: Jonathan Nieder
Signed-off-by: Ronnie Sahlberg
---
fast-import.c | 29 +++--
1 file changed, 23 insertions(+), 6 deletions(-)
diff --git a/fast-import.c b/fast-import.c
index cd929dc..191fc47 100644
--- a/fast-import.c
+++ b/fast-import.c
@@ -1734,15 +1734,3
Add an err argument to _begin so that on non-fatal failures in future ref
backends we can report a nice error back to the caller.
While _begin can currently never fail for other reasons than OOM, in which
case we die() anyway, we may add other types of backends in the future.
For example, a hypothe
Skip using the lock_any_ref_for_update wrapper and call lock_ref_sha1_basic
directly from the commit function.
Reviewed-by: Jonathan Nieder
Signed-off-by: Ronnie Sahlberg
---
refs.c | 12 ++--
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/refs.c b/refs.c
index 31d41fb..6
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.
Reviewed-by: Jonathan Nieder
Signed-off-by: Ronnie Sahlberg
---
branch
In _commit, ENOTDIR can happen in the call to lock_ref_sha1_basic, either when
we lstat the new refname and it returns ENOTDIR or if the name checking
function reports that the same type of conflict happened. In both cases it
means that we can not create the new ref due to a name conflict.
For the
No external users call write_ref_sha1 any more so lets declare it static.
Signed-off-by: Ronnie Sahlberg
---
refs.c | 10 --
refs.h | 3 ---
2 files changed, 8 insertions(+), 5 deletions(-)
diff --git a/refs.c b/refs.c
index 362ff1b..dfbf003 100644
--- a/refs.c
+++ b/refs.c
@@ -2666,6
Making errno when returning from lock_file() meaningful, which should
fix
* an existing almost-bug in lock_ref_sha1_basic where it assumes
errno==ENOENT is meaningful and could waste some work on retries
* an existing bug in repack_without_refs where it prints
strerror(errno) and picks ad
Making errno when returning from verify_lock() meaningful, which
should almost but not completely fix
* a bug in "git fetch"'s s_update_ref, which trusts the result of an
errno == ENOTDIR check to detect D/F conflicts
ENOTDIR makes sense as a sign that a file was in the way of a
directory we
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 w
Change tag.c to use ref transactions for all ref updates.
Reviewed-by: Jonathan Nieder
Signed-off-by: Ronnie Sahlberg
---
builtin/tag.c | 15 +--
1 file changed, 9 insertions(+), 6 deletions(-)
diff --git a/builtin/tag.c b/builtin/tag.c
index c6e8a71..c9bfc9a 100644
--- a/builtin/t
Reviewed-by: Jonathan Nieder
Signed-off-by: Ronnie Sahlberg
---
builtin/update-ref.c | 1 +
refs.c | 1 -
refs.h | 5 ++---
3 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/builtin/update-ref.c b/builtin/update-ref.c
index 405267f..1fd7a89 100644
--- a/b
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.
Reviewed-by: Jonathan Nieder
Signed-off-by: Ronnie Sahlberg
---
refs.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/refs.c
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.
If lock_ref_sha1_basic fails the check_refname_format test, set errno to
EINVAL before returning NULL. This to guarantee that we w
Allow ref_transaction_free(NULL) as a no-op. This makes ref_transaction_free
easier to use and more similar to plain 'free'.
In particular, it lets us rollback unconditionally as part of cleanup code
after setting 'transaction = NULL' if a transaction has been committed or
rolled back already.
Re
We do not yet need both a rollback and a free function for transactions.
Remove ref_transaction_rollback and use ref_transaction_free instead.
At a later stage we may reintroduce a rollback function if we want to start
adding reusable transactions and similar.
Reviewed-by: Jonathan Nieder
Signed
1 - 100 of 124 matches
Mail list logo