On 08/04/2016 08:46 PM, Junio C Hamano wrote:
> Michael Haggerty writes:
>
>> This makes it easier to detect whether shifting is possible, and will
>> also make the next change easier.
>
> I can see the code keeping track of earliest_end but the above does
> not
On 08/04/2016 02:04 AM, Stefan Beller wrote:
> On Wed, Aug 3, 2016 at 4:30 PM, Michael Haggerty wrote:
>> Stefan Beller wrote:
>>> [...]
>>> Rather the 10 describes the ratio of "advanced magic" to pure indentation
>>> based scoring in my underst
On 08/04/2016 09:39 PM, Junio C Hamano wrote:
> Michael Haggerty writes:
>
>>>> + }
>>>> + /*
>>>> +* We have reached the end of the line without finding any
>>>> non-space
>>>> +* characters
On 08/04/2016 01:50 AM, Stefan Beller wrote:
> On Wed, Aug 3, 2016 at 4:14 PM, Michael Haggerty wrote:
>> On 08/04/2016 12:11 AM, Stefan Beller wrote:
>>> On Wed, Aug 3, 2016 at 3:00 PM, Michael Ha
On 08/10/2016 06:58 PM, Michael Haggerty wrote:
> On 08/04/2016 09:27 AM, Jeff King wrote:
>> On Thu, Aug 04, 2016 at 12:00:33AM +0200, Michael Haggerty wrote:
>>
>>> The code branch used for the compaction heuristic incorrectly forgot to
>>> keep io in sync whi
On 08/09/2016 06:22 AM, Duy Nguyen wrote:
> On Tue, Aug 9, 2016 at 12:20 AM, Michael Haggerty
> wrote:
>> On 08/04/2016 05:58 PM, Johannes Schindelin wrote:
>>> [...]
>>> Even requiring every contributor to register with GitHub would be too much
>
On 08/09/2016 12:36 AM, Junio C Hamano wrote:
> Michael Haggerty writes:
>
>> Is it *really* so insane to consider moving collaboration on the Git
>> project to GitHub or some other similar platform?
>
> I only know how "pull requests" and "issue
On 08/04/2016 05:58 PM, Johannes Schindelin wrote:
> [...]
> Even requiring every contributor to register with GitHub would be too much
> of a limitation, I would wager.
> [...]
Is it *really* so insane to consider moving collaboration on the Git
project to GitHub or some other similar platform?
On 08/04/2016 12:51 AM, Stefan Beller wrote:
> On Wed, Aug 3, 2016 at 3:41 PM, Michael Haggerty wrote:
>> On 08/04/2016 12:30 AM, Stefan Beller wrote:
>>> On Wed, Aug 3, 2016 at 3:00 PM, Michael Haggerty
>>> wrote:
>>>
>>>> +return 10
On 08/04/2016 12:11 AM, Stefan Beller wrote:
> On Wed, Aug 3, 2016 at 3:00 PM, Michael Haggerty wrote:
>> Write things out a bit longer but less cryptically. Add more comments.
>
> By less cryptic you mean in Git coding style ;)
> The original author (do we want to cc Dav
On 08/04/2016 12:30 AM, Stefan Beller wrote:
> On Wed, Aug 3, 2016 at 3:00 PM, Michael Haggerty wrote:
>
>> +return 10 * score - bonus;
>
> Would it make sense to define-ify the 10 as well
> as this is the only hardcoded number in the
> scoring function?
On 08/04/2016 12:29 AM, Jacob Keller wrote:
> On Wed, Aug 3, 2016 at 3:00 PM, Michael Haggerty wrote:
>> +/*
>> + * If a line is indented more than this, get_indent() just returns this
>> value.
>> + * This avoids having to do absurd amounts of work for data that ar
Rename i to end, and alternate between using start and end as the
indexing variable as appropriate.
Rename ixref to end_matching_other.
Add some more comments.
Signed-off-by: Michael Haggerty
---
xdiff/xdiffi.c | 70 --
1 file changed
optimization and analysis and the
human-generated data values are recorded in a separate project [1]. If
other people add more test data (especially in other programming
languages and/or other text formats) and come up with weighting factors
that work better over a wider breadth of samples, it wi
ing either
`--indent-heuristic` or `git config diff.indentheuristic true`.
Michael Haggerty (8):
xdl_change_compact(): rename some local variables for clarity
xdl_change_compact(): clarify code
xdl_change_compact(): rename i to end
xdl_change_compact(): do one final shift or the other, not
* ix -> i
* ixo -> io
* ixs -> start
* grpsiz -> groupsize
Signed-off-by: Michael Haggerty
---
Thankfully, we don't have to limit indentifers to six characters, so
start naming things more understandably.
xdiff/xdiffi.c | 66 +
On 08/04/2016 12:00 AM, Michael Haggerty wrote:
> I've talked about this quite a bit on the list already. The idea is to
> improve ugly diffs
I forgot to note that this patch series is also available from my GitHub
account [1] as branch "diff-indent-heuristics".
Also, I
have ignored the compaction heuristic in that case, whereas
the new code always gives precedence to the compaction heuristic when it
is turned on.
Signed-off-by: Michael Haggerty
---
xdiff/xdiffi.c | 44 ++--
1 file changed, 22 insertions(+), 22 deletions(-)
Write things out a bit longer but less cryptically. Add more comments.
Signed-off-by: Michael Haggerty
---
I find the loops in the old code, with unfamiliar patterns of embedded
increment/decrement operators, confusing, and I think that writing
things out a little bit more verbosely (and with
This makes it easier to detect whether shifting is possible, and will
also make the next change easier.
Signed-off-by: Michael Haggerty
---
xdiff/xdiffi.c | 8 +++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/xdiff/xdiffi.c b/xdiff/xdiffi.c
index 66129db..34f021a 100644
The code branch used for the compaction heuristic incorrectly forgot to
keep io in sync while the group was shifted. I think that could have
led to reading past the end of the rchgo array.
Signed-off-by: Michael Haggerty
---
I didn't actually try to verify the presence of a bug, because it
There is no reason for it to take an array and index as argument, as it
only accesses a single element of the array.
Signed-off-by: Michael Haggerty
---
xdiff/xdiffi.c | 8
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/xdiff/xdiffi.c b/xdiff/xdiffi.c
index 34f021a
On 07/27/2016 08:03 PM, Duy Nguyen wrote:
> On Wed, Jul 27, 2016 at 7:50 PM, Stefan Beller wrote:
>> On Wed, Jul 27, 2016 at 10:42 AM, Duy Nguyen wrote:
>>> Before I start doing anything silly because I don't know it can
>>> already be done without waving my C wand like a mad man...
>>>
>>> I oft
On 07/10/2016 05:09 PM, Duy Nguyen wrote:
> On Fri, Jun 3, 2016 at 11:03 PM, Michael Haggerty
> wrote:
>> Since the that ref-iterator [1] changes seem to have gotten a positive
>> reception, let's try to keep up the momentum. I hope I'm not
>> overloading the re
On 06/30/2016 03:54 PM, Michael Haggerty wrote:
> On 06/23/2016 07:10 PM, Michael Haggerty wrote:
>> On 06/17/2016 06:09 PM, Stefan Beller wrote:
>>> I think before spending more time on discussing and implementing new
>>> (hopefully better) heuristics, I'd want
On 06/23/2016 07:10 PM, Michael Haggerty wrote:
> On 06/17/2016 06:09 PM, Stefan Beller wrote:
>> I think before spending more time on discussing and implementing new
>> (hopefully better) heuristics, I'd want to step back and try to be a bit more
>> systematic, i.e. I&
On 06/27/2016 09:26 AM, larsxschnei...@gmail.com wrote:
> Git-P4 used to place temporary refs under "git-p4-tmp". Since 3da1f37
> Git checks that all refs are placed under "ref". Instruct Git-P4 to
> place temporary refs under "ref/git-p4-tmp". There are no backwards
> compatibility considerations
On 06/23/2016 09:32 AM, Michael Haggerty wrote:
> [...]
> I have to say, I'm still confused about how the old code could have
> worked at all. For quite some time, Git hasn't allowed references with
> weird names like `git-p4-tmp/6` to be created, so how could there be any
&
On 06/23/2016 07:37 PM, Junio C Hamano wrote:
> Michael Haggerty writes:
>
>> Scoring heuristic:
>>
>>> # A place to accumulate bonus factors (positive makes this
>>> # index more favored):
>>> bonus = 0
>>>
>>> # Bon
On 06/17/2016 06:09 PM, Stefan Beller wrote:
> I think before spending more time on discussing and implementing new
> (hopefully better) heuristics, I'd want to step back and try to be a bit more
> systematic, i.e. I'll want to collect lots of test cases in different
> languages
> and use cases. A
On 06/20/2016 09:57 AM, Lars Schneider wrote:
>
>> On 20 Jun 2016, at 01:51, Junio C Hamano wrote:
>>
>> Junio C Hamano writes:
>>
>>> Michael Haggerty writes:
>>>
>>>> According to [1], something in that test seems to have been
On 06/18/2016 08:20 PM, Junio C Hamano wrote:
> Michael Haggerty writes:
>
>> On 06/17/2016 05:20 AM, Junio C Hamano wrote:
>>> [...]
>>> * mh/ref-iterators (2016-06-03) 13 commits
>>> (merged to 'next' on 2016-06-06 at c8e79dc)
>>>
On 06/18/2016 12:05 AM, Lars Schneider wrote:
>
>> On 17 Jun 2016, at 05:20, Junio C Hamano wrote:
>>
>> ...
>>
>> * mh/split-under-lock (2016-05-13) 33 commits
>> (merged to 'next' on 2016-06-03 at 2e71330)
>> + lock_ref_sha1_basic(): only handle REF_NODEREF mode
>> + commit_ref_update(): remov
On 06/18/2016 12:05 AM, Lars Schneider wrote:
>
>> On 17 Jun 2016, at 05:20, Junio C Hamano wrote:
>>
>> ...
>>
>> * mh/split-under-lock (2016-05-13) 33 commits
>> (merged to 'next' on 2016-06-03 at 2e71330)
>> [...]
>
> This topic seems break two git-p4 tests (t9801 and t9803) on next:
> https
On 06/17/2016 05:20 AM, Junio C Hamano wrote:
> [...]
> * mh/ref-iterators (2016-06-03) 13 commits
> (merged to 'next' on 2016-06-06 at c8e79dc)
> + for_each_reflog(): reimplement using iterators
> + dir_iterator: new API for iterating over a directory tree
> + for_each_reflog(): don't abort f
If there is not a nonbare repository where a submodule is supposedly
located, then don't instantiate a ref_cache for it.
The analogous check can be removed from resolve_gitlink_ref().
Signed-off-by: Michael Haggerty
---
refs/files-backend.c | 33 ++---
1
fter this patch).
Signed-off-by: Ramsay Jones
Signed-off-by: Michael Haggerty
---
refs/files-backend.c | 113 ---
refs/refs-internal.h | 7
2 files changed, 78 insertions(+), 42 deletions(-)
diff --git a/refs/files-backend.c b/refs/files-
ation
in a more straightforward manner.
If we rewrite all callers to use the reference iteration API, then we
can remove the current_ref_iter hack permanently.
Signed-off-by: Michael Haggerty
---
refs.c | 20 +
refs/files-backend.c | 206 ++
Extract new function ref_resolves_to_object() from
entry_resolves_to_object(). It can be used even if there is no ref_entry
at hand.
Signed-off-by: Michael Haggerty
---
refs/files-backend.c | 33 +++--
1 file changed, 23 insertions(+), 10 deletions(-)
diff --git a
.
Signed-off-by: Michael Haggerty
---
Makefile | 1 +
dir-iterator.c | 202 +
dir-iterator.h | 87 +
3 files changed, 290 insertions(+)
create mode 100644 dir-iterator.c
create mode 100644 dir-iterator.h
es for the
purpose of determining object reachability!) and wouldn't benefit from
a truncated iteration anyway.
So instead, emit an error message and skip the "broken" reflog, but
continue with the iteration.
Signed-off-by: Michael Haggerty
---
refs/files-backend.c | 2 +-
1
This will be useful for passing REF_NODEREF through.
Signed-off-by: Michael Haggerty
---
builtin/fetch.c | 2 +-
builtin/remote.c | 4 ++--
refs.h | 5 +++--
refs/files-backend.c | 4 ++--
4 files changed, 8 insertions(+), 7 deletions(-)
diff --git a/builtin/fetch.c b
option set to REF_NODEREF.
Signed-off-by: Michael Haggerty
---
builtin/remote.c | 6 +-
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/builtin/remote.c b/builtin/remote.c
index 1bbf9b4..c4b4d67 100644
--- a/builtin/remote.c
+++ b/builtin/remote.c
@@ -539,10 +539,6 @@ static int
In the context of the for_each_ref() functions, call the prefix that
references must start with "prefix". (In some places it was called
"base".) This is clearer, and also prevents confusion with another
planned use of the word "base".
Signed-off-by: Michael Hagge
Signed-off-by: Michael Haggerty
---
refs/files-backend.c | 9 -
refs/refs-internal.h | 10 +-
2 files changed, 9 insertions(+), 10 deletions(-)
diff --git a/refs/files-backend.c b/refs/files-backend.c
index bbf96ad..8fa897b 100644
--- a/refs/files-backend.c
+++ b/refs/files
trees and possibly other types of
iterators in the future.
Signed-off-by: Ramsay Jones
Signed-off-by: Michael Haggerty
---
Makefile | 1 +
iterator.h | 81
refs.h | 4 +-
refs/files-backend.c | 281 +
Free up the old name for a more general purpose.
Signed-off-by: Michael Haggerty
---
refs/files-backend.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/refs/files-backend.c b/refs/files-backend.c
index b563a7e..c24a78e 100644
--- a/refs/files-backend.c
+++ b/refs
There's continuing work in this area, so clean up unneeded "extern"
keywords rather than schlepping them around. Also split up some overlong
lines and add parameter names in a couple of places.
Signed-off-by: Michael Haggerty
--
mp.version-control.git/296801
[3] https://github.com/mhagger/git
Michael Haggerty (13):
refs: remove unnecessary "extern" keywords
do_for_each_ref(): move docstring to the header file
refs: use name "prefix" consistently
delete_refs(): add a flags argument
remote rm: ha
On 06/16/2016 07:46 PM, Stefan Beller wrote:
> The compaction heuristic for diffs was deemed quite good, but in 5580b27
> we have an example demonstrates a common case, that fails with the existing
> heuristic. That is why we disabled the heuristic in the v2.9.0 release.
>
> With this patch a diff
On 06/14/2016 07:03 AM, Eric Sunshine wrote:
> On Fri, Jun 3, 2016 at 5:03 PM, Michael Haggerty wrote:
>> resolve_ref_recursively() can handle references in arbitrary files
>> reference stores, so use it to resolve "gitlink" (i.e., submodule)
>> references. Asi
On 06/13/2016 09:16 AM, Michael Haggerty wrote:
> On 06/10/2016 09:01 PM, David Turner wrote:
>> On Fri, 2016-06-10 at 10:14 +0200, Michael Haggerty wrote:
>>
>>> /*
>>> + * Check whether the REF_HAVE_OLD and old_oid values stored in update
>>> + * a
Below is the delta needed to fixed the bug in the mh/split-under-lock
patch series that I mentioned in an earlier email [1], plus a little
tweak to make the docstring for lock_ref_for_update() clearer.
I actually fixed the bug in preparatory commit
ref_transaction_commit(): remove local varia
On 06/10/2016 09:01 PM, David Turner wrote:
> On Fri, 2016-06-10 at 10:14 +0200, Michael Haggerty wrote:
>
>> /*
>> + * Check whether the REF_HAVE_OLD and old_oid values stored in update
>> + * are consistent with the result read for the reference. error is
>> +
On 05/06/2016 06:13 PM, Michael Haggerty wrote:
> [...]
> This patch series is also available from my GitHub repo [2] as branch
> "split-under-lock".
>
> [1] http://thread.gmane.org/gmane.comp.version-control.git/292772
> [2] https://github.com/mhagger/git
I was r
On 06/10/2016 10:08 AM, Eric Sunshine wrote:
> On Fri, Jun 3, 2016 at 5:03 PM, Michael Haggerty wrote:
>> We want ref_stores to be polymorphic, so invent a base class of which
>> files_ref_store is a derived class. For now there is a one-to-one
>> relationship between ref_
On 06/10/2016 10:41 AM, Jeff King wrote:
> On Fri, Jun 10, 2016 at 10:31:13AM +0200, Michael Haggerty wrote:
>
>> I've often thought that indentation would be a good, fairly universal
>> signal for diff to use when deciding how to slide hunks around. Most
>> source c
On 06/10/2016 09:50 AM, Jeff King wrote:
> I found a false positive with the new compaction heuristic in v2.9:
> [...]
> I get this rather unfortunate diff:
>
> $ git diff
> diff --git a/file.rb b/file.rb
> index bd9d1cb..67fbeba 100644
> --- a/file.rb
> +++ b/file.rb
> @@
ugh the
symref; we can read the referent directly.
Signed-off-by: Michael Haggerty
---
refs/files-backend.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/refs/files-backend.c b/refs/files-backend.c
index 98c8b95..b8d7a9a 100644
--- a/refs/files-backend.c
+++ b/refs/files-ba
To aid the effort, extract a new function, check_old_oid(), and use it
in the two places where the read value of the reference has to be
checked against update->old_sha1.
Update tests to reflect the improvements.
Signed-off-by: Michael Haggerty
---
refs/files-backend.c |
https://github.com/mhagger/git
Michael Haggerty (6):
t1404: rename file to t1404-update-ref-errors.sh
t1404: remove "prefix" argument to test_update_rejected
t1404: document function test_update_rejected
t1404: add more tests of update-ref error handling
lock_ref_for_update(): make
Some of the error messages will be improved in subsequent commits.
Signed-off-by: Michael Haggerty
---
t/t1404-update-ref-errors.sh | 221 ++-
1 file changed, 219 insertions(+), 2 deletions(-)
diff --git a/t/t1404-update-ref-errors.sh b/t/t1404-update
Signed-off-by: Michael Haggerty
---
t/t1404-update-ref-errors.sh | 10 ++
1 file changed, 10 insertions(+)
diff --git a/t/t1404-update-ref-errors.sh b/t/t1404-update-ref-errors.sh
index 541cad1..7cfeaa9 100755
--- a/t/t1404-update-ref-errors.sh
+++ b/t/t1404-update-ref-errors.sh
@@ -3,6
rather
than taking the prefix as an argument.
Signed-off-by: Michael Haggerty
---
t/t1404-update-ref-errors.sh | 27 +--
1 file changed, 13 insertions(+), 14 deletions(-)
diff --git a/t/t1404-update-ref-errors.sh b/t/t1404-update-ref-errors.sh
index 2818460..541cad1 100755
I want to broaden the scope of this test file, so rename it accordingly.
Signed-off-by: Michael Haggerty
---
t/{t1404-update-ref-df-conflicts.sh => t1404-update-ref-errors.sh} | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
rename t/{t1404-update-ref-df-conflicts.sh => t1404-upda
On 06/09/2016 06:05 PM, Junio C Hamano wrote:
> Michael Haggerty writes:
>
>> On 06/07/2016 06:57 PM, Johannes Sixt wrote:
>>> Am 07.06.2016 um 13:50 schrieb Michael Haggerty:
>>>> test_update_rejected () {
>>>> +local prefix before pack crea
On 06/09/2016 06:14 PM, Junio C Hamano wrote:
> Michael Haggerty writes:
>
>>>> +static struct ref_store *main_ref_store = NULL;
>>>> +
>>>> +static struct ref_store *submodule_ref_stores = NULL;
>>>
>>> Let's let BSS take care of
On 06/07/2016 07:50 PM, Junio C Hamano wrote:
> [...]
Thanks for all your comments, Junio. I've pushed a revised version of
the patch series to my GitHub fork [1] as branch "ref-store", but I'll
wait for a little longer to see if there are more comments on the list
before sending a re-roll.
Micha
On 06/07/2016 06:57 PM, Johannes Sixt wrote:
> Am 07.06.2016 um 13:50 schrieb Michael Haggerty:
>> test_update_rejected () {
>> +local prefix before pack create error &&
>
> Do we want to add more of unportable 'local' declarations?
Sorry, I forgot th
On 06/07/2016 07:50 PM, Junio C Hamano wrote:
> Michael Haggerty writes:
>
>> From: David Turner
>>
>> Instead of including a files-backend-specific struct ref_lock, change
>> the generic ref_update struct to include a void pointer that backends
>>
On 06/07/2016 07:43 PM, Junio C Hamano wrote:
> Michael Haggerty writes:
>
>> From: David Turner
>>
>> In the file-based backend, delete_refs has some special optimization
>> to deal with packed refs. In other backends, we might be able to make
>> ref dele
On 06/07/2016 07:36 PM, Junio C Hamano wrote:
> Michael Haggerty writes:
>
>> For now it only supports the main reference store.
>
> Isn't this comment applicable to a handful of recent changes that
> made other things virtual, too? Just wondering if I am missing
>
On 06/07/2016 07:35 PM, Junio C Hamano wrote:
> Michael Haggerty writes:
>
>> Signed-off-by: Michael Haggerty
>> ---
>> refs.c | 7 +++
>> refs/files-backend.c | 6 --
>> refs/refs-internal.h | 4
>> 3 files changed, 15 inse
On 06/07/2016 07:29 PM, Junio C Hamano wrote:
> Michael Haggerty writes:
>
>> If we don't have to strip trailing '/' from the submodule path, then
>> don't allocate and copy the submodule name.
>
> Makes sense.
>
>> int resolve_gitlin
On 06/07/2016 07:03 PM, Junio C Hamano wrote:
> Michael Haggerty writes:
>
>> We want ref_stores to be polymorphic, so invent a base class of which
>> files_ref_store is a derived class. For now there is a one-to-one
>> relationship between ref_stores and submodu
On 06/07/2016 08:10 PM, Junio C Hamano wrote:
> Michael Haggerty writes:
>
>> From: David Turner
>>
>> Signed-off-by: David Turner
>> Signed-off-by: Junio C Hamano
>> Signed-off-by: Michael Haggerty
>> ---
>> refs/refs-internal.h | 5
On 06/08/2016 08:55 PM, Junio C Hamano wrote:
> Ramsay Jones writes:
>
>> Signed-off-by: Ramsay Jones
>> ---
>>
>> Hi Michael, Junio,
>>
>> I would normally ask you to squash this into the relevant patch when
>> you next re-roll your 'mh/ref-iterators' branch, but this has already
>> been merged
On 06/09/2016 01:46 PM, Michael Haggerty wrote:
> On 06/07/2016 07:13 AM, Eric Sunshine wrote:
>> [...]
> Thanks for all your great comments!
Junio,
Given that ref-iterators is in next but also that you will soon be
rewinding next, would you like these tweaks as a re-roll of the bran
On 06/07/2016 07:13 AM, Eric Sunshine wrote:
> On Fri, Jun 3, 2016 at 8:33 AM, Michael Haggerty wrote:
>> The iterator interface is modeled on that for references, though no
>> vtable is necessary because there is (so far?) only one type of
>> dir_iterator.
>> [...]
>
On 06/07/2016 11:06 AM, William Duclot wrote:
> [...]
> The "fixed" feature was aimed to allow the users to use strbuf with
> strings that they doesn't own themselves (a function parameter for
> example). From Michael example in the original mail:
>
> void f(char *path_buf, size_t path_buf_len)
>
On 06/04/2016 01:40 AM, Junio C Hamano wrote:
> Michael Haggerty writes:
>
>> On 06/03/2016 11:33 PM, Junio C Hamano wrote:
>>> [...]
>>> Ah, that reminds me. What's the doneness of the dependent topic?
>> [...]
>
> What I meant was the doneness
ps://github.com/mhagger/git
Michael Haggerty (5):
t1404: rename file to t1404-update-ref-errors.sh
t1404: document function test_update_rejected
t1404: add more tests of update-ref error handling
lock_ref_for_update(): make error handling more uniform
lock_ref_for_update(): avoid a sy
And declare its variables to be local.
Signed-off-by: Michael Haggerty
---
t/t1404-update-ref-errors.sh | 4
1 file changed, 4 insertions(+)
diff --git a/t/t1404-update-ref-errors.sh b/t/t1404-update-ref-errors.sh
index 2818460..a62d62a 100755
--- a/t/t1404-update-ref-errors.sh
+++ b/t
Some of the error messages will be improved in subsequent commits.
Signed-off-by: Michael Haggerty
---
t/t1404-update-ref-errors.sh | 221 ++-
1 file changed, 219 insertions(+), 2 deletions(-)
diff --git a/t/t1404-update-ref-errors.sh b/t/t1404-update
ugh the
symref; we can read the referent directly.
Signed-off-by: Michael Haggerty
---
refs/files-backend.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/refs/files-backend.c b/refs/files-backend.c
index 98c8b95..b8d7a9a 100644
--- a/refs/files-backend.c
+++ b/refs/files-ba
To aid the effort, extract a new function, check_old_oid(), and use it
in the two places where the read value of the reference has to be
checked against update->old_sha1.
Update tests to reflect the improvements.
Signed-off-by: Michael Haggerty
---
refs/files-backend.c |
I want to broaden the scope of this test file, so rename it accordingly.
Signed-off-by: Michael Haggerty
---
t/{t1404-update-ref-df-conflicts.sh => t1404-update-ref-errors.sh} | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
rename t/{t1404-update-ref-df-conflicts.sh => t1404-upda
On 06/03/2016 11:33 PM, Junio C Hamano wrote:
> Michael Haggerty writes:
>
>> This patch series applies on top of mh/split-under-lock. It can also
>> be obtained from my GitHub repo [2] as branch "ref-iterators".
>
> Ah, that reminds me. What's the donene
Signed-off-by: Michael Haggerty
---
refs/files-backend.c | 14 --
1 file changed, 8 insertions(+), 6 deletions(-)
diff --git a/refs/files-backend.c b/refs/files-backend.c
index 48b37fa..dfce4d1 100644
--- a/refs/files-backend.c
+++ b/refs/files-backend.c
@@ -1527,7 +1527,8 @@ static
Signed-off-by: Michael Haggerty
---
refs/files-backend.c | 26 +++---
1 file changed, 15 insertions(+), 11 deletions(-)
diff --git a/refs/files-backend.c b/refs/files-backend.c
index 225e0af..24b7c60 100644
--- a/refs/files-backend.c
+++ b/refs/files-backend.c
@@ -1987,15
For now it only supports the main reference store.
Signed-off-by: Michael Haggerty
---
refs.c | 7 +++
refs/files-backend.c | 6 --
refs/refs-internal.h | 3 +++
3 files changed, 14 insertions(+), 2 deletions(-)
diff --git a/refs.c b/refs.c
index 22837f4..2d84c5c 100644
Signed-off-by: Michael Haggerty
---
refs/files-backend.c | 12 ++--
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/refs/files-backend.c b/refs/files-backend.c
index 57f1965..9307fa0 100644
--- a/refs/files-backend.c
+++ b/refs/files-backend.c
@@ -1416,13 +1416,11 @@ static
Signed-off-by: Michael Haggerty
---
refs/files-backend.c | 7 ---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/refs/files-backend.c b/refs/files-backend.c
index 24b7c60..8d3cf96 100644
--- a/refs/files-backend.c
+++ b/refs/files-backend.c
@@ -3405,7 +3405,8 @@ static int
We want ref_stores to be polymorphic, so invent a base class of which
files_ref_store is a derived class. For now there is a one-to-one
relationship between ref_stores and submodules.
Signed-off-by: Michael Haggerty
---
refs.c | 91 ++
refs/files-backend.c
From: David Turner
Alternate refs backends might not need the refs/heads directory and so
on, so we make ref db initialization part of the backend.
Signed-off-by: David Turner
Signed-off-by: Junio C Hamano
Signed-off-by: Michael Haggerty
---
builtin/init-db.c| 21
From: David Turner
This removes the last caller of function get_files_ref_store(), so
remove it.
Signed-off-by: David Turner
Signed-off-by: Junio C Hamano
Signed-off-by: Michael Haggerty
---
refs.c | 7 +++
refs/files-backend.c | 24 ++--
refs/refs
Signed-off-by: Michael Haggerty
---
refs.c | 9 +
refs/files-backend.c | 7 ++-
refs/refs-internal.h | 5 +
3 files changed, 20 insertions(+), 1 deletion(-)
diff --git a/refs.c b/refs.c
index f4f5f32..22837f4 100644
--- a/refs.c
+++ b/refs.c
@@ -1425,6 +1425,15
Signed-off-by: Michael Haggerty
---
refs/files-backend.c | 14 --
1 file changed, 8 insertions(+), 6 deletions(-)
diff --git a/refs/files-backend.c b/refs/files-backend.c
index dfce4d1..bc7d250 100644
--- a/refs/files-backend.c
+++ b/refs/files-backend.c
@@ -2578,12 +2578,14
From: David Turner
Signed-off-by: Ronnie Sahlberg
Signed-off-by: David Turner
Signed-off-by: Junio C Hamano
Signed-off-by: Michael Haggerty
---
refs.c | 8
refs/files-backend.c | 8 +---
refs/refs-internal.h | 1 +
3 files changed, 14 insertions(+), 3 deletions
From: David Turner
Instead of including a files-backend-specific struct ref_lock, change
the generic ref_update struct to include a void pointer that backends
can use for their own arbitrary data.
Signed-off-by: David Turner
Signed-off-by: Junio C Hamano
Signed-off-by: Michael Haggerty
801 - 900 of 3206 matches
Mail list logo