Re: [PATCHv3 4/4] clone: use free_refspec() to free refspec list

2017-05-23 Thread Junio C Hamano
SZEDER Gábor writes: > On Mon, May 15, 2017 at 1:05 PM, SZEDER Gábor wrote: >> From: Jeff King >> >> Using free() on a refspec was always leaky, as its string >> fields also need freed. But it became more so when ad00f128d >> (clone: respect configured fetch respecs during initial >> fetch, 201

Re: Git 2.13 silent install

2017-05-23 Thread Konstantin Khomoutov
On Mon, May 22, 2017 at 05:41:52PM +0200, Johannes Schindelin wrote: > > > Just wondering if someone can send me the instructions for an > > > unattended/silent install for Git 2.13. > > > > This guide [1] is outdated but should be applicable (see the new > > installer file [2] and its "[Compone

Re: [PATCH v5] send-email: --batch-size to work around some SMTP server limit

2017-05-23 Thread Junio C Hamano
Ævar Arnfjörð Bjarmason writes: > Looking at this the Nth time now though I wonder about this approach > in general. In all your E-Mails I don't think you ever said /what/ > sort of error you had from the SMTP server, you just said you had a > failure or an error, I assume you hit one of the die'

Re: [PATCH v4 6/6] clean: teach clean -d to skip dirs containing ignored files

2017-05-23 Thread Junio C Hamano
Samuel Lijin writes: >> As I said, I am undecided if the result is easier to follow than >> your version ;-) > > I think I'll defer to your patch: I do agree that your version is > easier to follow and understand. Should I reroll just this patch and > its commit message, or would you prefer to ha

Re: [Bug] cloning a repository with a default MASTER branch tries to check out the master branch

2017-05-23 Thread Samuel Lijin
For some reason the repo on GH does not have a HEAD pointer: $ git ls-remote https://github.com/passcod/UPPERCASE-NPM.git efc7dbfd6ca155d5d19ce67eb98603896062f35arefs/heads/MASTER e60ea8e6ec45ec45ff44ac8939cb4105b16477darefs/pull/1/head f35a73dcb151d336dc3d30c9a2c7423ecdb7bd1c

What's cooking in git.git (May 2017, #07; Tue, 23)

2017-05-23 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. The 'maint' branch is now for the

Re: [PATCH v5] send-email: --batch-size to work around some SMTP server limit

2017-05-23 Thread Jan Viktorin
On Tue, 23 May 2017 16:46:27 +0900 Junio C Hamano wrote: > Ævar Arnfjörð Bjarmason writes: > > > Looking at this the Nth time now though I wonder about this approach > > in general. In all your E-Mails I don't think you ever said /what/ > > sort of error you had from the SMTP server, you just s

Re: [PATCH v4 4/4] convert: add "status=delayed" to filter process protocol

2017-05-23 Thread Lars Schneider
> On 23 May 2017, at 07:22, Junio C Hamano wrote: > > Lars Schneider writes: > + sigchain_pop(SIGPIPE); + + if (err || errno == EPIPE) { >>> >>> This looks strange, at first glance. >>> Do we set errno to 0 before ? >>> Or is there a trick that EPIPE can only be reached, >>>

Re: [PATCH v3 1/6] Fix build with core.autocrlf=true

2017-05-23 Thread Johannes Schindelin
Hi, On Tue, 23 May 2017, Junio C Hamano wrote: > Jonathan Nieder writes: > > > Junio, how do you prefer to handle this in git.git? Would you need to > > amend the patch to remove the git-gui/.gitattributes change and wait > > to get it from Pat, or is getting the same change twice okay? > > Y

[PATCH v5 2/6] t7061: status --ignored should search untracked dirs

2017-05-23 Thread Samuel Lijin
Per eb8c5b87, `status --ignored` by design does not list ignored files if they are in a directory which contains only ignored and untracked files (which is itself considered to be untracked) without `-uall`. This does not make sense for `--ignored`, which claims to "Show ignored files as well." Th

Re: BUG: The .gitignore rules can't be made to cross submodule boundaries

2017-05-23 Thread Johannes Schindelin
Hi Ævar, On Mon, 22 May 2017, Ævar Arnfjörð Bjarmason wrote: > When I was adding the sha1collisiondetection submodule to git.git I > noticed that building git would dirty the submodule. > > This is because our own Makefile adds .depend/ directories. I hacked > around it by just getting the upstr

[PATCH v5 4/6] dir: hide untracked contents of untracked dirs

2017-05-23 Thread Samuel Lijin
When we taught read_directory_recursive() to recurse into untracked directories in search of ignored files given DIR_SHOW_IGNORED_TOO, that had the side effect of teaching it to collect the untracked contents of untracked directories. It doesn't always make sense to return these, though (we do need

[PATCH v5 5/6] dir: expose cmp_name() and check_contains()

2017-05-23 Thread Samuel Lijin
We want to use cmp_name() and check_contains() (which both compare `struct dir_entry`s, the former in terms of the sort order, the latter in terms of whether one lexically contains another) outside of dir.c, so we have to (1) change their linkage and (2) rename them as appropriate for the global na

[PATCH v5 0/6] Fix clean -d and status --ignored

2017-05-23 Thread Samuel Lijin
Incorporates latest round of feedback from Junio about how to best structure the changes to cmd_clean() for maintainability. Samuel Lijin (6): t7300: clean -d should skip dirs with ignored files t7061: status --ignored should search untracked dirs dir: recurse into untracked dirs for ignored

[PATCH v5 3/6] dir: recurse into untracked dirs for ignored files

2017-05-23 Thread Samuel Lijin
We consider directories containing only untracked and ignored files to be themselves untracked, which in the usual case means we don't have to search these directories. This is problematic when we want to collect ignored files with DIR_SHOW_IGNORED_TOO, though, so we teach read_directory_recursive(

[PATCH v5 1/6] t7300: clean -d should skip dirs with ignored files

2017-05-23 Thread Samuel Lijin
If git sees a directory which contains only untracked and ignored files, clean -d should not remove that directory. It was recently discovered that this is *not* true of git clean -d, and it's possible that this has never worked correctly; this test and its accompanying patch series aims to fix tha

[PATCH v5 6/6] clean: teach clean -d to preserve ignored paths

2017-05-23 Thread Samuel Lijin
There is an implicit assumption that a directory containing only untracked and ignored paths should itself be considered untracked. This makes sense in use cases where we're asking if a directory should be added to the git database, but not when we're asking if a directory can be safely removed fro

Re: [PATCH] tag: duplicate mention of --contains should mention --no-contains

2017-05-23 Thread Ævar Arnfjörð Bjarmason
On Mon, May 15, 2017 at 2:23 PM, Ævar Arnfjörð Bjarmason wrote: > Fix a duplicate mention of --contains in the SYNOPSIS to mention > --no-contains. > > This fixes an error introduced in my commit ac3f5a3468 ("ref-filter: > add --no-contains option to tag/branch/for-each-ref", 2017-03-24). > > Sign

Hello beautiful, I'm just seeking for serious friendship

2017-05-23 Thread Wesley
My name is Wesley. from the US but currently in Syria for peace keeping mission. I want to get to know you better, if I may be so bold. I consider myself an easy-going man, and I am currently looking for a relationship in which I feel loved. Please forgive my manners am not good when it comes to

Re: BUG: The .gitignore rules can't be made to cross submodule boundaries

2017-05-23 Thread Ævar Arnfjörð Bjarmason
On Tue, May 23, 2017 at 11:17 AM, Johannes Schindelin wrote: > Hi Ævar, > > On Mon, 22 May 2017, Ævar Arnfjörð Bjarmason wrote: > >> When I was adding the sha1collisiondetection submodule to git.git I >> noticed that building git would dirty the submodule. >> >> This is because our own Makefile ad

git --merge and option parsing

2017-05-23 Thread Holst, Henrik
Hi, I am not sure if this is a bug but it was surprising to me so I thought I'd report it here. I added `ui.column=auto` to my gitconfig and that does not work so well with pipes so I want to use `--no-column` option. I was a bit surprised that this does not work? It seems that `--merged` pick

Re: [PATCH 0/2] Fix warnings on access of a remote with Windows paths

2017-05-23 Thread Johannes Schindelin
Hi Hannes, On Mon, 22 May 2017, Johannes Sixt wrote: > Am 22.05.2017 um 16:01 schrieb Johannes Schindelin: > > On Mon, 22 May 2017, stefan.na...@atlas-elektronik.com wrote: > > > Am 20.05.2017 um 08:28 schrieb Johannes Sixt: > > > > This small series fixes these warnings on Windows: > > > > > > >

Re: [PATCH 0/2] Fix warnings on access of a remote with Windows paths

2017-05-23 Thread Johannes Schindelin
Hi Hannes (& Junio, see below), On Mon, 22 May 2017, Johannes Sixt wrote: > Am 22.05.2017 um 13:59 schrieb Johannes Schindelin: > > On Sat, 20 May 2017, Johannes Sixt wrote: > > > This small series fixes these warnings on Windows: > > > > > > C:\Temp\gittest>git fetch C:\Temp\gittest > > > warnin

Re: [PATCH v2 0/2] Update sha1dc from upstream & optionally make it a submodule

2017-05-23 Thread Ævar Arnfjörð Bjarmason
On Tue, May 23, 2017 at 12:27 AM, Junio C Hamano wrote: > Ævar Arnfjörð Bjarmason writes: > >> I liked the suggestion to make the URL a relative path, but this would >> require you to maintain a mirror in the same places you push git.git >> to, is that something you'd be willing to do? > > After

Re: [PATCHv3 4/4] clone: use free_refspec() to free refspec list

2017-05-23 Thread Jeff King
On Tue, May 23, 2017 at 04:38:07PM +0900, Junio C Hamano wrote: > > First, the unchanged commit message is now (i.e. by using the parsed > > refspecs returned by remote_get()) completely outdated. > > Second, while it properly frees those refspecs, i.e. the array and all > > its string fields, it

Re: git --merge and option parsing

2017-05-23 Thread Jeff King
On Tue, May 23, 2017 at 10:17:18AM +, Holst, Henrik wrote: > I am not sure if this is a bug but it was surprising to me so I > thought I'd report it here. > > I added `ui.column=auto` to my gitconfig and that does not work so > well with pipes so I want to use `--no-column` option. I was a bi

Re: [PATCHv3 4/4] clone: use free_refspec() to free refspec list

2017-05-23 Thread SZEDER Gábor
On Tue, May 23, 2017 at 9:38 AM, Junio C Hamano wrote: > I was sifting entries in the draft "What's cooking" report to find > topics to merge to 'next'. I read the series over and as Peff said > in his <20170515224615.f6hnnfngwpier...@sigill.intra.peff.net>, I > think the series overall is good.

How do I see “merge events” in history?

2017-05-23 Thread Stefan Monov
I use the GitHub web interface and the git cli. Answers for either or both are appreciated. Sometimes, when I merge a branch into another branch, I see a commit with a message like "Merge branch 'master' into other_branch" in the GitHub history. But not always. So how do I see all "merge events",

Re: [Bug] cloning a repository with a default MASTER branch tries to check out the master branch

2017-05-23 Thread Jeff King
On Tue, May 23, 2017 at 04:01:06AM -0400, Samuel Lijin wrote: > For some reason the repo on GH does not have a HEAD pointer: > > $ git ls-remote https://github.com/passcod/UPPERCASE-NPM.git > efc7dbfd6ca155d5d19ce67eb98603896062f35arefs/heads/MASTER > e60ea8e6ec45ec45ff44ac8939cb4105b1647

Re: How do I see “merge events” in history?

2017-05-23 Thread Jeff King
On Tue, May 23, 2017 at 03:07:40PM +0300, Stefan Monov wrote: > I use the GitHub web interface and the git cli. Answers for either or > both are appreciated. > > Sometimes, when I merge a branch into another branch, I see a commit > with a message like "Merge branch 'master' into other_branch" in

Re: [PATCH v5 6/6] clean: teach clean -d to preserve ignored paths

2017-05-23 Thread Junio C Hamano
Samuel Lijin writes: > @@ -931,6 +961,7 @@ int cmd_clean(int argc, const char **argv, const char > *prefix) > prefix, argv); > > fill_directory(&dir, &pathspec); > + correct_untracked_entries(&dir); > > for (i = 0; i < dir.nr; i++) { > struc

Re: [PATCH v2 0/2] Update sha1dc from upstream & optionally make it a submodule

2017-05-23 Thread Junio C Hamano
Ævar Arnfjörð Bjarmason writes: > Seems like it would be useful to have a way to ex-post-facto say "past > history should use these URLs". i.e. if all git.git mirrors go down > and we have to re-host, then you can just clone git.git and off you > go, but the same isn't true of past submodule urls

Re: `pull --rebase --autostash` fails when fast forward in dirty repo

2017-05-23 Thread Jeff King
[+cc Junio, whose code this is touching] On Sun, May 21, 2017 at 12:17:06AM -0500, Tyler Brazier wrote: > This script explains and tests what's going on: > https://gist.github.com/tylerbrazier/4478e76fe44bf6657d4d3da6c789531d > > pull is failing because it shortcuts to --ff-only then calls > run

Re:Re: [PATCH v5] send-email: --batch-size to work around some SMTP server limit

2017-05-23 Thread 赵小强
At 2017-05-22 17:26:41, "Ævar Arnfjörð Bjarmason" wrote: >On Sun, May 21, 2017 at 2:59 PM, xiaoqiang zhao wrote: >> Some email servers (e.g. smtp.163.com) limit the number emails to be >> sent per session(connection) and this will lead to a faliure when >> sending many messages. > >This OK to m

Re: Another git repo at kernel.org?

2017-05-23 Thread Theodore Ts'o
So Junio owns the pub/scm/git/git.git tree on kernel.org, and he may already have access to create new repo's under the pub/scm/git hierarchy. In which case we might not need to bug the kernel.org administrators at all. Also, I'll note that it is possible to set up some repo's such that a group o

Re: Passing revs to git-bundle-create via stdin

2017-05-23 Thread Jeff King
On Tue, May 23, 2017 at 01:44:55AM +0200, ch wrote: > I'm using git bundles to create (incremental) backups of my local > repositories. > This works quite well but for certain repositories I'm getting unexpectedly > big > incremental bundles. I did some testing and from what I can tell it seems

Re: [WIP/RFC 00/23] repository object

2017-05-23 Thread Brandon Williams
On 05/22, Jeff King wrote: > On Thu, May 18, 2017 at 04:21:11PM -0700, Brandon Williams wrote: > > > When I first started working on the git project I found it very difficult to > > understand parts of the code base because of the inherently global nature of > > our code. It also made working on

Re: [WIP/RFC 00/23] repository object

2017-05-23 Thread Brandon Williams
On 05/19, Ben Peart wrote: > Glad to see you tackling this. This is definitely a step in the > right direction. > > I realize that it will take a lot of work and that intermediate > steps may just be pushing it the global state one level higher but > eventually it would be great to see an entire

Re: [WIP/RFC 17/23] repo: introduce new repository object

2017-05-23 Thread Brandon Williams
On 05/20, Stefan Beller wrote: > On Thu, May 18, 2017 at 4:21 PM, Brandon Williams wrote: > > Introduce 'struct repo' an object used to represent a repository. > > Is this the right place to outline what you expect from a repo object? > Are you planning to use it everywhere? > Is it lazy-init'd a

Re: BUG: The .gitignore rules can't be made to cross submodule boundaries

2017-05-23 Thread Stefan Beller
On Tue, May 23, 2017 at 2:55 AM, Ævar Arnfjörð Bjarmason wrote: > On Tue, May 23, 2017 at 11:17 AM, Johannes Schindelin > wrote: >> Hi Ævar, >> >> On Mon, 22 May 2017, Ævar Arnfjörð Bjarmason wrote: >> >>> When I was adding the sha1collisiondetection submodule to git.git I >>> noticed that buildi

Re: [PATCHv4 09/17] submodule.c: convert show_submodule_summary to use emit_line_fmt

2017-05-23 Thread Stefan Beller
On Mon, May 22, 2017 at 10:59 PM, Junio C Hamano wrote: > Stefan Beller writes: > >> diff --git a/submodule.c b/submodule.c >> index d3299e29c0..428c996c97 100644 >> --- a/submodule.c >> +++ b/submodule.c >> ... >> @@ -547,15 +543,16 @@ void show_submodule_inline_diff(FILE *f, const char >> *pat

Re: [PATCHv2 2/6] submodule test invocation: only pass additional arguments

2017-05-23 Thread Stefan Beller
On Mon, May 22, 2017 at 11:26 PM, Junio C Hamano wrote: > Stefan Beller writes: > >> diff --git a/t/t2013-checkout-submodule.sh b/t/t2013-checkout-submodule.sh >> index e8f70b806f..2672f104cf 100755 >> --- a/t/t2013-checkout-submodule.sh >> +++ b/t/t2013-checkout-submodule.sh >> @@ -65,9 +65,9 @@

Re: [PATCH 0/2] Fix warnings on access of a remote with Windows paths

2017-05-23 Thread Johannes Sixt
Am 23.05.2017 um 12:53 schrieb Johannes Schindelin: Hi Hannes (& Junio, see below), On Mon, 22 May 2017, Johannes Sixt wrote: Am 22.05.2017 um 13:59 schrieb Johannes Schindelin: On Sat, 20 May 2017, Johannes Sixt wrote: This small series fixes these warnings on Windows: C:\Temp\gittest>git

Re: [PATCHv2 1/6] submodule.c: add has_submodules to check if we have any submodules

2017-05-23 Thread Brandon Williams
On 05/22, Stefan Beller wrote: > When submodules are involved, it often slows down the process, as most > submodule related handling is either done via a child process or by > iterating over the index finding all gitlinks. > > For most commands that may interact with submodules, we need have a > q

Re: [PATCHv2 1/6] submodule.c: add has_submodules to check if we have any submodules

2017-05-23 Thread Stefan Beller
On Tue, May 23, 2017 at 11:40 AM, Brandon Williams wrote: > It doesn't look like any patches actually use this helper, is this > intended? It was needed for https://public-inbox.org/git/20170411194616.4963-1-sbel...@google.com/ which we do not have in this series any more. Will drop this patch.

Re: [GSoC][PATCH v4 1/2] t7407: test "submodule foreach --recursive" from subdirectory added

2017-05-23 Thread Brandon Williams
On 05/21, Prathamesh Chavan wrote: > Additional test cases added to the submodule-foreach test suite > to check the submodule foreach --recursive behavior from a > subdirectory as this was missing from the test suite. > > Mentored-by: Christian Couder > Mentored-by: Stefan Beller > Signed-off-by

Re: What's cooking in git.git (May 2017, #07; Tue, 23)

2017-05-23 Thread Stefan Beller
On Tue, May 23, 2017 at 1:08 AM, Junio C Hamano wrote: > * sb/submodule-blanket-recursive (2017-05-23) 6 commits > . builtin/push.c: respect 'submodule.recurse' option > . builtin/grep.c: respect 'submodule.recurse' option > . builtin/fetch.c: respect 'submodule.recurse' option > . Introduce

Re: [GSoC][PATCH v4 2/2] submodule: port subcommand foreach from shell to C

2017-05-23 Thread Brandon Williams
On 05/22, Stefan Beller wrote: > On Sun, May 21, 2017 at 5:58 AM, Prathamesh Chavan wrote: > > > I have also made some changes in git-submodule.sh for correcting > > the $path variable. And hence made the corresponding changes in > > the new test introduced in t7407-submodule-foreach as well. > >

Re: [PATCH v5 6/6] clean: teach clean -d to preserve ignored paths

2017-05-23 Thread Samuel Lijin
On Tue, May 23, 2017 at 8:52 AM, Junio C Hamano wrote: > Samuel Lijin writes: > >> @@ -931,6 +961,7 @@ int cmd_clean(int argc, const char **argv, const char >> *prefix) >> prefix, argv); >> >> fill_directory(&dir, &pathspec); >> + correct_untracked_entries(&dir); >

[PATCH v2 6/7] grep: un-break building with PCRE < 8.20

2017-05-23 Thread Ævar Arnfjörð Bjarmason
Amend my change earlier in this series ("grep: add support for the PCRE v1 JIT API", 2017-04-11) to un-break the build on PCRE v1 versions earlier than 8.20. The 8.20 release was the first release to have JIT & pcre_jit_stack in the headers, so a mock type needs to be provided for it on those rele

[PATCH v2 2/7] grep: skip pthreads overhead when using one thread

2017-05-23 Thread Ævar Arnfjörð Bjarmason
Skip the administrative overhead of using pthreads when only using one thread. Instead take the non-threaded path which would be taken under NO_PTHREADS. The threading support was initially added in commit 5b594f457a ("Threaded grep", 2010-01-25) with a hardcoded compile-time number of 8 threads.

[PATCH v2 5/7] grep: un-break building with PCRE < 8.32

2017-05-23 Thread Ævar Arnfjörð Bjarmason
Amend my change earlier in this series ("grep: add support for the PCRE v1 JIT API", 2017-04-11) to un-break the build on PCRE v1 versions earlier than 8.32. The JIT support was added in version 8.20 released on 2011-10-21, but it wasn't until 8.32 released on 2012-11-30 that the fast code path to

[PATCH v2 0/7] PCRE v2, PCRE v1 JIT, log -P & fixes

2017-05-23 Thread Ævar Arnfjörð Bjarmason
On Sun, May 21, 2017 at 1:50 AM, Junio C Hamano wrote: > Ævar Arnfjörð Bjarmason   writes: > >> Easy to review? 29 (I mean 30) patches? Are you kidding me?! >> >> As noted in v1 (<20170511091829.5634-1-ava...@gmail.com>; >> https://public-inbox.org/git/20170511091829.5634-1-ava...@gmail.com/) >> t

[PATCH v2 3/7] log: add -P as a synonym for --perl-regexp

2017-05-23 Thread Ævar Arnfjörð Bjarmason
Add a short -P option as a synonym for the longer --perl-regexp, for consistency with the options the corresponding grep invocations accept. This was intentionally omitted in commit 727b6fc3ed ("log --grep: accept --basic-regexp and --perl-regexp", 2012-10-03) for unspecified future use. Make it

[PATCH v2 4/7] grep: add support for the PCRE v1 JIT API

2017-05-23 Thread Ævar Arnfjörð Bjarmason
Change the grep PCRE v1 code to use JIT when available. When PCRE support was initially added in commit 63e7e9d8b6 ("git-grep: Learn PCRE", 2011-05-09) PCRE had no JIT support, it was integrated into 8.20 released on 2011-10-21. Enabling JIT support usually improves performance by more than 40%. T

[PATCH v2 7/7] grep: add support for PCRE v2

2017-05-23 Thread Ævar Arnfjörð Bjarmason
Add support for v2 of the PCRE API. This is a new major version of PCRE that came out in early 2015[1]. The regular expression syntax is the same, but while the API is similar, pretty much every function is either renamed or takes different arguments. Thus using it via entirely new functions makes

[PATCH v2 1/7] grep: don't redundantly compile throwaway patterns under threading

2017-05-23 Thread Ævar Arnfjörð Bjarmason
Change the pattern compilation logic under threading so that grep doesn't compile a pattern it never ends up using on the non-threaded code path, only to compile it again N times for N threads which will each use their own copy, ignoring the initially compiled pattern. This redundant compilation d

[PATCH v6 0/6] Fix clean -d and status --ignored

2017-05-23 Thread Samuel Lijin
Messed up on 6/6 in v5, forgot to include changes from earlier versions (karma for not running tests before I send-email'd the patch series). Samuel Lijin (6): t7300: clean -d should skip dirs with ignored files t7061: status --ignored should search untracked dirs dir: recurse into untracked

[PATCH v6 1/6] t7300: clean -d should skip dirs with ignored files

2017-05-23 Thread Samuel Lijin
If git sees a directory which contains only untracked and ignored files, clean -d should not remove that directory. It was recently discovered that this is *not* true of git clean -d, and it's possible that this has never worked correctly; this test and its accompanying patch series aims to fix tha

[PATCH v6 4/6] dir: hide untracked contents of untracked dirs

2017-05-23 Thread Samuel Lijin
When we taught read_directory_recursive() to recurse into untracked directories in search of ignored files given DIR_SHOW_IGNORED_TOO, that had the side effect of teaching it to collect the untracked contents of untracked directories. It doesn't always make sense to return these, though (we do need

[PATCH v6 5/6] dir: expose cmp_name() and check_contains()

2017-05-23 Thread Samuel Lijin
We want to use cmp_name() and check_contains() (which both compare `struct dir_entry`s, the former in terms of the sort order, the latter in terms of whether one lexically contains another) outside of dir.c, so we have to (1) change their linkage and (2) rename them as appropriate for the global na

[PATCH v6 6/6] clean: teach clean -d to preserve ignored paths

2017-05-23 Thread Samuel Lijin
There is an implicit assumption that a directory containing only untracked and ignored paths should itself be considered untracked. This makes sense in use cases where we're asking if a directory should be added to the git database, but not when we're asking if a directory can be safely removed fro

[PATCH v6 3/6] dir: recurse into untracked dirs for ignored files

2017-05-23 Thread Samuel Lijin
We consider directories containing only untracked and ignored files to be themselves untracked, which in the usual case means we don't have to search these directories. This is problematic when we want to collect ignored files with DIR_SHOW_IGNORED_TOO, though, so we teach read_directory_recursive(

[PATCH v6 2/6] t7061: status --ignored should search untracked dirs

2017-05-23 Thread Samuel Lijin
Per eb8c5b87, `status --ignored` by design does not list ignored files if they are in a directory which contains only ignored and untracked files (which is itself considered to be untracked) without `-uall`. This does not make sense for `--ignored`, which claims to "Show ignored files as well." Th

Re: [GSoC][PATCH v4 2/2] submodule: port subcommand foreach from shell to C

2017-05-23 Thread Brandon Williams
On 05/21, Prathamesh Chavan wrote: > This aims to make git-submodule foreach a builtin. This is the very > first step taken in this direction. Hence, 'foreach' is ported to > submodule--helper, and submodule--helper is called from git-submodule.sh. > The code is split up to have one function to obt

Re: What's cooking in git.git (May 2017, #07; Tue, 23)

2017-05-23 Thread Stefan Beller
On Tue, May 23, 2017 at 12:08 PM, Stefan Beller wrote: > On Tue, May 23, 2017 at 1:08 AM, Junio C Hamano wrote: > >> * sb/submodule-blanket-recursive (2017-05-23) 6 commits >> . builtin/push.c: respect 'submodule.recurse' option >> . builtin/grep.c: respect 'submodule.recurse' option >> . buil

Re: [PATCH v2 25/25] cache_ref_iterator_begin(): avoid priming unneeded directories

2017-05-23 Thread Jeff King
On Mon, May 22, 2017 at 04:17:55PM +0200, Michael Haggerty wrote: > So: > > * Move the responsibility for doing the prefix check directly to > `cache_ref_iterator`. This means that `cache_ref_iterator_begin()` > never has to wrap its return value in a `prefix_ref_iterator`. > > * Teach `cach

Re: What's cooking in git.git (May 2017, #07; Tue, 23)

2017-05-23 Thread Ævar Arnfjörð Bjarmason
On Tue, May 23, 2017 at 9:38 PM, Stefan Beller wrote: > On Tue, May 23, 2017 at 12:08 PM, Stefan Beller wrote: >> On Tue, May 23, 2017 at 1:08 AM, Junio C Hamano wrote: >> >>> * sb/submodule-blanket-recursive (2017-05-23) 6 commits >>> . builtin/push.c: respect 'submodule.recurse' option >>> .

Re: [PATCH 01/15] handle_revision_arg: reset "dotdot" consistently

2017-05-23 Thread Jeff King
On Sat, May 20, 2017 at 03:56:32PM +0100, Philip Oakley wrote: > > That means we do report the correct name for "a" in the > > pending array. But some code paths try to show the whole > > "a..b" name in error messages, and these erroneously show > > only "a" instead of "a..b". E.g.: > > > > $ gi

Re: [PATCH] usage: add NORETURN to BUG() function definitions

2017-05-23 Thread Ramsay Jones
On 23/05/17 04:32, Junio C Hamano wrote: > Interesting. One thing that I found somewhat suboptimal is that we > do not get signalled by non-zero exit. Warnings don't lead to non-zero exit, but similarly to -Werror, you can provide a -Wsparse-error to turn warnings into errors: $ make builtin

Re: [GSoC][PATCH v4 2/2] submodule: port subcommand foreach from shell to C

2017-05-23 Thread Stefan Beller
On Tue, May 23, 2017 at 12:36 PM, Brandon Williams wrote: > > You can set .git_cmd = 1 instead. > >> + cpr.dir = list_item->name; >> + prepare_submodule_repo_env(&cpr.env_array); >> + >> + argv_array_pushl(&cpr.args, "git", "--super-prefix", >> displaypath, > >

Re: [GSoC][PATCH v4 2/2] submodule: port subcommand foreach from shell to C

2017-05-23 Thread Brandon Williams
On 05/23, Stefan Beller wrote: > On Tue, May 23, 2017 at 12:36 PM, Brandon Williams wrote: > > > > You can set .git_cmd = 1 instead. > > > >> + cpr.dir = list_item->name; > >> + prepare_submodule_repo_env(&cpr.env_array); > >> + > >> + argv_array_pushl(&cpr.args

Re: [PATCH v3 22/30] grep: factor test for \0 in grep patterns into a function

2017-05-23 Thread Brandon Williams
On 05/20, Ævar Arnfjörð Bjarmason wrote: > Factor the test for \0 in grep patterns into a function. Since commit > 9eceddeec6 ("Use kwset in grep", 2011-08-21) any pattern containing a > \0 is considered fixed as regcomp() can't handle it. > > This change makes later changes that make use of eithe

Re: [PATCH 0/2] Fix warnings on access of a remote with Windows paths

2017-05-23 Thread Junio C Hamano
Johannes Schindelin writes: >> In this case, the warning occurs because I build with nd/fopen-errors. > > Ah. So the base commit Junio chose for your v1 is completely > inappropriate. It should be nd/fopen-errors instead. Actuallly, Hannes's patch text and problem description are confusingly inc

Re: [PATCH v6 6/6] clean: teach clean -d to preserve ignored paths

2017-05-23 Thread Junio C Hamano
Samuel Lijin writes: > There is an implicit assumption that a directory containing only > untracked and ignored paths should itself be considered untracked. This > makes sense in use cases where we're asking if a directory should be > added to the git database, but not when we're asking if a dire

Re: `pull --rebase --autostash` fails when fast forward in dirty repo

2017-05-23 Thread Junio C Hamano
Jeff King writes: > ...we can probably restrict it to when autostash is in use, like: > > /* >* If this is a fast-forward, we can skip calling rebase and >* just do the merge ourselves. But we don't know about >* autostash, so use the real rebase command when it's in effect. >*/

Re: [Non-Bug] cloning a repository with a default MASTER branch tries to check out the master branch

2017-05-23 Thread Philip Oakley
From: "Junio C Hamano" Félix Saparelli writes: I created a git repository that, for joke reasons, has a single branch called MASTER (in uppercase). Upon cloning this repo, git attempts to checkout the master branch (in lowercase), which does not exist. See what Git told you carefully and yo

Re: Another git repo at kernel.org?

2017-05-23 Thread Junio C Hamano
Theodore Ts'o writes: > So Junio owns the pub/scm/git/git.git tree on kernel.org, and he may > already have access to create new repo's under the pub/scm/git > hierarchy. In which case we might not need to bug the kernel.org > administrators at all. Yes, sorry for a premature inquiry.

Re: [PATCH 01/15] handle_revision_arg: reset "dotdot" consistently

2017-05-23 Thread Philip Oakley
From: "Jeff King" On Sat, May 20, 2017 at 03:56:32PM +0100, Philip Oakley wrote: > That means we do report the correct name for "a" in the > pending array. But some code paths try to show the whole > "a..b" name in error messages, and these erroneously show > only "a" instead of "a..b". E.g.:

Re: Another git repo at kernel.org?

2017-05-23 Thread Stefan Beller
On Tue, May 23, 2017 at 4:32 PM, Junio C Hamano wrote: > Theodore Ts'o writes: > >> So Junio owns the pub/scm/git/git.git tree on kernel.org, and he may >> already have access to create new repo's under the pub/scm/git >> hierarchy. In which case we might not need to bug the kernel.org >> admini

RE: git submodule update --remote fails on non-master branches with shallow clones enabled

2017-05-23 Thread Maxim Chuvilyaev
Hi, I am experiencing a problem with git submodules: git cannot update submodules from remote when using a non-master branch and shallow clones. Tested git versions client: 2.13 (Windows) server: 2.10 (CentOS 7) Behaviour when I have a submodule that is configured to get updates from a non-ma

Re: Passing revs to git-bundle-create via stdin

2017-05-23 Thread Junio C Hamano
Jeff King writes: > I think what's happening is that git-bundle actually runs _two_ > traversals using the command-line arguments. ... > ... It was just a way of confirming my > guess about the double-read. > > The real solutions I can think of are: > > 1. Teach git-bundle not to require the do

Re: [WIP/RFC 00/23] repository object

2017-05-23 Thread Junio C Hamano
Brandon Williams writes: > On 05/22, Jeff King wrote: >> That said, even if we never reached the point where we could handle all >> submodule requests in-process, I think sticking the repo-related global >> state in a struct certainly could not hurt general readability. So it's >> a good directio

Re: [PATCH 05/15] handle_revision_arg: add handle_dotdot() helper

2017-05-23 Thread Junio C Hamano
Jeff King writes: > The handle_revision_arg function is rather long, and a big > chunk of it is handling the range operators. Let's pull that > out to a separate helper. While we're doing so, we can clean > up a few of the rough edges that made the flow hard to > follow: > > - instead of manual

Re: [PATCH 0/15] retain blob info for git diff HEAD:foo HEAD:bar

2017-05-23 Thread Junio C Hamano
Patches around [PATCH 06-08/15] made some unexpected (at least to me) turns but the series told a coherent story, building on top of what has been achieved in the previous steps. Thanks for a pleasant read.

Re: [PATCH v2 00/25] Prepare to separate out a packed_ref_store

2017-05-23 Thread Junio C Hamano
Michael Haggerty writes: > * Since v1, branch `bc/object-id` has been merged to `next`, and it > has lots of conflicts with these changes. So I rebased this branch > onto a merge of `master` and `bc/object-id`. (I hope this makes > Junio's job easier.) This unfortunately causes a bit of tbd

Re: [PATCH 03/15] handle_revision_arg: stop using "dotdot" as a generic pointer

2017-05-23 Thread Junio C Hamano
Jeff King writes: > The handle_revision_arg() function has a "dotdot" variable > that it uses to find a ".." or "..." in the argument. If we > don't find one, we look for other marks, like "^!". But we > just keep re-using the "dotdot" variable, which is > confusing. > > Let's introduce a separat

Re: [PATCH v6 6/6] clean: teach clean -d to preserve ignored paths

2017-05-23 Thread Torsten Bögershausen
diff --git a/builtin/clean.c b/builtin/clean.c index d861f836a..937eb17b6 100644 --- a/builtin/clean.c +++ b/builtin/clean.c @@ -857,6 +857,38 @@ static void interactive_main_loop(void) } } +static void correct_untracked_entries(struct dir_struct *dir) +{ + int src, dst, ign;

Re: [PATCH v2 1/7] grep: don't redundantly compile throwaway patterns under threading

2017-05-23 Thread Junio C Hamano
Ævar Arnfjörð Bjarmason writes: > Rather, it's just to make the code easier to reason about. It's > confusing to debug this under threading & non-threading when the > threading codepaths redundantly compile a pattern which is never used. > > The reason the patterns are recompiled is as a side-ef

Re: [PATCH v2 2/7] grep: skip pthreads overhead when using one thread

2017-05-23 Thread Junio C Hamano
Ævar Arnfjörð Bjarmason writes: > Skip the administrative overhead of using pthreads when only using one > thread. Instead take the non-threaded path which would be taken under > NO_PTHREADS. > > The threading support was initially added in commit > 5b594f457a ("Threaded grep", 2010-01-25) with

[PATCH 04/29] blame: rename origin structure to blame_origin

2017-05-23 Thread Jeff Smith
The origin structure is core to the blame interface. Since origin will become more exposed, rename it to blame_origin to clarify what it is a part of. Signed-off-by: Jeff Smith --- builtin/blame.c | 114 1 file changed, 57 insertions(+),

[PATCH 06/29] blame: rename origin-related functions

2017-05-23 Thread Jeff Smith
Functions related to blame_origin that will be publicly exposed should have names that better reflect what they are a part of. Signed-off-by: Jeff Smith --- builtin/blame.c | 58 - 1 file changed, 29 insertions(+), 29 deletions(-) diff --g

[PATCH 02/29] blame: move textconv_object with related functions

2017-05-23 Thread Jeff Smith
textconv_object is used in places other than blame.c and should be moved to a more appropriate location. Other textconv related functions are located in diff.c so that seems as good a place as any. Signed-off-by: Jeff Smith --- builtin.h | 2 -- builtin/blame.c| 28 ---

[PATCH 05/29] blame: rename scoreboard structure to blame_scoreboard

2017-05-23 Thread Jeff Smith
The scoreboard structure is core to the blame interface. Since scoreboard will become more exposed, rename it to blame_scoreboard to clarify what it is a part of. Signed-off-by: Jeff Smith --- builtin/blame.c | 58 - 1 file changed, 29 inse

[PATCH 11/29] blame: move copy/move thresholds to scoreboard

2017-05-23 Thread Jeff Smith
Copy and move score thresholds are used in parts of blame that are being moved to libgit, and should be accessible via the scoreboard structure. Signed-off-by: Jeff Smith --- builtin/blame.c | 41 +++-- 1 file changed, 23 insertions(+), 18 deletions(-) diff -

[PATCH 10/29] blame: move stat counters to scoreboard

2017-05-23 Thread Jeff Smith
Statistic counters are used in parts of blame that are being moved to libgit, and should be accessible via the scoreboard structure. Signed-off-by: Jeff Smith --- builtin/blame.c | 34 +- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/builtin/blam

[PATCH 01/29] blame: remove unneeded dependency on blob.h

2017-05-23 Thread Jeff Smith
With commit 21666f1 ("convert object type handling from a string to a number", 2007-02-26), there was no longer a need for blame.c to include blob.h but it was not removed. Signed-off-by: Jeff Smith --- builtin/blame.c | 1 - 1 file changed, 1 deletion(-) diff --git a/builtin/blame.c b/builtin/

[PATCH 00/29] Add blame to libgit

2017-05-23 Thread Jeff Smith
Rather than duplicate large portions of builtin/blame.c in cgit, it would be better to shift its core functionality into libgit.a. The functionality left in builtin/blame.c mostly relates to terminal presentation. Since RFC v2 patchset: Rebased (merged in timestamp_t changes) Reorganized to s

[PATCH 03/29] blame: remove unused parameters

2017-05-23 Thread Jeff Smith
Clean up blame code before moving it into libgit Signed-off-by: Jeff Smith --- builtin/blame.c | 25 ++--- 1 file changed, 10 insertions(+), 15 deletions(-) diff --git a/builtin/blame.c b/builtin/blame.c index fbd757e..3529f01 100644 --- a/builtin/blame.c +++ b/builtin/blame

[PATCH 13/29] blame: move reverse flag to scoreboard

2017-05-23 Thread Jeff Smith
The reverse flag is used in parts of blame that are being moved to libgit, and should be accessible via the scoreboard structure. Signed-off-by: Jeff Smith --- builtin/blame.c | 23 ++- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/builtin/blame.c b/builtin/b

  1   2   >