Implement `packed_delete_refs()` using a reference transaction. This
means that `files_delete_refs()` can use `refs_delete_refs()` instead
of `repack_without_refs()` to delete any packed references, decreasing
the coupling between the classes.
Signed-off-by: Michael Haggerty <mhag...@alum.mit.
Used a `packed_ref_store` transaction in the implementation of
`files_initial_transaction_commit()` rather than using internal
features of the packed ref store. This further decouples
`files_ref_store` from `packed_ref_store`.
Signed-off-by: Michael Haggerty <mhag...@alum.mit.edu>
---
refs
Now that the packed reference store supports transactions, we can use
a transaction to write the packed versions of references that we want
to pack. This decreases the coupling between `files_ref_store` and
`packed_ref_store`.
Signed-off-by: Michael Haggerty <mhag...@alum.mit.edu>
---
refs
.
* If the `packed-refs` file is locked so long that `update-ref` fails
to lock it, then the reference can be left permanently in the
incorrect state described in the previous point.
In a moment, both problems will be fixed.
Signed-off-by: Michael Haggerty <mhag...@alum.mit.edu>
---
The first of t
.
This patch series is also available as branch
`packed-ref-transactions` in my fork on GitHub [1]. A draft of the
patch series to change `packed_ref_store` to use mmap and get rid of
its `ref_cache` is available as branch `mmap-packed-refs` from the
same source.
Michael
[1] https://github.com
ymref_update()` but it's not too bad:
* Do the initial check using `string_list_has_string()` rather than
calling `string_list_insert()` already.
* After `new_update` has been created, call `string_list_insert()`,
passing it `new_update->refname` as the string.
If this is done in place of your first commit, then your second commit
could be left unchanged.
Michael
of the branch that I pushed to GitHub but haven't yet
submitted to the list.
How would you like to proceed? Do you want me to submit a patch
(adding the assertion) that applies on top of this branch?
Michael
On Sat, Aug 26, 2017 at 6:38 PM, Junio C Hamano <gits...@pobox.com> wrote:
> Michael Haggerty <mhag...@alum.mit.edu> writes:
>
>> At this point in the code, len is *always* <= 20.
>
> This is the kind of log message that makes me unconfortable, as it
> lacks &
* `prefix_len`
* `path_len`
* `i`
It's good hygiene.
Signed-off-by: Michael Haggerty <mhag...@alum.mit.edu>
---
notes.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/notes.c b/notes.c
index d5409b55e3..7f5bfa19c7 100644
--- a/notes.c
+++ b/notes.c
@@ -406,7
. The logic separation also
simplifies upcoming changes.
This prevents us from leaking memory for a leaf_node in the case of
wrong-sized paths. There are still memory leaks in this code; they will
be fixed in upcoming commits.
Signed-off-by: Michael Haggerty <mhag...@alum.mit.edu>
---
notes.
Write the length into `object_oid` (before copying) rather than
`l->key_oid` (after copying). Then combine some code from the two `if`
blocks.
Signed-off-by: Michael Haggerty <mhag...@alum.mit.edu>
---
notes.c | 14 +-
1 file changed, 5 insertions(+), 9 deletions(-)
d
Remove the feature of `get_oid_hex_segment()` that it pads the rest of
the `oid` argument with zeros. Instead, do this at the caller who
needs it.
This makes the functionality of this function more coherent and
removes the need for its `oid_len` argument.
Signed-off-by: Michael Haggerty <m
The old code converted any entry whose path constituted a full SHA-1
as a leaf node, without regard for the type of the entry. But only
blobs can be notes. So treat entries whose paths *look like* notes
paths but that are not blobs as non-notes.
Signed-off-by: Michael Haggerty <m
At this point in the code, len is *always* <= 20.
Signed-off-by: Michael Haggerty <mhag...@alum.mit.edu>
---
notes.c | 35 +--
1 file changed, 17 insertions(+), 18 deletions(-)
diff --git a/notes.c b/notes.c
index 00630a9396..f7ce64ff48 100644
--- a/note
()`.
* Remove a loop variable: just count `len` down instead.
Signed-off-by: Michael Haggerty <mhag...@alum.mit.edu>
---
notes.c | 28 ++--
1 file changed, 10 insertions(+), 18 deletions(-)
diff --git a/notes.c b/notes.c
index ce9ba36179..d5409b55e3 100644
--- a/n
Nobody cares about the return value of get_oid_hex_segment() except to
check whether it failed. So just return 0 on success.
And while we're updating its docstring, update it for some argument
renaming that happened a while ago.
Signed-off-by: Michael Haggerty <mhag...@alum.mit.edu>
---
n
Declare the variables inside the loop, to make it more obvious that
their values are not carried across loop iterations.
Signed-off-by: Michael Haggerty <mhag...@alum.mit.edu>
---
notes.c | 8
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/notes.c b/notes.c
branch is also available from my Git fork [1] as branch
`load-subtree-cleanup`.
Michael
[1] https://github.com/mhagger/git
Michael Haggerty (12):
notes: make GET_NIBBLE macro more robust
load_subtree(): remove unnecessary conditional
load_subtree(): reduce the scope of some local variables
Put parentheses around sha1. Otherwise it could fail for something
like
GET_NIBBLE(n, (unsigned char *)data);
Signed-off-by: Michael Haggerty <mhag...@alum.mit.edu>
---
notes.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/notes.c b/notes.c
index f090c88363..0063
converted to "de/ad/beef", and indeed the
test added in commit 851c2b3 verifies that this case works correctly.
Signed-off-by: Michael Haggerty <mhag...@alum.mit.edu>
---
notes.c | 24 +++-
1 file changed, 7 insertions(+), 17 deletions(-)
diff --git a/notes.c
If an entry is not a tree entry, then it cannot possibly be an
internal node. But the old code checked this condition only after
allocating a leaf_node object and therefore leaked that memory.
Instead, check before even entering this branch of the code.
Signed-off-by: Michael Haggerty <m
verything". I gues my suggestion would be:
--all as it is now (refs/* plus HEAD)
--head alternative way to say HEAD (as it is now for show-ref)
--heads HEAD for all linked worktrees (incompatible change for show-ref)
And all of them should work the same for the rev-list/log family as well
as for-each-ref/show-ref.
I thinking that changing show-ref (porcelain, not quite as commonly
used) should do the least harm compared to all other options.
Michael
the namespace layer.
I guess it is also clear that symrefs on disk have to contain the full
reference names of their targets, but when they are read via a
namespace-view, the caller should see the short name as the target.
[...]
Michael
On Wed, Aug 23, 2017 at 11:55 PM, Junio C Hamano <gits...@pobox.com> wrote:
> Michael Haggerty <mhag...@alum.mit.edu> writes:
>
>> The philosophy of reference locking has been, "if another process is
>> changing a reference, then whatever I'm trying to do to it w
Compared to the 3-item v2:
1/4 == 1/3
2/4 is new as per Junio's suggestion: clarify the call-chain leading up
to prepare_to_commit()
3/4 == 2/3 with amended subject
4/4 is 3/3 rebased, squash-if removed
Michael J Gruber (4):
Documentation/git-merge: explain --continue
merge: clarify call
crafted after the in t7502. The test
requires EXECKEEPSPID (thus does not run under MINGW).
Save the merge state earlier (in the non-squash case) so that it does
not get lost. This makes the test pass.
Reported-by: hIpPy <hippy2...@gmail.com>
Signed-off-by: Michael J Gruber <g...@
the tree, which also
avoids setting automerge_was_ok (just as in the proper ret==1 case), so
that finish_automerge() is not called.
To ensure that no code change breaks that assumption, safe-guard
prepare_to_commit() by a BUG() statement.
Suggested-by: junio
Signed-off-by: Michael J Gruber &l
are
interrupted: we write heads-mode-msg now when we used to write
heads-msg-mode.
Signed-off-by: Michael J Gruber <g...@grubix.eu>
---
builtin/merge.c | 11 ---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/builtin/merge.c b/builtin/merge.c
index dafec80fa9..db33
Currently, 'git merge --continue' is mentioned but not explained.
Explain it.
Signed-off-by: Michael J Gruber <g...@grubix.eu>
---
Documentation/git-merge.txt | 5 -
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/Documentation/git-merge.txt b/Documentation/git-merge.txt
Junio C Hamano venit, vidit, dixit 22.08.2017 02:38:
> Michael J Gruber <g...@grubix.eu> writes:
>
>> static void prepare_to_commit(struct commit_list *remoteheads)
>> {
>> struct strbuf msg = STRBUF_INIT;
>> @@ -767,6 +768,8 @@ static void
Martin Ågren venit, vidit, dixit 21.08.2017 18:43:
> On 21 August 2017 at 14:53, Michael J Gruber <g...@grubix.eu> wrote:
>> Currently, 'git merge --continue' is mentioned but not explained.
>>
>> Explain it.
>>
>> Signed-off-by: Michael J Gruber <g.
write_merge_state() writes out the merge heads, mode, and msg. But we
may want to write out heads, mode without the msg. So, split out heads
(+mode) into a separate function write_merge_heads() that is called by
write_merge_state().
No funtional change so far.
Signed-off-by: Michael J Gruber &l
of people that I'd like to make angry - at least not
without a good reason.
Michael J Gruber (3):
Documentation/git-merge: explain --continue
merge: split write_merge_state in two
merge: save merge state earlier
Documentation/git-merge.txt | 5 -
builtin/merge.c | 14
(in the non-squash case) so that it does
not get lost.
Reported-by: hIpPy <hippy2...@gmail.com>
Signed-off-by: Michael J Gruber <g...@grubix.eu>
---
builtin/merge.c | 3 +++
t/t7600-merge.sh | 15 +++
2 files changed, 18 insertions(+)
diff --git a/builtin/merge.c b/builtin/m
Currently, 'git merge --continue' is mentioned but not explained.
Explain it.
Signed-off-by: Michael J Gruber <g...@grubix.eu>
---
Documentation/git-merge.txt | 5 -
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/Documentation/git-merge.txt b/Documentation/git-merge.txt
ckTimeout`, to allow this
setting to be tweaked.
Note: the function `get_files_ref_lock_timeout_ms()` cannot be private
to the files backend because it is also used by `write_pseudoref()`
and `delete_pseudoref()`, which are defined in `refs.c` so that they
can be used by other reference backends.
Si
(in the non-squash case) so that it does
not get lost.
Reported-by: hIpPy <hippy2...@gmail.com>
Signed-off-by: Michael J Gruber <g...@grubix.eu>
---
builtin/merge.c | 14 +++---
1 file changed, 11 insertions(+), 3 deletions(-)
diff --git a/builtin/merge.c b/builtin/merge.c
inde
ead) before launching the editor.
In any case, the following patch solves the problem and passes the
existing tests. But I'll wait for more comments (and think about a test
meanwhile).
Michael
to be
classical english.
Try and straighten that explanation out a bit.
Signed-off-by: Michael J Gruber <g...@grubix.eu>
---
Documentation/git-for-each-ref.txt | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/Documentation/git-for-each-ref.txt
b/Documentation/git-fo
to an object but not vice versa,
so the object cannot possible know %(refname), for example. Thus, this is
wrong independent of refs being objects (one day, maybe) or not.
Change the wording to make this clearer (and distinguish it from formats
for the log family).
Signed-off-by: Michael J Gruber
On Wed, Aug 16, 2017 at 12:47 AM, Shawn Pearce <spea...@spearce.org> wrote:
> On Mon, Aug 14, 2017 at 5:13 AM, Michael Haggerty <mhag...@alum.mit.edu>
> wrote:
>> On 08/07/2017 03:47 AM, Shawn Pearce wrote:
>>> 6th iteration of the reftable storage form
at a specific "point in time"
(attributes, config) for specific foo, but that wouldn't catch the case
above, even if we iterated over all commits which affect files that the
filter (currently) applies to.
Keep in mind that filters are a killer feature, so if you shoot yourself
in the foot: it could have come worse ;)
Michael
bove also claims that the performance cost "will be
regained later". The idea was that once the packed-refs were finished
being split out into a separate ref-store, we could limit the
`refs_verify_refname_available()` call to the packed references again.
That is what we do now.
Signed-off-b
updates overwrote their effects, and either
* reflogs were turned off for those updates, or
* the corresponding reflogs have been compacted into a separate file, or
* the corresponding reflog entries for those updates have been expired.
Michael
On 08/07/2017 03:47 AM, Shawn Pearce wrote:
> 6th iteration of the reftable storage format.
Thanks!
> Changes from v5:
> - extensions.refStorage = reftable is used to select this format.
>
> - Log records can be explicitly deleted (for refs/stash).
> - Log records may use
On 8/7/17, Junio C Hamano wrote:
> Just to avoid possible confusion, the above is not to say "once it
> is decided, you are not allowed to bring fresh arguments to the
> discussion". As Peff said [*2*] in that old discussion thread, the
> circumstances may have changed over 9
On 8/5/17, Junio C Hamano <gits...@pobox.com> wrote:
> Michael Forney <mfor...@mforney.org> writes:
>> On 8/5/17, Junio C Hamano <gits...@pobox.com> wrote:
>>> Have you made sure that all of these scripts, before calling
>>> 'git-foo' in the curren
On 8/5/17, Junio C Hamano wrote:
> Have you made sure that all of these scripts, before calling
> 'git-foo' in the current code, update their PATH so that these found
> in the bog standard place (i.e. GIT_EXEC_PATH)?
>
> The reason I ask is because we can rest assured these
This way, they still work even if the built-in symlinks aren't
installed.
Signed-off-by: Michael Forney <mfor...@mforney.org>
---
It looks like there was an effort to do this a number of years ago (through
`make remove-dashes`). These are just a few I noticed were still left in the
.sh s
objects with this prefix:
child_addr+ : varint
}
```
On Thu, Aug 3, 2017 at 3:26 PM, Shawn Pearce <spea...@spearce.org> wrote:
> On Thu, Aug 3, 2017 at 11:38 AM, Michael Haggerty <mhag...@alum.mit.edu>
> wrote:
>> On Tue, Aug 1, 2017 at 7:38 PM, Shawn Pearce <spea...@spea
On Tue, Aug 1, 2017 at 7:38 PM, Shawn Pearce <spea...@spearce.org> wrote:
> On Tue, Aug 1, 2017 at 6:51 PM, Michael Haggerty <mhag...@alum.mit.edu> wrote:
>> On Tue, Aug 1, 2017 at 4:27 PM, Shawn Pearce <spea...@spearce.org> wrote:
>>> On Mon, Jul 31, 2017
On Tue, Aug 1, 2017 at 4:27 PM, Shawn Pearce <spea...@spearce.org> wrote:
> On Mon, Jul 31, 2017 at 11:41 PM, Michael Haggerty <mhag...@alum.mit.edu>
> wrote:
>> On Sun, Jul 30, 2017 at 8:51 PM, Shawn Pearce <spea...@spearce.org> wrote:
>>> 4th i
On Tue, Aug 1, 2017 at 1:23 PM, Shawn Pearce <spea...@spearce.org> wrote:
> On Mon, Jul 31, 2017 at 11:41 PM, Michael Haggerty <mhag...@alum.mit.edu>
> wrote:
>> On Sun, Jul 30, 2017 at 8:51 PM, Shawn Pearce <spea...@spearce.org> wrote:
>>> 4th i
dditional `log_type`
# constants.
message : varstr
}
}
obj_record = {
# The "next" two bytes of the SHA-1 being described:
bytes : uchar[2]
# The number of of child_addrs:
count : varint
# File offsets of the chunks containing references that point at
# objects with this prefix:
child_addr+ : varint
}
```
Michael
associated reflog entries are "compacted out" of the
numerical sequence and the remaining indices are renumbered
contiguously.
But it's ok with me to make it 64 bits. Usually those extra bytes
would be appear as and so should prefix- and zlib-compress
well.
Michael
algorithm, which would block step A
of pack-refs from beginning.
I have the feeling that there might be other, more improbably races
lurking here, too.
The eternal problems with races in the files backend is a main reason
that I'm enthusiastic about the reftable proposal.
Michael
require a small amendment to my `update_index` suggestion
above, namely that reflog-only and ref-only reftables might have
overlapping `update_index` ranges, but the end result should be that
the files together cover the whole range of `update_index`es for refs
and also for reflogs.
Michael
Stefan, Jonathan: you're both right, the new test needs the SYMLINKS
prerequisite. Junio, would you mind adding that flag?
Thanks,
Michael
Dang, I just noticed that I hit "reply" rather than "reply-to-all" on
the below email (stupid GMail default). Junio, your response to this
email accordingly went only to me.
Michael
-- Forwarded message --
From: Michael Haggerty <mhag...@alum.mit.edu>
Da
in working
on it.
Michael
[1]
https://public-inbox.org/git/d0da02a8b6f0272fa70ae3b1dc80fee6c6ee8d18.150803.git.mhag...@alum.mit.edu/
On Mon, Jul 24, 2017 at 2:43 PM, Junio C Hamano <gits...@pobox.com> wrote:
> Jeff King <p...@peff.net> writes:
>
>> On Mon, Jul 24,
s use case and prevent a
regression like this from recurring.
Signed-off-by: Michael Haggerty <mhag...@alum.mit.edu>
---
Sorry for the slow response; I've been traveling and very busy.
I didn't even know that a symlinked `packed-refs` file is a thing. The
attached patch should fix the pro
On Sun, Jul 16, 2017 at 12:43 PM, Shawn Pearce <spea...@spearce.org> wrote:
> On Sun, Jul 16, 2017 at 10:33 AM, Michael Haggerty <mhag...@alum.mit.edu>
> wrote:
>> * Do you propose to store *all* references (i.e., including the
>> references that we call pseudorefs,
tables in
any detail, though I must say that my first reaction is surprise that
you want to store reflogs (which are mostly immutable, rarely read,
and can be an order of magnitude bigger) in the same files as
references.
Michael
On Wed, Jul 12, 2017 at 5:17 PM, Shawn Pearce <spea...@spearce.org>
Junio C Hamano venit, vidit, dixit 05.07.2017 18:26:
> Johannes Schindelin writes:
>
>> It seems to be a little-known feature of `grep` (and it certainly came
>> as a surprise to this here developer who believed to know the Unix tools
>> pretty well) that multiple
that will eventually make it
possible to fix some longstanding races.
The only semantic change here is that `repack_without_refs()` used to
forget to release the lock in the `if (!removed)` exit path. That
omission is now fixed.
Signed-off-by: Michael Haggerty <mhag...@alum.mit.edu>
---
refs
shortly.
Signed-off-by: Michael Haggerty <mhag...@alum.mit.edu>
---
refs/packed-backend.c | 40
1 file changed, 32 insertions(+), 8 deletions(-)
diff --git a/refs/packed-backend.c b/refs/packed-backend.c
index 18ce47fcb7..71f92ed6f0 100644
--- a/refs/
Rename `lock_packed_refs()` to `packed_refs_lock()` for consistency
with how other methods are named. Also, it's about to get some
companions.
Signed-off-by: Michael Haggerty <mhag...@alum.mit.edu>
---
refs/files-backend.c | 4 ++--
refs/packed-backend.c | 10 +-
refs/packed-bac
That way the callers don't have to come up with error messages
themselves.
Signed-off-by: Michael Haggerty <mhag...@alum.mit.edu>
---
refs/files-backend.c | 6 ++
refs/packed-backend.c | 17 +++--
refs/packed-backend.h | 6 +++---
3 files changed, 16 insertions(
Instead, change the callers of `commit_packed_refs()` to call
`packed_refs_unlock()`.
Signed-off-by: Michael Haggerty <mhag...@alum.mit.edu>
---
refs/files-backend.c | 2 ++
refs/packed-backend.c | 18 --
2 files changed, 10 insertions(+), 10 deletions(-)
diff --git
Add two new public functions, `packed_refs_unlock()` and
`packed_refs_is_locked()`, with which callers can manage and query the
`packed-refs` lock externally.
Call `packed_refs_unlock()` from `commit_packed_refs()` and
`rollback_packed_refs()`.
Signed-off-by: Michael Haggerty <m
The old code ignored any lines that it didn't understand, including
unterminated lines. This is dangerous. Instead, `die()` if the
`packed-refs` file contains any unterminated lines or lines that we
don't know how to handle.
This fixes the tests added in the last commit.
Signed-off-by: Michael
Report errors via a `struct strbuf *err` rather than by calling
`die()`. To enable this goal, change `write_packed_entry()` to report
errors via a return value and `errno` rather than dying.
Signed-off-by: Michael Haggerty <mhag...@alum.mit.edu>
---
refs/files-backend.c | 10 +++---
refs/
If `packed-refs` contains indecipherable lines, we should emit an
error and quit rather than just skipping the lines. Unfortunately, we
currently do the latter. Add some failing tests demonstrating the
problem.
This will be fixed in the next commit.
Signed-off-by: Michael Haggerty <m
The existing callers already check that the lock isn't held just
before calling `clear_packed_ref_cache()`, and in the near future we
want to be able to call this function when the lock is held.
Signed-off-by: Michael Haggerty <mhag...@alum.mit.edu>
---
refs/packed-backend.c | 2 --
Add a new function, `packed_read_raw_ref()`, which is nearly a
`read_raw_ref_fn`. Use it in place of `resolve_packed_ref()`.
Signed-off-by: Michael Haggerty <mhag...@alum.mit.edu>
---
refs/files-backend.c | 36 +---
1 file changed, 17 insertions(+), 19 del
be implemented (e.g., those having to do
with symrefs or reflogs).
Signed-off-by: Michael Haggerty <mhag...@alum.mit.edu>
---
refs/files-backend.c | 16 ++--
refs/packed-backend.c | 231 +-
refs/packed-backend.h | 23 ++---
refs/refs-internal.h
It only cares about the packed-refs part of the reference store.
Signed-off-by: Michael Haggerty <mhag...@alum.mit.edu>
---
refs/files-backend.c | 15 +++
1 file changed, 7 insertions(+), 8 deletions(-)
diff --git a/refs/files-backend.c b/refs/files-backend.c
index 5d15
it moves code around and adjusts its visibility, but doesn't
change anything.
Signed-off-by: Michael Haggerty <mhag...@alum.mit.edu>
---
Makefile | 1 +
refs.c| 18 ++
refs/files-backend.c | 640 +-
r
Add the infrastructure to iterate over a `packed_ref_store`. It's a
lot of boilerplate, but it's all part of a campaign to make
`packed_ref_store` implement `ref_store`. In the future, this iterator
will work much differently.
Signed-off-by: Michael Haggerty <mhag...@alum.mit.edu>
---
refs
It only cares about the packed-refs part of the reference store.
Signed-off-by: Michael Haggerty <mhag...@alum.mit.edu>
---
refs/files-backend.c | 31 ++-
1 file changed, 22 insertions(+), 9 deletions(-)
diff --git a/refs/files-backend.c b/refs/files-backend.c
It only cares about the packed-refs part of the reference store.
Signed-off-by: Michael Haggerty <mhag...@alum.mit.edu>
---
refs/files-backend.c | 13 ++---
1 file changed, 6 insertions(+), 7 deletions(-)
diff --git a/refs/files-backend.c b/refs/files-backend.c
index 2b0d
It only cares about the packed-refs part of the reference store.
Signed-off-by: Michael Haggerty <mhag...@alum.mit.edu>
---
refs/files-backend.c | 20 ++--
1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/refs/files-backend.c b/refs/files-backend.c
index 2b9d
-by: Michael Haggerty <mhag...@alum.mit.edu>
---
refs/files-backend.c | 40 ++--
1 file changed, 18 insertions(+), 22 deletions(-)
diff --git a/refs/files-backend.c b/refs/files-backend.c
index b040bb3b0a..87cecde231 100644
--- a/refs/files-backend.c
+++ b/refs
It only cares about the packed-refs part of the reference store.
Signed-off-by: Michael Haggerty <mhag...@alum.mit.edu>
---
refs/files-backend.c | 12 +++-
1 file changed, 7 insertions(+), 5 deletions(-)
diff --git a/refs/files-backend.c b/refs/files-backend.c
index a08d
It only cares about the packed-refs part of the reference store.
Signed-off-by: Michael Haggerty <mhag...@alum.mit.edu>
---
refs/files-backend.c | 16
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/refs/files-backend.c b/refs/files-backend.c
index de82
This will later become a method of `packed_ref_store`.
Signed-off-by: Michael Haggerty <mhag...@alum.mit.edu>
---
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 c206
Move the `packed_refs_lock` member from `files_ref_store` to
`packed_ref_store`, and rename it to `lock` since it's now more
obvious what it is locking.
Signed-off-by: Michael Haggerty <mhag...@alum.mit.edu>
---
refs/files-backend.c | 31 ---
1 file chang
It only cares about the packed-refs part of the reference store.
Signed-off-by: Michael Haggerty <mhag...@alum.mit.edu>
---
refs/files-backend.c | 18 +-
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/refs/files-backend.c b/refs/files-backend.c
index 0d8f
Start extracting the packed-refs-related data structures into a new
class, `packed_ref_store`. It doesn't yet implement `ref_store`, but
it will.
Signed-off-by: Michael Haggerty <mhag...@alum.mit.edu>
---
refs/files-backend.c | 42 +-
1 file chang
It only cares about the packed-refs part of the reference store.
Signed-off-by: Michael Haggerty <mhag...@alum.mit.edu>
---
refs/files-backend.c | 26 --
1 file changed, 12 insertions(+), 14 deletions(-)
diff --git a/refs/files-backend.c b/refs/files-backend.c
Move `packed_refs_path` from `files_ref_store` to `packed_ref_store`,
and rename it to `path` since its meaning is clear from its new
context.
Inline `files_packed_refs_path()`.
Signed-off-by: Michael Haggerty <mhag...@alum.mit.edu>
---
refs/files-backend.c | 25 --
It only cares about the packed-refs part of the reference store.
Signed-off-by: Michael Haggerty <mhag...@alum.mit.edu>
---
refs/files-backend.c | 10 +-
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/refs/files-backend.c b/refs/files-backend.c
index b2ef7b3bb9..bc5c
It only cares about the packed-refs part of the reference store.
Signed-off-by: Michael Haggerty <mhag...@alum.mit.edu>
---
refs/files-backend.c | 10 +-
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/refs/files-backend.c b/refs/files-backend.c
index bc5c0de84e..4943
a test that such references don't
cause problems.
Signed-off-by: Junio C Hamano <gits...@pobox.com>
Signed-off-by: Michael Haggerty <mhag...@alum.mit.edu>
---
t/t1408-packed-refs.sh | 42 ++
1 file changed, 42 insertions(+)
create mode 100755 t/t1408-packed-refs.
corruption in packed-refs files, distinguish between
unterminated lines and other corruption.
* Fixed a typo in a commit message.
This patch series can also be obtained from my GitHub fork [2] as
branch packed-ref-store.
Michael
[1] v1: http://public-inbox.org/git/cover.1497534157.git.mhag
On 06/23/2017 09:58 PM, Jeff King wrote:
> On Fri, Jun 23, 2017 at 09:01:47AM +0200, Michael Haggerty wrote:
>
>> The old code ignored any lines that it didn't understand. This is
>> dangerous. Instead, `die()` if the `packed-refs` file contains any
>> lines that we
On 06/23/2017 09:56 PM, Jeff King wrote:
> On Fri, Jun 23, 2017 at 09:01:46AM +0200, Michael Haggerty wrote:
>
>> Change `repack_without_refs()` to expect the packed-refs lock to be
>> held already, and not to release the lock before returning. Change the
>> callers to d
2017-06-27 18:25 GMT+02:00 Junio C Hamano <gits...@pobox.com>:
> Ah, wait, that particular grep may have GNUism. If you changed it
> to
>
> egrep "$tree \((refs/heads/master|HEAD)@{[0-9]*}:" out
>
> does it make it pass for you?
Yes, this is working.
Greetings
Michael
t ok 17 - ISO-2022-JP should be shown in UTF-8 now
But that's another topic, which I will open once this is fixed.
Greetings
Michael
5986870d4
What do you think?
2017-06-27 7:41 GMT+02:00 Michael Kebe <michael.k...@gmail.com>:
> 2017-06-26 22:27 GMT+02:00 Ævar Arnfjörð Bjarmason <ava...@gmail.com>:
>> Could you (or anyone else for that matter) please test it with:
>>
>> git
301 - 400 of 4489 matches
Mail list logo