Re: [PATCH] builtin/add: add detail to a 'cannot chmod' error message

2017-08-08 Thread Junio C Hamano
Ramsay Jones writes: > In addition to adding the missing newline, add the x-ecutable bit > 'mode change' character to the error message. This message now has > the same form as similar messages output by 'update-index'. > > Signed-off-by: Ramsay Jones

Re: [PATCH] t1200: remove t1200-tutorial.sh

2017-08-08 Thread Junio C Hamano
Jonathan Nieder writes: > Correction: the tutorial is now called gitcore-tutorial and mostly > survives. A search for -p --root failed because of v1.5.5.1~19^2 > (core-tutorial.txt: Fix showing the current behaviour, 2008-04-10). Yeah, I was wondering why neither of you

Re: [PATCH] builtin/add: add a missing newline to an stderr message

2017-08-08 Thread Junio C Hamano
Jonathan Nieder writes: > I don't believe the force_mode without an 'x' provides a clear signal > to the end user. Perhaps you meant %cx? Indeed you are right. I think I saw Ramsay's v2 that has the 'x', so let's use that version. Thanks.

Re: [PATCH] sha1_file: avoid comparison if no packed hash matches the first byte

2017-08-08 Thread Junio C Hamano
Jeff King writes: > On Tue, Aug 08, 2017 at 06:52:31PM -0400, Jeff King wrote: > >> > Interesting. I see that we still have the conditional code to call >> > out to sha1-lookup.c::sha1_entry_pos(). Do we need a similar change >> > over there, I wonder? Alternatively, as we have

Re: [PATCH] t4062: stop using repetition in regex

2017-08-08 Thread Junio C Hamano
René Scharfe writes: > Am 09.08.2017 um 00:26 schrieb Junio C Hamano: >> ... but in the meantime, I think replacing the test with "0$" to >> force the scanner to find either the end of line or the end of the >> buffer may be a good workaround. We do not have to care how many of >>

[PATCH v2 10/25] pack: move install_packed_git()

2017-08-08 Thread Jonathan Tan
Signed-off-by: Jonathan Tan --- cache.h | 1 - pack.h | 4 ++-- packfile.c | 11 ++- sha1_file.c | 9 - 4 files changed, 12 insertions(+), 13 deletions(-) diff --git a/cache.h b/cache.h index bf93477e8..41562dc0b 100644 --- a/cache.h +++

[PATCH v2 06/25] pack: move pack-closing functions

2017-08-08 Thread Jonathan Tan
The function close_pack_fd() needs to be temporarily made global. Its scope will be restored to static in a subsequent commit. Signed-off-by: Jonathan Tan --- builtin/am.c| 1 + builtin/clone.c | 1 + builtin/fetch.c | 1 + builtin/merge.c | 1 + cache.h

[PATCH v2 11/25] pack: move {,re}prepare_packed_git and approximate_object_count

2017-08-08 Thread Jonathan Tan
Signed-off-by: Jonathan Tan --- builtin/gc.c | 1 + cache.h| 15 http-backend.c | 1 + pack.h | 15 packfile.c | 216 + path.c | 1 + server-info.c | 1 +

[PATCH v2 12/25] pack: move unpack_object_header()

2017-08-08 Thread Jonathan Tan
Signed-off-by: Jonathan Tan --- cache.h | 1 - pack.h | 2 ++ packfile.c | 25 + sha1_file.c | 25 - 4 files changed, 27 insertions(+), 26 deletions(-) diff --git a/cache.h b/cache.h index f020dfade..9c70759a6

[PATCH v2 09/25] pack: move add_packed_git()

2017-08-08 Thread Jonathan Tan
Signed-off-by: Jonathan Tan --- cache.h | 1 - connected.c | 1 + pack.h | 1 + packfile.c | 53 + sha1_file.c | 61 - 5 files changed, 55

[PATCH v2 20/25] pack: move find_pack_entry_one(), is_pack_valid()

2017-08-08 Thread Jonathan Tan
Signed-off-by: Jonathan Tan --- cache.h | 8 -- pack.h | 10 ++-- packfile.c | 85 + sha1_file.c | 84 4 files changed, 93

[PATCH v2 21/25] pack: move find_sha1_pack()

2017-08-08 Thread Jonathan Tan
Signed-off-by: Jonathan Tan --- cache.h | 3 --- http-push.c | 1 + http-walker.c | 1 + pack.h| 3 +++ packfile.c| 13 + sha1_file.c | 13 - 6 files changed, 18 insertions(+), 16 deletions(-) diff --git a/cache.h

[PATCH v2 19/25] pack: move check_pack_index_ptr(), nth_packed_object_offset()

2017-08-08 Thread Jonathan Tan
Signed-off-by: Jonathan Tan --- cache.h | 16 pack.h | 16 packfile.c | 33 + sha1_file.c | 33 - 4 files changed, 49 insertions(+), 49 deletions(-) diff --git

[PATCH v2 16/25] sha1_file: remove read_packed_sha1()

2017-08-08 Thread Jonathan Tan
Use read_object() in its place instead. This avoids duplication of code. This makes force_object_loose() slightly slower (because of a redundant check of loose object storage), but only in the error case. Signed-off-by: Jonathan Tan --- sha1_file.c | 26

[PATCH v2 18/25] pack: move nth_packed_object_{sha1,oid}

2017-08-08 Thread Jonathan Tan
Signed-off-by: Jonathan Tan --- cache.h | 14 -- pack.h | 14 ++ packfile.c | 31 +++ sha1_file.c | 31 --- 4 files changed, 45 insertions(+), 45 deletions(-) diff --git a/cache.h

[PATCH v2 15/25] sha1_file: set whence in storage-specific info fn

2017-08-08 Thread Jonathan Tan
Move the setting of oi->whence to sha1_loose_object_info() and packed_object_info(). This allows sha1_object_info_extended() to not need to know about the delta base cache. Signed-off-by: Jonathan Tan --- sha1_file.c | 13 ++--- 1 file changed, 6 insertions(+),

[PATCH v2 17/25] pack: move packed_object_info(), unpack_entry()

2017-08-08 Thread Jonathan Tan
Both sha1_file.c and packfile.c now need read_object(), so a copy of read_object() was created in packfile.c. This patch makes both mark_bad_packed_object() and has_packed_and_bad() global. Unlike most of the other patches in this series, these 2 functions need to remain global. Signed-off-by:

[PATCH v2 23/25] pack: move has_sha1_pack()

2017-08-08 Thread Jonathan Tan
Signed-off-by: Jonathan Tan --- builtin/prune-packed.c | 1 + cache.h| 2 -- diff.c | 1 + pack.h | 2 ++ packfile.c | 6 ++ revision.c | 1 + sha1_file.c| 6 -- 7 files changed,

[PATCH v2 24/25] pack: move has_pack_index()

2017-08-08 Thread Jonathan Tan
Signed-off-by: Jonathan Tan --- cache.h | 2 -- pack.h | 2 ++ packfile.c | 8 sha1_file.c | 8 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/cache.h b/cache.h index d96d36d50..656b39d51 100644 --- a/cache.h +++ b/cache.h

[PATCH v2 25/25] pack: move for_each_packed_object()

2017-08-08 Thread Jonathan Tan
Signed-off-by: Jonathan Tan --- builtin/cat-file.c | 1 + cache.h| 7 +-- pack.h | 11 +++ packfile.c | 40 reachable.c| 1 + sha1_file.c| 40

[PATCH v2 22/25] pack: move find_pack_entry() and make it global

2017-08-08 Thread Jonathan Tan
This function needs to be global as it is used by sha1_file.c and will be used by packfile.c. Signed-off-by: Jonathan Tan --- pack.h | 2 ++ packfile.c | 53 + sha1_file.c | 53

[PATCH v2 01/25] pack: move pack name-related functions

2017-08-08 Thread Jonathan Tan
Currently, sha1_file.c and cache.h contain many functions, both related to and unrelated to packfiles. This makes both files very large and causes an unclear separation of concerns. Create a new file, packfile.c, to hold all packfile-related functions currently in sha1_file.c, and designate

[PATCH v2 02/25] pack: move static state variables

2017-08-08 Thread Jonathan Tan
sha1_file.c declares some static variables that store packfile-related state. Move them to packfile.c. They are temporarily made global, but subsequent commits will restore their scope back to static. Signed-off-by: Jonathan Tan --- pack.h | 9 +

[PATCH v2 00/25] Move exported packfile funcs to its own file

2017-08-08 Thread Jonathan Tan
Here is the complete patch set. I have only moved the exported functions that operate with packfiles and their static helpers - for example, static functions like freshen_packed_object() that are used only by non-pack-specific functions are not moved. In the end, 3 functions needed to be made

[PATCH v2 08/25] pack: move unuse_pack()

2017-08-08 Thread Jonathan Tan
Signed-off-by: Jonathan Tan --- cache.h | 1 - pack.h | 1 + packfile.c | 9 + sha1_file.c | 9 - 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/cache.h b/cache.h index dd9f9a9ae..4812f3a63 100644 --- a/cache.h +++ b/cache.h

[PATCH v2 14/25] pack: move unpack_object_header()

2017-08-08 Thread Jonathan Tan
Signed-off-by: Jonathan Tan --- cache.h | 1 - pack.h | 1 + packfile.c | 26 ++ sha1_file.c | 26 -- 4 files changed, 27 insertions(+), 27 deletions(-) diff --git a/cache.h b/cache.h index

[PATCH v2 03/25] pack: move pack_report()

2017-08-08 Thread Jonathan Tan
Signed-off-by: Jonathan Tan --- cache.h | 2 -- pack.h | 2 ++ packfile.c | 24 sha1_file.c | 24 4 files changed, 26 insertions(+), 26 deletions(-) diff --git a/cache.h b/cache.h index 1f0f47819..c7f802e4a

[PATCH v2 05/25] pack: move release_pack_memory()

2017-08-08 Thread Jonathan Tan
The function unuse_one_window() needs to be temporarily made global. Its scope will be restored to static in a subsequent commit. Signed-off-by: Jonathan Tan --- git-compat-util.h | 2 -- pack.h| 4 packfile.c| 49

[PATCH v2 13/25] pack: move get_size_from_delta()

2017-08-08 Thread Jonathan Tan
Signed-off-by: Jonathan Tan --- cache.h | 1 - pack.h | 1 + packfile.c | 40 sha1_file.c | 39 --- 4 files changed, 41 insertions(+), 40 deletions(-) diff --git a/cache.h

[PATCH v2 04/25] pack: move open_pack_index(), parse_pack_index()

2017-08-08 Thread Jonathan Tan
alloc_packed_git() in packfile.c is duplicated from sha1_file.c. In a subsequent commit, alloc_packed_git() will be removed from sha1_file.c. Signed-off-by: Jonathan Tan --- builtin/count-objects.c | 1 + cache.h | 8 --- pack.h |

[PATCH v2 07/25] pack: move use_pack()

2017-08-08 Thread Jonathan Tan
The function open_packed_git() needs to be temporarily made global. Its scope will be restored to static in a subsequent commit. Signed-off-by: Jonathan Tan --- cache.h | 1 - pack.h | 14 +-- packfile.c | 303

[PATCH] builtin/add: add detail to a 'cannot chmod' error message

2017-08-08 Thread Ramsay Jones
In addition to adding the missing newline, add the x-ecutable bit 'mode change' character to the error message. This message now has the same form as similar messages output by 'update-index'. Signed-off-by: Ramsay Jones --- Hi Junio, This is v2 of the earlier

Re: [PATCH] t1200: remove t1200-tutorial.sh

2017-08-08 Thread Jonathan Nieder
Jonathan Nieder wrote: > Stefan Beller wrote: >>> Stefan Beller wrote: Nowadays there are better tutorials out there such as "Git from bottom up" or others, easily found online. Additionally to that a tutorial in our test suite is not as easy to discover as e.g. online tutorials.

Re: [PATCH] t1200: remove t1200-tutorial.sh

2017-08-08 Thread Jonathan Nieder
Stefan Beller wrote: > On Tue, Aug 8, 2017 at 5:07 PM, Jonathan Nieder wrote: >> Stefan Beller wrote: >>> Nowadays there are better tutorials out there such as "Git from bottom up" >>> or others, easily found online. Additionally to that a tutorial in our >>> test suite is

Re: [PATCH] t1200: remove t1200-tutorial.sh

2017-08-08 Thread Stefan Beller
On Tue, Aug 8, 2017 at 5:07 PM, Jonathan Nieder wrote: > Hi, > > Stefan Beller wrote: > >> Nowadays there are better tutorials out there such as "Git from bottom up" >> or others, easily found online. Additionally to that a tutorial in our >> test suite is not as easy to

Re: [PATCH] t1200: remove t1200-tutorial.sh

2017-08-08 Thread Jonathan Nieder
Hi, Stefan Beller wrote: > Nowadays there are better tutorials out there such as "Git from bottom up" > or others, easily found online. Additionally to that a tutorial in our > test suite is not as easy to discover as e.g. online tutorials. > > This test/tutorial was discovered by the patch

Re: reftable [v6]: new ref storage format

2017-08-08 Thread Shawn Pearce
On Tue, Aug 8, 2017 at 4:34 PM, Junio C Hamano wrote: > Shawn Pearce writes: > >> Given that the index can now also be multi-level, I don't expect to >> see a 2G index. A 2G index forces the reader to load the entire 2G to >> take advantage of the restart

Re: [PATCH] builtin/add: add a missing newline to an stderr message

2017-08-08 Thread Ramsay Jones
On 08/08/17 22:45, René Scharfe wrote: > Am 08.08.2017 um 23:36 schrieb Ramsay Jones: >> >> Signed-off-by: Ramsay Jones >> --- >> >> Hi Junio, >> >> I noticed this while looking into the t3700 failure on cygwin tonight. >> Also, I couldn't decide whether or not to

Re: reftable [v6]: new ref storage format

2017-08-08 Thread Stefan Beller
On Mon, Aug 7, 2017 at 11:30 AM, Shawn Pearce wrote: > On Mon, Aug 7, 2017 at 11:27 AM, Stefan Beller wrote: >> On Sun, Aug 6, 2017 at 6:47 PM, Shawn Pearce wrote: >>> 6th iteration of the reftable storage format. >>> >>> You can

[PATCH] t1200: remove t1200-tutorial.sh

2017-08-08 Thread Stefan Beller
Nowadays there are better tutorials out there such as "Git from bottom up" or others, easily found online. Additionally to that a tutorial in our test suite is not as easy to discover as e.g. online tutorials. This test/tutorial was discovered by the patch author in the effort to migrate our

Re: reftable [v6]: new ref storage format

2017-08-08 Thread Junio C Hamano
Shawn Pearce writes: > Given that the index can now also be multi-level, I don't expect to > see a 2G index. A 2G index forces the reader to load the entire 2G to > take advantage of the restart table. It may be more efficient for such > a reader to have had the writer make

Re: [PATCH] sha1_file: avoid comparison if no packed hash matches the first byte

2017-08-08 Thread Jeff King
On Tue, Aug 08, 2017 at 06:52:31PM -0400, Jeff King wrote: > > Interesting. I see that we still have the conditional code to call > > out to sha1-lookup.c::sha1_entry_pos(). Do we need a similar change > > over there, I wonder? Alternatively, as we have had the experimental > >

Re: [PATCH] sha1_file: avoid comparison if no packed hash matches the first byte

2017-08-08 Thread Jeff King
On Tue, Aug 08, 2017 at 03:43:13PM -0700, Junio C Hamano wrote: > > @@ -2812,7 +2812,7 @@ off_t find_pack_entry_one(const unsigned char *sha1, > > hi = mi; > > else > > lo = mi+1; > > - } while (lo < hi); > > + } > > return 0; > > } >

Re: [PATCH] sha1_file: avoid comparison if no packed hash matches the first byte

2017-08-08 Thread Junio C Hamano
René Scharfe writes: > find_pack_entry_one() uses the fan-out table of pack indexes to find out > which entries match the first byte of the searched hash and does a > binary search on this subset of the main index table. > > If there are no matching entries then lo and hi will have

Re: [PATCH] sha1_file: avoid comparison if no packed hash matches the first byte

2017-08-08 Thread Jonathan Nieder
René Scharfe wrote: > find_pack_entry_one() uses the fan-out table of pack indexes to find out > which entries match the first byte of the searched hash and does a > binary search on this subset of the main index table. > > If there are no matching entries then lo and hi will have the same >

Re: [PATCH] t4062: stop using repetition in regex

2017-08-08 Thread René Scharfe
Am 09.08.2017 um 00:26 schrieb Junio C Hamano: > Junio C Hamano writes: > >> So I find Dscho's concern quite valid, even though I do believe you >> when you say the code somehow segfaults. I just can not tell >> how/why it would segfault, though---it is possible that

Re: [PATCH] builtin/add: add a missing newline to an stderr message

2017-08-08 Thread Jonathan Nieder
Ramsay Jones wrote: > Signed-off-by: Ramsay Jones Reviewed-by: Jonathan Nieder Thanks for catching it.

Re: [PATCH] builtin/add: add a missing newline to an stderr message

2017-08-08 Thread Jonathan Nieder
Junio C Hamano wrote: > René Scharfe writes: >>> diff --git a/builtin/add.c b/builtin/add.c >>> index e888fb8c5..385b53ae7 100644 >>> --- a/builtin/add.c >>> +++ b/builtin/add.c >>> @@ -43,7 +43,7 @@ static void chmod_pathspec(struct pathspec *pathspec, int >>> force_mode) >>>

Re: reftable [v6]: new ref storage format

2017-08-08 Thread Shawn Pearce
On Tue, Aug 8, 2017 at 12:25 PM, Junio C Hamano wrote: > Shawn Pearce writes: > >> For `log_type = 0x4..0x7` the `log_chained` section is used instead to >> compress information that already appeared in a prior log record. The >> `log_chained` always

Re: [PATCH] t4062: stop using repetition in regex

2017-08-08 Thread René Scharfe
Am 09.08.2017 um 00:09 schrieb Junio C Hamano: > René Scharfe writes: > >> Am 08.08.2017 um 16:49 schrieb Johannes Schindelin: >>> Hi René, >>> >>> On Tue, 8 Aug 2017, René Scharfe wrote: >>> OpenBSD's regex library has a repetition limit (RE_DUP_MAX) of 255. That's the

Re: reftable [v6]: new ref storage format

2017-08-08 Thread Shawn Pearce
On Tue, Aug 8, 2017 at 12:01 PM, Junio C Hamano wrote: > I notice that you raised the location of restart table within a > block in this iteration (or maybe it happened in v5). > > This forces you to hold all contents in core before the first byte > is written out. You start

Re: [PATCH] t4062: stop using repetition in regex

2017-08-08 Thread Junio C Hamano
Junio C Hamano writes: > So I find Dscho's concern quite valid, even though I do believe you > when you say the code somehow segfaults. I just can not tell > how/why it would segfault, though---it is possible that regexec() > implementation is stupid and does not realize that

Re: [PATCH] builtin/add: add a missing newline to an stderr message

2017-08-08 Thread Junio C Hamano
René Scharfe writes: >> diff --git a/builtin/add.c b/builtin/add.c >> index e888fb8c5..385b53ae7 100644 >> --- a/builtin/add.c >> +++ b/builtin/add.c >> @@ -43,7 +43,7 @@ static void chmod_pathspec(struct pathspec *pathspec, int >> force_mode) >> continue; >>

Re: [PATCH] t4062: stop using repetition in regex

2017-08-08 Thread Junio C Hamano
René Scharfe writes: > Am 08.08.2017 um 16:49 schrieb Johannes Schindelin: >> Hi René, >> >> On Tue, 8 Aug 2017, René Scharfe wrote: >> >>> OpenBSD's regex library has a repetition limit (RE_DUP_MAX) of 255. >>> That's the minimum acceptable value according to POSIX. In t4062 we

[PATCH] sha1_file: avoid comparison if no packed hash matches the first byte

2017-08-08 Thread René Scharfe
find_pack_entry_one() uses the fan-out table of pack indexes to find out which entries match the first byte of the searched hash and does a binary search on this subset of the main index table. If there are no matching entries then lo and hi will have the same value. The binary search still

Re: [PATCH] Convert size datatype to size_t

2017-08-08 Thread Junio C Hamano
Martin Koegler writes: > diff --git a/apply.c b/apply.c > index f2d5991..ea97fd2 100644 > --- a/apply.c > +++ b/apply.c > @@ -3085,7 +3085,7 @@ static int apply_binary_fragment(struct apply_state > *state, >struct patch *patch) > { >

Re: [PATCH] builtin/add: add a missing newline to an stderr message

2017-08-08 Thread René Scharfe
Am 08.08.2017 um 23:36 schrieb Ramsay Jones: > > Signed-off-by: Ramsay Jones > --- > > Hi Junio, > > I noticed this while looking into the t3700 failure on cygwin tonight. > Also, I couldn't decide whether or not to add the i18n '_()' brackets > around the message.

[PATCH] builtin/add: add a missing newline to an stderr message

2017-08-08 Thread Ramsay Jones
Signed-off-by: Ramsay Jones --- Hi Junio, I noticed this while looking into the t3700 failure on cygwin tonight. Also, I couldn't decide whether or not to add the i18n '_()' brackets around the message. In the end I didn't, but will happily add them if you think I

Re: [PATCH] Convert size datatype to size_t

2017-08-08 Thread Junio C Hamano
Martin Koegler writes: > From: Martin Koegler > > It changes the signature of the core object access function > including any other functions to assure a clean compile if > sizeof(size_t) != sizeof(unsigned long). > > Signed-off-by: Martin

Re: [RFC PATCH 00/10] An attempt to move packfile funcs to its own file

2017-08-08 Thread Junio C Hamano
Jonathan Tan writes: > What do you mean by "keep the exposed surface area small enough"? If you > mean the total number of exposed functions in sha1_file and pack (once > everything is done), I think it will be almost the same as that > currently in sha1_file. > ... >

Re: [PATCH 2/2] filter-branch: Handle rewritting (very) old style tags which lack tagger

2017-08-08 Thread Junio C Hamano
Ian Campbell writes: > Such as v2.6.12-rc2..v2.6.13-rc3 in the Linux kernel source tree. > > Insert a fake tag header, since newer `git mktag` wont accept the input > otherwise: > > $ git cat-file tag v2.6.12-rc2 > object 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 >

Re: [PATCH 1/2] filter-branch: Add --state-branch to hold pickled copy of ref map

2017-08-08 Thread Junio C Hamano
Ian Campbell writes: > Allowing for incremental updates of large trees. "by doing what" is missing. And ... > > I have been using this as part of the device tree extraction from the Linux > kernel source since 2013, about time I sent the patch upstream! ... this does not

Re: [RFC PATCH 01/10] pack: move pack name-related functions

2017-08-08 Thread Jonathan Tan
On Tue, 8 Aug 2017 13:36:24 -0700 Stefan Beller wrote: > On Tue, Aug 8, 2017 at 12:32 PM, Jonathan Tan > wrote: > > Currently, sha1_file.c and cache.h contain many functions, both related > > to and unrelated to packfiles. This makes both files

Re: [RFC PATCH 04/10] pack: move open_pack_index(), parse_pack_index()

2017-08-08 Thread Jonathan Tan
On Tue, 08 Aug 2017 13:19:23 -0700 Junio C Hamano wrote: > Jonathan Tan writes: > > > Signed-off-by: Jonathan Tan > > --- > > builtin/count-objects.c | 1 + > > cache.h | 8 --- > > pack.c

Re: [RFC PATCH 00/10] An attempt to move packfile funcs to its own file

2017-08-08 Thread Jonathan Tan
On Tue, 08 Aug 2017 13:05:05 -0700 Junio C Hamano wrote: > Jonathan Tan writes: > > > While investigating annotating packfiles and loose objects to support > > connectivity checks in partial clones [1], I decided to make the effort > > to separate

Re: [RFC PATCH 01/10] pack: move pack name-related functions

2017-08-08 Thread Stefan Beller
On Tue, Aug 8, 2017 at 12:32 PM, Jonathan Tan wrote: > Currently, sha1_file.c and cache.h contain many functions, both related > to and unrelated to packfiles. This makes both files very large and > causes an unclear separation of concerns. > > Create a new file, pack.c,

Re: [PATCH v2 5/5] sha1_file: support loading lazy objects

2017-08-08 Thread Ben Peart
On 7/31/2017 5:02 PM, Jonathan Tan wrote: Teach sha1_file to invoke the command configured in extensions.lazyObject whenever an object is requested and unavailable. The usage of the hook can be suppressed through a flag when invoking has_object_file_with_flags() and other similar functions.

Re: [RFC PATCH 04/10] pack: move open_pack_index(), parse_pack_index()

2017-08-08 Thread Junio C Hamano
Jonathan Tan writes: > Signed-off-by: Jonathan Tan > --- > builtin/count-objects.c | 1 + > cache.h | 8 --- > pack.c | 149 > > pack.h |

Re: [PATCH v2 2/2 / RFC] branch: quote branch/ref names to improve readability

2017-08-08 Thread Stefan Beller
On Tue, Aug 8, 2017 at 12:43 PM, Junio C Hamano wrote: > Stefan Beller writes: > >> (Though wondering for non-submodule users, if they perceive it as >> inconsistency as other parts of the code may not follow the rigorous quoting) > > Do you mean that we

Re: [RFC PATCH 00/10] An attempt to move packfile funcs to its own file

2017-08-08 Thread Junio C Hamano
Jonathan Tan writes: > While investigating annotating packfiles and loose objects to support > connectivity checks in partial clones [1], I decided to make the effort > to separate packfile-related code from sha1_file.c into its own file, to > make it easier to both

[PATCH] Convert size datatype to size_t

2017-08-08 Thread Martin Koegler
From: Martin Koegler It changes the signature of the core object access function including any other functions to assure a clean compile if sizeof(size_t) != sizeof(unsigned long). Signed-off-by: Martin Koegler --- There is much more to

Re: [PATCH v2 2/2 / RFC] branch: quote branch/ref names to improve readability

2017-08-08 Thread Junio C Hamano
Stefan Beller writes: > (Though wondering for non-submodule users, if they perceive it as > inconsistency as other parts of the code may not follow the rigorous quoting) Do you mean that we may instead want to remove the excessive quoting of branch names and stuff from

Re: [PATCH v2] t3700: fix broken test under !POSIXPERM

2017-08-08 Thread Ramsay Jones
On 08/08/17 20:32, Ramsay Jones wrote: > > > On 08/08/17 20:21, René Scharfe wrote: >> 76e368c378 (t3700: fix broken test under !SANITY) explains that the test >> 'git add --chmod=[+-]x changes index with already added file' can fail >> if xfoo3 is still present as a symlink from a previous

Re: [PATCH v2] am: fix signoff when other trailers are present

2017-08-08 Thread Junio C Hamano
Phillip Wood writes: > test_expect_success 'am --signoff does not add Signed-off-by: line if > already there' ' > - git format-patch --stdout HEAD^ >patch3 && > - sed -e "/^Subject/ s,\[PATCH,Re: Re: Re: & 1/5 v2] [foo," patch3 > >patch4 && > - rm -fr

[RFC PATCH 04/10] pack: move open_pack_index(), parse_pack_index()

2017-08-08 Thread Jonathan Tan
Signed-off-by: Jonathan Tan --- builtin/count-objects.c | 1 + cache.h | 8 --- pack.c | 149 pack.h | 8 +++ sha1_file.c | 140

[RFC PATCH 08/10] pack: move unuse_pack()

2017-08-08 Thread Jonathan Tan
Signed-off-by: Jonathan Tan --- cache.h | 1 - pack.c | 9 + pack.h | 1 + sha1_file.c | 9 - 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/cache.h b/cache.h index dd9f9a9ae..4812f3a63 100644 --- a/cache.h +++ b/cache.h

[RFC PATCH 10/10] pack: move install_packed_git()

2017-08-08 Thread Jonathan Tan
Signed-off-by: Jonathan Tan --- cache.h | 1 - pack.c | 11 ++- pack.h | 4 ++-- sha1_file.c | 9 - 4 files changed, 12 insertions(+), 13 deletions(-) diff --git a/cache.h b/cache.h index bf93477e8..41562dc0b 100644 --- a/cache.h +++

[RFC PATCH 00/10] An attempt to move packfile funcs to its own file

2017-08-08 Thread Jonathan Tan
While investigating annotating packfiles and loose objects to support connectivity checks in partial clones [1], I decided to make the effort to separate packfile-related code from sha1_file.c into its own file, to make it easier to both code such changes and review them. Here is the beginning of

[RFC PATCH 09/10] pack: move add_packed_git()

2017-08-08 Thread Jonathan Tan
Signed-off-by: Jonathan Tan --- cache.h | 1 - connected.c | 1 + pack.c | 53 + pack.h | 1 + sha1_file.c | 61 - 5 files changed, 55

[RFC PATCH 03/10] pack: move pack_report()

2017-08-08 Thread Jonathan Tan
Signed-off-by: Jonathan Tan --- cache.h | 2 -- pack.c | 24 pack.h | 2 ++ sha1_file.c | 24 4 files changed, 26 insertions(+), 26 deletions(-) diff --git a/cache.h b/cache.h index 1f0f47819..c7f802e4a

[RFC PATCH 05/10] pack: move release_pack_memory()

2017-08-08 Thread Jonathan Tan
The function unuse_one_window() needs to be temporarily made global. Its scope will be restored to static in a subsequent commit. Signed-off-by: Jonathan Tan --- git-compat-util.h | 2 -- pack.c| 49 + pack.h

[RFC PATCH 06/10] pack: move pack-closing functions

2017-08-08 Thread Jonathan Tan
The function close_pack_fd() needs to be temporarily made global. Its scope will be restored to static in a subsequent commit. Signed-off-by: Jonathan Tan --- In doing this, I discovered that some builtins close the packs even though they, in theory, should not know

[RFC PATCH 07/10] pack: move use_pack()

2017-08-08 Thread Jonathan Tan
open_packed_git is made global. Signed-off-by: Jonathan Tan --- Unlike the other commits where variables and functions are made global and then remade static, open_packed_git is not remade static (because a function in sha1_file.c still uses it). --- cache.h | 1

Re: [PATCH v2] t3700: fix broken test under !POSIXPERM

2017-08-08 Thread Ramsay Jones
On 08/08/17 20:21, René Scharfe wrote: > 76e368c378 (t3700: fix broken test under !SANITY) explains that the test > 'git add --chmod=[+-]x changes index with already added file' can fail > if xfoo3 is still present as a symlink from a previous test and deletes > it with rm(1). That still leaves

[RFC PATCH 02/10] pack: move static state variables

2017-08-08 Thread Jonathan Tan
sha1_file.c declares some static variables that store packfile-related state. Move them to pack.c. They are temporarily made global, but subsequent commits will restore their scope back to static. Signed-off-by: Jonathan Tan --- pack.c | 14 ++ pack.h

[RFC PATCH 01/10] pack: move pack name-related functions

2017-08-08 Thread Jonathan Tan
Currently, sha1_file.c and cache.h contain many functions, both related to and unrelated to packfiles. This makes both files very large and causes an unclear separation of concerns. Create a new file, pack.c, to hold all packfile-related functions currently in sha1_file.c, and designate pack.h to

Re: reftable [v6]: new ref storage format

2017-08-08 Thread Junio C Hamano
Shawn Pearce writes: > For `log_type = 0x4..0x7` the `log_chained` section is used instead to > compress information that already appeared in a prior log record. The > `log_chained` always includes `old_id` for this record, as `new_id` is > implied by the prior (by file

[PATCH v2] t3700: fix broken test under !POSIXPERM

2017-08-08 Thread René Scharfe
76e368c378 (t3700: fix broken test under !SANITY) explains that the test 'git add --chmod=[+-]x changes index with already added file' can fail if xfoo3 is still present as a symlink from a previous test and deletes it with rm(1). That still leaves it present in the index, which causes the test

Re: reftable [v6]: new ref storage format

2017-08-08 Thread Junio C Hamano
I notice that you raised the location of restart table within a block in this iteration (or maybe it happened in v5). This forces you to hold all contents in core before the first byte is written out. You start from the first entry (which will become the first restart entry), emit a handful as

Re: [PATCH] git svn fetch: Create correct commit timestamp when using --localtime

2017-08-08 Thread Urs Thuermann
Junio C Hamano writes: > > Yep, seems alright. Can you apply directly? > > Been a bit preoccupied as of late. Thanks. > > Surely, I'll just add your Reviewed-by: myself ;-) OK, thanks. This will fix the bug I've reported here a week or so ago (see the References header).

Re: [PATCH v2 2/2 / RFC] branch: quote branch/ref names to improve readability

2017-08-08 Thread Stefan Beller
On Tue, Aug 8, 2017 at 10:11 AM, Kaartic Sivaraam wrote: > Signed-off-by: Kaartic Sivaraam > --- > branch.c | 16 > 1 file changed, 8 insertions(+), 8 deletions(-) I like this patch. In submodule.c we quote a lot

Re: What's cooking in git.git (Jul 2017, #09; Mon, 31)

2017-08-08 Thread Igor Djordjevic
On 08/08/2017 15:14, Ævar Arnfjörð Bjarmason wrote: > On Mon, Aug 07 2017, Igor Djordjevic jotted: >> On 07/08/2017 23:25, Igor Djordjevic wrote: >>> On 06/08/2017 22:26, Ævar Arnfjörð Bjarmason wrote: On Sat, Aug 05 2017, Junio C. Hamano jotted: > I actually consider "branch" to *never*

Re: [PATCH v2 1/2 / RFC] builtin/branch: stop supporting the use of --set-upstream option

2017-08-08 Thread Martin Ågren
On 8 August 2017 at 19:11, Kaartic Sivaraam wrote: > The '--set-upstream' option of branch was deprecated in, > > b347d06bf branch: deprecate --set-upstream and show help if we > detect possible mistaken use (Thu, 30 Aug 2012 19:23:13 +0200) > > It was

Re: [RFC] clang-format: outline the git project's coding style

2017-08-08 Thread Junio C Hamano
Brandon Williams writes: >> > +# Add a line break after the return type of top-level functions >> > +# int >> > +# foo(); >> > +AlwaysBreakAfterReturnType: TopLevel >> >> We do that? > > Haha So generally no we don't do this. Though there are definitely many > places in our

Re: [RFC] clang-format: outline the git project's coding style

2017-08-08 Thread Brandon Williams
On 08/08, Stefan Beller wrote: > On Tue, Aug 8, 2017 at 5:05 AM, Johannes Schindelin > wrote: > > Hi Brandon, > > > > On Mon, 7 Aug 2017, Brandon Williams wrote: > > > >> Add a '.clang-format' file which outlines the git project's coding > >> style. This can be used

Dear Beloved Friend

2017-08-08 Thread Mrs Marois
Dear Beloved Friend, I am Mrs Nicole Benoite Marois and I have been suffering from ovarian cancer disease and the doctor says that i have just few weeks to leave. I am from (Paris) France but based in Benin republic since eleven years ago as a business woman dealing with gold exportation

Re: [RFC] clang-format: outline the git project's coding style

2017-08-08 Thread Brandon Williams
On 08/08, Junio C Hamano wrote: > Brandon Williams writes: > > > Add a '.clang-format' file which outlines the git project's coding > > style. This can be used with clang-format to auto-format .c and .h > > files to conform with git's style. > > > > Signed-off-by: Brandon

Re: [RFC] clang-format: outline the git project's coding style

2017-08-08 Thread Junio C Hamano
Brandon Williams writes: > Add a '.clang-format' file which outlines the git project's coding > style. This can be used with clang-format to auto-format .c and .h > files to conform with git's style. > > Signed-off-by: Brandon Williams > --- > > I'm sure

Re: [RFC] clang-format: outline the git project's coding style

2017-08-08 Thread Stefan Beller
On Tue, Aug 8, 2017 at 5:05 AM, Johannes Schindelin wrote: > Hi Brandon, > > On Mon, 7 Aug 2017, Brandon Williams wrote: > >> Add a '.clang-format' file which outlines the git project's coding >> style. This can be used with clang-format to auto-format .c and .h >>

Re: t3700 broken on pu on Cygwin

2017-08-08 Thread Adam Dinwoodie
On Tue, Aug 08, 2017 at 05:32:21PM +0200, René Scharfe wrote: > Am 08.08.2017 um 17:18 schrieb Adam Dinwoodie: > > The t3700-add.sh test is currently failing on the pu branch on Cygwin. > > To my surprise, the problem appears to have been introduced by a merge, > > 867fa1d6a. Both parents of that

  1   2   >