Re: [PATCH v3 24/24] midx: clear midx on repack

2018-07-05 Thread Eric Sunshine
On Thu, Jul 5, 2018 at 8:54 PM Derrick Stolee wrote: > 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

Re: [PATCH v3 17/24] midx: prepare midxed_git struct

2018-07-05 Thread Eric Sunshine
On Thu, Jul 5, 2018 at 8:54 PM Derrick Stolee wrote: > midx: prepare midxed_git struct What's a "midxed_git"? I don't see it in the code anywhere. > Signed-off-by: Derrick Stolee

Re: [PATCH v3 16/24] config: create core.multiPackIndex setting

2018-07-05 Thread Eric Sunshine
On Thu, Jul 5, 2018 at 8:54 PM Derrick Stolee wrote: > 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

Re: [PATCH v3 15/24] midx: write object offsets

2018-07-05 Thread Eric Sunshine
On Thu, Jul 5, 2018 at 8:54 PM Derrick Stolee wrote: > 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

Re: [PATCH v3 07/24] multi-pack-index: expand test data

2018-07-05 Thread Eric Sunshine
On Fri, Jul 6, 2018 at 12:36 AM Eric Sunshine wrote: > On Thu, Jul 5, 2018 at 8:54 PM Derrick Stolee wrote: > > +test_expect_success 'write midx with one v1 pack' ' > > + pack=$(git pack-objects --index-version=1 pack/test > + test_when_finished rm pack/test-$pack.pack

Re: [PATCH v3 06/24] multi-pack-index: load into memory

2018-07-05 Thread Eric Sunshine
On Fri, Jul 6, 2018 at 12:19 AM Eric Sunshine wrote: > On Thu, Jul 5, 2018 at 8:53 PM Derrick Stolee wrote: > > +midx_read_expect () { > > + cat >expect <<-EOF > > + header: 4d494458 1 0 0 > > + object_dir: . > > + EOF > > + test-tool read-midx . >actual && > > +

Re: [PATCH v3 13/24] midx: write object ids in a chunk

2018-07-05 Thread Eric Sunshine
On Thu, Jul 5, 2018 at 8:54 PM Derrick Stolee wrote: > Signed-off-by: Derrick Stolee > --- > diff --git a/midx.c b/midx.c > @@ -18,9 +18,10 @@ > @@ -384,6 +391,32 @@ static size_t write_midx_pack_names(struct hashfile *f, > +static size_t write_midx_oid_lookup(struct hashfile *f, unsigned char

Re: [PATCH v3 11/24] midx: read pack names into array

2018-07-05 Thread Eric Sunshine
On Thu, Jul 5, 2018 at 8:54 PM Derrick Stolee wrote: > Signed-off-by: Derrick Stolee > --- > diff --git a/t/t5319-multi-pack-index.sh b/t/t5319-multi-pack-index.sh > @@ -8,8 +8,13 @@ midx_read_expect () { > cat >expect <<-EOF Broken &&-chain. > header: 4d494458 1 1 $NUM_PACKS >

Re: [PATCH v3 07/24] multi-pack-index: expand test data

2018-07-05 Thread Eric Sunshine
On Thu, Jul 5, 2018 at 8:54 PM Derrick Stolee wrote: > multi-pack-index: expand test data Since this patch is touching only t5319, a more typical title would be: t5319: expand test data > As we build the multi-pack-index file format, we want to test the format > on real repoasitories. Add

Re: [PATCH v3 06/24] multi-pack-index: load into memory

2018-07-05 Thread Eric Sunshine
On Thu, Jul 5, 2018 at 8:53 PM Derrick Stolee wrote: > Create a new multi_pack_index struct for loading multi-pack-indexes into > memory. Create a test-tool builtin for reading basic information about > that multi-pack-index to verify the correct data is written. > > Signed-off-by: Derrick Stolee

Re: [PATCH v3 04/24] multi-pack-index: add 'write' verb

2018-07-05 Thread Eric Sunshine
On Thu, Jul 5, 2018 at 8:53 PM Derrick Stolee wrote: > In anticipation of writing multi-pack-indexes, add a > 'git multi-pack-index write' subcommand and send the options to a > write_midx_file() method. Since the 'write' command is a no-op at this point, perhaps say so in the commit message.

Re: [PATCH v3 03/24] multi-pack-index: add builtin

2018-07-05 Thread Eric Sunshine
On Thu, Jul 5, 2018 at 8:53 PM Derrick Stolee wrote: > 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 > --- > diff --git

[PATCH 3/3] send-email: automatically determine transfer-encoding

2018-07-05 Thread brian m. carlson
git send-email, when invoked without a --transfer-encoding option, sends 8bit data without a MIME version or a transfer encoding. This has several downsides. First, unless the transfer encoding is specified, it defaults to 7bit, meaning that non-ASCII data isn't allowed. Second, if lines longer

[PATCH 2/3] send-email: accept long lines with suitable transfer encoding

2018-07-05 Thread brian m. carlson
With --validate (which is the default), we warn about lines exceeding 998 characters due to the limits specified in RFC 5321. However, if we're using a suitable transfer encoding (quoted-printable or base64), we're guaranteed not to have lines exceeding 76 characters, so there's no need to fail

[PATCH 0/3] Automatic transfer encoding for patches

2018-07-05 Thread brian m. carlson
git send-email has the --validate option, which is the default, to check if a patch has lines longer than RFC 5321 allows (998 octets). However, it doesn't take into account the fact that using certain transfer encodings makes this issue moot, and it also doesn't provide any helpful clue to the

[PATCH 1/3] send-email: add an auto option for transfer encoding

2018-07-05 Thread brian m. carlson
For most patches, using a transfer encoding of 8bit provides good compatibility with most servers and makes it as easy as possible to view patches. However, there are some patches for which 8bit is not a valid encoding: RFC 5321 specifies that a message must not have lines exceeding 998 octets.

Re: [PATCH 0/8] X509 (gpgsm) commit signing support

2018-07-05 Thread brian m. carlson
On Tue, Jul 03, 2018 at 02:38:12PM +0200, Henning Schild wrote: > This series adds support for signing commits with gpgsm. > > The first two patches are cleanups of gpg-interface, while the next > four prepare for the introduction of the actual feature in patch 7. > Finally patch 8 extends the

Re: [PATCH 8/8] gpg-interface t: extend the existing GPG tests with GPGSM

2018-07-05 Thread brian m. carlson
On Tue, Jul 03, 2018 at 02:38:20PM +0200, Henning Schild wrote: > Add test cases to cover the new X509/gpgsm support. Most of them > resemble existing ones. They just switch the format to X509 and set the > signingkey when creating signatures. Validation of signatures does not > need any

Re: [PATCH 7/8] gpg-interface: introduce new signature format "X509" using gpgsm

2018-07-05 Thread brian m. carlson
On Tue, Jul 03, 2018 at 02:38:19PM +0200, Henning Schild wrote: > This commit allows git to create and check X509 type signatures using > gpgsm. > > Signed-off-by: Henning Schild > --- > Documentation/config.txt | 5 - > gpg-interface.c | 10 +- > 2 files changed, 13

Re: [PATCH 3/8] gpg-interface: add new config to select how to sign a commit

2018-07-05 Thread brian m. carlson
On Tue, Jul 03, 2018 at 02:38:15PM +0200, Henning Schild wrote: > Add "gpg.format" where the user can specify which type of signature to > use for commits. At the moment only "PGP" is supported and the value is > not even used. This commit prepares for a new types of signatures. We typically

[PATCH v3 23/24] packfile: skip loading index if in multi-pack-index

2018-07-05 Thread Derrick Stolee
Signed-off-by: Derrick Stolee --- packfile.c | 19 +-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/packfile.c b/packfile.c index 2c819a0ad8..e6ecf12ab5 100644 --- a/packfile.c +++ b/packfile.c @@ -469,8 +469,19 @@ static int open_packed_git_1(struct packed_git

[PATCH v3 11/24] midx: read pack names into array

2018-07-05 Thread Derrick Stolee
Signed-off-by: Derrick Stolee --- midx.c | 17 + object-store.h | 1 + t/helper/test-read-midx.c | 5 + t/t5319-multi-pack-index.sh | 7 ++- 4 files changed, 29 insertions(+), 1 deletion(-) diff --git a/midx.c b/midx.c index

[PATCH v3 22/24] midx: prevent duplicate packfile loads

2018-07-05 Thread Derrick Stolee
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

[PATCH v3 07/24] multi-pack-index: expand test data

2018-07-05 Thread Derrick Stolee
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

[PATCH v3 16/24] config: create core.multiPackIndex setting

2018-07-05 Thread Derrick Stolee
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

[PATCH v3 17/24] midx: prepare midxed_git struct

2018-07-05 Thread Derrick Stolee
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 cc35abe7a2..d5a61c0c53 100644 --- a/midx.c +++

[PATCH v3 24/24] midx: clear midx on repack

2018-07-05 Thread Derrick Stolee
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 | 12 midx.h | 1 + 3 files changed, 21

[PATCH v3 21/24] midx: use midx in approximate_object_count

2018-07-05 Thread Derrick Stolee
Signed-off-by: Derrick Stolee --- packfile.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packfile.c b/packfile.c index c0eb5ac885..97e7812b6b 100644 --- a/packfile.c +++ b/packfile.c @@ -861,10 +861,13 @@ unsigned long approximate_object_count(void) { if

[PATCH v3 20/24] midx: use existing midx when writing new one

2018-07-05 Thread Derrick Stolee
Due to how Windows handles replacing a lockfile when there is an open handle, create the close_midx() method to close the existing midx before writing the new one. Signed-off-by: Derrick Stolee --- midx.c | 116 ++--- midx.h | 1 + 2 files

[PATCH v3 18/24] midx: read objects from multi-pack-index

2018-07-05 Thread Derrick Stolee
Signed-off-by: Derrick Stolee --- midx.c | 91 +- midx.h | 2 ++ object-store.h | 1 + packfile.c | 8 - 4 files changed, 100 insertions(+), 2 deletions(-) diff --git a/midx.c b/midx.c index d5a61c0c53..84b045060a 100644

[PATCH v3 15/24] midx: write object offsets

2018-07-05 Thread Derrick Stolee
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

[PATCH v3 19/24] midx: use midx in abbreviation calculations

2018-07-05 Thread Derrick Stolee
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 +-

[PATCH v3 14/24] midx: write object id fanout chunk

2018-07-05 Thread Derrick Stolee
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 |

[PATCH v3 10/24] multi-pack-index: write pack names in chunk

2018-07-05 Thread Derrick Stolee
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

[PATCH v3 02/24] multi-pack-index: add format details

2018-07-05 Thread Derrick Stolee
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

[PATCH v3 06/24] multi-pack-index: load into memory

2018-07-05 Thread Derrick Stolee
Create a new multi_pack_index struct for loading multi-pack-indexes into memory. Create a test-tool builtin for reading basic information about that multi-pack-index to verify the correct data is written. Signed-off-by: Derrick Stolee --- Makefile| 1 + midx.c

[PATCH v3 09/24] multi-pack-index: read packfile list

2018-07-05 Thread Derrick Stolee
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 | 46

[PATCH v3 05/24] midx: write header information to lockfile

2018-07-05 Thread Derrick Stolee
As we begin writing the multi-pack-index format to disk, start with the basics: the 12-byte header and the 20-byte checksum footer. Start with these basics so we can add the rest of the format in small increments. As we implement the format, we will use a technique to check that our computed

[PATCH v3 03/24] multi-pack-index: add builtin

2018-07-05 Thread Derrick Stolee
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 +- Documentation/git-multi-pack-index.txt | 36

[PATCH v3 12/24] midx: sort and deduplicate objects from packfiles

2018-07-05 Thread Derrick Stolee
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

[PATCH v3 08/24] packfile: generalize pack directory list

2018-07-05 Thread Derrick Stolee
In anticipation of sharing the pack directory listing with the multi-pack-index, generalize prepare_packed_git_one() into for_each_file_in_pack_dir(). Signed-off-by: Derrick Stolee --- packfile.c | 101 + packfile.h | 6 2 files

[PATCH v3 04/24] multi-pack-index: add 'write' verb

2018-07-05 Thread Derrick Stolee
In anticipation of writing multi-pack-indexes, add a 'git multi-pack-index write' subcommand and send the options to a write_midx_file() method. Also create a basic test file that tests the 'write' subcommand. Signed-off-by: Derrick Stolee --- Documentation/git-multi-pack-index.txt | 22

[PATCH v3 13/24] midx: write object ids in a chunk

2018-07-05 Thread Derrick Stolee
Signed-off-by: Derrick Stolee --- Documentation/technical/pack-format.txt | 4 +++ midx.c | 47 +++-- object-store.h | 1 + t/helper/test-read-midx.c | 2 ++ t/t5319-multi-pack-index.sh |

[PATCH v3 00/24] Multi-pack-index (MIDX)

2018-07-05 Thread Derrick Stolee
Thanks for the feedback on v2. I cleaned up the patch to respond to all that feedback. I'll include the version diff in a follow-up email. You can see the CI builds for Linux, Mac, and Windows linked from the GitHub pull request [1]. Biggest changes in this version: * Deleted the extra static

[PATCH v3 01/24] multi-pack-index: add design document

2018-07-05 Thread Derrick Stolee
Signed-off-by: Derrick Stolee --- Documentation/technical/multi-pack-index.txt | 109 +++ 1 file changed, 109 insertions(+) create mode 100644 Documentation/technical/multi-pack-index.txt diff --git a/Documentation/technical/multi-pack-index.txt

Business Proposal

2018-07-05 Thread BRENDA WILSON
I am Sgt.Brenda Wilson, originally from Lake Jackson Texas USA.I personally made a special research and I came across your information. I am presently writing this mail to you from U.S Military base Kabul Afghanistan I have a secured business proposal for you. Reply for more details via my

Re: [PATCH] builtin/config: work around an unsized array forward declaration

2018-07-05 Thread Jeff King
On Thu, Jul 05, 2018 at 09:50:53PM +0200, Beat Bolli wrote: > > Your patch is obviously correct, but I think here there might be an even > > simpler solution: just bump option_parse_type() below the declaration, > > since it's the only one that needs it. That hunk is bigger, but the > > overall

Re: [PATCH] builtin/config: work around an unsized array forward declaration

2018-07-05 Thread Beat Bolli
Hi Peff On 05.07.18 21:38, Jeff King wrote: > On Thu, Jul 05, 2018 at 08:34:45PM +0200, Beat Bolli wrote: > >> As reported here[0], Microsoft Visual Studio 2017.2 and "gcc -pedantic" >> don't understand the forward declaration of an unsized static array. >> They insist on an array size: >> >>

Re: [PATCH] builtin/config: work around an unsized array forward declaration

2018-07-05 Thread Jeff King
On Thu, Jul 05, 2018 at 08:34:45PM +0200, Beat Bolli wrote: > As reported here[0], Microsoft Visual Studio 2017.2 and "gcc -pedantic" > don't understand the forward declaration of an unsized static array. > They insist on an array size: > > d:\git\src\builtin\config.c(70,46): error C2133: >

Re: [PATCH] builtin/config: work around an unsized array forward declaration

2018-07-05 Thread Taylor Blau
On Thu, Jul 05, 2018 at 08:34:45PM +0200, Beat Bolli wrote: > As reported here[0], Microsoft Visual Studio 2017.2 and "gcc -pedantic" > don't understand the forward declaration of an unsized static array. > They insist on an array size: > > d:\git\src\builtin\config.c(70,46): error C2133: >

Re: [PATCH v2 05/24] midx: write header information to lockfile

2018-07-05 Thread Derrick Stolee
On 6/25/2018 3:19 PM, Junio C Hamano wrote: 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

Re: [PATCH v2 06/24] multi-pack-index: load into memory

2018-07-05 Thread Eric Sunshine
On Thu, Jul 5, 2018 at 10:20 AM Derrick Stolee wrote: > On 6/25/2018 3:38 PM, Junio C Hamano wrote: > While I don't use substitutions in this patch, I do use them in later > patches. Here is the final version of this method: > > midx_read_expect () { > NUM_PACKS=$1 >

[PATCH] builtin/config: work around an unsized array forward declaration

2018-07-05 Thread Beat Bolli
As reported here[0], Microsoft Visual Studio 2017.2 and "gcc -pedantic" don't understand the forward declaration of an unsized static array. They insist on an array size: d:\git\src\builtin\config.c(70,46): error C2133: 'builtin_config_options': unknown size The thread [1] explains that

Re: Git 2.18: RUNTIME_PREFIX... is it working?

2018-07-05 Thread Paul Smith
On Wed, 2018-07-04 at 13:22 +0200, Johannes Schindelin wrote: > > Basically what happens is that I run configure with > > --prefix=/my/install/path --with-gitconfig=etc/gitconfig > > --with-gitattributes=etc/gitattributes. > > > > Then I run make with RUNTIME_PREFIX=YesPlease. > > Ah. In Git for

Re: [GSoC][PATCH v2 1/7] sequencer: make two functions and an enum from sequencer.c public

2018-07-05 Thread Alban Gruin
Hi Junio, Le 03/07/2018 à 22:20, Junio C Hamano a écrit : > Alban Gruin writes: > >> -enum check_level { >> -CHECK_IGNORE = 0, CHECK_WARN, CHECK_ERROR >> -}; >> - >> -static enum check_level get_missing_commit_check_level(void) >> +enum missing_commit_check_level

RE: [PATCH v6 2/8] read-cache: teach make_cache_entry to take object_id

2018-07-05 Thread Jameson Miller
> > > > Teach make_cache_entry function to take object_id instead of a SHA-1. > > This repeats the subject line? > > Sign off missing. Thank you Stefan for pointing this out. This does not add much information to the subject line. I could clean it up if I re-roll to fix up the missing sign

Re: [PATCH v3 0/2] grep.c: teach --only-matching to 'git-grep(1)'

2018-07-05 Thread Taylor Blau
On Thu, Jul 05, 2018 at 10:21:11AM -0400, Jeff King wrote: > On Tue, Jul 03, 2018 at 04:51:52PM -0500, Taylor Blau wrote: > > > diff --git a/Documentation/git-grep.txt b/Documentation/git-grep.txt > > index 0de3493b80..be13fc3253 100644 > > --- a/Documentation/git-grep.txt > > +++

Re: [PATCH v3 0/2] grep.c: teach --only-matching to 'git-grep(1)'

2018-07-05 Thread Jeff King
On Tue, Jul 03, 2018 at 04:51:52PM -0500, Taylor Blau wrote: > diff --git a/Documentation/git-grep.txt b/Documentation/git-grep.txt > index 0de3493b80..be13fc3253 100644 > --- a/Documentation/git-grep.txt > +++ b/Documentation/git-grep.txt > @@ -17,7 +17,7 @@ SYNOPSIS > [-l |

Re: [PATCH v2 06/24] multi-pack-index: load into memory

2018-07-05 Thread Derrick Stolee
On 6/25/2018 3:38 PM, Junio C Hamano wrote: Derrick Stolee writes: + cat >expect <<- EOF "<<-\EOF", i.e. make it easy for readers to spot that there is no funny substitutions happening in the here-doc body. While I don't use substitutions in this patch, I do use them in later

Re: [PATCH 4/8] gpg-interface: introduce an abstraction for multiple gpg formats

2018-07-05 Thread Henning Schild
Am Wed, 4 Jul 2018 09:10:17 +0200 schrieb Martin Ågren : > Hi Henning, > > On 3 July 2018 at 14:38, Henning Schild > wrote: > > Create a struct that holds the format details for the supported > > formats. At the moment that is still just "PGP". This commit > > prepares for the introduction of