The commits in state:filter.map have already been processed, so don't
filter them again. This makes incremental git filter-branch much faster.
Also add tests for --state-branch option.
Signed-off-by: Michael Barabanov
---
git-filter-branch.sh | 1 +
t/t7003-filter-branch.sh | 15 ++
On Mon, Jun 25, 2018 at 5:49 PM Junio C Hamano wrote:
> Christian Couder writes:
> > This is a follow up from the patch series called "odb remote" [...]
>
> 5702.20 and 5702.21 seems to fail in standalone test, when these are
> directly queued on top of Git v2.18.0; I haven't looked into the
> fa
On Mon, Jun 25, 2018 at 10:35 AM Derrick Stolee wrote:
> diff --git a/midx.c b/midx.c
> @@ -210,6 +227,20 @@ static void sort_packs_by_name(char **pack_names,
> uint32_t nr_packs, uint32_t *p
> +static size_t write_midx_pack_lookup(struct hashfile *f,
> +char *
> Changes in v4 are fairly minor. There are a few documentation changes,
> commit message updates, as well as a few small style tweaks based on
> reviewer comments.
Patches 4 and 7, which I have commented on previously, look good.
As for patch 2, it still has a missing period in the documentatio
Here are the topics that have been cooking. Commits prefixed with
'-' are only in 'pu' (proposed updates) while commits prefixed with
'+' are in 'next'. The ones marked with '.' do not appear in any of
the integration branches, but I am still holding onto them.
Git 2.18 turned out to be an unusu
> Refactor find_non_local_tags and get_ref_map to only take the
> information they need instead of the entire transport struct. Besides
> improving code clarity, this also improves their flexibility, allowing
> for a different set of refs to be used instead of relying on the ones
> stored in the tr
> --- /dev/null
> +++ b/t/lib-httpd/one-time-sed.sh
> @@ -0,0 +1,16 @@
> +#!/bin/sh
> +
> +if [ -e one-time-sed ]; then
> + "$GIT_EXEC_PATH/git-http-backend" >out
> +
> + sed "$(cat one-time-sed)" out_modified
> +
> + if diff out out_modified >/dev/null; then
> + cat out
> +
Michael Barabanov writes:
> The commits in state:filter.map have already been processed, so don't
> filter them again. This makes incremental git filter-branch much faster.
>
> Also add tests for --state-branch option.
>
> Signed-off-by: Michael Barabanov
> ---
> git-filter-branch.sh | 3 +
> I was looking at semantic merge conflicts between this and your
> e2838d85 ("commit-graph: always load commit-graph information",
> 2018-05-01), the latter of which I planned to merge to 'master' as a
> part of the first batch in this cycle, and noticed that there are
> two very similar functions
Christian Couder writes:
> This is a follow up from the patch series called "odb remote" that I
> ...
Just an early warning, as I haven't even complained on patch titles
of these patches in the series ;-)
5702.20 and 5702.21 seems to fail in standalone test, when these are
directly queued on to
The grep code invokes show_line() to display the contents of a matched
or context line in its output. Part of this execution is to print a line
header that includes information such as the kind, the line- and
column-number and etc. of that match.
To prepare for the addition of an option to print o
Hi,
Attached is a resurrection of my previous topic [1] to add
'--only-matching' (in the style of GNU grep) to 'git grep'.
The changes are described in detail in each of the attached patches.
Similar to the series to add --column to 'git grep', I have restarted
this thread in order to not clutte
Teach 'git grep --only-matching', a new option to only print the
matching part(s) of a line.
For instance, a line containing the following (taken from README.md:27):
(`man gitcvs-migration` or `git help cvs-migration` if git is
Is printed as follows:
$ git grep -no -e git -- README.md | gre
Hi,
On Mon, 25 Jun 2018, Alban Gruin wrote:
> Le 25/06/2018 à 17:34, Junio C Hamano a écrit :
> > Alban Gruin writes:
> >
> >> Le 22/06/2018 à 18:27, Junio C Hamano a écrit :
> >>> Alban Gruin writes:
> This rewrites (the misnamed) setup_reflog_action() from shell to C. The
> new ver
Jonathan Tan writes:
> Instead of storing commit graphs in static variables, store them in
> struct object_store. There are no changes to the signatures of existing
> functions - they all still only support the_repository, and support for
> other instances of struct repository will be added in a
On 2018-06-25 16:15, Eric Sunshine wrote:
On Mon, Jun 25, 2018 at 3:18 PM Alejandro R. Sedeño wrote:
With GNU sed, the r command doesn't care if a space separates it and
the filename it reads from.
With SunOS sed, the space is required.
MacOS and the various BSD's ship with BSD 'sed', not GN
On Mon, Jun 25, 2018 at 3:18 PM Alejandro R. Sedeño wrote:
> With GNU sed, the r command doesn't care if a space separates it and
> the filename it reads from.
>
> With SunOS sed, the space is required.
MacOS and the various BSD's ship with BSD 'sed', not GNU 'sed', so it
seemed prudent to check
Derrick Stolee writes:
> +struct prepare_pack_data
> +{
ERROR: open brace '{' following struct go on the same line
#88: FILE: packfile.c:777:
+struct prepare_pack_data
+{
> + struct repository *r;
> + struct string_list *garbage;
> + int local;
> +};
> +
> +static void prepare_pack(
Derrick Stolee writes:
> test_expect_success 'write midx with no packs' '
> + test_when_finished rm pack/multi-pack-index &&
It is generally a good idea to give "-f" to "rm" used in
test_when_finished. The main command sequence may have failed
before it has a chance to create that file; ev
Derrick Stolee writes:
> +#define MIDX_HASH_LEN 20
> +#define MIDX_MIN_SIZE (MIDX_HEADER_SIZE + MIDX_HASH_LEN)
>
> static char *get_midx_filename(const char *object_dir)
> {
> return xstrfmt("%s/pack/multi-pack-index", object_dir);
> }
>
> +struct multi_pack_index *load_multi_pack_in
During negotiation, fetch-pack eventually reports as "have" lines all
commits reachable from all refs. Allow the user to restrict the commits
sent in this way by providing a whitelist of tips; only the tips
themselves and their ancestors will be sent.
This feature is only supported for protocols t
Derrick Stolee writes:
> +#define MIDX_SIGNATURE 0x4d494458 /* "MIDX" */
> +#define MIDX_VERSION 1
> +#define MIDX_HASH_VERSION 1
> +#define MIDX_HEADER_SIZE 12
> +
> +static char *get_midx_filename(const char *object_dir)
> +{
> + return xstrfmt("%s/pack/multi-pack-index", object_dir);
> +}
With GNU sed, the r command doesn't care if a space separates it and
the filename it reads from.
With SunOS sed, the space is required.
Signed-off-by: Alejandro R. Sedeño
---
Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Makefile b/Makefile
index e4b503d..5bac181
Derrick Stolee writes:
> This new 'git multi-pack-index' builtin will be the plumbing access
> for writing, reading, and checking multi-pack-index files. The
> initial implementation is a no-op.
>
> Signed-off-by: Derrick Stolee
> ---
> .gitignore | 3 +-
> Document
Hi,
I published my blog post about last week:
https://blog.pa1ch.fr/posts/2018/06/25/en/gsoc2018-week-8.html
Cheers,
Alban
Add tests to check the behavior of fetching from a repository which
changes between rounds of negotiation (for example, when different
servers in a load-balancing agreement participate in the same stateless
RPC negotiation). This forms a baseline of comparison to the ref-in-want
functionality (whic
Expand the transport fetch method signature, by adding an output
parameter, to allow transports to return information about the refs they
have fetched. Then communicate shallow status information through this
mechanism instead of by modifying the input list of refs.
This does require clients to s
Implement ref-in-want on the client side so that when a server supports
the "ref-in-want" feature, a client will send "want-ref" lines for each
reference the client wants to fetch. This feature allows clients to
tolerate inconsistencies that exist when a remote repository's refs
change during the
Refactor find_non_local_tags and get_ref_map to only take the
information they need instead of the entire transport struct. Besides
improving code clarity, this also improves their flexibility, allowing
for a different set of refs to be used instead of relying on the ones
stored in the transport st
Populate peer ref OIDs in get_ref_map instead of do_fetch. Besides
tightening scopes of variables in the code, this also prepares for
get_ref_map being able to be called multiple times within do_fetch.
Signed-off-by: Brandon Williams
---
builtin/fetch.c | 36 ++--
Refactor the fetch_refs function into a function that does the fetching
of refs and another function that stores them. This is in preparation
for allowing additional processing of the fetched refs before updating
the local ref store.
Signed-off-by: Brandon Williams
---
builtin/fetch.c | 23
Currently, while performing packfile negotiation, clients are only
allowed to specify their desired objects using object ids. This causes
a vulnerability to failure when an object turns non-existent during
negotiation, which may happen if, for example, the desired repository is
provided by multipl
Changes in v4 are fairly minor. There are a few documentation changes,
commit message updates, as well as a few small style tweaks based on
reviewer comments.
Brandon Williams (8):
test-pkt-line: add unpack-sideband subcommand
upload-pack: implement ref-in-want
upload-pack: test negotiation
Add an 'unpack-sideband' subcommand to the test-pkt-line helper to
enable unpacking packet line data sent multiplexed using a sideband.
Signed-off-by: Brandon Williams
---
t/helper/test-pkt-line.c | 33 +
1 file changed, 33 insertions(+)
diff --git a/t/helper/tes
On Mon, Jun 25, 2018 at 02:43:50PM -0400, Jeff King wrote:
> On Fri, Jun 22, 2018 at 10:49:26AM -0500, Taylor Blau wrote:
> > Since the last time, only a couple of things have changed at Peff's
> > suggestions in [1]. The changes are summarized here, and an inter-diff
> > is available below:
> >
>
On Fri, Jun 22, 2018 at 10:49:26AM -0500, Taylor Blau wrote:
> Attached is my third--anticipate the final--re-roll of my series to
> teach 'git grep --column'.
You know when you say that it jinxes it, right? :)
> Since the last time, only a couple of things have changed at Peff's
> suggestions i
On 06/14, Jonathan Tan wrote:
> Thanks, Brandon and Junio, for your comments.
>
> Updates since v2:
> - nothing new in patches 1 and 2
> - patch 3: now clear priority queue unconditionally once we are done
>with it (as requested by Brandon in a comment for a later patch)
> - patch 4: update
On 06/07, Jonathan Tan wrote:
> This is a continuation of the object store refactoring effort.
>
> We cannot truly free an object store without ensuring that any generated
> bitmaps are first freed, so here are patches to drastically reduce the
> lifetime of any bitmaps generated. As a bonus, the
Hi Junio,
Le 25/06/2018 à 17:34, Junio C Hamano a écrit :
> Alban Gruin writes:
>
>> Hi Junio,
>>
>> Le 22/06/2018 à 18:27, Junio C Hamano a écrit :
>>> Alban Gruin writes:
This rewrites (the misnamed) setup_reflog_action() from shell to C. The
new version is called checkout_base_comm
On 06/25, Jonathan Tan wrote:
> > +static int parse_want_ref(const char *line, struct string_list
> > *wanted_refs)
> > +{
> > + const char *arg;
> > + if (skip_prefix(line, "want-ref ", &arg)) {
> > + struct object_id oid;
> > + struct string_list_item *item;
> > +
Jeff King writes:
> We seem to match url schemes case-sensitively:
>
> $ git clone SSH://example.com/repo.git
> Cloning into 'repo'...
> fatal: Unable to find remote helper for 'SSH'
>
> whereas rfc3986 is clear that the scheme portion is case-insensitive.
> We probably ought to match at le
On 06/25, Jonathan Tan wrote:
> > static void update_shallow(struct fetch_pack_args *args,
> > - struct ref **sought, int nr_sought,
> > + struct ref *refs,
>
> update_shallow() now takes in a linked list of refs instead of an array.
> I see that the tran
> +static int parse_want_ref(const char *line, struct string_list *wanted_refs)
> +{
> + const char *arg;
> + if (skip_prefix(line, "want-ref ", &arg)) {
> + struct object_id oid;
> + struct string_list_item *item;
> + struct object *o;
> +
> +
On 06/22, Jonathan Nieder wrote:
> Hi,
>
> Brandon Williams wrote:
>
> > Implement ref-in-want on the client side so that when a server supports
> > the "ref-in-want" feature, a client will send "want-ref" lines for each
> > reference the client wants to fetch.
> >
> > Signed-off-by: Brandon Will
Christian Couder writes:
> For each promisor remote I think it makes no sense to have more than
> one remote odb pointing to it. So I am not sure what to do here.
If it makes no sense, then detecting and erroring out would be a
sensible thing to do, no?
> static void update_shallow(struct fetch_pack_args *args,
> -struct ref **sought, int nr_sought,
> +struct ref *refs,
update_shallow() now takes in a linked list of refs instead of an array.
I see that the translation of this function is straightfo
> Populate peer ref OIDs in get_ref_map instead of do_fetch. Besides
> tightening scopes of variables in the code, this also prepares for
> get_ref_map being able to be called multiple times within do_fetch.
get_ref_map() is only called in one place in builtin/fetch.c, and that
place is in do_fetc
> +wanted-refs section
> + * This section is only included if the client has requested a
> + ref using a 'want-ref' line and if a packfile section is also
> + included in the response.
> +
> + * Always begins with the section header "wanted-refs"
Add a period at the end to
On Mon, Jun 25, 2018 at 9:34 AM Junio C Hamano wrote:
>
> Bryan Turner writes:
>
> > Git on Windows is not designed to run with anything other than
> > core.ignoreCase=true, and attempting to do so will cause unexpected
> > behavior.
>
> Even though I fully agree with your conclusion that the doc
Tiago Botelho writes:
> +test_expect_success "--bisect-all --first-parent" '
> +cat >expect1 < +$(git rev-parse CC) (dist=2)
> +$(git rev-parse EX) (dist=1)
> +$(git rev-parse D) (dist=1)
> +$(git rev-parse FX) (dist=0)
> +EOF
> +
> +cat >expect2 < +$(git rev-parse CC) (dist=2)
> +$(git rev-parse
Nguyễn Thái Ngọc Duy writes:
> Signed-off-by: Nguyễn Thái Ngọc Duy
> ---
> apply.c | 34 +++---
> 1 file changed, 19 insertions(+), 15 deletions(-)
Until all the codepaths that reach these callsites to index_*
functions from cmd_main() are converted to pass "struct
Currently, `show_stash()` uses `cmd_diff()` to generate
the output. After this commit, the output will be generated
using the internal API.
Before this commit, `git stash show --quiet` would act like
`git diff` and error out if the stash is not empty. Now, the
`--quiet` option does not error out g
It is already stated in documentation that it will accept any
option known to `git diff`, but not in the usage text and some
parts of the documentation.
Signed-off-by: Paul-Sebastian Ungureanu
---
Documentation/git-stash.txt | 4 ++--
builtin/stash--helper.c | 4 ++--
2 files changed, 4 inse
Add stash store to the helper and delete the store_stash function
from the shell script.
Add the usage string which was forgotten in the shell script.
Signed-off-by: Paul-Sebastian Ungureanu
---
builtin/stash--helper.c | 48 +
git-stash.sh| 43
Add stash list to the helper and delete the list_stash function
from the shell script.
Signed-off-by: Paul-Sebastian Ungureanu
---
builtin/stash--helper.c | 33 +
git-stash.sh| 7 +--
2 files changed, 34 insertions(+), 6 deletions(-)
diff --git a
Add in documentation about the change of behavior regarding
the `--quiet` option, which was introduced in the last commit.
(the `--quiet` option does not exit anymore with erorr if it
is given an empty stash as argument)
Signed-off-by: Paul-Sebastian Ungureanu
---
Documentation/git-stash.txt | 3
Add stash show to the helper and delete the show_stash, have_stash,
assert_stash_like, is_stash_like and parse_flags_and_rev functions
from the shell script now that they are no longer needed.
Before this commit, `git stash show` would ignore `--index` and
`--quiet` options. Now, `git stash show`
From: Joel Teichroeb
Add stash branch to the helper and delete the apply_to_branch
function from the shell script.
Checkout does not currently provide a function for checking out
a branch as cmd_checkout does a large amount of sanity checks
first that we require here.
Signed-off-by: Joel Teichr
From: Joel Teichroeb
Add the drop and clear commands to the builtin helper. These two
are each simple, but are being added together as they are quite
related.
We have to unfortunately keep the drop and clear functions in the
shell script as functions are called with parameters internally
that ar
From: Joel Teichroeb
Add stash pop to the helper and delete the pop_stash, drop_stash,
assert_stash_ref functions from the shell script now that they
are no longer needed.
Signed-off-by: Joel Teichroeb
Signed-off-by: Paul-Sebastian Ungureanu
---
builtin/stash--helper.c | 36 ++
From: Joel Teichroeb
Add a builtin helper for performing stash commands. Converting
all at once proved hard to review, so starting with just apply
lets conversion get started without the other commands being
finished.
The helper is being implemented as a drop in replacement for
stash so that whe
Compared to 'get_oid', 'get_oidf' has as parameters a
printf format string and the additional arguments. This
will help simplify the code in subsequent commits.
Original-idea-by: Johannes Schindelin
Signed-off-by: Paul-Sebastian Ungureanu
---
cache.h | 1 +
sha1-name.c | 19 +++
Hello,
This first series of patches does bring some changes and improvements to the
test suite. One of the patches also introduces a new function `get_oidf()` which
will be hepful for the incoming patches related to `git stash`.
Thanks,
Paul
Joel Teichroeb (1):
stash: improve option parsing t
From: Joel Teichroeb
In preparation for converting the stash command incrementally to
a builtin command, this patch improves test coverage of the option
parsing. Both for having too many parameters, or too few.
Signed-off-by: Joel Teichroeb
Signed-off-by: Paul-Sebastian Ungureanu
---
t/t3903-
Removed whitespaces after redirection operators.
Signed-off-by: Paul-Sebastian Ungureanu
---
t/t3903-stash.sh | 120 ---
1 file changed, 61 insertions(+), 59 deletions(-)
diff --git a/t/t3903-stash.sh b/t/t3903-stash.sh
index af7586d43..de6cab1fe 1007
Renamed some test cases' labels to be more descriptive and under 80
characters per line.
Signed-off-by: Paul-Sebastian Ungureanu
---
t/t3903-stash.sh | 14 +++---
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/t/t3903-stash.sh b/t/t3903-stash.sh
index de6cab1fe..8d002a7f2
Bryan Turner writes:
> Git on Windows is not designed to run with anything other than
> core.ignoreCase=true, and attempting to do so will cause unexpected
> behavior.
Even though I fully agree with your conclusion that the document
must make it crystal clear that core.ignoreCase must be set to
On Sat, Jun 23, 2018 at 05:45:19PM -0400, Noam Postavsky wrote:
> On 20 May 2016 at 18:12, Noam Postavsky
> wrote:
My, this is a blast from the past. :)
> Subject: [PATCH v1] log: Fix coloring of certain octupus merge shapes
>
> For octopus merges where the first parent edge immediately merge
On Wed, Jun 6, 2018 at 10:04 PM, Elijah Newren wrote:
> Add a simple directory rename testcase, in conjunction with each of the
> types of rebases:
> git-rebase--interactive
> git-rebase--am
> git-rebase--merge
> and also use the same testcase for
> git am --3way
>
> This demonstrates an i
Signed-off-by: Elijah Newren
---
.../technical/directory-rename-detection.txt | 92 +++
1 file changed, 92 insertions(+)
create mode 100644 Documentation/technical/directory-rename-detection.txt
diff --git a/Documentation/technical/directory-rename-detection.txt
b/Documentatio
git rebase has three different types: am, merge, and interactive, all of
which are implemented in terms of separate scripts. am builds on git-am,
merge builds on git-merge-recursive, and interactive builds on
git-cherry-pick. We make use of features in those lower-level commands in
the different
There are a variety of aspects that are common to all rebases regardless
of which backend is in use; however, the behavior for these different
aspects varies in ways that could surprise users. (In fact, it's not
clear -- to me at least -- that these differences were even desirable or
intentional.)
git rebase has many options that only work with one of its three backends.
It also has a few other pairs of incompatible options. Document these.
Signed-off-by: Elijah Newren
---
Documentation/git-rebase.txt | 85
1 file changed, 77 insertions(+), 8 deletion
Add a simple directory rename testcase, in conjunction with each of the
types of rebases:
git-rebase--interactive
git-rebase--am
git-rebase--merge
and also use the same testcase for
git am --3way
This demonstrates a difference in behavior between the different rebase
backends in regards to
rebase backends currently behave differently with empty commit messages,
largely as a side-effect of the different underlying commands on which
they are based. am-based rebases apply commits with an empty commit
message without stopping or requiring the user to specify an extra flag.
(It is intere
rebase was taught the --force-rebase option in commit b2f82e05de ("Teach
rebase to rebase even if upstream is up to date", 2009-02-13). This flag
worked for the am and merge backends, but wasn't a valid option for the
interactive backend.
rebase was taught the --no-ff option for interactive rebas
git-rebase has lots of options that are mutually incompatible. Even among
aspects of its behavior that is common to all rebase types, it has a number
of inconsistencies. This series tries to document, fix, and/or warn users
about many of these.
Changes since v3 (range-diff included at the end):
git rebase is split into three types: am, merge, and interactive. Various
options imply different types, and which mode we are using determine which
sub-script (git-rebase--$type) is executed to finish the work. Not all
options work with all types, so add tests for combinations where we expect
to
signoff is not specific to the am-backend. Also, re-order a few options
to make like things (e.g. strategy and strategy-option) be near each
other.
Signed-off-by: Elijah Newren
---
git-rebase.sh | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/git-rebase.sh b/git-rebase
SZEDER Gábor writes:
>> When an error occurs in updating the working tree of a submodule in
>> submodule_move_head, tell the user which submodule the error occurred in.
>>
>> The call to read-tree contains a super-prefix, such that the read-tree
>> will correctly report any path related issues,
Alban Gruin writes:
> Hi Junio,
>
> Le 22/06/2018 à 18:27, Junio C Hamano a écrit :
>> Alban Gruin writes:
>> > This rewrites (the misnamed) setup_reflog_action() from shell to C. The
>> > new version is called checkout_base_commit().
>>
>> ;-) on the "misnamed" part. Indeed, setting up the co
Hi,
On Thu, 21 Jun 2018, Raphael Hertzog wrote:
> On Thu, 21 Jun 2018, Duy Nguyen wrote:
> > Nice. There's another string in bisect_common() that should also be
> > translated: "revision walk setup failed". Maybe you can mark it too?
>
> Sure. A new version of the second patch is attached.
I hav
On 6/8/2018 6:24 PM, SZEDER Gábor wrote:
The commit-graph file is a very helpful feature for speeding up git
operations. In order to make it more useful, make it possible to
write the commit-graph file during standard garbage collection
operations.
Add a 'gc.commitGraph' config setting that trig
As we build the multi-pack-index file format, we want to test the format
on real repoasitories. Add tests to t5319-multi-pack-index.sh that
create repository data including multiple packfiles with both version 1
and version 2 formats.
The current 'git multi-pack-index write' command will always wr
Signed-off-by: Derrick Stolee
---
packfile.c | 5 -
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/packfile.c b/packfile.c
index 20b743da91..e72e8a685d 100644
--- a/packfile.c
+++ b/packfile.c
@@ -863,11 +863,14 @@ unsigned long approximate_object_count(void)
{
if (!the
The multi-pack-index, when present, tracks the existence of objects and
their offsets within a list of packfiles. This allows us to use the
multi-pack-index for object lookups, abbreviations, and object counts.
When the multi-pack-index tracks a packfile, then we do not need to add
that packfile t
Signed-off-by: Derrick Stolee
---
midx.c | 107 ++---
midx.h | 1 +
2 files changed, 96 insertions(+), 12 deletions(-)
diff --git a/midx.c b/midx.c
index c258e3ebdf..02cbfc5bd5 100644
--- a/midx.c
+++ b/midx.c
@@ -47,7 +47,6 @@ struct multi_p
If a 'git repack' command replaces existing packfiles, then we must
clear the existing multi-pack-index before moving the packfiles it
references.
Signed-off-by: Derrick Stolee
---
builtin/repack.c | 8
midx.c | 8
midx.h | 1 +
3 files changed, 17 insertion
Signed-off-by: Derrick Stolee
---
packfile.c | 19 +--
1 file changed, 17 insertions(+), 2 deletions(-)
diff --git a/packfile.c b/packfile.c
index f2b8d6f8a7..acd02430a8 100644
--- a/packfile.c
+++ b/packfile.c
@@ -469,8 +469,19 @@ static int open_packed_git_1(struct packed_git *
Signed-off-by: Derrick Stolee
---
midx.c | 22 ++
midx.h | 3 +++
object-store.h | 9 +
packfile.c | 6 +-
4 files changed, 39 insertions(+), 1 deletion(-)
diff --git a/midx.c b/midx.c
index 71ca493107..3dd5027dc6 100644
--- a/midx.c
+++ b/m
The multi-pack-index needs to track which packfiles it indexes. Store
these in our first required chunk. Since filenames are not well
structured, add padding to keep good alignment in later chunks.
Modify the 'git multi-pack-index read' subcommand to output the
existence of the pack-file name chun
Signed-off-by: Derrick Stolee
---
midx.c | 11 ++
midx.h | 3 ++
packfile.c | 6
packfile.h | 1 +
sha1-name.c | 70 +
t/t5319-multi-pack-index.sh | 3 +-
6
Signed-off-by: Derrick Stolee
---
midx.c | 93 --
midx.h | 2 ++
object-store.h | 1 +
packfile.c | 8 -
4 files changed, 101 insertions(+), 3 deletions(-)
diff --git a/midx.c b/midx.c
index 3dd5027dc6..14514d6828 100644
The core.multiPackIndex config setting controls the multi-pack-
index (MIDX) feature. If false, the setting will disable all reads
from the multi-pack-index file.
Add comparison commands in t5319-multi-pack-index.sh to check
typical Git behavior remains the same as the config setting is turned
on
The final pair of chunks for the multi-pack-index file stores the object
offsets. We default to using 32-bit offsets as in the pack-index version
1 format, but if there exists an offset larger than 32-bits, we use a
trick similar to the pack-index version 2 format by storing all offsets
at least 2^
The multi-pack-index feature generalizes the existing pack-index
feature by indexing objects across multiple pack-files.
Describe the basic file format, using a 12-byte header followed by
a lookup table for a list of "chunks" which will be described later.
The file ends with a footer containing a
Signed-off-by: Derrick Stolee
---
Documentation/technical/pack-format.txt | 4 ++
midx.c | 51 ++---
object-store.h | 1 +
t/helper/test-read-midx.c | 2 +
t/t5319-multi-pack-index.sh | 4 +
Signed-off-by: Derrick Stolee
---
Documentation/technical/pack-format.txt | 5 +++
midx.c | 53 +++--
object-store.h | 1 +
t/helper/test-read-midx.c | 4 +-
t/t5319-multi-pack-index.sh | 18
Before writing a list of objects and their offsets to a multi-pack-index,
we need to collect the list of objects contained in the packfiles. There
may be multiple copies of some objects, so this list must be deduplicated.
It is possible to artificially get into a state where there are many
duplica
When constructing a multi-pack-index file for a given object directory,
read the files within the enclosed pack directory and find matches that
end with ".idx" and find the correct paired packfile using
add_packed_git().
Signed-off-by: Derrick Stolee
---
midx.c | 45
1 - 100 of 112 matches
Mail list logo