Re: [PATCH 08/27] pack: move approximate object count to object store

2018-02-26 Thread Jeff King
On Fri, Feb 23, 2018 at 02:22:14PM -0800, Stefan Beller wrote: > >> + /* > >> + * A fast, rough count of the number of objects in the repository. > >> + * These two fields are not meant for direct access. Use > >> + * approximate_object_count() instead. > >> + */ > >> +

Use of uninitialised value of size 8 in sha1_name.c

2018-02-26 Thread Christian Couder
Hi Derrick, These days when running: ./t5616-partial-clone.sh --valgrind on master, I get a bunch of: ==21455== Use of uninitialised value of size 8 ==21455==at 0x2D2A73: get_hex_char_from_oid (sha1_name.c:492) ==21455==by 0x2D2AFE: extend_abbrev_len (sha1_name.c:502) ==21455==by

Re: [PATCH] strbuf_read_file(): preserve errno across close() call

2018-02-26 Thread Jeff King
On Fri, Feb 23, 2018 at 10:00:24PM +0100, René Scharfe wrote: > How about adding a stealthy close_no_errno(), or do something like the > following to get shorter and more readable code? (We could also keep > a single close() call, but would then set errno even on success.) > [...] > @@ -391,7

Re: [PATCHv4 01/27] repository: introduce raw object store field

2018-02-26 Thread Duy Nguyen
On Fri, Feb 23, 2018 at 04:47:28PM -0800, Stefan Beller wrote: > /* The main repository */ > static struct repository the_repo = { > - NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, _index, > _algos[GIT_HASH_SHA1], 0, 0 > + NULL, NULL, > + RAW_OBJECT_STORE_INIT, > + NULL,

Re: [PATCHv4 01/27] repository: introduce raw object store field

2018-02-26 Thread Brandon Williams
On 02/26, Junio C Hamano wrote: > Duy Nguyen writes: > > > diff --git a/common-main.c b/common-main.c > > index 6a689007e7..a13ab981aa 100644 > > --- a/common-main.c > > +++ b/common-main.c > > @@ -1,6 +1,7 @@ > > #include "cache.h" > > #include "exec_cmd.h" > > #include

Re: [PATCH 1/4] repository.c: move env-related setup code back to environment.c

2018-02-26 Thread Eric Sunshine
On Mon, Feb 26, 2018 at 5:30 AM, Nguyễn Thái Ngọc Duy wrote: > It does not make sense that generic repository code contains handling > of environment variables, which are specific for the main repository > only. Refactor repo_set_gitdir() function to take $GIT_DIR and >

Re: [PATCH v4 03/13] commit-graph: create git-commit-graph builtin

2018-02-26 Thread Derrick Stolee
On 2/26/2018 11:25 AM, SZEDER Gábor wrote: Teach git the 'commit-graph' builtin that will be used for writing and reading packed graph files. The current implementation is mostly empty, except for an '--object-dir' option. Since 'git commit-graph' is a builtin command, it shouldn't show up in

Re: [PATCHv4 01/27] repository: introduce raw object store field

2018-02-26 Thread Stefan Beller
On Mon, Feb 26, 2018 at 1:30 AM, Duy Nguyen wrote: > On Fri, Feb 23, 2018 at 04:47:28PM -0800, Stefan Beller wrote: >> /* The main repository */ >> static struct repository the_repo = { >> - NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, _index, >>

Re: [PATCHv4 01/27] repository: introduce raw object store field

2018-02-26 Thread Junio C Hamano
Duy Nguyen writes: > diff --git a/common-main.c b/common-main.c > index 6a689007e7..a13ab981aa 100644 > --- a/common-main.c > +++ b/common-main.c > @@ -1,6 +1,7 @@ > #include "cache.h" > #include "exec_cmd.h" > #include "attr.h" > +#include "repository.h" > > /* > *

Re: [PATCH v2] subtree: fix add and pull for GPG-signed commits

2018-02-26 Thread Junio C Hamano
Stephen R Guglielmo writes: > On Fri, Feb 23, 2018 at 5:45 PM, Junio C Hamano wrote: >... >> I am however starting to feel that >> ... >> may be a better approach. > ... > I'm happy to develop a new patch based on your recommendations. Should > it be on

Re: [PATCH v7 0/7] convert: add support for different encodings

2018-02-26 Thread Torsten Bögershausen
On Sun, Feb 25, 2018 at 08:44:46PM -0500, Jeff King wrote: > On Sat, Feb 24, 2018 at 04:18:36PM +0100, Lars Schneider wrote: > > > > We always use the in-repo contents when generating 'diff'. I think > > > by "attribute to be used in diff", what you are reallying after is > > > to convert the

Re: [PATCHv4 00/27] Moving global state into the repository object (part 1)

2018-02-26 Thread Jonathan Tan
On Fri, 23 Feb 2018 16:47:27 -0800 Stefan Beller wrote: > v4: > * addressed feedback from the single patches (mostly nits) > * rebased on latest master The patches I looked at previously (patches 7, 15, 19, 22, and 24) look good to me.

Re: [PATCH v3 0/6] Fix initializing the_hash_algo

2018-02-26 Thread Stefan Beller
On Sun, Feb 25, 2018 at 12:34 PM, brian m. carlson wrote: > On Sun, Feb 25, 2018 at 06:18:34PM +0700, Nguyễn Thái Ngọc Duy wrote: >> v3 refines v2 a bit more: >> >> - fix configure typo (and stray words in commit message) >> - use repo_set_hash_algo() instead of

Re: [PATCH 0/4] Delete ignore_env member in struct repository

2018-02-26 Thread Junio C Hamano
Nguyễn Thái Ngọc Duy writes: > This series is built on top of Stefan's object-store-part1, v4. I > could rebase it on 'master' too, but then Junio may need to resolve > some conflicts. As a follow-up fix for combined "move things to the_repo as much as possible" efforts I

[no subject]

2018-02-26 Thread tboegi
>From 9f7d43f29eaf6017b7b16261ce91d8ef182cf415 Mon Sep 17 00:00:00 2001 In-Reply-To: <20171218131249.gb4...@sigill.intra.peff.net> References: <20171218131249.gb4...@sigill.intra.peff.net> From: =?UTF-8?q?Torsten=20B=C3=B6gershausen?= Date: Fri, 23 Feb 2018 20:53:34 +0100 Subject:

[PATCH/RFC 1/1] Auto diff of UTF-16 files in UTF-8

2018-02-26 Thread tboegi
From: Torsten Bögershausen When an UTF-16 file is commited and later changed, `git diff` shows "Binary files XX and YY differ". When the user wants a diff in UTF-8, a textconv needs to be specified in .gitattributes and the textconv must be configured. A more user-friendly diff

Re: [PATCH/RFC 1/1] Auto diff of UTF-16 files in UTF-8

2018-02-26 Thread Peter Krefting
tbo...@web.de: +static inline int buffer_has_utf16_bom(const void *buf, size_t len) { + const unsigned char *text = (unsigned char *)buf; + if (!text || len < 2) +return 0; + if (text[0] == 0xff && text[1] == 0xfe) +return 1; + if (text[0] == 0xfe && text[1] == 0xff) +return 1;

Re: [PATCH v3 13/35] ls-refs: introduce ls-refs server command

2018-02-26 Thread Junio C Hamano
Jeff King writes: > I actually wonder if we should just specify that the patterns must > _always_ be fully-qualified, but may end with a single "/*" to iterate > over wildcards. Or even simpler, that "refs/heads/foo" would find that > ref itself, and anything under it. > > That

Re: [PATCH 1/4] repository.c: move env-related setup code back to environment.c

2018-02-26 Thread Stefan Beller
> diff --git a/setup.c b/setup.c > index c5d55dcee4..6fac1bb58a 100644 > --- a/setup.c > +++ b/setup.c > @@ -1116,8 +1116,7 @@ const char *setup_git_directory_gently(int *nongit_ok) > const char *gitdir = getenv(GIT_DIR_ENVIRONMENT); > if (!gitdir) >

Re: [PATCH] t/known-leaky: add list of known-leaky test scripts

2018-02-26 Thread Martin Ågren
On 25 February 2018 at 04:48, Kaartic Sivaraam wrote: > On Wednesday 21 February 2018 02:14 AM, Martin Ågren wrote: >> To sum up: I probably won't be looking into Travis-ing such a blacklist >> in the near future. >> > > Just thinking out loud, how about having a

[PATCH v5 01/12] sequencer: avoid using errno clobbered by rollback_lock_file()

2018-02-26 Thread Johannes Schindelin
As pointed out in a review of the `--recreate-merges` patch series, `rollback_lock_file()` clobbers errno. Therefore, we have to report the error message that uses errno before calling said function. Signed-off-by: Johannes Schindelin --- sequencer.c | 13

[PATCH v5 00/12] rebase -i: offer to recreate merge commits

2018-02-26 Thread Johannes Schindelin
Once upon a time, I dreamt of an interactive rebase that would not flatten branch structure, but instead recreate the commit topology faithfully. My original attempt was --preserve-merges, but that design was so limited that I did not even enable it in interactive mode. Subsequently, it *was*

Re: [PATCH v4 00/12] rebase -i: offer to recreate merge commits

2018-02-26 Thread Johannes Schindelin
Hi Jake, On Sun, 25 Feb 2018, Jacob Keller wrote: > On Fri, Feb 23, 2018 at 4:35 AM, Johannes Schindelin > wrote: > > Changes since v3: > > > > - fixed a grammar error in "introduce the `merge` command"'s commit message. > > > > - fixed a couple of resource leaks in

Re: [PATCH] sha1_name: fix uninitialized memory errors

2018-02-26 Thread Jeff King
On Mon, Feb 26, 2018 at 09:56:47AM -0500, Derrick Stolee wrote: > diff --git a/sha1_name.c b/sha1_name.c > index 611c7d2..44dd595 100644 > --- a/sha1_name.c > +++ b/sha1_name.c > @@ -546,17 +546,12 @@ static void find_abbrev_len_for_pack(struct packed_git > *p, >* nearby for the

Re: [PATCH v7 0/7] convert: add support for different encodings

2018-02-26 Thread Jeff King
On Mon, Feb 26, 2018 at 06:35:33PM +0100, Torsten Bögershausen wrote: > > diff --git a/userdiff.c b/userdiff.c > > index dbfb4e13cd..48fa7e8bdd 100644 > > --- a/userdiff.c > > +++ b/userdiff.c > > @@ -161,6 +161,7 @@ IPATTERN("css", > > "-?[_a-zA-Z][-_a-zA-Z0-9]*" /* identifiers */ > >

Re: [PATCH 0/4] Delete ignore_env member in struct repository

2018-02-26 Thread Stefan Beller
On Mon, Feb 26, 2018 at 2:30 AM, Nguyễn Thái Ngọc Duy wrote: > It turns out I don't need my other series [1] in order to delete this > field. This series moves getenv() calls from > repo_set_gitdir()/repo_setup_env() and prepare_alt_odb() back in > environment.c where they

Re: [PATCH v3 21/35] fetch-pack: perform a fetch using v2

2018-02-26 Thread Brandon Williams
On 02/23, Jonathan Tan wrote: > On Tue, 6 Feb 2018 17:12:58 -0800 > Brandon Williams wrote: > > > + while ((oid = get_rev())) { > > + packet_buf_write(req_buf, "have %s\n", oid_to_hex(oid)); > > + if (++haves_added >= INITIAL_FLUSH) > > +

Re: [PATCHv4 00/27] Moving global state into the repository object (part 1)

2018-02-26 Thread Stefan Beller
On Sat, Feb 24, 2018 at 7:00 AM, Duy Nguyen wrote: > I notice that there are a few global state (or configuration rather) > left after this: packed_git_window_size, packed_git_limit and > delta_base_cache_limit. These can be changed by $GIT_DIR/config, but > since it's still

Re: [PATCH 08/27] pack: move approximate object count to object store

2018-02-26 Thread Stefan Beller
On Mon, Feb 26, 2018 at 12:55 AM, Jeff King wrote: > On Fri, Feb 23, 2018 at 02:22:14PM -0800, Stefan Beller wrote: > >> >> + /* >> >> + * A fast, rough count of the number of objects in the repository. >> >> + * These two fields are not meant for direct access. Use

[PATCH v5 02/12] sequencer: make rearrange_squash() a bit more obvious

2018-02-26 Thread Johannes Schindelin
There are some commands that have to be skipped from rearranging by virtue of not handling any commits. However, the logic was not quite obvious: it skipped commands based on their position in the enum todo_command. Instead, let's make it explicit that we skip all commands that do not handle any

[PATCH v5 12/12] rebase -i: introduce --recreate-merges=[no-]rebase-cousins

2018-02-26 Thread Johannes Schindelin
This one is a bit tricky to explain, so let's try with a diagram: C / \ A - B - E - F \ / D To illustrate what this new mode is all about, let's consider what happens upon `git rebase -i --recreate-merges B`, in particular to the commit `D`. So far, the new branch

[PATCH v5 05/12] sequencer: introduce the `merge` command

2018-02-26 Thread Johannes Schindelin
This patch is part of the effort to reimplement `--preserve-merges` with a substantially improved design, a design that has been developed in the Git for Windows project to maintain the dozens of Windows-specific patch series on top of upstream Git. The previous patch implemented the `label` and

[PATCH v5 03/12] git-rebase--interactive: clarify arguments

2018-02-26 Thread Johannes Schindelin
From: Stefan Beller Up to now each command took a commit as its first argument and ignored the rest of the line (usually the subject of the commit) Now that we are about to introduce commands that take different arguments, clarify each command by giving the argument

[PATCH v5 08/12] rebase: introduce the --recreate-merges option

2018-02-26 Thread Johannes Schindelin
Once upon a time, this here developer thought: wouldn't it be nice if, say, Git for Windows' patches on top of core Git could be represented as a thicket of branches, and be rebased on top of core Git in order to maintain a cherry-pick'able set of patch series? The original attempt to answer this

[PATCH v5 09/12] sequencer: make refs generated by the `label` command worktree-local

2018-02-26 Thread Johannes Schindelin
This allows for rebases to be run in parallel in separate worktrees (think: interrupted in the middle of one rebase, being asked to perform a different rebase, adding a separate worktree just for that job). Signed-off-by: Johannes Schindelin --- refs.c

[PATCH v5 10/12] sequencer: handle post-rewrite for merge commands

2018-02-26 Thread Johannes Schindelin
In the previous patches, we implemented the basic functionality of the `git rebase -i --recreate-merges` command, in particular the `merge` command to create merge commits in the sequencer. The interactive rebase is a lot more these days, though, than a simple cherry-pick in a loop. For example,

[PATCH v5 11/12] pull: accept --rebase=recreate to recreate the branch topology

2018-02-26 Thread Johannes Schindelin
Similar to the `preserve` mode simply passing the `--preserve-merges` option to the `rebase` command, the `recreate` mode simply passes the `--recreate-merges` option. This will allow users to conveniently rebase non-trivial commit topologies when pulling new commits, without flattening them.

[PATCH v5 07/12] rebase-helper --make-script: introduce a flag to recreate merges

2018-02-26 Thread Johannes Schindelin
The sequencer just learned new commands intended to recreate branch structure (similar in spirit to --preserve-merges, but with a substantially less-broken design). Let's allow the rebase--helper to generate todo lists making use of these commands, triggered by the new --recreate-merges option.

[PATCH v5 06/12] sequencer: fast-forward merge commits, if possible

2018-02-26 Thread Johannes Schindelin
Just like with regular `pick` commands, if we are trying to recreate a merge commit, we now test whether the parents of said commit match HEAD and the commits to be merged, and fast-forward if possible. This is not only faster, but also avoids unnecessary proliferation of new objects.

[PATCH v5 04/12] sequencer: introduce new commands to reset the revision

2018-02-26 Thread Johannes Schindelin
In the upcoming commits, we will teach the sequencer to recreate merges. This will be done in a very different way from the unfortunate design of `git rebase --preserve-merges` (which does not allow for reordering commits, or changing the branch topology). The main idea is to introduce new todo

Re: [PATCH v3 14/35] connect: request remote refs using v2

2018-02-26 Thread Jonathan Nieder
Brandon Williams wrote: > Teach the client to be able to request a remote's refs using protocol > v2. This is done by having a client issue a 'ls-refs' request to a v2 > server. Yay, ls-remote support! [...] > --- a/builtin/upload-pack.c > +++ b/builtin/upload-pack.c > @@ -5,6 +5,7 @@ >

Re: [PATCH v3 14/35] connect: request remote refs using v2

2018-02-26 Thread Jonathan Nieder
Jonathan Tan wrote: > On Thu, 22 Feb 2018 13:26:58 -0500 > Jeff King wrote: >> I agree that it shouldn't matter much here. But if the name argv_array >> is standing in the way of using it, I think we should consider giving it >> a more general name. I picked that not to evoke

Re: [PATCH v3 18/35] fetch: pass ref patterns when fetching

2018-02-26 Thread Jonathan Nieder
Brandon Williams wrote: > Construct a list of ref patterns to be passed to > 'transport_get_remote_refs()' from the refspec to be used during the > fetch. This list of ref patterns will be used to allow the server to > filter the ref advertisement when communicating using protocol v2. > >

Re: [PATCH v3 13/35] ls-refs: introduce ls-refs server command

2018-02-26 Thread Ævar Arnfjörð Bjarmason
On Sat, Feb 24 2018, Jeff King jotted: > On Thu, Feb 22, 2018 at 04:45:14PM -0800, Brandon Williams wrote: >> > Does the client have to be aware that we're using wildmatch? I think >> > they'd need "refs/heads/**" to actually implement what we usually >> > specify in refspecs as "refs/heads/*".

Re: [PATCHv4 00/27] Moving global state into the repository object (part 1)

2018-02-26 Thread Duy Nguyen
On Tue, Feb 27, 2018 at 3:50 AM, Stefan Beller wrote: >> The natural thing to do is move these to raw_object_store too (and >> repo_submodule_init needs to check submodule's config file). But one >> may argue these should be per-process instead of per-repo though. I >> don't

Re: [BUG] [git 2.16.1] yeeek ... my files are gone .. by git pull

2018-02-26 Thread Johannes Schindelin
Hi Peff, On Fri, 23 Feb 2018, Jeff King wrote: > On Fri, Feb 23, 2018 at 06:29:55AM +0100, "Marcel 'childNo͡.de' Trautwein" > wrote: > > > shows me a quite different behavior, so solely rebase not seems the > > full problem BUT `--rebase=preserve` will .. o’man , really, is this > > intended?

Re: [PATCH 1/4] repository.c: move env-related setup code back to environment.c

2018-02-26 Thread Duy Nguyen
On Tue, Feb 27, 2018 at 3:30 AM, Stefan Beller wrote: >> diff --git a/setup.c b/setup.c >> index c5d55dcee4..6fac1bb58a 100644 >> --- a/setup.c >> +++ b/setup.c >> @@ -1116,8 +1116,7 @@ const char *setup_git_directory_gently(int *nongit_ok) >> const

[no subject]

2018-02-26 Thread Alan Gage
Hello, I recently noticed a bug involving GitBash and Python. I was running a function that would post the system time once every second using a while loop but the text was only sent after the while loop ended due to a timer I had set. Essesntially, instead of it being entered every second into

[PATCH v5 13/13] commit-graph: implement "--additive" option

2018-02-26 Thread Derrick Stolee
Teach git-commit-graph to add all commits from the existing commit-graph file to the file about to be written. This should be used when adding new commits without performing garbage collection. Signed-off-by: Derrick Stolee --- Documentation/git-commit-graph.txt | 10

[PATCH v5 12/13] commit-graph: build graph from starting commits

2018-02-26 Thread Derrick Stolee
Teach git-commit-graph to read commits from stdin when the --stdin-commits flag is specified. Commits reachable from these commits are added to the graph. This is a much faster way to construct the graph than inspecting all packed objects, but is restricted to known tips. For the Linux

[PATCH v5 03/13] commit-graph: create git-commit-graph builtin

2018-02-26 Thread Derrick Stolee
Thanks for the help in getting all the details right in setting up a builtin. -- >8 -- Teach git the 'commit-graph' builtin that will be used for writing and reading packed graph files. The current implementation is mostly empty, except for an '--object-dir' option. Signed-off-by: Derrick

[PATCH v5 02/13] graph: add commit graph design document

2018-02-26 Thread Derrick Stolee
Add Documentation/technical/commit-graph.txt with details of the planned commit graph feature, including future plans. Signed-off-by: Derrick Stolee --- Documentation/technical/commit-graph.txt | 164 +++ 1 file changed, 164 insertions(+)

[PATCH v5 10/13] commit: integrate commit graph with commit parsing

2018-02-26 Thread Derrick Stolee
Teach Git to inspect a commit graph file to supply the contents of a struct commit when calling parse_commit_gently(). This implementation satisfies all post-conditions on the struct commit, including loading parents, the root tree, and the commit date. If core.commitGraph is false, then do not

[PATCH v5 06/13] commit-graph: implement 'git-commit-graph write'

2018-02-26 Thread Derrick Stolee
Teach git-commit-graph to write graph files. Create new test script to verify this command succeeds without failure. Signed-off-by: Derrick Stolee --- Documentation/git-commit-graph.txt | 39 builtin/commit-graph.c | 33 ++

[PATCH v5 00/13] Serialized Git Commit Graph

2018-02-26 Thread Derrick Stolee
This patch series is another big difference from version 4, but I do think we are converging on a stable design. This series depends on a few things in flight: * jt/binsearch-with-fanout for bsearch_graph() * 'master' includes the sha1file -> hashfile rename in (98a3beab). * [PATCH] commit:

[PATCH v5 05/13] commit-graph: implement write_commit_graph()

2018-02-26 Thread Derrick Stolee
Teach Git to write a commit graph file by checking all packed objects to see if they are commits, then store the file in the given object directory. Signed-off-by: Derrick Stolee --- Makefile | 1 + commit-graph.c | 360

[PATCH v5 04/13] csum-file: add CSUM_KEEP_OPEN flag

2018-02-26 Thread Derrick Stolee
This patch is new to the series due to the interactions with the lockfile API and the hashfile API. I need to ensure the hashfile writes the hash value at the end of the file, but keep the file descriptor open so the lock is valid. I welcome any susggestions to this patch or to the way I use it

[PATCH v5 01/13] commit-graph: add format document

2018-02-26 Thread Derrick Stolee
Add document specifying the binary format for commit graphs. This format allows for: * New versions. * New hash functions and hash lengths. * Optional extensions. Basic header information is followed by a binary table of contents into "chunks" that include: * An ordered list of commit object

[PATCH v5 11/13] commit-graph: read only from specific pack-indexes

2018-02-26 Thread Derrick Stolee
Teach git-commit-graph to inspect the objects only in a certain list of pack-indexes within the given pack directory. This allows updating the commit graph iteratively. Signed-off-by: Derrick Stolee --- Documentation/git-commit-graph.txt | 11 ++-

Re: [PATCH 2/2] Revert "repository: pre-initialize hash algo pointer"

2018-02-26 Thread Junio C Hamano
Duy Nguyen writes: > Yes that's the intention. But after writing cover letter for v2 and > sending it out, it looks to me that this thing must stay until all our > code is converted to using the_hash_algo (I don't know if there are > more to convert or it's finished already).

Re: What's cooking in git.git (Feb 2018, #03; Wed, 21)

2018-02-26 Thread Johannes Schindelin
Hi Junio, On Fri, 23 Feb 2018, Junio C Hamano wrote: > Johannes Schindelin writes: > > > On Wed, 21 Feb 2018, Junio C Hamano wrote: > > > >> * js/rebase-recreate-merge (2018-02-12) 12 commits > >> ... > >> > >> "git rebase" learned "--recreate-merges" to

Re: [PATCH 1/1] git-p4: add format-patch subcommand

2018-02-26 Thread Miguel Torroja
very nice subcommand, I tested it with a shelved CL and a submitted CL. Find my comments inline On Mon, Feb 26, 2018 at 12:48 PM, Luke Diamand wrote: > It takes a list of P4 changelists and generates a patch for > each one, using "p4 describe". > > This is especially useful for

Re: [PATCH 1/1] git-p4: add format-patch subcommand

2018-02-26 Thread Eric Sunshine
On Mon, Feb 26, 2018 at 6:48 AM, Luke Diamand wrote: > It takes a list of P4 changelists and generates a patch for > each one, using "p4 describe". > [...] > Signed-off-by: Luke Diamand > --- > diff --git a/git-p4.py b/git-p4.py > @@ -3749,6 +3761,277 @@ class

Re: [PATCHv4 01/27] repository: introduce raw object store field

2018-02-26 Thread Duy Nguyen
On Tue, Feb 27, 2018 at 2:28 AM, Stefan Beller wrote: > On Mon, Feb 26, 2018 at 1:30 AM, Duy Nguyen wrote: >> On Fri, Feb 23, 2018 at 04:47:28PM -0800, Stefan Beller wrote: >>> /* The main repository */ >>> static struct repository the_repo = { >>> -

Re: [RFC] Rebasing merges: a jorney to the ultimate solution (Road Clear)

2018-02-26 Thread Johannes Schindelin
Hi Buga, On Tue, 20 Feb 2018, Igor Djordjevic wrote: > I`m really interested in this topic, which seems to (try to) address the > only "bad feeling" I had with rebasing merges - being afraid of silently > losing amendments by actually trying to "replay" the merge (where > additional and possibly

Re: [PATCH 0/4] Delete ignore_env member in struct repository

2018-02-26 Thread Duy Nguyen
On Tue, Feb 27, 2018 at 3:46 AM, Stefan Beller wrote: > What is the plan from here on? > Should I build further series on top of yours? The next series will > focus on the pack side of things (pack.h, packfile.{c,h}) > > So maybe we'll have Junio merge down my series (and

[PATCH v5 07/13] commit-graph: implement git commit-graph read

2018-02-26 Thread Derrick Stolee
Teach git-commit-graph to read commit graph files and summarize their contents. Use the read subcommand to verify the contents of a commit graph file in the tests. Signed-off-by: Derrick Stolee --- Documentation/git-commit-graph.txt | 12 builtin/commit-graph.c

[PATCH v5 08/13] commit-graph: add core.commitGraph setting

2018-02-26 Thread Derrick Stolee
The commit graph feature is controlled by the new core.commitGraph config setting. This defaults to 0, so the feature is opt-in. The intention of core.commitGraph is that a user can always stop checking for or parsing commit graph files if core.commitGraph=0. Signed-off-by: Derrick Stolee

[PATCH v5 09/13] commit-graph: close under reachability

2018-02-26 Thread Derrick Stolee
Teach write_commit_graph() to walk all parents from the commits discovered in packfiles. This prevents gaps given by loose objects or previously-missed packfiles. Also automatically add commits from the existing graph file, if it exists. Signed-off-by: Derrick Stolee ---

Re: [PATCH v2 05/36] resolve-undo: convert struct resolve_undo_info to object_id

2018-02-26 Thread brian m. carlson
On Mon, Feb 26, 2018 at 06:25:24PM +0700, Duy Nguyen wrote: > On Mon, Feb 26, 2018 at 4:11 AM, brian m. carlson > wrote: > > @@ -44,7 +44,7 @@ void resolve_undo_write(struct strbuf *sb, struct > > string_list *resolve_undo) > > for (i = 0; i < 3;

[PATCH 0/4] Delete ignore_env member in struct repository

2018-02-26 Thread Nguyễn Thái Ngọc Duy
It turns out I don't need my other series [1] in order to delete this field. This series moves getenv() calls from repo_set_gitdir()/repo_setup_env() and prepare_alt_odb() back in environment.c where they belong in my opinion. The repo_set_gitdir() now takes $GIT_DIR and optionally all other

[PATCH 2/4] repository.c: delete dead functions

2018-02-26 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy --- repository.c | 45 - 1 file changed, 45 deletions(-) diff --git a/repository.c b/repository.c index 70dc8dc661..be86da82cc 100644 --- a/repository.c +++ b/repository.c @@ -16,51 +16,6 @@

[PATCH 1/4] repository.c: move env-related setup code back to environment.c

2018-02-26 Thread Nguyễn Thái Ngọc Duy
It does not make sense that generic repository code contains handling of environment variables, which are specific for the main repository only. Refactor repo_set_gitdir() function to take $GIT_DIR and optionally _all_ other customizable paths. These optional paths can be NULL and will be

[PATCH 3/4] sha1_file.c: move delayed getenv(altdb) back to setup_git_env()

2018-02-26 Thread Nguyễn Thái Ngọc Duy
getenv() is supposed to work on the main repository only. This delayed getenv() code in sha1_file.c makes it more difficult to convert sha1_file.c to a generic object store that could be used by both submodule and main repositories. Move the getenv() back in setup_git_env() where other env vars

[PATCH 4/4] repository: delete ignore_env member

2018-02-26 Thread Nguyễn Thái Ngọc Duy
This variable was added because the repo_set_gitdir() was created to cover both submodule and main repos, but these two are initialized a bit differently so ignore_env == 0 means main repo, while ignore_env != 0 is submodules. Since the difference part (env variables) has been moved out of

Re: [PATCH 1/2] wildmatch: add interface for precompiling wildmatch() patterns

2018-02-26 Thread Duy Nguyen
On Mon, Feb 26, 2018 at 3:35 AM, Ævar Arnfjörð Bjarmason wrote: > Add the scaffolding necessary for precompiling wildmatch() > patterns. > > There is currently no point in doing this with the wildmatch() > function we have now, since it can't make any use of precompiling the >

Re: [PATCH] Call timegm and timelocal with 4-digit year

2018-02-26 Thread Bernhard M. Wiedemann
On 2018-02-24 23:28, Ævar Arnfjörð Bjarmason wrote: > My Time::Local 1.2300 on perl 5.024001 currently interprets "69" here as > 1969, but after this it'll be 2069. on one hand, there is already perl -e 'use Time::Local; print scalar gmtime(Time::Local::timegm(0,0,0,1,0,68))' Sun Jan 1

Re: Git should preserve modification times at least on request

2018-02-26 Thread 'Peter Backes'
On Mon, Feb 26, 2018 at 11:56:42AM +0100, Andreas Krey wrote: > > The bigger issue is usually to copy with those pesky leap seconds. It > > makes a difference whether one uses solar seconds ("posix" style; those > > are more commonly seen) or atomic seconds ("right" style) for the UNIX > >

OK

2018-02-26 Thread Ahmed Zama
Greetings, I am desperately in need of a foreigner with a foreign account. I have a profitable business that wil be of a benefit to both of us. Permit me to disclose the details of the business to you Ahmed Zama

Re: [PATCH 0/2] wildmatch precompilation interface

2018-02-26 Thread Duy Nguyen
On Mon, Feb 26, 2018 at 3:35 AM, Ævar Arnfjörð Bjarmason wrote: > My recently landed wildmatch test series was in preperation for some > more major wildmatch changes. > > Here's another series that prepares for bigger changes in wildmatch, > it adds an interface to pre-compile

Re: [PATCH v2 04/36] cache-tree: convert remnants to struct object_id

2018-02-26 Thread Duy Nguyen
On Mon, Feb 26, 2018 at 4:11 AM, brian m. carlson wrote: > @@ -465,7 +465,7 @@ static void write_one(struct strbuf *buffer, struct > cache_tree *it, > #endif > > if (0 <= it->entry_count) { > - strbuf_add(buffer, it->oid.hash, 20); > +

Re: Git should preserve modification times at least on request

2018-02-26 Thread Andreas Krey
On Thu, 22 Feb 2018 03:05:35 +, 'Peter Backes' wrote: ... > The bigger issue is usually to copy with those pesky leap seconds. It > makes a difference whether one uses solar seconds ("posix" style; those > are more commonly seen) or atomic seconds ("right" style) for the UNIX > timestamp.

Re: [PATCH v2 05/36] resolve-undo: convert struct resolve_undo_info to object_id

2018-02-26 Thread Duy Nguyen
On Mon, Feb 26, 2018 at 4:11 AM, brian m. carlson wrote: > @@ -44,7 +44,7 @@ void resolve_undo_write(struct strbuf *sb, struct > string_list *resolve_undo) > for (i = 0; i < 3; i++) { > if (!ui->mode[i]) >

[PATCH 0/1] git-p4: add format-patch subcommand

2018-02-26 Thread Luke Diamand
This is an initial attempt to add a "format-patch" command to git-p4, following on from the earlier discussion about shelving. It uses the "p4 describe" command to generate the diff content and post-processes it enough to generate git-style patches. These can be fed to tools such as patch, or

[PATCH 1/1] git-p4: add format-patch subcommand

2018-02-26 Thread Luke Diamand
It takes a list of P4 changelists and generates a patch for each one, using "p4 describe". This is especially useful for applying shelved changelists to your git-p4 tree; the existing "git p4" subcommands do not handle these. That's because they "p4 print" the contents of each file at a given

Re: Use of uninitialised value of size 8 in sha1_name.c

2018-02-26 Thread Jeff King
On Mon, Feb 26, 2018 at 10:04:22AM +0100, Christian Couder wrote: > ==21455== Use of uninitialised value of size 8 > ==21455==at 0x2D2A73: get_hex_char_from_oid (sha1_name.c:492) > ==21455==by 0x2D2AFE: extend_abbrev_len (sha1_name.c:502) > ==21455==by 0x2D2C3D:

Re: What's cooking in git.git (Feb 2018, #03; Wed, 21)

2018-02-26 Thread Duy Nguyen
On Thu, Feb 22, 2018 at 7:31 AM, Junio C Hamano wrote: > * nd/worktree-move (2018-02-12) 7 commits > - worktree remove: allow it when $GIT_WORK_TREE is already gone > - worktree remove: new command > - worktree move: refuse to move worktrees with submodules > - worktree

Re: Use of uninitialised value of size 8 in sha1_name.c

2018-02-26 Thread Christian Couder
On Mon, Feb 26, 2018 at 10:53 AM, Jeff King wrote: > On Mon, Feb 26, 2018 at 10:04:22AM +0100, Christian Couder wrote: > >> ==21455== Use of uninitialised value of size 8 >> ==21455==at 0x2D2A73: get_hex_char_from_oid (sha1_name.c:492) >> ==21455==by 0x2D2AFE:

Re: [PATCH 2/2] wildmatch: use the new precompiling wildmatch()

2018-02-26 Thread Duy Nguyen
On Mon, Feb 26, 2018 at 3:35 AM, Ævar Arnfjörð Bjarmason wrote: > diff --git a/config.c b/config.c > index b0c20e6cb8..0f595de971 100644 > --- a/config.c > +++ b/config.c > @@ -210,6 +210,7 @@ static int include_by_gitdir(const struct config_options > *opts, > int ret =

Re: What's cooking in git.git (Feb 2018, #03; Wed, 21)

2018-02-26 Thread Eric Sunshine
On Mon, Feb 26, 2018 at 5:17 AM, Duy Nguyen wrote: > On Thu, Feb 22, 2018 at 7:31 AM, Junio C Hamano wrote: >> * nd/worktree-move (2018-02-12) 7 commits >> >> "git worktree" learned move and remove subcommands. >> >> Expecting a reroll. >> cf.

Re: [PATCH v2 34/36] Convert lookup_replace_object to struct object_id

2018-02-26 Thread Duy Nguyen
On Mon, Feb 26, 2018 at 4:12 AM, brian m. carlson wrote: > diff --git a/sha1_file.c b/sha1_file.c > index 7493bc7f11..c41fbe2f01 100644 > --- a/sha1_file.c > +++ b/sha1_file.c > @@ -1227,22 +1227,18 @@ int oid_object_info_extended(const struct object_id > *oid,

[PATCH] git-p4: Fix depot path stripping

2018-02-26 Thread Nuno Subtil
When useClientSpec=true, stripping of P4 depot paths doesn't happen correctly on sync. Modifies stripRepoPath to handle this case better. Signed-off-by: Nuno Subtil --- git-p4.py | 12 +--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/git-p4.py

Re: [PATCH v3 02/35] pkt-line: introduce struct packet_reader

2018-02-26 Thread Jonathan Nieder
Jonathan Nieder wrote: > Brandon Williams wrote: >> Sometimes it is advantageous to be able to peek the next packet line >> without consuming it (e.g. to be able to determine the protocol version >> a server is speaking). In order to do that introduce 'struct >> packet_reader' which is an

Re: [PATCH v3 13/35] ls-refs: introduce ls-refs server command

2018-02-26 Thread Jonathan Nieder
Ævar Arnfjörð Bjarmason wrote: > On Sat, Feb 24 2018, Jeff King jotted: >> I actually wonder if we should just specify that the patterns must >> _always_ be fully-qualified, but may end with a single "/*" to iterate >> over wildcards. Or even simpler, that "refs/heads/foo" would find that >> ref

Re: [PATCH v8 3/7] utf8: add function to detect prohibited UTF-16/32 BOM

2018-02-26 Thread Eric Sunshine
On Sun, Feb 25, 2018 at 6:35 AM, Lars Schneider wrote: >> On 25 Feb 2018, at 04:41, Eric Sunshine wrote: >> Is this interpretation correct? When I read [1], I interpret it as >> saying that no BOM _of any sort_ should be present when the

Re: [RFC] Rebasing merges: a jorney to the ultimate solution (Road Clear)

2018-02-26 Thread Sergey Organov
Hi Johannes, Johannes Schindelin writes: > Hi Buga, > > On Tue, 20 Feb 2018, Igor Djordjevic wrote: > >> I`m really interested in this topic, which seems to (try to) address the >> only "bad feeling" I had with rebasing merges - being afraid of silently >> losing

Re: [RFC] Rebasing merges: a jorney to the ultimate solution (Road Clear)

2018-02-26 Thread Jacob Keller
On Mon, Feb 26, 2018 at 4:07 PM, Johannes Schindelin wrote: > Hi Buga, > > On Tue, 20 Feb 2018, Igor Djordjevic wrote: > >> I`m really interested in this topic, which seems to (try to) address the >> only "bad feeling" I had with rebasing merges - being afraid of

Re: [PATCH v2 12/27] serve: introduce git-serve

2018-02-26 Thread Jonathan Nieder
Hi Duy, Duy Nguyen wrote: > On Fri, Jan 26, 2018 at 6:58 AM, Brandon Williams wrote: >> + stateless-rpc >> +--- >> + >> +If advertised, the `stateless-rpc` capability indicates that the server >> +supports running commands in a stateless-rpc mode, which means that

Prize

2018-02-26 Thread ''Internet''
The USA Internet Command Protocol promotions has selected your e-mail ID as lucky winner of US$2,500.000 out of US$350,000.000.00 shared worldwide for 150.000 internet e-mail users. Your Winning Code is (youripnews763-alertenews-abc-2.5m$$$@) For your payment, quickly forward your email

Re: [PATCH v3 02/35] pkt-line: introduce struct packet_reader

2018-02-26 Thread Jonathan Nieder
Hi, Brandon Williams wrote: > Sometimes it is advantageous to be able to peek the next packet line > without consuming it (e.g. to be able to determine the protocol version > a server is speaking). In order to do that introduce 'struct > packet_reader' which is an abstraction around the normal

  1   2   >