Re: [PATCH 1/2] store submodule in common dir

2018-08-15 Thread Joakim Tjernlund
On Tue, 2018-08-14 at 16:20 -0700, Junio C Hamano wrote: > CAUTION: This email originated from outside of the organization. Do not click > links or open attachments unless you recognize the sender and know the > content is safe. > > > Junio C Hamano writes: > > > My understanding of what

[PATCH] branch: support configuring --sort via .gitconfig

2018-08-15 Thread samuel . maftoul
From: Samuel Maftoul Add support for configuring default sort ordering for git branches. Command line option will override this configured value, using the exact same syntax. --- Documentation/config.txt | 5 + Documentation/git-branch.txt | 4 builtin/branch.c | 10

Re: [PATCH 1/2] store submodule in common dir

2018-08-15 Thread Joakim Tjernlund
On Wed, 2018-08-15 at 10:28 +0200, Joakim Tjernlund wrote: > On Tue, 2018-08-14 at 16:20 -0700, Junio C Hamano wrote: > > CAUTION: This email originated from outside of the organization. Do not > > click links or open attachments unless you recognize the sender and know > > the content is safe.

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

2018-08-15 Thread Phillip Wood
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 numbering of the messages is off by

[PATCH 0/2] rebase -i: fix SIGSEGV when 'merge ' fails

2018-08-15 Thread Phillip Wood
From: Phillip Wood As they fix a bug these patches are based on maint. Unfortunately the second patch has semantic conflicts with master s/git_path_merge_msg()/git_path_merge_msg(the_repository)/ There are additional textual conflicts with pu/next due to some messages being marked for

[PATCH 1/2] t3430: add conflicting commit

2018-08-15 Thread Phillip Wood
From: Phillip Wood Move the creation of conflicting-G from a test to the setup so that it can be used in subsequent tests without creating the kind of implicit dependencies that plague t3404. While we're at it simplify the arguments to the test_commit() call the creates the conflicting commit.

[PATCH 2/2] rebase -i: fix SIGSEGV when 'merge ' fails

2018-08-15 Thread Phillip Wood
From: Phillip Wood If a merge command in the todo list specifies just a branch to merge with no -C/-c argument then item->commit is NULL. This means that if there are merge conflicts error_with_patch() is passed a NULL commit which causes a segmentation fault when make_patch() tries to look it

Re: [PATCH 0/9] Add missing includes and forward declares

2018-08-15 Thread Elijah Newren
On Wed, Aug 15, 2018 at 8:43 AM Junio C Hamano wrote: > Elijah Newren writes: > > > On Tue, Aug 14, 2018 at 10:45 PM Junio C Hamano wrote: > >> Elijah Newren writes: > >> > >> > On Mon, Aug 13, 2018 at 11:24 AM Junio C Hamano > >> > wrote: > >> >> Jeff King writes: > >> > > >> >> As things

Re: [PATCH 4/7] for_each_packed_object: support iterating in pack-order

2018-08-15 Thread Derrick Stolee
On 8/10/2018 7:15 PM, Jeff King wrote: diff --git a/commit-graph.c b/commit-graph.c index b0a55ad128..69a0d1c203 100644 --- a/commit-graph.c +++ b/commit-graph.c @@ -730,7 +730,7 @@ void write_commit_graph(const char *obj_dir, die("error adding pack %s",

Re: [PATCH 0/7] speeding up cat-file by reordering object access

2018-08-15 Thread Derrick Stolee
On 8/10/2018 7:07 PM, Jeff King wrote: The general idea is that accessing objects in packfile order is way kinder to the delta base cache, and thus way more efficient. See patches 4 and 7 in particular for discussion and numbers. I'm primarily interested in cat-file, so this series is focused

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

2018-08-15 Thread Ævar Arnfjörð Bjarmason
Extend the NO_TCLTK=NoThanks flag to be understood by the Documentation Makefile. Before this change compiling and installing with NO_TCLTK would result in no git-gui, gitk or git-citool being installed, but their respective manual pages would still be installed. Signed-off-by: Ævar Arnfjörð

Re: [PATCH 0/9] Add missing includes and forward declares

2018-08-15 Thread Junio C Hamano
Elijah Newren writes: >> >> But please remind me not to merge this round down to 'next', for the >> "enum" forward decl gotcha. > > I'll send out a new round shortly. Would you like me to squash the > last patch (the one that had two hunks with minor conflicts with other > topics in next and

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

2018-08-15 Thread Junio C Hamano
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 not > perform the traversal at all. Instead they use reachability

Re: Measuring Community Involvement (was Re: Contributor Summit planning)

2018-08-15 Thread Duy Nguyen
On Tue, Aug 14, 2018 at 7:43 PM Derrick Stolee wrote: > 2. Number of other commit tag-lines (Reviewed-By, Helped-By, > Reported-By, etc.). > > Using git repo: > > $ git log --since=2018-01-01 junio/next|grep by:|grep -v > Signed-off-by:|sort|uniq -c|sort -nr|head -n 20 > > 66

[PATCH 0/1] Fix make -C t chainlint with DOS line endings

2018-08-15 Thread Johannes Schindelin via GitGitGadget
Historically, nobody paid attention to our own source code having correct Git attributes [https://www.edwardthomson.com/blog/git_for_windows_line_endings.html] when it comes to line endings. Because historically, we had no good way to specify that ;-) But now we do, and so we need to use it.

[PATCH 1/1] chainlint: fix for core.autocrlf=true

2018-08-15 Thread Johannes Schindelin via GitGitGadget
From: Johannes Schindelin The `chainlint` target compares actual output to expected output, where the actual output is generated from files that are specifically checked out with LF-only line endings. So the expected output needs to be checked out with LF-only line endings, too. Signed-off-by:

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

2018-08-15 Thread Junio C Hamano
Matthew DeVore writes: > Thank you. I changed it to this: > awk -e "/tree|blob/{print \$1}" objs >trees_and_blobs The "-e" option does not appear in http://pubs.opengroup.org/onlinepubs/9699919799/utilities/awk.html and I think you can safely drop it from your command line. If no -f

Re: [PATCH 1/2] store submodule in common dir

2018-08-15 Thread Duy Nguyen
On Wed, Aug 15, 2018 at 1:20 AM Junio C Hamano wrote: > Theoretically we should be able to make modules/kernel%2fv2.[24] > additional "worktree"s of modules/kernel%2fv2.6, but given that > these are all "bare" repositories without an attached working tree, > I am not sure how that would supposed

Re: [PATCHv3 1/6] Add missing includes and forward declares

2018-08-15 Thread Elijah Newren
On Tue, Aug 14, 2018 at 11:51 PM Elijah Newren wrote: > > [...] > > >> enums are of unknown size, so forward declarations don't work for > > >> them. See bb/pedantic for some examples. > > > > > > structs are also of unknown size; the size is irrelevant when the > > > function signature merely

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

2018-08-15 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy --- branch.c | 22 -- branch.h | 7 +-- builtin/am.c | 2 +- builtin/branch.c | 6 -- builtin/checkout.c | 5 +++-- builtin/reset.c| 2 +- 6 files changed, 26 insertions(+), 18 deletions(-) diff

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

2018-08-15 Thread Nguyễn Thái Ngọc Duy
--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 CHERRY_PICK_HEAD is on "git reset" so we

Re: [PATCH 0/9] Add missing includes and forward declares

2018-08-15 Thread Junio C Hamano
Elijah Newren writes: > On Tue, Aug 14, 2018 at 10:45 PM Junio C Hamano wrote: >> Elijah Newren writes: >> >> > On Mon, Aug 13, 2018 at 11:24 AM Junio C Hamano wrote: >> >> Jeff King writes: >> > >> >> As things are slowly moving out of the so-far kitchen-sink "cache.h" >> >> into more

"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

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

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

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

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

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").

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

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

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: [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

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: "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

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

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

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(-) > >

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.

"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

[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

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

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

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

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

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: [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

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

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

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: [PATCH v4 3/5] unpack-trees: optimize walking same trees with cache-tree

2018-08-15 Thread Duy Nguyen
On Mon, Aug 13, 2018 at 8:58 PM Ben Peart wrote: > > + * > > + * D/F conflicts and higher stage entries are not a concern > > + * because cache-tree would be invalidated and we would never > > + * get here in the first place. > > + */ > > + for (i = 0; i < nr_entries;

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

2018-08-15 Thread Elijah Newren
On Wed, Aug 15, 2018 at 9:24 AM Nguyễn Thái Ngọc Duy wrote: The patch looks good, but since this touches multiple .c files, I think I'd s/branch.c/branch/ in the subject line. > > Signed-off-by: Nguyễn Thái Ngọc Duy > --- > branch.c | 22 -- > branch.h

Re: [PATCH] branch: support configuring --sort via .gitconfig

2018-08-15 Thread Eric Sunshine
On Wed, Aug 15, 2018 at 7:16 AM wrote: > Add support for configuring default sort ordering for git branches. Command > line option will override this configured value, using the exact same > syntax. Your Signed-off-by: is missing. See Documentation/SubmittingPatches. > diff --git

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 >>

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

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

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: [PATCH 1/1] chainlint: fix for core.autocrlf=true

2018-08-15 Thread Eric Sunshine
On Wed, Aug 15, 2018 at 10:33 AM Johannes Schindelin via GitGitGadget wrote: > The `chainlint` target compares actual output to expected output, where > the actual output is generated from files that are specifically checked > out with LF-only line endings. So the expected output needs to be >

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

2018-08-15 Thread Duy Nguyen
On Wed, Aug 15, 2018 at 6:58 PM Stefan Beller wrote: > > On Wed, Aug 15, 2018 at 9:53 AM Duy Nguyen wrote: > > > > On Wed, Aug 15, 2018 at 6:48 PM Elijah Newren wrote: > > > > > > On Wed, Aug 15, 2018 at 9:24 AM Nguyễn Thái Ngọc Duy > > > wrote: > > > > > > The patch looks good, but since

[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

[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 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

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

[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 +++

[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 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

[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

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 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

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 v4 6/6] list-objects-filter: implement filter tree:0

2018-08-15 Thread Matthew DeVore
On Wed, Aug 15, 2018 at 9:14 AM Junio C Hamano wrote: > > Matthew DeVore writes: > > > Thank you. I changed it to this: > > awk -e "/tree|blob/{print \$1}" objs >trees_and_blobs > > The "-e" option does not appear in > > http://pubs.opengroup.org/onlinepubs/9699919799/utilities/awk.html > >

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

2018-08-15 Thread Junio C Hamano
Ævar Arnfjörð Bjarmason writes: > Extend the NO_TCLTK=NoThanks flag to be understood by the > Documentation Makefile. > > Before this change compiling and installing with NO_TCLTK would result > in no git-gui, gitk or git-citool being installed, but their > respective manual pages would still

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] 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

[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

[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 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

[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,

[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]:

[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

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) >> +

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

2018-08-15 Thread Stefan Beller
On Wed, Aug 15, 2018 at 9:53 AM Duy Nguyen wrote: > > On Wed, Aug 15, 2018 at 6:48 PM Elijah Newren wrote: > > > > On Wed, Aug 15, 2018 at 9:24 AM Nguyễn Thái Ngọc Duy > > wrote: > > > > The patch looks good, but since this touches multiple .c files, I > > think I'd s/branch.c/branch/ in the

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

2018-08-15 Thread Stefan Beller
On Wed, Aug 15, 2018 at 9:23 AM Nguyễn Thái Ngọc Duy wrote: > > --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. > >

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:09 PM Stefan Beller wrote: > Technically you would not need patch 1 in this series, as you could call > remove_branch_state(void) as before that patch to do the same thing here. > I guess that patch 1 is more of a drive by cleanup, then? Yes. > It looks a bit

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

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

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

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 1/2] branch.c: remove explicit reference to the_repository

2018-08-15 Thread Duy Nguyen
On Wed, Aug 15, 2018 at 6:48 PM Elijah Newren wrote: > > On Wed, Aug 15, 2018 at 9:24 AM Nguyễn Thái Ngọc Duy > wrote: > > The patch looks good, but since this touches multiple .c files, I > think I'd s/branch.c/branch/ in the subject line. It is about removing the_repository from branch.c

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

2018-08-15 Thread Junio C Hamano
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 included; calling it > MAN1_TXT_TCLTK or something, perhaps,

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

2018-08-15 Thread Junio C Hamano
Duy Nguyen writes: > On Wed, Aug 15, 2018 at 6:48 PM Elijah Newren wrote: >> >> On Wed, Aug 15, 2018 at 9:24 AM Nguyễn Thái Ngọc Duy >> wrote: >> >> The patch looks good, but since this touches multiple .c files, I >> think I'd s/branch.c/branch/ in the subject line. > > It is about removing

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

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: [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, >>

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

Re: [PATCH 1/1] chainlint: fix for core.autocrlf=true

2018-08-15 Thread Junio C Hamano
"Johannes Schindelin via GitGitGadget" writes: > From: Johannes Schindelin > > The `chainlint` target compares actual output to expected output, where > the actual output is generated from files that are specifically checked > out with LF-only line endings. So the expected output needs to be >

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

2018-08-15 Thread Duy Nguyen
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 > > help me read. > > Yup, I

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

2018-08-15 Thread Stefan Beller
On Wed, Aug 15, 2018 at 10:18 AM Duy Nguyen wrote: > > On Wed, Aug 15, 2018 at 7:09 PM Stefan Beller wrote: > > Technically you would not need patch 1 in this series, as you could call > > remove_branch_state(void) as before that patch to do the same thing here. > > I guess that patch 1 is more

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] 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

  1   2   >