Re: [PATCH] hex: use unsigned index for ring buffer

2016-10-23 Thread René Scharfe
Am 23.10.2016 um 11:11 schrieb Jeff King: On Sun, Oct 23, 2016 at 11:00:48AM +0200, René Scharfe wrote: Overflow is defined for unsigned integers, but not for signed ones. Make the ring buffer index in sha1_to_hex() unsigned to be on the safe side. Signed-off-by: Rene Scharfe

Re: RFC Failover url for fetches?

2016-10-23 Thread Jakub Narębski
W dniu 21.10.2016 o 21:03, Junio C Hamano pisze: > Stefan Beller writes: > >> So when pushing it is possible to have multiple urls >> (remote..url) configured. >> >> When fetching only the first configured url is considered. >> Would it make sense to allow multiple urls and

Re: [PATCH v1 10/19] read-cache: regenerate shared index if necessary

2016-10-23 Thread Ramsay Jones
On 23/10/16 10:26, Christian Couder wrote: > When writing a new split-index and there is a big number of cache > entries in the split-index compared to the shared index, it is a > good idea to regenerate the shared index. > > By default when the ratio reaches 20%, we will push back all > the

Re: [PATCH 28/36] attr: keep attr stack for each check

2016-10-23 Thread Ramsay Jones
On 23/10/16 00:32, Stefan Beller wrote: > Instead of having a global attr stack, attach the stack to each check. > This allows to use the attr in a multithreaded way. > > > > Signed-off-by: Stefan Beller > --- > attr.c| 101 >

Re: [PATCH 17/36] attr: expose validity check for attribute names

2016-10-23 Thread Ramsay Jones
On 23/10/16 00:32, Stefan Beller wrote: > From: Junio C Hamano > > Export attr_name_valid() function, and a helper function that > returns the message to be given when a given pair > is not a good name for an attribute. > > We could later update the message to

Re: git clone --bare --origin incompatible?

2016-10-23 Thread Roman Neuhauser
# sch...@linux-m68k.org / 2016-10-23 14:29:55 +0200: > On Okt 23 2016, Roman Neuhauser wrote: > > > what is the reason clone --bare prohibits --origin? > > > > % git clone --bare -o fubar anything anywhere > > fatal: --bare and --origin fubar options are incompatible. >

Re: git clone --bare --origin incompatible?

2016-10-23 Thread Andreas Schwab
On Okt 23 2016, Roman Neuhauser wrote: > what is the reason clone --bare prohibits --origin? > > % git clone --bare -o fubar anything anywhere > fatal: --bare and --origin fubar options are incompatible. Since a bare clone maps remote branches directly to local

git clone --bare --origin incompatible?

2016-10-23 Thread Roman Neuhauser
hello, what is the reason clone --bare prohibits --origin? % git clone --bare -o fubar anything anywhere fatal: --bare and --origin fubar options are incompatible. -- roman

Re: tools for easily "uncommitting" parts of a patch I just commited?

2016-10-23 Thread Duy Nguyen
On Sun, Oct 23, 2016 at 8:38 AM, Jeff King wrote: > On Sun, Oct 23, 2016 at 08:23:01AM +0700, Duy Nguyen wrote: > >> I hit the same problem sometimes, but in my case sometimes I >> accidentally do "git add" after "git add -p" and a configuration in >> "git commit -a" won't help me.

Re: [PATCH 2/3] submodule tests: replace cloning from . by "$(pwd)"

2016-10-23 Thread Johannes Sixt
Am 22.10.2016 um 22:46 schrieb Stefan Beller: I have looked into it again, and by now I think the bug is a feature, actually. Consider this: git clone . super git -C super submodule add ../submodule # we thought the previous line is buggy git clone super super-clone At this

Re: [PATCH v5 00/27] Prepare the sequencer for the upcoming rebase -i patches

2016-10-23 Thread Johannes Schindelin
Hi Junio, On Sun, 23 Oct 2016, Johannes Schindelin wrote: > On Sat, 22 Oct 2016, Junio C Hamano wrote: > > > Johannes Schindelin writes: > > > > > This patch series marks the '4' in the countdown to speed up rebase -i > > > by implementing large parts in C (read:

Re: [PATCH v5 00/27] Prepare the sequencer for the upcoming rebase -i patches

2016-10-23 Thread Johannes Schindelin
Hi Junio, On Sat, 22 Oct 2016, Junio C Hamano wrote: > Johannes Schindelin writes: > > > This patch series marks the '4' in the countdown to speed up rebase -i > > by implementing large parts in C (read: there will be three more patch > > series after that before

Re: [PATCH v5 00/27] Prepare the sequencer for the upcoming rebase -i patches

2016-10-23 Thread Johannes Schindelin
Hi Junio, On Fri, 21 Oct 2016, Junio C Hamano wrote: > Johannes Schindelin writes: > > I still do not understand (note that I am not saying "I do not > accept"--acceptance or rejection happens after an understandable > explanation is given, and "do not understand"

Re: [PATCH v5 22/27] sequencer: teach write_message() to append an optional LF

2016-10-23 Thread Johannes Schindelin
Hi Junio, On Fri, 21 Oct 2016, Junio C Hamano wrote: > Johannes Schindelin writes: > > > This commit prepares for future callers that will have a pointer/length > > to some text to be written that lacks an LF, yet an LF is desired. > > Instead of requiring the

Re: Stash pop/apply conflict and --theirs and --ours

2016-10-23 Thread Jeff King
On Sun, Oct 23, 2016 at 12:58:12AM +0200, Sven Strickroth wrote: > I regularly experience that beginners have problems unterstanding that > --ours and --theirs are swapped when a conflict occurrs on git stash > apply or stash pop. > > From the HCI perspective this is really counter intuitive. I

Re: [PATCH v4 20/25] sequencer: refactor write_message()

2016-10-23 Thread Johannes Schindelin
Hi Junio, On Fri, 21 Oct 2016, Junio C Hamano wrote: > Johannes Schindelin writes: > > >> Ah, make that four steps. The final one is: > >> > >> - add append_eol parameter that nobody uses at this step in the > >> series. > >> > >> This is a new feature

[PATCH v1 14/19] read-cache: touch shared index files when used

2016-10-23 Thread Christian Couder
When a split-index file is created, let's update the mtime of the shared index file that the split-index file is referencing. In a following commit we will make shared index file expire depending on their mtime, so updating the mtime makes sure that the shared index file will not be deleted soon.

[PATCH v1 08/19] Documentation/git-update-index: talk about core.splitIndex config var

2016-10-23 Thread Christian Couder
Signed-off-by: Christian Couder --- Documentation/git-update-index.txt | 6 ++ 1 file changed, 6 insertions(+) diff --git a/Documentation/git-update-index.txt b/Documentation/git-update-index.txt index 7386c93..e091b2a 100644 ---

[PATCH v1 06/19] t1700: add tests for core.splitIndex

2016-10-23 Thread Christian Couder
Signed-off-by: Christian Couder --- t/t1700-split-index.sh | 37 + 1 file changed, 37 insertions(+) diff --git a/t/t1700-split-index.sh b/t/t1700-split-index.sh index 292a072..db8c39f 100755 --- a/t/t1700-split-index.sh +++

[PATCH v1 16/19] read-cache: unlink old sharedindex files

2016-10-23 Thread Christian Couder
Everytime split index is turned on, it creates a "sharedindex." file in the git directory. This change makes sure that shared index files that haven't been used for a long time are removed when a new shared index file is created. The new "splitIndex.sharedIndexExpire" config variable is

[PATCH v1 15/19] config: add git_config_get_date_string() from gc.c

2016-10-23 Thread Christian Couder
This function will be used in a following commit to get the expiration time of the shared index files from the config, and it is generic enough to be put in "config.c". Signed-off-by: Christian Couder --- builtin/gc.c | 15 ++- cache.h | 1 + config.c

[PATCH v1 03/19] split-index: add {add,remove}_split_index() functions

2016-10-23 Thread Christian Couder
Also use the functions in cmd_update_index() in builtin/update-index.c. These functions will be used in a following commit to tweak our use of the split-index feature depending on the setting of a configuration variable. Signed-off-by: Christian Couder ---

[PATCH v1 07/19] Documentation/config: add information for core.splitIndex

2016-10-23 Thread Christian Couder
Signed-off-by: Christian Couder --- Documentation/config.txt | 4 1 file changed, 4 insertions(+) diff --git a/Documentation/config.txt b/Documentation/config.txt index 27069ac..96521a4 100644 --- a/Documentation/config.txt +++ b/Documentation/config.txt @@ -331,6

[PATCH v1 10/19] read-cache: regenerate shared index if necessary

2016-10-23 Thread Christian Couder
When writing a new split-index and there is a big number of cache entries in the split-index compared to the shared index, it is a good idea to regenerate the shared index. By default when the ratio reaches 20%, we will push back all the entries from the split-index into a new shared index file

[PATCH v1 12/19] Documentation/config: add splitIndex.maxPercentChange

2016-10-23 Thread Christian Couder
Signed-off-by: Christian Couder --- Documentation/config.txt | 13 + 1 file changed, 13 insertions(+) diff --git a/Documentation/config.txt b/Documentation/config.txt index 96521a4..380eeb8 100644 --- a/Documentation/config.txt +++ b/Documentation/config.txt

[PATCH v1 05/19] update-index: warn in case of split-index incoherency

2016-10-23 Thread Christian Couder
When users are using `git update-index --(no-)split-index`, they may expect the split-index feature to be used or not according to the option they just used, but this might not be the case if the new "core.splitIndex" config variable has been set. In this case let's warn about what will happen and

[PATCH v1 17/19] t1700: test shared index file expiration

2016-10-23 Thread Christian Couder
Signed-off-by: Christian Couder --- t/t1700-split-index.sh | 44 1 file changed, 44 insertions(+) diff --git a/t/t1700-split-index.sh b/t/t1700-split-index.sh index f03addf..f448fc1 100755 --- a/t/t1700-split-index.sh +++

[PATCH v1 11/19] t1700: add tests for splitIndex.maxPercentChange

2016-10-23 Thread Christian Couder
Signed-off-by: Christian Couder --- t/t1700-split-index.sh | 72 ++ 1 file changed, 72 insertions(+) diff --git a/t/t1700-split-index.sh b/t/t1700-split-index.sh index 507a1dd..f03addf 100755 --- a/t/t1700-split-index.sh

[PATCH v1 18/19] Documentation/config: add splitIndex.sharedIndexExpire

2016-10-23 Thread Christian Couder
Signed-off-by: Christian Couder --- Documentation/config.txt | 11 +++ 1 file changed, 11 insertions(+) diff --git a/Documentation/config.txt b/Documentation/config.txt index 380eeb8..5212a97 100644 --- a/Documentation/config.txt +++ b/Documentation/config.txt

[PATCH v1 01/19] split-index: s/eith/with/ typo fix

2016-10-23 Thread Christian Couder
Signed-off-by: Christian Couder --- split-index.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/split-index.c b/split-index.c index 35da553..615f4ca 100644 --- a/split-index.c +++ b/split-index.c @@ -187,7 +187,7 @@ void

[PATCH v1 13/19] sha1_file: make check_and_freshen_file() non static

2016-10-23 Thread Christian Couder
This function will be used in a commit soon, so let's make it available globally. Signed-off-by: Christian Couder --- cache.h | 3 +++ sha1_file.c | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/cache.h b/cache.h index faceceb..a625b47 100644

[PATCH v1 04/19] read-cache: add and then use tweak_split_index()

2016-10-23 Thread Christian Couder
This will make us use the split-index feature or not depending on the value of the "core.splitIndex" config variable. Signed-off-by: Christian Couder --- read-cache.c | 17 + 1 file changed, 17 insertions(+) diff --git a/read-cache.c b/read-cache.c

[PATCH v1 00/19] Add configuration options for split-index

2016-10-23 Thread Christian Couder
Goal We want to make it possible to use the split-index feature automatically by just setting a new "core.splitIndex" configuration variable to true. This can be valuable as split-index can help significantly speed up `git rebase` especially along with the work to libify `git apply` that

[PATCH v1 02/19] config: add git_config_get_split_index()

2016-10-23 Thread Christian Couder
This new function will be used in a following commit to know if we want to use the split index feature or not. Signed-off-by: Christian Couder --- cache.h | 1 + config.c | 10 ++ 2 files changed, 11 insertions(+) diff --git a/cache.h b/cache.h index

[PATCH v1 19/19] Documentation/git-update-index: explain splitIndex.*

2016-10-23 Thread Christian Couder
Signed-off-by: Christian Couder --- Documentation/git-update-index.txt | 33 + 1 file changed, 25 insertions(+), 8 deletions(-) diff --git a/Documentation/git-update-index.txt b/Documentation/git-update-index.txt index e091b2a..635d157

[PATCH v1 09/19] config: add git_config_get_max_percent_split_change()

2016-10-23 Thread Christian Couder
This new function will be used in a following commit to get the value of the "splitIndex.maxPercentChange" config variable. Signed-off-by: Christian Couder --- cache.h | 1 + config.c | 16 2 files changed, 17 insertions(+) diff --git a/cache.h

Re: [PATCH] hex: use unsigned index for ring buffer

2016-10-23 Thread Jeff King
On Sun, Oct 23, 2016 at 11:00:48AM +0200, René Scharfe wrote: > Overflow is defined for unsigned integers, but not for signed ones. > Make the ring buffer index in sha1_to_hex() unsigned to be on the > safe side. > > Signed-off-by: Rene Scharfe > --- > Hard to trigger, but

Re: [PATCH] Allow stashes to be referenced by index only

2016-10-23 Thread Jeff King
On Thu, Sep 08, 2016 at 07:46:37PM -0400, Aaron M Watson wrote: > Instead of referencing "stash@{n}" explicitly, it can simply be > referenced as "n". Most users only reference stashes by their position > in the stash stask (what I refer to as the "index"). The syntax for the > typical stash

[PATCH] hex: use unsigned index for ring buffer

2016-10-23 Thread René Scharfe
Overflow is defined for unsigned integers, but not for signed ones. Make the ring buffer index in sha1_to_hex() unsigned to be on the safe side. Signed-off-by: Rene Scharfe --- Hard to trigger, but probably even harder to diagnose once someone somehow manages to do it on some

revisiting zstd timings

2016-10-23 Thread Jeff King
You may recall some "what if" timings I did recently, where I replaced zlib with zstd: http://public-inbox.org/git/20160914235843.nacr54ekvl6rj...@sigill.intra.peff.net/ The aim was that it would give us about the same compression level, but much faster inflating and deflating. My numbers