non-smooth progress indication for git fsck and git gc

2018-08-15 Thread Ulrich Windl
Hi! I'd like to point out some minor issue observed while processing some 5-object repository with many binary objects, but most are rather small: Between the two phases of "git fsck" (checking directories and checking objects) there was a break of several seconds where no progress was indi

[PATCH] l10n: ru.po: fix misguiding translations

2018-08-15 Thread Basin Ilya
The removed word suggested that there was nothing to do while it's not always the case. --- po/ru.po | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/po/ru.po b/po/ru.po index 9dd5dfb14..77690c8b3 100644 --- a/po/ru.po +++ b/po/ru.po @@ -14110,22 +14110,22 @@ msgstr "Сде

Re: "Changes not staged for commit" after cloning a repo on macOS

2018-08-15 Thread Torsten Bögershausen
On Thu, Aug 16, 2018 at 12:25:24AM +0430, Hadi Safari wrote: > Hi everyone! > > I encountered a strange situation on OS X recently. I cloned a repository > (https://github.com/kevinxucs/Sublime-Gitignore.git), went to folder, and > saw "Changes not staged for commit" message for four specific file

Re: [PATCH v5 0/7] [PATCH v4 0/7] Add delta islands support

2018-08-15 Thread Christian Couder
Sorry, I made a copy paste error in the subject there should not be "[PATCH v4 0/7]" in it. On Thu, Aug 16, 2018 at 8:13 AM, Christian Couder wrote: > This patch series is upstreaming work made by GitHub and available in: [...]

[PATCH v5 6/7] pack-objects: move tree_depth into 'struct packing_data'

2018-08-15 Thread Christian Couder
This reduces the size of 'struct object_entry' and therefore makes packing objects more efficient. This also renames cmp_tree_depth() into tree_depth_compare(), as it is more modern to have the name of the compare functions end with "compare". Helped-by: Jeff King Helped-by: Duy Nguyen Signed-o

[PATCH v5 5/7] t: add t5319-delta-islands.sh

2018-08-15 Thread Christian Couder
From: Jeff King Signed-off-by: Jeff King Signed-off-by: Christian Couder --- t/t5319-delta-islands.sh | 143 +++ 1 file changed, 143 insertions(+) create mode 100755 t/t5319-delta-islands.sh diff --git a/t/t5319-delta-islands.sh b/t/t5319-delta-islands.sh

[PATCH v5 4/7] repack: add delta-islands support

2018-08-15 Thread Christian Couder
From: Jeff King Implement simple support for --delta-islands option and repack.useDeltaIslands config variable in git repack. This allows users to setup delta islands in their config and get the benefit of less disk usage while cloning and fetching is still quite fast and not much more CPU inten

[PATCH v5 2/7] pack-objects: refactor code into compute_layer_order()

2018-08-15 Thread Christian Couder
In a following commit, as we will use delta islands, we will have to compute the write order for different layers, not just for one. Let's prepare for that by refactoring the code that will be used to compute the write order for a given layer into a new compute_layer_order() function. This will m

[PATCH v5 3/7] pack-objects: add delta-islands support

2018-08-15 Thread Christian Couder
From: Jeff King Implement support for delta islands in git pack-objects and document how delta islands work in "Documentation/git-pack-objects.txt" and Documentation/config.txt. This allows users to setup delta islands in their config and get the benefit of less disk usage while cloning and fetc

[PATCH v5 7/7] pack-objects: move 'layer' into 'struct packing_data'

2018-08-15 Thread Christian Couder
This reduces the size of 'struct object_entry' from 88 bytes to 80 and therefore makes packing objects more efficient. For example on a Linux repo with 12M objects, `git pack-objects --all` needs extra 96MB memory even if the layer feature is not used. Helped-by: Jeff King Helped-by: Duy Nguyen

[PATCH v5 1/7] Add delta-islands.{c,h}

2018-08-15 Thread Christian Couder
From: Jeff King Hosting providers that allow users to "fork" existing repos want those forks to share as much disk space as possible. Alternates are an existing solution to keep all the objects from all the forks into a unique central repo, but this can have some drawbacks. Especially when packi

[PATCH v5 0/7] [PATCH v4 0/7] Add delta islands support

2018-08-15 Thread Christian Couder
This patch series is upstreaming work made by GitHub and available in: https://github.com/peff/git/commits/jk/delta-islands The above work has been already described in the following article: https://githubengineering.com/counting-objects/ The above branch contains only one patch. In this patch

Re: [PATCH v4 1/7] Add delta-islands.{c,h}

2018-08-15 Thread Christian Couder
On Mon, Aug 13, 2018 at 9:00 PM, Jeff King wrote: > On Mon, Aug 13, 2018 at 05:33:59AM +0200, Christian Couder wrote: > >> >> + memcpy(&sha_core, oid->hash, sizeof(uint64_t)); >> >> + rl->hash += sha_core; >> > >> > Hmm, so the first 64-bits of the oid of each ref that is part of >> > this

Re: [PATCH v4 1/7] Add delta-islands.{c,h}

2018-08-15 Thread Christian Couder
On Mon, Aug 13, 2018 at 8:11 PM, Jeff King wrote: > On Mon, Aug 13, 2018 at 01:17:18PM +0100, Ramsay Jones wrote: > >> >>> +struct island_bitmap { >> >>> + uint32_t refcount; >> >>> + uint32_t bits[]; >> >> >> >> Use FLEX_ARRAY here? We are slowly moving toward requiring >> >> certain C99

Re: [PATCH v2] worktree: add --quiet option

2018-08-15 Thread Martin Ågren
On Wed, 15 Aug 2018 at 22:56, Elia Pinto wrote: > Add the '--quiet' option to git worktree, > as for the other git commands. 'add' is the > only command affected by it since all other > commands, except 'list', are currently > silent by default. Thanks for a follow-up. The word "currently" means

Re: "Changes not staged for commit" after cloning a repo on macOS

2018-08-15 Thread Hadi Safari
I checked line-ending but didn't think to file names. Thank you so much. On 25/5/1397 AP 1:36 AM, Bryan Turner wrote: Taking a look at the repository's file list on GitHub[1], it shows that this is because HFS and APFS by default are case-insensitive. The file listing shows that there is a "na

Re: [PATCH 2/2] submodule: munge paths to submodule git directories

2018-08-15 Thread Jonathan Nieder
Stefan Beller wrote: > Jonathan Nieder wrote: >> All at the cost of recording a little configuration somewhere. If we >> want to decrease the configuration, we can avoid recording it there in >> the easy cases (e.g. when name == gitdirname). That's "just" an >> optimization. > > Sounds good, but

Re: [PATCH 2/2] submodule: munge paths to submodule git directories

2018-08-15 Thread Stefan Beller
> [...] all good reasons; ship it :-) > All at the cost of recording a little configuration somewhere. If we > want to decrease the configuration, we can avoid recording it there in > the easy cases (e.g. when name == gitdirname). That's "just" an > optimization. Sounds good, but gerrit for ex

Re: [PATCH 2/2] submodule: munge paths to submodule git directories

2018-08-15 Thread Jonathan Nieder
Hi again, Stefan Beller wrote: > On Tue, Aug 14, 2018 at 2:12 PM Jonathan Nieder wrote: >> What if we forbid directory separator characters in the gitdirname? > > Fine with me, but ideally we'd want to allow sharding the > submodules. When you have 1000 submodules > we'd want them not all inside

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

2018-08-15 Thread Stefan Beller
> > * sb/config-write-fix (2018-08-08) 3 commits > - git-config: document accidental multi-line setting in deprecated syntax > - config: fix case sensitive subsection names on writing > - t1300: document current behavior of setting options > > Recent update to "git config" broke updating variab

[PATCH 6/7] submodule--helper, update_clone: store index to update_clone instead of ce

2018-08-15 Thread Stefan Beller
In update_submodules, we use the run_processes_parallel(get_task, finished) API, which allows to pass around a task specific callback cookie from the get_next function to the finish function. That finish function in turn may alter generic callback cookie to have the next call of get_task come up wi

[RFC PATCH 0/7] Unset the submodule URL in the superproject when no longer needed

2018-08-15 Thread Stefan Beller
This is available as git fetch //github.com/stefanbeller/git unsetsubmoduleurl and was hinted at in https://public-inbox.org/git/cagz79kyfok9hfxm2-vmazlppqbofqyktyyuyjb8twzz6oz5...@mail.gmail.com/ Originally we have had the url in the config, (a) that we can change the URLs after the "gi

[PATCH 4/7] submodule sync: omit setting submodule URL in config if possible

2018-08-15 Thread Stefan Beller
We do not need to update the submodule url in the superprojects config if the url is not used to keep the submodule active. Signed-off-by: Stefan Beller --- builtin/submodule--helper.c | 14 +- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/builtin/submodule--helper.c

[PATCH 2/7] builtin/submodule--helper: remove stray new line

2018-08-15 Thread Stefan Beller
Signed-off-by: Stefan Beller --- builtin/submodule--helper.c | 1 - 1 file changed, 1 deletion(-) diff --git a/builtin/submodule--helper.c b/builtin/submodule--helper.c index 5c9d1fb496d..2f20bd4abdc 100644 --- a/builtin/submodule--helper.c +++ b/builtin/submodule--helper.c @@ -1024,7 +1024,6 @@

[PATCH 7/7] builtin/submodule--helper: unset submodule url if possible

2018-08-15 Thread Stefan Beller
Signed-off-by: Stefan Beller --- builtin/submodule--helper.c | 24 ++-- t/t5526-fetch-submodules.sh | 2 +- t/t7406-submodule-update.sh | 8 t/t7410-submodule-checkout-to.sh | 2 +- 4 files changed, 32 insertions(+), 4 deletions(-) diff --git a/buil

[PATCH 1/7] t7410: update to new style

2018-08-15 Thread Stefan Beller
While at it fix a typo (s/independed/independent) and make sure git is not in a chain of pipes. Signed-off-by: Stefan Beller --- t/t7410-submodule-checkout-to.sh | 99 +++- 1 file changed, 58 insertions(+), 41 deletions(-) diff --git a/t/t7410-submodule-checkout-to.s

[PATCH 5/7] submodule--helper: factor out allocation of callback cookie

2018-08-15 Thread Stefan Beller
Signed-off-by: Stefan Beller --- builtin/submodule--helper.c | 16 +--- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/builtin/submodule--helper.c b/builtin/submodule--helper.c index 639d0bb20a1..1c9a12781fd 100644 --- a/builtin/submodule--helper.c +++ b/builtin/submodu

[PATCH 3/7] submodule: is_submodule_active to differentiate between new and old mode

2018-08-15 Thread Stefan Beller
The change a086f921a72 (submodule: decouple url and submodule interest, 2017-03-17) enables us to do more than originally thought. As the url setting was used both to actually set the url where to obtain the submodule from, as well as used as a boolean flag later to see if it was active, we would n

Re: [PATCH 2/2] submodule: munge paths to submodule git directories

2018-08-15 Thread Aaron Schrab
At 15:33 -0700 08 Aug 2018, Brandon Williams wrote: Teach "submodule_name_to_gitdir()" to munge a submodule's name (by url encoding it) before using it to build a path to the submodule's gitdir. Seems like this will be a problem if it results in names that exceed NAME_MAX? On common systems t

Re: [PATCHv4 0/6] Add missing includes and forward declares

2018-08-15 Thread Ramsay Jones
On 15/08/18 18:54, Elijah Newren wrote: > This series fixes compilation errors when using a simple test.c file that > includes git-compat-util.h and then exactly one other header (and repeating > this for different headers of git). > [snip] > 1: f7d50cef3b ! 1: e6a93208b2 Add missing include

[PATCH v6 2/6] list-objects: refactor to process_tree_contents

2018-08-15 Thread Matthew DeVore
This will be used in a follow-up patch to reduce indentation needed when invoking the logic conditionally. i.e. rather than: if (foo) { while (...) { /* this is very indented */ } } we will have: if (foo) process_tree_contents(...); Signed-off-by: Matthew

[PATCH v6 3/6] list-objects: always parse trees gently

2018-08-15 Thread Matthew DeVore
If parsing fails when revs->ignore_missing_links and revs->exclude_promisor_objects are both false, we print the OID anyway in the die("bad tree object...") call, so any message printed by parse_tree_gently() is superfluous. Signed-off-by: Matthew DeVore --- list-objects.c | 4 +--- 1 file chang

[PATCH v6 1/6] list-objects: store common func args in struct

2018-08-15 Thread Matthew DeVore
This will make utility functions easier to create, as done by the next patch. Signed-off-by: Matthew DeVore --- list-objects.c | 158 +++-- 1 file changed, 74 insertions(+), 84 deletions(-) diff --git a/list-objects.c b/list-objects.c index c99c47ac1.

[PATCH v6 4/6] rev-list: handle missing tree objects properly

2018-08-15 Thread Matthew DeVore
Previously, we assumed only blob objects could be missing. This patch makes rev-list handle missing trees like missing blobs. The --missing=* and --exclude-promisor-objects flags now work for trees as they already do for blobs. This is demonstrated in t6112. Signed-off-by: Matthew DeVore --- bui

[PATCH v6 6/6] list-objects-filter: implement filter tree:0

2018-08-15 Thread Matthew DeVore
Teach list-objects the "tree:0" filter which allows for filtering out all tree and blob objects (unless other objects are explicitly specified by the user). The purpose of this patch is to allow smaller partial clones. The name of this filter - tree:0 - does not explicitly specify that it also fil

[PATCH v6 0/6] filter: support for excluding all trees and blobs

2018-08-15 Thread Matthew DeVore
Applied suggestion from Junio about removing -e flag from awk invocation. Sending an updated patchset now since I haven't heard any other comments for a while, and I don't believe Jonathan, the most active reviewer, has any more concerns. Matthew DeVore (6): list-objects: store common func args

[PATCH v6 5/6] revision: mark non-user-given objects instead

2018-08-15 Thread Matthew DeVore
Currently, list-objects.c incorrectly treats all root trees of commits as USER_GIVEN. Also, it would be easier to mark objects that are non-user-given instead of user-given, since the places in the code where we access an object through a reference are more obvious than the places where we access a

What's cooking in git.git (Aug 2018, #03; Wed, 15)

2018-08-15 Thread Junio C Hamano
Here are the topics that have been cooking. Commits prefixed with '-' are only in 'pu' (proposed updates) while commits prefixed with '+' are in 'next'. The ones marked with '.' do not appear in any of the integration branches, but I am still holding onto them. You can find the changes described

Re: [PATCH] git-submodule.sh: accept verbose flag in cmd_update to be non-quiet

2018-08-15 Thread Stefan Beller
On Tue, Aug 14, 2018 at 11:27 PM "Jochen Kühner" wrote: > > > > > We use git for windows, there I cannot fin the git-submodule.sh! How can I > fix it there? > > It probably doesn't have the .sh extension. I don't know where all git executables are located in GfW. Maybe "dir /s git.exe" can give

Re: [PATCH v2] worktree: add --quiet option

2018-08-15 Thread Thomas Gummerer
On 08/15, Elia Pinto wrote: > Add the '--quiet' option to git worktree, > as for the other git commands. 'add' is the > only command affected by it since all other > commands, except 'list', are currently > silent by default. > > Helped-by: Martin Ågren > Helped-by: Duy Nguyen > Helped-by: Eric

Re: [GSoC][PATCH v7 00/26] Convert "git stash" to C builtin

2018-08-15 Thread Thomas Gummerer
On 08/08, Paul-Sebastian Ungureanu wrote: > Hello, > > Here is the whole `git stash` C version. Some of the previous > patches were already reviewed (up to and including "stash: convert > store to builtin"), but there are some which were not > (starting with "stash: convert create to builtin"). T

Re: [GSoC][PATCH v7 15/26] stash: convert create to builtin

2018-08-15 Thread Thomas Gummerer
On 08/08, Paul-Sebastian Ungureanu wrote: > Add stash create to the helper. > > Signed-off-by: Paul-Sebastian Ungureanu > --- > builtin/stash--helper.c | 406 > git-stash.sh| 2 +- > 2 files changed, 407 insertions(+), 1 deletion(-) > > dif

Re: "less -F" is broken

2018-08-15 Thread Linus Torvalds
On Wed, Aug 15, 2018 at 2:29 PM Ævar Arnfjörð Bjarmason wrote: > > Downloading & trying versions of it locally reveals that it's as of > version 520, not 530. The last version before 520 is 487. Presumably > it's covered by this item in the changelog: > > Don't output terminal init sequence if

Re: "less -F" is broken

2018-08-15 Thread Linus Torvalds
On Wed, Aug 15, 2018 at 2:29 PM Ævar Arnfjörð Bjarmason wrote: > > FWIW they're not linked from > http://www.greenwoodsoftware.com/less/download.html but you can just URL > hack and see releases http://www.greenwoodsoftware.com/less/ and change > links like http://www.greenwoodsoftware.com/less/le

Re: [PATCH] gpg-interface.c: detect and reject multiple signatures on commits

2018-08-15 Thread Jonathan Nieder
Michał Górny wrote: > GnuPG supports creating signatures consisting of multiple signature > packets. If such a signature is verified, it outputs all the status > messages for each signature separately. However, git currently does not > account for such scenario and gets terribly confused over ge

Re: "less -F" is broken

2018-08-15 Thread Ævar Arnfjörð Bjarmason
On Wed, Aug 15 2018, Linus Torvalds wrote: > Sadly, as of less-530, the behavior of "less -F" is broken enough that > I think git needs to potentially think about changing the defaults for > the pager, or people should at least be aware of it. Downloading & trying versions of it locally reveals

Re: [GSoC][PATCH v7 14/26] stash: convert store to builtin

2018-08-15 Thread Thomas Gummerer
On 08/08, Paul-Sebastian Ungureanu wrote: > Add stash store to the helper and delete the store_stash function > from the shell script. > > Add the usage string which was forgotten in the shell script. I think similarly to 'git stash create', which also doesn't appear in the usage, this was intent

Re: "less -F" is broken

2018-08-15 Thread Stefan Beller
On Wed, Aug 15, 2018 at 1:35 PM Linus Torvalds wrote: > > Sadly, as of less-530, the behavior of "less -F" is broken enough that > I think git needs to potentially think about changing the defaults for > the pager, or people should at least be aware of it. > > Older versions of less (at least up t

Re: Potential vulnerability: 'mixed up' output when commit has multiple signatures

2018-08-15 Thread Michał Górny
On Tue, 2018-08-14 at 22:35 -0700, Jonathan Nieder wrote: > Hi, > > Michał Górny wrote: > > > I've been testing the git signature verification a bit and I've > > discovered a troubling behavior when the commit object contains > > multiple signatures. > > Thanks for discovering this. Do you mind

Re: Potential vulnerability: 'mixed up' output when commit has multiple signatures

2018-08-15 Thread Jonathan Nieder
Michał Górny wrote: > On Tue, 2018-08-14 at 22:35 -0700, Jonathan Nieder wrote: > > Michał Górny wrote: >>> I've been testing the git signature verification a bit and I've >>> discovered a troubling behavior when the commit object contains >>> multiple signatures. >> >> Thanks for discovering this

Re: [GSoC][PATCH v7 13/26] stash: update `git stash show` documentation

2018-08-15 Thread Thomas Gummerer
On 08/08, Paul-Sebastian Ungureanu wrote: > Add in documentation about the change of behavior regarding > the `--quiet` option, which was introduced in the last commit. > (the `--quiet` option does not exit anymore with erorr if it s/erorr/error/ > is given an empty stash as argument) If we want

Re: "Changes not staged for commit" after cloning a repo on macOS

2018-08-15 Thread Bryan Turner
On Wed, Aug 15, 2018 at 1:50 PM Hadi Safari wrote: > > Hi everyone! > > I encountered a strange situation on OS X recently. I cloned a > repository (https://github.com/kevinxucs/Sublime-Gitignore.git), went to > folder, and saw "Changes not staged for commit" message for four > specific files. It

Re: [PATCH v2] checkout: optimize "git checkout -b "

2018-08-15 Thread Ben Peart
On 8/6/2018 10:25 AM, Ben Peart wrote: On 8/3/2018 11:58 AM, Duy Nguyen wrote: On Thu, Aug 02, 2018 at 02:02:00PM -0400, Ben Peart wrote: But if you still want to push it further, this is something I have in mind. It probably has bugs, but at least preliminary test shows me that it co

Re: [GSoC][PATCH v7 12/26] stash: refactor `show_stash()` to use the diff API

2018-08-15 Thread Thomas Gummerer
On 08/08, Paul-Sebastian Ungureanu wrote: > Currently, `show_stash()` uses `cmd_diff()` to generate > the output. After this commit, the output will be generated > using the internal API. > > Before this commit, `git stash show --quiet` would act like > `git diff` and error out if the stash is not

[PATCH v2] worktree: add --quiet option

2018-08-15 Thread Elia Pinto
Add the '--quiet' option to git worktree, as for the other git commands. 'add' is the only command affected by it since all other commands, except 'list', are currently silent by default. Helped-by: Martin Ågren Helped-by: Duy Nguyen Helped-by: Eric Sunshine Signed-off-by: Elia Pinto --- This

"Changes not staged for commit" after cloning a repo on macOS

2018-08-15 Thread Hadi Safari
Hi everyone! I encountered a strange situation on OS X recently. I cloned a repository (https://github.com/kevinxucs/Sublime-Gitignore.git), went to folder, and saw "Changes not staged for commit" message for four specific files. It happened every time I repeated the procedure. I even was abl

Re: [PATCHv4 0/6] Add missing includes and forward declares

2018-08-15 Thread Jonathan Nieder
Elijah Newren wrote: > 62 files changed, 152 insertions(+), 18 deletions(-) All 6 patches in this series are Reviewed-by: Jonathan Nieder Thanks for your patient work. Pointer to previous rounds for the curious: https://public-inbox.org/git/20180811043218.31456-1-new...@gmail.com/

Re: [PATCHv4 6/6] Remove forward declaration of an enum

2018-08-15 Thread Jonathan Nieder
Elijah Newren wrote: > According to http://c-faq.com/null/machexamp.html, sizeof(char*) != > sizeof(int*) on some platforms. Since an enum could be a char or int > (or long or...), knowing the size of the enum thus is important to > knowing the size of a pointer to an enum, so we cannot just forw

Re: [PATCHv4 2/6] alloc: make allocate_alloc_state and clear_alloc_state more consistent

2018-08-15 Thread Jonathan Nieder
Elijah Newren wrote: > Since both functions are using the same data type, they should either both > refer to it as void *, or both use the real type (struct alloc_state *). > Opt for the latter. > > Reviewed-by: Jonathan Nieder > Signed-off-by: Elijah Newren Not worth rerolling for this, but th

Re: [PATCHv4 1/6] Add missing includes and forward declarations

2018-08-15 Thread Jonathan Nieder
Elijah Newren wrote: [...] > Signed-off-by: Elijah Newren > --- [...] > 55 files changed, 132 insertions(+), 4 deletions(-) Reviewed-by: Jonathan Nieder Thanks.

"less -F" is broken

2018-08-15 Thread Linus Torvalds
Sadly, as of less-530, the behavior of "less -F" is broken enough that I think git needs to potentially think about changing the defaults for the pager, or people should at least be aware of it. Older versions of less (at least up to less-487 - March 2017) do not have this bug. There were apparen

Re: [GSoC][PATCH v7 11/26] stash: change `git stash show` usage text and documentation

2018-08-15 Thread Thomas Gummerer
> Subject: stash: change `git stash show` usage text and documentation Another nitpick about commit messages. "change ... usage text and documentation" doesn't say much about what the actual change is. How about something like "stash: mention options in "show" synopsis" instead? The change itsel

Re: [GSoC][PATCH v7 10/26] stash: convert show to builtin

2018-08-15 Thread Thomas Gummerer
On 08/08, Paul-Sebastian Ungureanu wrote: > Add stash show to the helper and delete the show_stash, have_stash, > assert_stash_like, is_stash_like and parse_flags_and_rev functions > from the shell script now that they are no longer needed. > > Before this commit, `git stash show` would ignore `--

Re: [PATCH 00/24] Kill the_index part3

2018-08-15 Thread Stefan Beller
On Mon, Aug 13, 2018 at 2:24 PM Junio C Hamano wrote: > > Brandon Williams writes: > > > On 08/13, Nguyễn Thái Ngọc Duy wrote: > >> This is the third part of killing the_index (at least outside > >> builtin/). Part 1 [1] is dropped. Part 2 is nd/no-extern on 'pu'. This > >> part is built on top o

Re: [GSoC][PATCH v7 09/26] stash: implement the "list" command in the builtin

2018-08-15 Thread Thomas Gummerer
> Subject: stash: implement the "list" command in the builtin Nit: The previous commit messages all have the format "stash: convert to builtin", maybe follow the same pattern here? The rest of the patch looks good to me. On 08/08, Paul-Sebastian Ungureanu wrote: > Add stash list to the helper a

Re: [PATCH v4] clone: report duplicate entries on case-insensitive filesystems

2018-08-15 Thread Junio C Hamano
Torsten Bögershausen writes: >> + >> +#if !defined(GIT_WINDOWS_NATIVE) /* inode is always zero on Windows */ >> +for (i = 0; i < state->istate->cache_nr; i++) { >> +struct cache_entry *dup = state->istate->cache[i]; >> + >> +if (dup == ce) >> +break

Re: [PATCH v4] clone: report duplicate entries on case-insensitive filesystems

2018-08-15 Thread Duy Nguyen
On Wed, Aug 15, 2018 at 9:08 PM Torsten Bögershausen wrote: > > +#if !defined(GIT_WINDOWS_NATIVE) /* inode is always zero on Windows */ > > + for (i = 0; i < state->istate->cache_nr; i++) { > > + struct cache_entry *dup = state->istate->cache[i]; > > + > > + if (dup ==

Re: [GSoC][PATCH v7 04/26] stash: renamed test cases to be more descriptive

2018-08-15 Thread Thomas Gummerer
> Subject: Re: [GSoC][PATCH v7 04/26] stash: renamed test cases to be more > descriptive Please use the imperative mood in the title and the commit messages themselves. From Documentation/SubmittingPatches: Describe your changes in imperative mood, e.g. "make xyzzy do frotz" instead of

Re: [PATCH 08/24] unpack-trees: remove 'extern' on function declaration

2018-08-15 Thread Stefan Beller
On Wed, Aug 15, 2018 at 12:21 PM Duy Nguyen wrote: > > On Wed, Aug 15, 2018 at 9:10 PM Stefan Beller wrote: > > > > On Mon, Aug 13, 2018 at 9:15 AM Nguyễn Thái Ngọc Duy > > wrote: > > > > > > Signed-off-by: Nguyễn Thái Ngọc Duy > > > > This removes the only existing extern keyword, which was a

Re: [PATCH 08/24] unpack-trees: remove 'extern' on function declaration

2018-08-15 Thread Duy Nguyen
On Wed, Aug 15, 2018 at 9:10 PM Stefan Beller wrote: > > On Mon, Aug 13, 2018 at 9:15 AM Nguyễn Thái Ngọc Duy > wrote: > > > > Signed-off-by: Nguyễn Thái Ngọc Duy > > This removes the only existing extern keyword, which was added by > Linus in 933bf40a5c6 (Start moving unpack-trees to "struct

Re: [PATCH] rebase -i: fix numbering in squash message

2018-08-15 Thread Junio C Hamano
Phillip Wood writes: >> I wonder if it makes it easier to read, understand and maintain if >> there were a local variable that gets opts->current_fixup_count+2 at >> the beginning of the function, make these three places refer to that >> variable, and move the increment of opts->current_fixup_cou

Re: [PATCH 08/24] unpack-trees: remove 'extern' on function declaration

2018-08-15 Thread Stefan Beller
On Mon, Aug 13, 2018 at 9:15 AM Nguyễn Thái Ngọc Duy wrote: > > Signed-off-by: Nguyễn Thái Ngọc Duy This removes the only existing extern keyword, which was added by Linus in 933bf40a5c6 (Start moving unpack-trees to "struct tree_desc", 2007-08-09). All other callers do not have this noise word

Re: [PATCH v4] clone: report duplicate entries on case-insensitive filesystems

2018-08-15 Thread Torsten Bögershausen
On Sun, Aug 12, 2018 at 11:07:14AM +0200, Nguyễn Thái Ngọc Duy wrote: > Paths that only differ in case work fine in a case-sensitive > filesystems, but if those repos are cloned in a case-insensitive one, > you'll get problems. The first thing to notice is "git status" will > never be clean with no

Re: [PATCH 07/24] ls-files: correct index argument to get_convert_attr_ascii()

2018-08-15 Thread Stefan Beller
On Mon, Aug 13, 2018 at 9:15 AM Nguyễn Thái Ngọc Duy wrote: > > write_eolinfo() does take an istate as function argument and it should > be used instead of the_index. > > Signed-off-by: Nguyễn Thái Ngọc Duy > --- > builtin/ls-files.c | 17 + > 1 file changed, 9 insertions(+), 8 d

[PATCH v3 3/6] chainlint: recognize multi-line $(...) when command cuddled with "$("

2018-08-15 Thread Eric Sunshine
For multi-line $(...) expressions nested within subshells, chainlint.sed only recognizes: x=$( echo foo && ... but it is not unlikely that test authors may also cuddle the command with the opening "$(", so support that style, as well: x=$(echo foo && ... The clos

[PATCH v3 6/6] chainlint: add test of pathological case which triggered false positive

2018-08-15 Thread Eric Sunshine
This extract from contrib/subtree/t7900 triggered a false positive due to three chainlint limitations: * recognizing only a "blessed" set of here-doc tag names in a subshell ("EOF", "EOT", "INPUT_END"), of which "TXT" is not a member * inability to recognize multi-line $(...) when the first sta

[PATCH v3 5/6] chainlint: recognize multi-line quoted strings more robustly

2018-08-15 Thread Eric Sunshine
chainlint.sed recognizes multi-line quoted strings within subshells: echo "abc def" >out && so it can avoid incorrectly classifying lines internal to the string as breaking the &&-chain. To identify the first line of a multi-line string, it checks if the line contains a single quote.

[PATCH v3 2/6] chainlint: match quoted here-doc tags

2018-08-15 Thread Eric Sunshine
A here-doc tag can be quoted ('EOF'/"EOF") or escaped (\EOF) to suppress interpolation within the body. Although, chainlint recognizes escaped tags, it does not know about quoted tags. For completeness, teach it to recognize quoted tags, as well. Signed-off-by: Eric Sunshine --- t/chainlint.sed

[PATCH v3 4/6] chainlint: let here-doc and multi-line string commence on same line

2018-08-15 Thread Eric Sunshine
After swallowing a here-doc, chainlint.sed assumes that no other processing needs to be done on the line aside from checking for &&-chain breakage; likewise, after folding a multi-line quoted string. However, it's conceivable (even if unlikely in practice) that both a here-doc and a multi-line quot

[PATCH v3 1/6] chainlint: match arbitrary here-docs tags rather than hard-coded names

2018-08-15 Thread Eric Sunshine
chainlint.sed swallows top-level here-docs to avoid being fooled by content which might look like start-of-subshell. It likewise swallows here-docs in subshells to avoid marking content lines as breaking the &&-chain, and to avoid being fooled by content which might look like end-of-subshell, start

[PATCH v3 0/6] chainlint: improve robustness against "unusual" shell coding

2018-08-15 Thread Eric Sunshine
This is a re-roll of [1] which improves chainlint's robustness in the face of unusual shell coding such as in contrib/subtree/t7900 which triggered a false-positive[2]. Changes since v2: * recognize "quoted" here-doc tag names (in addition to 'quoted' and \escaped) Interdiff below. [1]: http

Re: [PATCH] rebase -i: fix numbering in squash message

2018-08-15 Thread Phillip Wood
Hi Junio On 15/08/2018 19:05, Junio C Hamano wrote: > > Phillip Wood writes: > >> From: Phillip Wood >> >> Commit e12a7ef597 ("rebase -i: Handle "combination of commits" with >> GETTEXT_POISON", 2018-04-27) changed the way that individual commit >> messages are labelled when squashing commits

Re: [PATCH v4 2/5] unpack-trees: add performance tracing

2018-08-15 Thread Junio C Hamano
Duy Nguyen writes: > On Tue, Aug 14, 2018 at 10:52 PM Junio C Hamano wrote: >> > It's not just sampling points. There's things like index id being >> > shown in the message for example. I prefer to keep free style format >> > to help me read. There's also things like indentation I do here to >>

Re: [PATCH] Makefile: extend NO_TCLTK=NoThanks to cover docs

2018-08-15 Thread Junio C Hamano
Ævar Arnfjörð Bjarmason writes: +ifndef NO_TCLTK +MAN1_TXT_WIP += gitk.txt +MAN1_TXT = $(MAN1_TXT_WIP) +else +TCLTK_FILES += git-gui.txt +TCLTK_FILES += gitk.txt +TCLTK_FILES += git-citool.txt +MAN1_TXT = $(filter-out \ + $(TCLTK_FILES), \ >>>

Re: [PATCH] rebase -i: fix numbering in squash message

2018-08-15 Thread Junio C Hamano
Phillip Wood writes: > From: Phillip Wood > > Commit e12a7ef597 ("rebase -i: Handle "combination of commits" with > GETTEXT_POISON", 2018-04-27) changed the way that individual commit > messages are labelled when squashing commits together. In doing so a > regression was introduced where the nu

Re: [PATCH] Makefile: extend NO_TCLTK=NoThanks to cover docs

2018-08-15 Thread Ævar Arnfjörð Bjarmason
On Wed, Aug 15 2018, Junio C Hamano wrote: > Junio C Hamano writes: > >>> # Guard against environment variables >>> MAN1_TXT = >>> +MAN1_TXT_WIP = >>> +TCLTK_FILES = >> >> The latter name loses the fact that it is to hold candidates to be >> on MAN1_TXT that happen to be conditionally include

[PATCHv4 3/6] Move definition of enum branch_track from cache.h to branch.h

2018-08-15 Thread Elijah Newren
'branch_track' feels more closely related to branching, and it is needed later in branch.h; rather than #include'ing cache.h in branch.h for this small enum, just move the enum and the external declaration for git_branch_track to branch.h. Reviewed-by: Jonathan Nieder Signed-off-by: Elijah Newren

[PATCHv4 2/6] alloc: make allocate_alloc_state and clear_alloc_state more consistent

2018-08-15 Thread Elijah Newren
Since both functions are using the same data type, they should either both refer to it as void *, or both use the real type (struct alloc_state *). Opt for the latter. Reviewed-by: Jonathan Nieder Signed-off-by: Elijah Newren --- alloc.c | 2 +- alloc.h | 2 +- 2 files changed, 2 insertions(+),

Re: [PATCH v4 6/6] list-objects-filter: implement filter tree:0

2018-08-15 Thread Matthew DeVore
On Wed, Aug 15, 2018 at 9:17 AM Junio C Hamano wrote: > > Jeff King writes: > > > Right, I'd agree they probably want the minimum for that traversal. And > > for `rev-list --filter`, that's probably OK. But keep in mind the main > > goal for --filter is using it for fetches, and many servers do n

[PATCHv4 5/6] compat/precompose_utf8.h: use more common include guard style

2018-08-15 Thread Elijah Newren
Reviewed-by: Jonathan Nieder Signed-off-by: Elijah Newren --- compat/precompose_utf8.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/compat/precompose_utf8.h b/compat/precompose_utf8.h index a94e7c4342..6f843d3e1a 100644 --- a/compat/precompose_utf8.h +++ b/compat/precomp

[PATCHv4 1/6] Add missing includes and forward declarations

2018-08-15 Thread Elijah Newren
I looped over the toplevel header files, creating a temporary two-line C program for each consisting of #include "git-compat-util.h" #include $HEADER This patch is the result of manually fixing errors in compiling those tiny programs. Signed-off-by: Elijah Newren --- alloc.h |

[PATCHv4 0/6] Add missing includes and forward declares

2018-08-15 Thread Elijah Newren
This series fixes compilation errors when using a simple test.c file that includes git-compat-util.h and then exactly one other header (and repeating this for different headers of git). Changes in this series come from Jonathan Nieder's reviews; full range-diff follows below, but in summary: -

[PATCHv4 4/6] urlmatch.h: fix include guard

2018-08-15 Thread Elijah Newren
Reviewed-by: Jonathan Nieder Signed-off-by: Elijah Newren --- urlmatch.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/urlmatch.h b/urlmatch.h index 37ee5da85e..e482148248 100644 --- a/urlmatch.h +++ b/urlmatch.h @@ -1,4 +1,6 @@ #ifndef URL_MATCH_H +#define URL_MATCH_H + #include "stri

[PATCHv4 6/6] Remove forward declaration of an enum

2018-08-15 Thread Elijah Newren
According to http://c-faq.com/null/machexamp.html, sizeof(char*) != sizeof(int*) on some platforms. Since an enum could be a char or int (or long or...), knowing the size of the enum thus is important to knowing the size of a pointer to an enum, so we cannot just forward declare an enum the way we

Re: [PATCH 1/2] branch.c: remove explicit reference to the_repository

2018-08-15 Thread Duy Nguyen
On Wed, Aug 15, 2018 at 7:38 PM Junio C Hamano wrote: > > Duy Nguyen writes: > > >> 4) eventually (in the very long run), we'd change the signature of > >> all commands from cmd_foo(int argc, char argv, char *prefix) > >> to cmd_foo(int argc, char argv, struct repository *repo) > >> > >> you

Re: [PATCH 1/2] branch.c: remove explicit reference to the_repository

2018-08-15 Thread Junio C Hamano
Duy Nguyen writes: >> 4) eventually (in the very long run), we'd change the signature of >> all commands from cmd_foo(int argc, char argv, char *prefix) >> to cmd_foo(int argc, char argv, struct repository *repo) >> >> you seem to be interested in removing the_repository from branch.c, >> but

Re: [PATCH 2/2] cherry-pick: fix --quit not deleting CHERRY_PICK_HEAD

2018-08-15 Thread Junio C Hamano
Duy Nguyen writes: > On Wed, Aug 15, 2018 at 7:26 PM Junio C Hamano wrote: >> >> Please do not hide this bugfix behind 1/2 that is likely to require >> longer to cook than the fix itself. And more importantly, it makes >> it impossible to merge down the fix to the maintenance track, as I >> do

Re: [PATCH 2/2] cherry-pick: fix --quit not deleting CHERRY_PICK_HEAD

2018-08-15 Thread Duy Nguyen
On Wed, Aug 15, 2018 at 7:26 PM Junio C Hamano wrote: > > Nguyễn Thái Ngọc Duy writes: > > > --quit is supposed to be --abort but without restoring HEAD. Leaving > > CHERRY_PICK_HEAD behind could make other commands mistake that > > cherry-pick is still ongoing (e.g. "git commit --amend" will re

Re: [PATCH 2/2] cherry-pick: fix --quit not deleting CHERRY_PICK_HEAD

2018-08-15 Thread Junio C Hamano
Nguyễn Thái Ngọc Duy writes: > --quit is supposed to be --abort but without restoring HEAD. Leaving > CHERRY_PICK_HEAD behind could make other commands mistake that > cherry-pick is still ongoing (e.g. "git commit --amend" will refuse to > work). Clean it too. > > For abort, this job of deleting

Re: [PATCH 1/2] branch.c: remove explicit reference to the_repository

2018-08-15 Thread Duy Nguyen
On Wed, Aug 15, 2018 at 7:20 PM Junio C Hamano wrote: > I also do not think remove_branch_state() function belongs to > branch.c in the first place. The state it is clearing is not even > about a "branch". It is state left by the last command that stopped > in the middle; its only callers are "r

  1   2   >