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.
>
>
> + 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
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
"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
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
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
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:
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
---
.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
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
---
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
---
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
+++
---
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
+++
> + 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;
>
>> "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, 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
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
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.
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
---
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
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
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
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, 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
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
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
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
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
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
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
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
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
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
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
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
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
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.
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.
>
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
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
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
---
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
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
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
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
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
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
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
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
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
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
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
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
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");
> +
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*
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
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
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
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 +-
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 |
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
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
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
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
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
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(-)
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
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(-)
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
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 |
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
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
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
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 +-
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
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
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(+),
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
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
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,
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
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
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
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
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
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
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
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
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
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
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 ++-
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
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
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
---
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
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 +
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
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
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,
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 - 100 of 142 matches
Mail list logo