Re: [RFC PATCH 1/1] json-writer: incorrect format specifier

2018-03-24 Thread Ramsay Jones
On 24/03/18 05:37, Wink Saville wrote: > In routines jw_object_uint64 and jw_object_double strbuf_addf is > invoked with strbuf_addf(>json, ":%"PRIuMAX, value) where value > is a uint64_t. This causes a compile error on OSX. > > The correct format specifier is PRIu64 instead of PRIuMax. > >

Re: [PATCH 3/4] stash: convert drop and clear to builtin

2018-03-24 Thread Christian Couder
> + argv_array_pushl(, "reflog", "delete", "--updateref", > "--rewrite", NULL); > + argv_array_push(, info->revision); > + ret = cmd_reflog(args.argc, args.argv, prefix); > + if (!ret) { > + if (!quiet) { > + printf(_("Dropped %s

Re: [GSoC] Convert “git stash” to builtin proposal

2018-03-24 Thread Paul-Sebastian Ungureanu
On 23.03.2018 19:11, Christian Couder wrote: * Ensure that no regression occurred: considering that there are plenty of tests and that I have a good understanding of the function, this should be a trivial task. There are a lot of things that the test suite doesn't test. Hopefully, by first

[PATCH v3] filter-branch: fix errors caused by refs that point at non-committish

2018-03-24 Thread Yuki Kokubun
"git filter-branch -- --all" print error messages when refs that point at objects that are not committish. Such refs can be created by "git replace" with trees or blobs. And also "git tag" with trees or blobs can create such refs. Filter these problematic refs out early, before they are seen by

Re: [PATCH] completion: add option completion for most builtin commands

2018-03-24 Thread Duy Nguyen
On Thu, Mar 22, 2018 at 6:56 PM, Junio C Hamano wrote: > Duy Nguyen writes: > >> +__git_main_with_parseopt_helper=' >> + blame cat-file check-attr check-ignore >> + check-mailmap checkout-index column count-objects fast-export >> + hash-object

[RFC][PATCH] git-stash: convert git stash list to C builtin

2018-03-24 Thread Paul-Sebastian Ungureanu
Currently, because git stash is not fully converted to C, I introduced a new helper that will hold the converted commands. --- Makefile| 1 + builtin.h | 1 + builtin/stash--helper.c | 52 + git-stash.sh| 7

Null pointer dereference in git-submodule

2018-03-24 Thread Jeremy Feusi
Hi, While bootstrapping a gnu repository I noticed that git segfaulted when called as "git submodule status". After compiling git with address sanitizer and minimizing the directory I finally narrowed it down to the files which I have attached as a tar archive. Here is a detailed backtrace:

Re: [PATCH v4 2/3] builtin/branch: give more useful error messages when renaming

2018-03-24 Thread Kaartic Sivaraam
On Friday 16 March 2018 02:03 AM, Junio C Hamano wrote: > Quite honestly, I am not sure if this amount of new code that > results in sentence lego is really worth it. Speaking specifically about the new code for the sentence lego: I currently lack knowledge of a better way to achieve the same

[PATCH 1/4] stash: convert apply to builtin

2018-03-24 Thread Joel Teichroeb
--- .gitignore | 1 + Makefile| 1 + builtin.h | 1 + builtin/stash--helper.c | 339 git-stash.sh| 3 +- git.c | 1 + 6 files changed, 345 insertions(+), 1

[PATCH 0/4] Convert some stash functionality to a builtin

2018-03-24 Thread Joel Teichroeb
I've been working on converting all of git stash to be a builtin, however it's hard to get it all working at once with limited time, so I've moved around half of it to a new stash--helper builtin and called these functions from the shell script. Once this is stabalized, it should be easier to

[PATCH 3/4] stash: convert drop and clear to builtin

2018-03-24 Thread Joel Teichroeb
--- builtin/stash--helper.c | 93 + git-stash.sh| 4 +-- 2 files changed, 95 insertions(+), 2 deletions(-) diff --git a/builtin/stash--helper.c b/builtin/stash--helper.c index 18c4aba665..1598b82ac2 100644 --- a/builtin/stash--helper.c

[PATCH 2/4] stash: convert branch to builtin

2018-03-24 Thread Joel Teichroeb
--- builtin/stash--helper.c | 44 git-stash.sh| 3 ++- 2 files changed, 46 insertions(+), 1 deletion(-) diff --git a/builtin/stash--helper.c b/builtin/stash--helper.c index e9a9574f40..18c4aba665 100644 --- a/builtin/stash--helper.c +++

[PATCH 4/4] stash: convert pop to builtin

2018-03-24 Thread Joel Teichroeb
--- builtin/stash--helper.c | 38 ++ git-stash.sh| 3 ++- 2 files changed, 40 insertions(+), 1 deletion(-) diff --git a/builtin/stash--helper.c b/builtin/stash--helper.c index 1598b82ac2..b912f84c97 100644 --- a/builtin/stash--helper.c +++

Re: [PATCH 1/4] stash: convert apply to builtin

2018-03-24 Thread Christian Couder
> + if (unpack_trees(nr_trees, t, )) > + return -1; > + > + if (write_locked_index(_index, _file, COMMIT_LOCK)) { > + error(_("unable to write new index file")); > + return -1; Maybe: return error(...); > + } > + > + return 0; >

Re: [PATCH] filter-branch: consider refs can refer to an object other than commit or tag

2018-03-24 Thread Yuki Kokubun
>> "git filter-branch -- --all" print unwanted error messages when refs that >> cannot be used with ^0 exist. > > It is not incorrect per-se, but if I were writing this, I'd say > "... when refs that point at objects that are not committish" or > something like that, as that is much closer to

**Herzlichen Glückwunsch**

2018-03-24 Thread Euro Millions
Herzlichen Glückwunsch, Sie haben 650.000 Euro in den monatlichen Gewinnspielen von Euro Millions/Google Promo am 10. März 2018 gewonnen. Kontaktieren Sie unseren Schadenregulierungsbeauftragten mit den folgenden Informationen Vollständiger Name Heimatadresse Geschlecht Alter Telefon

hello

2018-03-24 Thread Miss Mariel
Am Miss. Mariel. i work in one of the prime bank here in Burkina Faso, i want the bank to transfer the money left by our late customer is a foreigner from Korea. can you invest this money and also help the poor' the amount value at $13,300,000.00 (Thirteen Million Three Hundred Thousand

[PATCH v2 0/8] completion: add option completion for most builtin commands

2018-03-24 Thread Nguyễn Thái Ngọc Duy
This series adds option completion for many more commands. More importantly it introduces a generic completion function __git_complete_common(). With --git-completion-helper providing more and more information in future, this function can start to replace many other _git_xxx() in this file.

[PATCH v2 7/8] completion: use __gitcomp_builtin in _git_ls_tree

2018-03-24 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy --- contrib/completion/git-completion.bash | 7 +++ 1 file changed, 7 insertions(+) diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash index 0ee0ad7ac3..2f16264413 100644 ---

[PATCH v2 2/8] git.c: add hidden option --list-parseopt-builtins

2018-03-24 Thread Nguyễn Thái Ngọc Duy
This is another step to help automate git-completion.bash. This option gives a list of all builtin commands that do use parse_options(), which supports another hidden option --git-completion-helper. The output is prepared for easy consumption by git-completion.bash and separates items by spaces

[PATCH v2 6/8] completion: delete option-only completion commands

2018-03-24 Thread Nguyễn Thái Ngọc Duy
The new function __git_complete_common can take over this job with less code to maintain. Signed-off-by: Nguyễn Thái Ngọc Duy --- contrib/completion/git-completion.bash | 15 --- 1 file changed, 15 deletions(-) diff --git a/contrib/completion/git-completion.bash

[PATCH v2 5/8] completion: add --option completion for most builtin commands

2018-03-24 Thread Nguyễn Thái Ngọc Duy
Many builtin commands use parseopt which supports expose the option list via --git-completion-helper but do not have explicit support in git-completion.bash. This patch detects those commands and uses __gitcomp_builtin for option completion. This does not pollute the command name completion

[PATCH v2 3/8] completion: mention the oldest version we need to support

2018-03-24 Thread Nguyễn Thái Ngọc Duy
This is more of a note for git-completion.bash contributors, not users. The bash version is from MacOS [1]. Most Linux distros should be 4.x at this point. [1] https://public-inbox.org/git/%3ccapig+cqxt1ov4mjzszqilbzr4wn1xcp7asxmp+_dhtwtywh...@mail.gmail.com%3E/ Signed-off-by: Nguyễn Thái Ngọc

**Herzlichen Glückwunsch**

2018-03-24 Thread Euro Millions
Herzlichen Glückwunsch, Sie haben 650.000 Euro in den monatlichen Gewinnspielen von Euro Millions/Google Promo am 10. März 2018 gewonnen. Kontaktieren Sie unseren Schadenregulierungsbeauftragten mit den folgenden Informationen Vollständiger Name Heimatadresse Geschlecht Alter Telefon

Re: [RFC v3][GSoC] Project proposal: convert interactive rebase to C

2018-03-24 Thread Alban Gruin
Hi, this is the first draft of my proposal. --- ABSTRACT git is a modular source control management software, and all of its subcommands are programs on their own. A lot of them are written in C, but a couple of them are shell or Perl scripts. This is the case of =git-rebase--interactive= (or

Re: [PATCH v2 5/8] completion: add --option completion for most builtin commands

2018-03-24 Thread Eric Sunshine
On Sat, Mar 24, 2018 at 4:35 PM, Nguyễn Thái Ngọc Duy wrote: > Many builtin commands use parseopt which supports expose the option s/expose/exposing/ maybe? > list via --git-completion-helper but do not have explicit support in > git-completion.bash. This patch detects those

Re: [PATCH] branch -l: print useful info whilst rebasing a non-local branch

2018-03-24 Thread Eric Sunshine
On Sat, Mar 24, 2018 at 2:38 PM, Kaartic Sivaraam wrote: > When rebasing interacitvely (rebase -i), "git branch -l" prints a line The "git branch -l" threw me since "-l" is short for --create-reflog. I'm guessing you meant "git branch --list". > indicating the

Re: [RFC PATCH 1/1] json-writer: incorrect format specifier

2018-03-24 Thread Ramsay Jones
On 24/03/18 15:14, Ramsay Jones wrote: > > > On 24/03/18 05:37, Wink Saville wrote: >> In routines jw_object_uint64 and jw_object_double strbuf_addf is >> invoked with strbuf_addf(>json, ":%"PRIuMAX, value) where value >> is a uint64_t. This causes a compile error on OSX. >> >> The correct

[PATCH 4/3] sha1_name: use bsearch_pack() in unique_in_pack()

2018-03-24 Thread René Scharfe
Replace the custom binary search in unique_in_pack() with a call to bsearch_pack(). This reduces code duplication and makes use of the fan-out table of packs. Signed-off-by: Rene Scharfe --- This is basically the same replacement as done by patch 3. Speed is less of a concern

[PATCH] branch -l: print useful info whilst rebasing a non-local branch

2018-03-24 Thread Kaartic Sivaraam
When rebasing interacitvely (rebase -i), "git branch -l" prints a line indicating the current branch being rebased. This works well when the interactive rebase was intiated when a local branch is checked out. This doesn't play well when the rebase was initiated on a remote branch or an arbitrary

[RFC PATCH 0/1] json-writer: add cast to uintmax_t

2018-03-24 Thread Wink Saville
Building the pu branch at commit 8b49f5c076c using Travis-Ci all linux builds worked but the two OSX builds failed with: CC ident.o CC json-writer.o json-writer.c:123:38: error: format specifies type 'uintmax_t' (aka 'unsigned long') but the argument has type 'uint64_t' (aka 'unsigned

[RFC PATCH v2 1/1] json-writer: add cast to uintmax_t

2018-03-24 Thread Wink Saville
Correct a compile error on Mac OSX by adding a cast to uintmax_t in calls to strbuf_addf. Helped-by: Ramsay Jones Tested-by: travis-ci Signed-off-by: Wink Saville --- json-writer.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff

Re: [PATCH v4 1/4] worktree: improve message when creating a new worktree

2018-03-24 Thread Thomas Gummerer
On 03/20, Eric Sunshine wrote: > On Sat, Mar 17, 2018 at 6:22 PM, Thomas Gummerer wrote: > > [...] > > Fix these inconsistencies, and no longer show the identifier by making > > the 'git reset --hard' call quiet, and printing the message directly > > from the builtin command

Re: [PATCH v4 2/4] worktree: be clearer when "add" dwim-ery kicks in

2018-03-24 Thread Thomas Gummerer
On 03/20, Eric Sunshine wrote: > On Tue, Mar 20, 2018 at 3:26 AM, Eric Sunshine > wrote: > > On Sat, Mar 17, 2018 at 6:22 PM, Thomas Gummerer > > wrote: > >> Currently there is no indication in the "git worktree add" output that > >> a new branch

Re: Null pointer dereference in git-submodule

2018-03-24 Thread René Scharfe
Am 24.03.2018 um 18:42 schrieb Jeremy Feusi: > Hi, > While bootstrapping a gnu repository I noticed that git segfaulted when > called as "git submodule status". After compiling git with address > sanitizer and minimizing the directory I finally narrowed it down to the > files which I have attached

Re: [PATCH v4 4/4] worktree: teach "add" to check out existing branches

2018-03-24 Thread Thomas Gummerer
On 03/20, Eric Sunshine wrote: > On Sat, Mar 17, 2018 at 6:22 PM, Thomas Gummerer wrote: > > [...] > > However we can do a little better than that, and check the branch out if > > it is not checked out anywhere else. This will help users who just want > > to check an

Re: [ANNOUNCE] Git Rev News edition 37

2018-03-24 Thread Philip Oakley
From: "Christian Couder" Hi everyone, The 37th edition of Git Rev News is now published: https://git.github.io/rev_news/2018/03/21/edition-37/ Thanks a lot to all the contributors! Enjoy, Christian, Jakub, Markus and Gabriel. Thank you for the Git Rev News.

Re: [PATCH] branch -l: print useful info whilst rebasing a non-local branch

2018-03-24 Thread Kaartic Sivaraam
On Sunday 25 March 2018 07:04 AM, Eric Sunshine wrote: > On Sat, Mar 24, 2018 at 2:38 PM, Kaartic Sivaraam > wrote: >> When rebasing interacitvely (rebase -i), "git branch -l" prints a line > > The "git branch -l" threw me since "-l" is short for --create-reflog. >

[PATCH v2 4/8] completion: factor out _git_xxx calling code

2018-03-24 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy --- contrib/completion/git-completion.bash | 17 + 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash index 9bef457792..b3a9ecfad0

[PATCH v2 1/8] git.c: move cmd_struct declaration up

2018-03-24 Thread Nguyễn Thái Ngọc Duy
In a later patch we need access to one of these command option constants near the top of this file. Move this block up so we will be able to access the command options. Signed-off-by: Nguyễn Thái Ngọc Duy --- git.c | 34 +- 1 file changed, 17

[PATCH v2 8/8] completion: use __gitcomp_builtin in _git_cherry

2018-03-24 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy --- contrib/completion/git-completion.bash | 6 ++ 1 file changed, 6 insertions(+) diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash index 2f16264413..0fe91d016f 100644 ---

query on git submodule (ignore)

2018-03-24 Thread prashant Nidgunde
Hello, I am new to this community ,so please ignore if I am asking anything silly. Case : Today when I built my submodule , and did a git status , it shows as modified. After reading certain suggestions on web i found out that i can ignore that adding a line in .gitmodules But, I had to add

Re: [PATCH] branch -l: print useful info whilst rebasing a non-local branch

2018-03-24 Thread Eric Sunshine
On Sun, Mar 25, 2018 at 12:10 AM, Jeff King wrote: > So: > > git branch -l > > _looks_ like it works, but only because list mode is the default. If you > did: > > git branch -l foo > > you would find that it does list "foo" at all, but instead creates a new > branch "foo" with

Re: [PATCH] branch -l: print useful info whilst rebasing a non-local branch

2018-03-24 Thread Jeff King
On Sun, Mar 25, 2018 at 12:28:30AM -0400, Eric Sunshine wrote: > On Sun, Mar 25, 2018 at 12:10 AM, Jeff King wrote: > > Alternatively, we could at least detect the situation that confused you: > > > > diff --git a/builtin/branch.c b/builtin/branch.c > > @@ -676,6 +676,9 @@ int

Re: [PATCH] branch -l: print useful info whilst rebasing a non-local branch

2018-03-24 Thread Jeff King
On Sun, Mar 25, 2018 at 09:11:34AM +0530, Kaartic Sivaraam wrote: > >> When rebasing interacitvely (rebase -i), "git branch -l" prints a line > > > > The "git branch -l" threw me since "-l" is short for --create-reflog. > > I'm guessing you meant "git branch --list". > > That's surprising, I

Re: [PATCH] branch -l: print useful info whilst rebasing a non-local branch

2018-03-24 Thread Eric Sunshine
On Sun, Mar 25, 2018 at 09:11:34AM +0530, Kaartic Sivaraam wrote: > On Sunday 25 March 2018 07:04 AM, Eric Sunshine wrote: > > Can we have a couple new tests: one checking "git branch --list" for > > the typical case (when rebasing off a named branch) and one checking > > when rebasing from a

Re: [PATCH] branch -l: print useful info whilst rebasing a non-local branch

2018-03-24 Thread Eric Sunshine
On Sun, Mar 25, 2018 at 12:10 AM, Jeff King wrote: > Alternatively, we could at least detect the situation that confused you: > > diff --git a/builtin/branch.c b/builtin/branch.c > @@ -676,6 +676,9 @@ int cmd_branch(int argc, const char **argv, const char > *prefix) > + if

Re: [PATCH v2] Makefile: detect compiler and enable more warnings in DEVELOPER=1

2018-03-24 Thread Eric Sunshine
On Sat, Mar 24, 2018 at 8:53 AM, Nguyễn Thái Ngọc Duy wrote: > The set of extra warnings we enable when DEVELOPER has to be > conservative because we can't assume any compiler version the > developer may use. Detect the compiler version so we know when it's > safe to enable

[PATCH v4 2/7] repack: add --keep-pack option

2018-03-24 Thread Nguyễn Thái Ngọc Duy
We allow to keep existing packs by having companion .keep files. This is helpful when a pack is permanently kept. In the next patch, git-gc just wants to keep a pack temporarily, for one pack-objects run. git-gc can use --keep-pack for this use case. A note about why the pack_keep field cannot be

[PATCH v4 5/7] gc: handle a corner case in gc.bigPackThreshold

2018-03-24 Thread Nguyễn Thái Ngọc Duy
This config allows us to keep packs back if their size is larger than a limit. But if this N >= gc.autoPackLimit, we may have a problem. We are supposed to reduce the number of packs after a threshold because it affects performance. We could tell the user that they have incompatible

[PATCH v4 1/7] t7700: have closing quote of a test at the beginning of line

2018-03-24 Thread Nguyễn Thái Ngọc Duy
The closing quote of a test body by convention is always at the start of line. Signed-off-by: Nguyễn Thái Ngọc Duy Signed-off-by: Junio C Hamano --- t/t7700-repack.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/t/t7700-repack.sh

Re: [GSoC] Info: git log --oneline improvements

2018-03-24 Thread Christian Couder
Hi, On Sat, Mar 24, 2018 at 5:32 AM, Pratik Karki wrote: > > Hi Christian and Johannes, > > I will like to send another proposal on git log --oneline improvements. > My first proposal[1] was on "Convert scripts to builtins". Can > you provide me information about "git

Re: [PATCH v4 3/7] gc: add --keep-largest-pack option

2018-03-24 Thread Ævar Arnfjörð Bjarmason
On Sat, Mar 24 2018, Nguyễn Thái Ngọc Duy wrote: > struct option builtin_gc_options[] = { > OPT__QUIET(, N_("suppress progress reporting")), > @@ -362,6 +390,8 @@ int cmd_gc(int argc, const char **argv, const char > *prefix) > OPT_BOOL(0, "aggressive", , N_("be

Re: [PATCH v7 06/13] pack-objects: move in_pack out of struct object_entry

2018-03-24 Thread Ævar Arnfjörð Bjarmason
On Sat, Mar 24 2018, Nguyễn Thái Ngọc Duy wrote: > + if (pack->in_pack_by_idx) { > + if (p->index <= 0) > + die("BUG: found_pack should be NULL " > + "instead of having non-positive index"); > +

[PATCH v3] git-svn: allow empty email-address using authors-prog and authors-file

2018-03-24 Thread Andreas Heiduk
The email address in --authors-file and --authors-prog can be empty but git-svn translated it into a fictional email address in the form jondoe containing the SVN repository UUID. Now git-svn behaves like git-commit: If the email is *explicitly*

Re: [PATCH v2 00/36] Combine t/helper binaries into a single one

2018-03-24 Thread Duy Nguyen
On Sat, Mar 24, 2018 at 1:50 PM, Ævar Arnfjörð Bjarmason wrote: > > On Sat, Mar 24 2018, Nguyễn Thái Ngọc Duy wrote: > >> v2 fixes a couple of typos in commit messages and use the cmd__ prefix >> for test commands instead of test_, which avoids a naming conflict >> with the

Re: [PATCH v6 00/11] nd/pack-objects-pack-struct updates

2018-03-24 Thread Jeff King
On Fri, Mar 23, 2018 at 04:01:50PM +, Ramsay Jones wrote: > Not that it matters, but I assume this was something like: > > $ time (echo HEAD | git cat-file --batch-check="%(objectsize:disk)") > > ... and I suspect it was on the linux.git repo, yes? Yes to both. > If I do this on my

[PATCH v2 00/36] Combine t/helper binaries into a single one

2018-03-24 Thread Nguyễn Thái Ngọc Duy
v2 fixes a couple of typos in commit messages and use the cmd__ prefix for test commands instead of test_, which avoids a naming conflict with the existing function test_lazy_init_name_hash [the previous v2 send out was aborted because I messed it up with some other patches] Nguyễn Thái Ngọc Duy

[PATCH v2 13/36] t/helper: merge test-genrandom into test-tool

2018-03-24 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy --- Makefile | 2 +- t/helper/test-genrandom.c | 3 ++- t/helper/test-tool.c | 1 + t/helper/test-tool.h | 1 + t/t0005-signals.sh| 2 +-

[PATCH v2 07/36] t/helper: merge test-date into test-tool

2018-03-24 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy --- Makefile | 2 +- t/helper/test-date.c | 17 + t/helper/test-tool.c | 1 + t/helper/test-tool.h | 1 + t/t0006-date.sh| 8 t/t1300-repo-config.sh | 2 +- t/test-lib.sh |

[PATCH v2 09/36] t/helper: merge test-drop-caches into test-tool

2018-03-24 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy --- Makefile| 2 +- t/helper/test-drop-caches.c | 3 ++- t/helper/test-tool.c| 1 + t/helper/test-tool.h| 1 + t/perf/p7519-fsmonitor.sh | 12 ++-- 5 files changed, 11 insertions(+), 8

[PATCH v2 01/36] t/helper: add an empty test-tool program

2018-03-24 Thread Nguyễn Thái Ngọc Duy
This will become an umbrella program that absorbs most [1] t/helper programs in. By having a single executable binary we reduce disk usage (libgit.a is replicated by every t/helper program) and shorten link time a bit. Running "make --jobs=1; du -sh t/helper" with ccache fully populated, it takes

[PATCH v2 02/36] t/helper: merge test-chmtime into test-tool

2018-03-24 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy --- Makefile | 3 ++- t/helper/test-chmtime.c | 15 +++--- t/helper/test-tool.c | 1 + t/helper/test-tool.h | 2 ++ t/lib-git-svn.sh | 2

[PATCH v2 33/36] t/helper: merge test-subprocess into test-tool

2018-03-24 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy --- Makefile | 2 +- t/helper/test-subprocess.c | 3 ++- t/helper/test-tool.c | 1 + t/helper/test-tool.h | 1 + t/t1501-work-tree.sh | 2 +- 5 files changed, 6 insertions(+), 3 deletions(-) diff --git

[PATCH v2 18/36] t/helper: merge test-mktemp into test-tool

2018-03-24 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy --- Makefile | 2 +- t/helper/test-mktemp.c | 3 ++- t/helper/test-tool.c | 1 + t/helper/test-tool.h | 1 + t/t0070-fundamental.sh | 4 ++-- 5 files changed, 7 insertions(+), 4 deletions(-) diff --git a/Makefile

[PATCH v2 35/36] t/helper: merge test-wildmatch into test-tool

2018-03-24 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy --- Makefile | 2 +- t/helper/test-tool.c | 1 + t/helper/test-tool.h | 1 + t/helper/test-wildmatch.c | 3 ++- t/t3070-wildmatch.sh | 14 +++--- 5 files changed, 12 insertions(+), 9 deletions(-)

[PATCH v2 36/36] t/helper: merge test-write-cache into test-tool

2018-03-24 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy --- Makefile| 2 +- t/helper/test-tool.c| 1 + t/helper/test-tool.h| 1 + t/helper/test-write-cache.c | 3 ++- t/perf/p0007-write-cache.sh | 2 +- 5 files changed, 6 insertions(+), 3 deletions(-) diff

[PATCH v2 30/36] t/helper: merge test-strcmp-offset into test-tool

2018-03-24 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy --- Makefile | 2 +- t/helper/test-strcmp-offset.c | 3 ++- t/helper/test-tool.c | 1 + t/helper/test-tool.h | 1 + t/t0065-strcmp-offset.sh | 2 +- 5 files changed, 6 insertions(+), 3 deletions(-)

[PATCH v2 16/36] t/helper: merge (unused) test-match-trees into test-tool

2018-03-24 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy --- Makefile| 2 +- t/helper/test-match-trees.c | 3 ++- t/helper/test-tool.c| 1 + t/helper/test-tool.h| 1 + 4 files changed, 5 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index

[PATCH v2 34/36] t/helper: merge test-urlmatch-normalization into test-tool

2018-03-24 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy --- Makefile | 2 +- t/helper/test-tool.c | 1 + t/helper/test-tool.h | 1 + t/helper/test-urlmatch-normalization.c | 5 +- t/t0110-urlmatch-normalization.sh |

[PATCH v2 26/36] t/helper: merge test-run-command into test-tool

2018-03-24 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy --- Makefile| 2 +- t/helper/test-run-command.c | 3 ++- t/helper/test-tool.c| 1 + t/helper/test-tool.h| 1 + t/t0061-run-command.sh | 24 5 files changed, 17

[PATCH v2 27/36] t/helper: merge test-scrap-cache-tree into test-tool

2018-03-24 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy --- Makefile | 2 +- t/helper/test-scrap-cache-tree.c | 3 ++- t/helper/test-tool.c | 1 + t/helper/test-tool.h | 1 + t/t0090-cache-tree.sh| 8 5 files changed, 9

[PATCH v2 14/36] t/helper: merge test-hashmap into test-tool

2018-03-24 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy --- Makefile| 2 +- t/helper/test-hashmap.c | 5 +++-- t/helper/test-tool.c| 1 + t/helper/test-tool.h| 1 + t/t0011-hashmap.sh | 4 ++-- 5 files changed, 8 insertions(+), 5 deletions(-) diff --git a/Makefile

[PATCH v2 15/36] t/helper: merge test-index-version into test-tool

2018-03-24 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy --- Makefile | 2 +- t/helper/test-index-version.c | 3 ++- t/helper/test-tool.c | 1 + t/helper/test-tool.h | 1 + t/t1600-index.sh | 2 +-

[PATCH v2 32/36] t/helper: merge test-submodule-config into test-tool

2018-03-24 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy --- Makefile | 2 +- t/helper/test-submodule-config.c | 3 ++- t/helper/test-tool.c | 1 + t/helper/test-tool.h | 1 + t/t7411-submodule-config.sh | 18 +- 5 files

[PATCH v2 29/36] t/helper: merge test-sigchain into test-tool

2018-03-24 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy --- Makefile | 2 +- t/helper/test-sigchain.c | 3 ++- t/helper/test-tool.c | 1 + t/helper/test-tool.h | 1 + t/t0005-signals.sh | 4 ++-- 5 files changed, 7 insertions(+), 4 deletions(-) diff --git a/Makefile

[PATCH v2 12/36] t/helper: merge test-example-decorate into test-tool

2018-03-24 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy --- Makefile | 2 +- t/helper/test-example-decorate.c | 3 ++- t/helper/test-tool.c | 1 + t/helper/test-tool.h | 1 + t/t9004-example.sh | 2 +- 5 files changed, 6 insertions(+),

[PATCH v2 06/36] t/helper: merge test-ctype into test-tool

2018-03-24 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy --- Makefile | 2 +- t/helper/test-ctype.c | 3 ++- t/helper/test-tool.c | 1 + t/helper/test-tool.h | 1 + t/t0070-fundamental.sh | 2 +- 5 files changed, 6 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile

[PATCH v2 08/36] t/helper: merge (unused) test-delta into test-tool

2018-03-24 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy --- Makefile | 2 +- t/helper/test-delta.c | 5 +++-- t/helper/test-tool.c | 1 + t/helper/test-tool.h | 1 + 4 files changed, 6 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index efb1872c52..327d63217a

Re: [PATCH v2] Allow use of TLS 1.3

2018-03-24 Thread Loganaden Velvindron
On Sat, Mar 24, 2018 at 2:04 AM, Junio C Hamano wrote: > Daniel Stenberg writes: > >> On Fri, 23 Mar 2018, Loganaden Velvindron wrote: >> >>> +#ifdef CURL_SSLVERSION_TLSv1_3 >>> +{ "tlsv1.3", CURL_SSLVERSION_TLSv1_3 } >>> +#endif >> >> Unfortunately,

[GSoC] Re: Info: git log --oneline improvements

2018-03-24 Thread Pratik Karki
Hi Christian and Johannes, Though I sent a mail earlier, saying I would like to submit another proposal, I am now skeptical on re-writing another proposal as you guys are only available mentor for GSoC and I believe Git doesn't select more than 2 proposals. Hence, I will try to update my

Re: [PATCH v7 06/13] pack-objects: move in_pack out of struct object_entry

2018-03-24 Thread Ævar Arnfjörð Bjarmason
On Sat, Mar 24 2018, Nguyễn Thái Ngọc Duy wrote: > Instead of using 8 bytes (on 64 bit arch) to store a pointer to a > pack. Use an index instead since the number of packs should be > relatively small. > > This limits the number of packs we can handle to 1k. Since we can't be > sure people can

Re: [PATCH v2 00/36] Combine t/helper binaries into a single one

2018-03-24 Thread Ævar Arnfjörð Bjarmason
On Sat, Mar 24 2018, Nguyễn Thái Ngọc Duy wrote: > v2 fixes a couple of typos in commit messages and use the cmd__ prefix > for test commands instead of test_, which avoids a naming conflict > with the existing function test_lazy_init_name_hash > > [the previous v2 send out was aborted because I

[PATCH v7 03/13] pack-objects: use bitfield for object_entry::dfs_state

2018-03-24 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy --- builtin/pack-objects.c | 3 +++ pack-objects.h | 28 +--- 2 files changed, 20 insertions(+), 11 deletions(-) diff --git a/builtin/pack-objects.c b/builtin/pack-objects.c index 647c01ea34..83f8154865

[PATCH v7 12/13] pack-objects: shrink delta_size field in struct object_entry

2018-03-24 Thread Nguyễn Thái Ngọc Duy
Allowing a delta size of 64 bits is crazy. Shrink this field down to 31 bits with one overflow bit. If we find an existing delta larger than 2GB, we do not cache delta_size at all and will get the value from oe_size(), potentially from disk if it's larger than 4GB. Note, since DELTA_SIZE() is

[PATCH v7 11/13] pack-objects: shrink size field in struct object_entry

2018-03-24 Thread Nguyễn Thái Ngọc Duy
It's very very rare that an uncompressed object is larger than 4GB (partly because Git does not handle those large files very well to begin with). Let's optimize it for the common case where object size is smaller than this limit. Shrink size field down to 32 bits [1] and one overflow bit. If the

[PATCH v7 02/13] pack-objects: turn type and in_pack_type to bitfields

2018-03-24 Thread Nguyễn Thái Ngọc Duy
An extra field type_valid is added to carry the equivalent of OBJ_BAD in the original "type" field. in_pack_type always contains a valid type so we only need 3 bits for it. A note about accepting OBJ_NONE as "valid" type. The function read_object_list_from_stdin() can pass this value [1] and it

[PATCH v7 07/13] pack-objects: refer to delta objects by index instead of pointer

2018-03-24 Thread Nguyễn Thái Ngọc Duy
These delta pointers always point to elements in the objects[] array in packing_data struct. We can only hold maximum 4G of those objects because the array size in nr_objects is uint32_t. We could use uint32_t indexes to address these elements instead of pointers. On 64-bit architecture (8 bytes

[PATCH v7 09/13] pack-objects: don't check size when the object is bad

2018-03-24 Thread Nguyễn Thái Ngọc Duy
sha1_object_info() in check_objects() may fail to locate an object in the pack and return type OBJ_BAD. In that case, it will likely leave the "size" field untouched. We delay error handling until later in prepare_pack() though. Until then, do not touch "size" field. This field should contain the

[PATCH v7 10/13] pack-objects: clarify the use of object_entry::size

2018-03-24 Thread Nguyễn Thái Ngọc Duy
While this field most of the time contains the canonical object size, there is one case it does not: when we have found that the base object of the delta in question is also to be packed, we will very happily reuse the delta by copying it over instead of regenerating the new delta. "size" in this

[PATCH v7 05/13] pack-objects: move in_pack_pos out of struct object_entry

2018-03-24 Thread Nguyễn Thái Ngọc Duy
This field is only need for pack-bitmap, which is an optional feature. Move it to a separate array that is only allocated when pack-bitmap is used (it's not freed in the same way that objects[] is not). Signed-off-by: Nguyễn Thái Ngọc Duy --- builtin/pack-objects.c | 3 ++-

[PATCH v7 06/13] pack-objects: move in_pack out of struct object_entry

2018-03-24 Thread Nguyễn Thái Ngọc Duy
Instead of using 8 bytes (on 64 bit arch) to store a pointer to a pack. Use an index instead since the number of packs should be relatively small. This limits the number of packs we can handle to 1k. Since we can't be sure people can never run into the situation where they have more than 1k pack

[PATCH v7 08/13] pack-objects: shrink z_delta_size field in struct object_entry

2018-03-24 Thread Nguyễn Thái Ngọc Duy
We only cache deltas when it's smaller than a certain limit. This limit defaults to 1000 but save its compressed length in a 64-bit field. Shrink that field down to 16 bits, so you can only cache 65kb deltas. Larger deltas must be recomputed at when the pack is written down. Signed-off-by: Nguyễn

[PATCH v7 04/13] pack-objects: use bitfield for object_entry::depth

2018-03-24 Thread Nguyễn Thái Ngọc Duy
Because of struct packing from now on we can only handle max depth 4095 (or even lower when new booleans are added in this struct). This should be ok since long delta chain will cause significant slow down anyway. Signed-off-by: Nguyễn Thái Ngọc Duy ---

[PATCH v7 00/13] nd/pack-objects-pack-struct updates

2018-03-24 Thread Nguyễn Thái Ngọc Duy
Phew.. pack-objects is tough to crack. v7 changes - the 16k pack limit is removed thanks to Jeff suggestion. The limit for memory saving though is reduced down to 1k again. - only object size below 2G is cached (previously 4G) to avoid 1 << 32 on 32 bits. - fix oe_size() retrieving wrong size

[PATCH v7 01/13] pack-objects: a bit of document about struct object_entry

2018-03-24 Thread Nguyễn Thái Ngọc Duy
The role of this comment block becomes more important after we shuffle fields around to shrink this struct. It will be much harder to see what field is related to what. Signed-off-by: Nguyễn Thái Ngọc Duy --- pack-objects.h | 45 +

[PATCH v7 13/13] pack-objects: reorder members to shrink struct object_entry

2018-03-24 Thread Nguyễn Thái Ngọc Duy
Previous patches leave lots of holes and padding in this struct. This patch reorders the members and shrinks the struct down to 80 bytes (from 136 bytes, before any field shrinking is done) with 16 bits to spare (and a couple more in in_pack_header_size when we really run out of bits). This is

Re: [GSOC]About the microproject related to CI

2018-03-24 Thread Christian Couder
Hi, On Fri, Mar 23, 2018 at 2:44 AM, Zhibin Li <08826794b...@gmail.com> wrote: > Hi all, > > I'm Zhibin Li, an undergraduate from China and I'm interested in automated > testing. Since the application deadline is coming, hope it's not too late > for me to start with the microproject. As the

Re: [PATCH v4 3/7] gc: add --keep-largest-pack option

2018-03-24 Thread Duy Nguyen
On Sat, Mar 24, 2018 at 10:36 AM, Ævar Arnfjörð Bjarmason wrote: > > On Sat, Mar 24 2018, Nguyễn Thái Ngọc Duy wrote: > >> struct option builtin_gc_options[] = { >> OPT__QUIET(, N_("suppress progress reporting")), >> @@ -362,6 +390,8 @@ int cmd_gc(int argc,

Re: [RFC PATCH 1/1] json-writer: incorrect format specifier

2018-03-24 Thread Jeff Hostetler
On 3/24/2018 1:37 AM, Wink Saville wrote: In routines jw_object_uint64 and jw_object_double strbuf_addf is invoked with strbuf_addf(>json, ":%"PRIuMAX, value) where value is a uint64_t. This causes a compile error on OSX. The correct format specifier is PRIu64 instead of PRIuMax.

  1   2   >