[PATCH] Add color slots for branch names in "git status --short --branch"

2017-04-19 Thread Stephen Kent
Signed-off-by: Stephen Kent --- Documentation/config.txt | 5 - builtin/commit.c | 4 contrib/completion/git-completion.bash | 2 ++ 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/Documentation/config.txt

What's cooking in git.git (Apr 2017, #04; Wed, 19)

2017-04-19 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. An early preview for the upcoming

Re: [PATCH v10 4/5] dir_iterator: rewrite state machine model

2017-04-19 Thread Junio C Hamano
Daniel Ferreira writes: > diff --git a/t/t0065-dir-iterator.sh b/t/t0065-dir-iterator.sh > index 46e5ce5..4c6632f 100755 > --- a/t/t0065-dir-iterator.sh > +++ b/t/t0065-dir-iterator.sh > @@ -15,31 +15,41 @@ test_expect_success 'setup' ' > >dir/d/e/d/a && > > mkdir

Re: [PATCH v10 0/5] [GSoC] remove_subtree(): reimplement using iterators

2017-04-19 Thread Junio C Hamano
Daniel Ferreira writes: > I do not know if "queuing" meant I did not have to change this series > any further (specially after Stefan's "ok"), but anyway, this series > applies Junio's corrections back from v9, that were mostly regarding > commit messages or style. I hope I got

Re: [PATCH v3 08/12] refs: remove dead for_each_*_submodule()

2017-04-19 Thread Junio C Hamano
Ramsay Jones writes: > On 19/04/17 12:01, Nguyễn Thái Ngọc Duy wrote: >> These are used in revision.c. After the last patch they are replaced >> with the refs_ version. Delete them (except for_each_remote_ref_submodule >> which is still used by submodule.c) >> >>

Re: [PATCH v2 12/12] rev-list: expose and document --single-worktree

2017-04-19 Thread Junio C Hamano
Duy Nguyen writes: > On Sun, Mar 19, 2017 at 1:00 AM, Junio C Hamano wrote: >>> diff --git a/Documentation/rev-list-options.txt >>> b/Documentation/rev-list-options.txt >>> index a02f7324c0..c71e94b2d0 100644 >>> --- a/Documentation/rev-list-options.txt

Re: [PATCH v3 05/12] refs: move submodule slash stripping code to get_submodule_ref_store

2017-04-19 Thread Duy Nguyen
On Thu, Apr 20, 2017 at 12:02:08AM +0200, Johannes Sixt wrote: > Am 19.04.2017 um 13:01 schrieb Nguyễn Thái Ngọc Duy: > > @@ -1558,7 +1543,17 @@ struct ref_store *get_submodule_ref_store(const char > > *submodule) > > { > > struct strbuf submodule_sb = STRBUF_INIT; > > struct ref_store

Re: [bug?] docs in Documentation/technical/ do not seem to be distributed

2017-04-19 Thread brian m. carlson
On Wed, Apr 19, 2017 at 01:03:09PM -0500, Samuel Lijin wrote: > On Wed, Apr 19, 2017 at 12:05 PM, Jonathan Nieder wrote: > > This sounds like a packaging bug in Arch Linux and Ubuntu. > > > > That said, at least in Ubuntu, I am not able to reproduce it. Do > > you have the

Re: minor typos in documentation

2017-04-19 Thread René Genz
On 19.04.2017 22:55, Stefan Beller wrote: ... Thanks for spotting the errors! Care to craft a patch and send it upstream yourself? See https://github.com/git/git/blob/master/Documentation/SubmittingPatches how to approach it. TL;DR: git clone https://github.com/git/git # hack hack hack

[PATCH v6 06/11] run-command: prepare child environment before forking

2017-04-19 Thread Brandon Williams
In order to avoid allocation between 'fork()' and 'exec()' prepare the environment to be used in the child process prior to forking. Switch to using 'execve()' so that the construct child environment can used in the exec'd process. Signed-off-by: Brandon Williams ---

[PATCH v6 04/11] run-command: use the async-signal-safe execv instead of execvp

2017-04-19 Thread Brandon Williams
Convert the function used to exec from 'execvp()' to 'execv()' as the (p) variant of exec isn't async-signal-safe and has the potential to call malloc during the path resolution it performs. Instead we simply do the path resolution ourselves during the preparation stage prior to forking. There

[PATCH v6 05/11] string-list: add string_list_remove function

2017-04-19 Thread Brandon Williams
Teach string-list to be able to remove a string from a sorted 'struct string_list'. Signed-off-by: Brandon Williams --- string-list.c | 18 ++ string-list.h | 7 +++ 2 files changed, 25 insertions(+) diff --git a/string-list.c b/string-list.c index

[PATCH v6 07/11] run-command: don't die in child when duping /dev/null

2017-04-19 Thread Brandon Williams
Signed-off-by: Brandon Williams --- run-command.c | 28 +--- 1 file changed, 13 insertions(+), 15 deletions(-) diff --git a/run-command.c b/run-command.c index 15e2e74a7..b3a35dd82 100644 --- a/run-command.c +++ b/run-command.c @@ -117,18 +117,6 @@

[PATCH v6 03/11] run-command: prepare command before forking

2017-04-19 Thread Brandon Williams
According to [1] we need to only call async-signal-safe operations between fork and exec. Using malloc to build the argv array isn't async-signal-safe. In order to avoid allocation between 'fork()' and 'exec()' prepare the argv array used in the exec call prior to forking the process. [1]

[PATCH v6 02/11] t0061: run_command executes scripts without a #! line

2017-04-19 Thread Brandon Williams
Add a test to 't0061-run-command.sh' to ensure that run_command can continue to execute scripts which don't include a '#!' line. Signed-off-by: Brandon Williams --- t/t0061-run-command.sh | 11 +++ 1 file changed, 11 insertions(+) diff --git a/t/t0061-run-command.sh

[PATCH v6 10/11] run-command: add note about forking and threading

2017-04-19 Thread Brandon Williams
All non-Async-Signal-Safe functions (e.g. malloc and die) were removed between 'fork' and 'exec' in start_command in order to avoid potential deadlocking when forking while multiple threads are running. This deadlocking is possible when a thread (other than the one forking) has acquired a lock

[PATCH v6 11/11] run-command: block signals between fork and execve

2017-04-19 Thread Brandon Williams
From: Eric Wong Signal handlers of the parent firing in the forked child may have unintended side effects. Rather than auditing every signal handler we have and will ever have, block signals while forking and restore default signal handlers in the child before execve. Restoring

[PATCH v6 08/11] run-command: eliminate calls to error handling functions in child

2017-04-19 Thread Brandon Williams
All of our standard error handling paths have the potential to call malloc or take stdio locks; so we must avoid them inside the forked child. Instead, the child only writes an 8 byte struct atomically to the parent through the notification pipe to propagate an error. All user-visible error

[PATCH v6 09/11] run-command: handle dup2 and close errors in child

2017-04-19 Thread Brandon Williams
Signed-off-by: Brandon Williams --- run-command.c | 58 ++ 1 file changed, 42 insertions(+), 16 deletions(-) diff --git a/run-command.c b/run-command.c index 1f15714b1..615b6e9c9 100644 --- a/run-command.c +++

[PATCH v6 01/11] t5550: use write_script to generate post-update hook

2017-04-19 Thread Brandon Williams
The post-update hooks created in t5550-http-fetch-dumb.sh is missing the "!#/bin/sh" line which can cause issues with portability. Instead create the hook using the 'write_script' function which includes the proper "#!" line. Signed-off-by: Brandon Williams ---

[PATCH v6 00/11] forking and threading

2017-04-19 Thread Brandon Williams
Changes in v6: * fix some windows compat issues * better comment on the string_list_remove function (also marked extern) Brandon Williams (10): t5550: use write_script to generate post-update hook t0061: run_command executes scripts without a #! line run-command: prepare command before

[PATCH v2 12/13] grep: add support for the PCRE v1 JIT API

2017-04-19 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. When JIT support is enabled the PCRE performance usually improves by

[PATCH v2 10/13] grep: change the internal PCRE code & header names to be PCRE1

2017-04-19 Thread Ævar Arnfjörð Bjarmason
Change the internal PCRE variable & function names to have a "1" suffix. This is for preparation for libpcre2 support, where having non-versioned names would be confusing. The earlier "grep: change the internal PCRE macro names to be PCRE1" change elaborates on the motivations behind this commit.

[PATCH v2 11/13] perf: add a performance comparison test of grep -E and -P

2017-04-19 Thread Ævar Arnfjörð Bjarmason
Add a very basic performance comparison test comparing the POSIX extended & pcre1 engines. I'm skipping the "basic" POSIX engine because supporting its alternate regex syntax is hard, although it would be interesting to test it, at least under glibc it seems to be an entirely different engine,

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

2017-04-19 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-ish, pretty much every function is either renamed or takes different arguments. Thus using it via entirely new functions

[PATCH v2 08/13] test-lib: rename the LIBPCRE prerequisite to PCRE

2017-04-19 Thread Ævar Arnfjörð Bjarmason
Rename the LIBPCRE prerequisite to PCRE. This is for preparation for libpcre2 support, where having just "LIBPCRE" would be confusing as it implies v1 of the library. None of these tests are incompatible between versions 1 & 2 of libpcre, it's less confusing to give them a more general name to

[PATCH v2 07/13] grep: make grep.patternType=[pcre|pcre1] a synonym for "perl"

2017-04-19 Thread Ævar Arnfjörð Bjarmason
Make the pattern types "pcre" & "pcre1" synonyms for the long-standing "perl" grep.patternType. This change is part of a longer patch series to add pcre2 support to Git. It's nice to be able to performance test PCRE v1 v.s. v2 without having to recompile git, and doing that via grep.patternType

[PATCH v2 09/13] grep: change the internal PCRE macro names to be PCRE1

2017-04-19 Thread Ævar Arnfjörð Bjarmason
Change the internal USE_LIBPCRE define, & build options flag to use a naming convention ending in PCRE1, without changing the long-standing USE_LIBPCRE Makefile flag which enables this code. This is for preparation for libpcre2 support where having things like USE_LIBPCRE and USE_LIBPCRE2 in any

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

2017-04-19 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. Since

[PATCH v2 04/13] log: add exhaustive tests for pattern style options & config

2017-04-19 Thread Ævar Arnfjörð Bjarmason
Add exhaustive tests for how the different grep.patternType options & the corresponding command-line options affect git-log. Before this change it was possible to patch revision.c so that the --basic-regexp option was synonymous with --extended-regexp, and --perl-regexp wasn't recognized at all,

[PATCH v2 02/13] Makefile & configure: reword outdated comment about PCRE

2017-04-19 Thread Ævar Arnfjörð Bjarmason
Reword an outdated comment which suggests that only git-grep can use PCRE. This comment was added back when PCRE support was initially added in commit 63e7e9d8b6 ("git-grep: Learn PCRE", 2011-05-09), and was true at the time. It hasn't been telling the full truth since git-log learned to use

[PATCH v2 03/13] grep: add a test for backreferences in PCRE patterns

2017-04-19 Thread Ævar Arnfjörð Bjarmason
Add a test for backreferences such as (.)\1 in PCRE patterns. This test ensures that the PCRE_NO_AUTO_CAPTURE option isn't turned on. Before this change turning it on would break these sort of patterns, but wouldn't break any tests. Signed-off-by: Ævar Arnfjörð Bjarmason ---

[PATCH v2 06/13] grep & rev-list doc: stop promising libpcre for --perl-regexp

2017-04-19 Thread Ævar Arnfjörð Bjarmason
Stop promising in our grep & rev-list options documentation that we're always going to be using libpcre when given the --perl-regexp option. Instead talk about using "Perl-compatible regular expressions" and using "the PCRE library". Saying "libpcre" strongly suggests that we might be talking

[PATCH v2 00/13] PCRE v1 improvements & PCRE v2 support

2017-04-19 Thread Ævar Arnfjörð Bjarmason
It's been a while since I sent v1 of this. I addressed most of the comments, except: * grep w/submodules doesn't properly pcre2 to submodule greps. * The critiqued adding runtime complexity by supporting both pcre1 & pcre2 via a switch is still there. I wanted to get something out the door

[PATCH v2 01/13] grep: remove redundant regflags assignment under PCRE

2017-04-19 Thread Ævar Arnfjörð Bjarmason
Remove a redundant assignment to the "regflags" variable. This variable is only used for POSIX regular expression matching, not when the PCRE library is used. This redundant assignment was added as a result of copy/paste programming in commit 84befcd0a4 ("grep: add a grep.patternType

Re: [PATCH v3 05/12] refs: move submodule slash stripping code to get_submodule_ref_store

2017-04-19 Thread Johannes Sixt
Am 19.04.2017 um 13:01 schrieb Nguyễn Thái Ngọc Duy: @@ -1558,7 +1543,17 @@ struct ref_store *get_submodule_ref_store(const char *submodule) { struct strbuf submodule_sb = STRBUF_INIT; struct ref_store *refs; + char *to_free = NULL; int ret; + size_t len; +

Re: [RFC PATCH] parse-options: disallow double-negations of options starting with no-

2017-04-19 Thread Jeff King
On Wed, Apr 19, 2017 at 02:22:47PM -0700, Jacob Keller wrote: > > I think the breakage in that case would be caused by "--no-stage" taking > > over "--stage" as well. And your patch doesn't change that; it happened > > already in 2012. > > > > Your patch only affects the --no-no- form, which I

Re: [RFC PATCH] parse-options: disallow double-negations of options starting with no-

2017-04-19 Thread Jacob Keller
On Wed, Apr 19, 2017 at 2:22 PM, Jacob Keller wrote: > On Wed, Apr 19, 2017 at 2:00 PM, Jeff King wrote: >> On Wed, Apr 19, 2017 at 01:54:06PM -0700, Jacob Keller wrote: >> >>> This is why it's an RFC. I don't really feel that it's too much of a >>>

Re: [RFC PATCH] parse-options: disallow double-negations of options starting with no-

2017-04-19 Thread Jacob Keller
On Wed, Apr 19, 2017 at 2:00 PM, Jeff King wrote: > On Wed, Apr 19, 2017 at 01:54:06PM -0700, Jacob Keller wrote: > >> This is why it's an RFC. I don't really feel that it's too much of a >> problem. As for the reason why I thought it might want a flag itself >> is because of

Re: [RFC PATCH] parse-options: disallow double-negations of options starting with no-

2017-04-19 Thread Jeff King
On Wed, Apr 19, 2017 at 01:54:06PM -0700, Jacob Keller wrote: > This is why it's an RFC. I don't really feel that it's too much of a > problem. As for the reason why I thought it might want a flag itself > is because of concerns raised earlier that we might have something > liek > > OPT_BOOL(

Re: minor typos in documentation

2017-04-19 Thread Stefan Beller
On Wed, Apr 19, 2017 at 1:44 PM, René Genz wrote: > Dear sir or madam, > > At: > https://git-scm.com/docs/git-commit#git-commit---long > > you can read: > When doing a dry-run, give the output in a the long-format. > > From my point of view it should read: > When doing a

Re: [RFC PATCH] parse-options: disallow double-negations of options starting with no-

2017-04-19 Thread Jacob Keller
On Wed, Apr 19, 2017 at 8:10 AM, Jeff King wrote: > On Wed, Apr 19, 2017 at 02:08:20AM -0700, Jacob Keller wrote: > >> From: Jacob Keller >> >> Many options can be negated by prefixing the option with "no-", for >> example "--3way" can be prefixed with

minor typos in documentation

2017-04-19 Thread René Genz
Dear sir or madam, At: https://git-scm.com/docs/git-commit#git-commit---long you can read: When doing a dry-run, give the output in a the long-format. From my point of view it should read: When doing a dry-run, give the output in the long-format. Furthermore in the file:

Re: [PATCH v3 1/2] use HOST_NAME_MAX to size buffers for gethostname(2)

2017-04-19 Thread René Scharfe
Am 19.04.2017 um 21:09 schrieb Torsten Bögershausen: On 2017-04-19 19:28, René Scharfe wrote: [] One or two minor comments inline diff --git a/builtin/gc.c b/builtin/gc.c index 2daede7820..4c1c01e87d 100644 --- a/builtin/gc.c +++ b/builtin/gc.c @@ -228,21 +228,99 @@ static int need_to_gc(void)

Re: [PATCH 0/2] clone: record submodule alternates when not recursing

2017-04-19 Thread Stefan Beller
+ Junio, Jacob On Tue, Apr 11, 2017 at 12:46 PM, Stefan Beller wrote: > The meat is in the second patch: > The commit 31224cbdc7 (clone: recursive and reference option triggers > submodule alternates, 2016-08-17) argued for any further `submodule > update` > to

Re: [PATCH v3 1/2] use HOST_NAME_MAX to size buffers for gethostname(2)

2017-04-19 Thread Torsten Bögershausen
On 2017-04-19 19:28, René Scharfe wrote: [] One or two minor comments inline > diff --git a/builtin/gc.c b/builtin/gc.c > index 2daede7820..4c1c01e87d 100644 > --- a/builtin/gc.c > +++ b/builtin/gc.c > @@ -228,21 +228,99 @@ static int need_to_gc(void) > return 1; > } > > +struct pidfile {

RE: [PATCH v3 1/2] use HOST_NAME_MAX to size buffers for gethostname(2)

2017-04-19 Thread David Turner
> I had another look at this last night and cooked up the following patch. > Might > have gone overboard with it.. > > -- >8 -- > Subject: [PATCH] gc: support arbitrary hostnames and pids in > lock_repo_for_gc() > > git gc writes its pid and hostname into a pidfile to prevent concurrent >

Re: [PATCHv2 4/4] builtin/reset: add --recurse-submodules switch

2017-04-19 Thread Stefan Beller
On Tue, Apr 18, 2017 at 9:18 PM, Junio C Hamano wrote: > Stefan Beller writes: > >> git-reset is yet another working tree manipulator, which should >> be taught about submodules. >> >> One use case of "git-reset" is to reset to a known good state, >> and

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

2017-04-19 Thread Torsten Bögershausen
>> (Back to the roots) >> Which criteria do you have in mind: When should a filter process the blob >> and return it immediately, and when would it respond "delayed" ? > > See above: it's up to the filter. In case of Git LFS: delay if a network call > is required. > That make sense. I try to

Re: [BUG REPORT] git 2.9.0 clone --recursive fails on cloning a submodule

2017-04-19 Thread Stefan Beller
On Wed, Apr 19, 2017 at 4:30 AM, Ævar Arnfjörð Bjarmason wrote: > On Sun, Jun 19, 2016 at 10:51 PM, Junio C Hamano wrote: >> Jeff King writes: >> >>> Stefan, I think it might be worth revisiting the default set by d22eb04 >>> to propagate

Re: [PATCH v5 02/11] t0061: run_command executes scripts without a #! line

2017-04-19 Thread Johannes Sixt
Am 19.04.2017 um 17:56 schrieb Brandon Williams: On 04/19, Johannes Sixt wrote: Am 19.04.2017 um 07:43 schrieb Johannes Sixt: Windows can only run scripts with a shbang line. Out of curiosity how did you have t5550 passing on windows then? Since the first patch in this series fixes a that

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

2017-04-19 Thread Stefan Beller
On Wed, Apr 19, 2017 at 10:05 AM, 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. cool

Re: [bug?] docs in Documentation/technical/ do not seem to be distributed

2017-04-19 Thread Samuel Lijin
On Wed, Apr 19, 2017 at 12:05 PM, Jonathan Nieder wrote: > Hi, > > Samuel Lijin wrote: > >> It's possible this may have nothing to do with the Git project itself >> because I have absolutely no idea how this is handled on the packaging >> side or, possibly, if this is actually

Re: [PATCH v3 1/2] use HOST_NAME_MAX to size buffers for gethostname(2)

2017-04-19 Thread René Scharfe
Am 19.04.2017 um 03:28 schrieb Jonathan Nieder: > David Turner wrote: >> @@ -274,7 +278,7 @@ static const char *lock_repo_for_gc(int force, pid_t* >> ret_pid) >> * running. >> */ >> time(NULL) - st.st_mtime <= 12 * 3600 && >> -

Re: What's cooking in git.git (Apr 2017, #03; Tue, 18)

2017-04-19 Thread Stefan Beller
Prathamesh wrote: > Also, I would like to ask is there are any more changes required in my > microproject for getting it merged. > https://public-inbox.org/git/20170403213557.27724-1-pc44...@gmail.com/ See the last what's cooking email:

[PATCH v12 4/5] read-cache: speed up has_dir_name (part 1)

2017-04-19 Thread git
From: Jeff Hostetler Teach has_dir_name() to see if the path of the new item is greater than the last path in the index array before attempting to search for it. has_dir_name() is looking for file/directory collisions in the index and has to consider each sub-directory

[PATCH v12 1/5] read-cache: add strcmp_offset function

2017-04-19 Thread git
From: Jeff Hostetler Add strcmp_offset() function to also return the offset of the first change. Add unit test and helper to verify. Signed-off-by: Jeff Hostetler --- Makefile | 1 + cache.h | 1 +

[PATCH v12 5/5] read-cache: speed up has_dir_name (part 2)

2017-04-19 Thread git
From: Jeff Hostetler Teach has_dir_name() to see if the path of the new item is greater than the last path in the index array before attempting to search for it. has_dir_name() is looking for file/directory collisions in the index and has to consider each sub-directory

[GSoC][RFC/PATCH] submodule: port subcommand foreach from shell to C

2017-04-19 Thread Prathamesh Chavan
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 obtain all the list of submodules and a

[PATCH v12 0/5] read-cache: speed up add_index_entry

2017-04-19 Thread git
From: Jeff Hostetler Version 12 adds a new t/perf/repo/inflate-repo.sh script to let you inflate a test repo, such as a copy of git.git or linux.git, to have a branch containing a very large number of (non-synthetic) files. It also fixes the "##" comments in the

[PATCH v12 3/5] read-cache: speed up add_index_entry during checkout

2017-04-19 Thread git
From: Jeff Hostetler Teach add_index_entry_with_check() to see if the path of the new item is greater than the last path in the index array before attempting to search for it. During checkout, merge_working_tree() populates the new index in sorted order, so this change

[PATCH v12 2/5] p0006-read-tree-checkout: perf test to time read-tree

2017-04-19 Thread git
From: Jeff Hostetler Created t/perf/repos/many-files.sh to generate large, but artificial repositories. Created t/perf/inflate-repo.sh to alter an EXISTING repo to have a set of large commits. This can be used to create a branch with 1M+ files in repositories like

Re: [bug?] docs in Documentation/technical/ do not seem to be distributed

2017-04-19 Thread Jonathan Nieder
Hi, Samuel Lijin wrote: > It's possible this may have nothing to do with the Git project itself > because I have absolutely no idea how this is handled on the packaging > side or, possibly, if this is actually intended. > > There are a couple of links floating around in the man pages pointing >

Re: [PATCH] gitmodules: clarify what history depth a shallow clone has

2017-04-19 Thread Stefan Beller
On Wed, Apr 19, 2017 at 12:56 AM, Sebastian Schuberth wrote: > Signed-off-by: Sebastian Schuberth Thanks, Stefan > --- > Documentation/gitmodules.txt | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git

Re: [PATCH v3 2/2] xgethostname: handle long hostnames

2017-04-19 Thread René Scharfe
Am 19.04.2017 um 17:50 schrieb David Turner: >> -Original Message- >> From: Junio C Hamano [mailto:gits...@pobox.com] >> Sent: Tuesday, April 18, 2017 10:51 PM >> To: Jonathan Nieder >> Cc: David Turner ; git@vger.kernel.org; >> l@web.de

Re: [PATCH v5 11/11] run-command: block signals between fork and execve

2017-04-19 Thread Brandon Williams
On 04/19, Eric Wong wrote: > Johannes Sixt wrote: > > Am 19.04.2017 um 01:18 schrieb Brandon Williams: > > >@@ -400,6 +404,53 @@ static char **prep_childenv(const char *const > > >*deltaenv) > > > } > > > #endif > > > > > > > Does this #endif in this hunk context belong to an

Re: [PATCH v3 08/12] refs: remove dead for_each_*_submodule()

2017-04-19 Thread Ramsay Jones
On 19/04/17 12:01, Nguyễn Thái Ngọc Duy wrote: > These are used in revision.c. After the last patch they are replaced > with the refs_ version. Delete them (except for_each_remote_ref_submodule > which is still used by submodule.c) > > Signed-off-by: Nguyễn Thái Ngọc Duy >

Re: [PATCH v5 02/11] t0061: run_command executes scripts without a #! line

2017-04-19 Thread Brandon Williams
On 04/19, Johannes Sixt wrote: > Am 19.04.2017 um 07:43 schrieb Johannes Sixt: > >Am 19.04.2017 um 01:17 schrieb Brandon Williams: > >>Add a test to 't0061-run-command.sh' to ensure that run_command can > >>continue to execute scripts which don't include a '#!' line. > > > >Why is this necessary?

RE: [PATCH v3 2/2] xgethostname: handle long hostnames

2017-04-19 Thread David Turner
> -Original Message- > From: Junio C Hamano [mailto:gits...@pobox.com] > Sent: Tuesday, April 18, 2017 10:51 PM > To: Jonathan Nieder > Cc: David Turner ; git@vger.kernel.org; > l@web.de > Subject: Re: [PATCH v3 2/2] xgethostname: handle

Re: [RFC PATCH] parse-options: disallow double-negations of options starting with no-

2017-04-19 Thread Jeff King
On Wed, Apr 19, 2017 at 02:08:20AM -0700, Jacob Keller wrote: > From: Jacob Keller > > Many options can be negated by prefixing the option with "no-", for > example "--3way" can be prefixed with "--no-3way" to disable it. Since > 0f1930c58754 ("parse-options: allow

GOLD SELLER

2017-04-19 Thread Dr.Johnson Bande
Dear Sirs, We have available for sale DORE BARS of 99.9% purity 24 carat and 97.6% purity 23 carat, Kindly indicate your interest if you are willing to buy our GOLD.we will send our FCO with procedure after receipt of your confirmation. Regards, OMEGA GOLD TRADE LTD.

Re: [PATCH] various: disallow --no-no-OPT for --no-opt options

2017-04-19 Thread Jeff King
On Wed, Apr 19, 2017 at 09:02:52AM +0200, Ævar Arnfjörð Bjarmason wrote: > On Wed, Apr 19, 2017 at 4:50 AM, Jeff King wrote: > > On Tue, Apr 18, 2017 at 07:40:37PM -0700, Junio C Hamano wrote: > > > >> > It might even be possible to detect the existing line and > >> > have

[PATCH v2] clone: add a --no-tags option to clone without tags

2017-04-19 Thread Ævar Arnfjörð Bjarmason
Add a --no-tags option to "git clone" to clone without tags. Currently there's no easy way to clone a repository and end up with just a "master" branch via --single-branch, or track all branches and no tags. Now --no-tags can be added to "git clone" with or without --single-branch to clone a

Re: [PATCH v3 1/2] use HOST_NAME_MAX to size buffers for gethostname(2)

2017-04-19 Thread René Scharfe
Am 19.04.2017 um 03:28 schrieb Jonathan Nieder: >> From: René Scharfe >> >> POSIX limits the length of host names to HOST_NAME_MAX. Export the >> fallback definition from daemon.c and use this constant to make all >> buffers used with gethostname(2) big enough for any possible

Re: [PATCH] various: disallow --no-no-OPT for --no-opt options

2017-04-19 Thread René Scharfe
Am 19.04.2017 um 15:19 schrieb Ævar Arnfjörð Bjarmason: I mean a bug in my patch, i.e. I meant to remove --no-no-OPT in cases of --no-OPT but also removed --OPT unintentionally, but anyway, let's drop this one, Jacob's patch is better. Ah, OK. You also wondered why no tests complained. Good

((U.N.O/W.B.O/15/04/?2017/5/9/82)).

2017-04-19 Thread U/N
<<< No Message Collected >>>

Re: [PATCH] various: disallow --no-no-OPT for --no-opt options

2017-04-19 Thread Ævar Arnfjörð Bjarmason
On Wed, Apr 19, 2017 at 3:11 PM, René Scharfe wrote: > Am 19.04.2017 um 09:00 schrieb Ævar Arnfjörð Bjarmason: >> >> On Wed, Apr 19, 2017 at 12:29 AM, René Scharfe wrote: >>> >>> Setting PARSE_OPT_NONEG takes away the ability to toggle the affected >>> option. E.g.

[PATCH v10 5/5] remove_subtree(): reimplement using iterators

2017-04-19 Thread Daniel Ferreira
Use dir_iterator to traverse through remove_subtree()'s directory tree, avoiding the need for recursive calls to readdir(). Simplify remove_subtree()'s code. A conversion similar in purpose was previously done at 46d092a ("for_each_reflog(): reimplement using iterators", 2016-05-21).

[PATCH v10 4/5] dir_iterator: rewrite state machine model

2017-04-19 Thread Daniel Ferreira
Perform a rewrite of dir_iterator_advance(). dir_iterator has ceased to rely on a combination of level.initialized and level.dir_state state variables and now only tracks the state with level.dir_state, which simplifies the iterator mechanism, makes the code easier to follow and eases additions of

[PATCH v10 2/5] remove_subtree(): test removing nested directories

2017-04-19 Thread Daniel Ferreira
Test removing a nested directory when an attempt is made to restore the index to a state where it does not exist. A similar test could be found previously in t/t2000-checkout-cache-clash.sh, but it did not check for nested directories, which could allow a faulty implementation of remove_subtree()

[PATCH v10 3/5] dir_iterator: refactor dir_iterator_advance

2017-04-19 Thread Daniel Ferreira
Factor out reusable helpers out of dir_iterator_advance(). Make dir_iterator_advance()'s code more legible and allow some behavior to be reusable. Signed-off-by: Daniel Ferreira --- dir-iterator.c | 66 ++ 1 file changed,

[PATCH v10 1/5] dir_iterator: add tests for dir_iterator API

2017-04-19 Thread Daniel Ferreira
Create t/helper/test-dir-iterator.c, which prints relevant information about a directory tree iterated over with dir_iterator. Create t/t0065-dir-iterator.sh, which tests that dir_iterator does iterate through a whole directory tree. Signed-off-by: Daniel Ferreira ---

[PATCH v10 0/5] [GSoC] remove_subtree(): reimplement using iterators

2017-04-19 Thread Daniel Ferreira
This is the tenth version of a patch series that implements the GSoC microproject of converting a recursive call to readdir() to use dir_iterator. v1: https://public-inbox.org/git/CAGZ79kZwT-9mHTiOJ5CEjk2wDFkn6+NcogjX0=vjhsah16a...@mail.gmail.com/T/#t v2:

[ANNOUNCE] Git Rev News edition 26

2017-04-19 Thread Christian Couder
Hi everyone, The 26th edition of Git Rev News is now published: https://git.github.io/rev_news/2017/04/19/edition-26/ Thanks a lot to all the contributors and helpers! Enjoy, Christian, Thomas, Jakub and Markus.

Re: [PATCH] various: disallow --no-no-OPT for --no-opt options

2017-04-19 Thread René Scharfe
Am 19.04.2017 um 09:00 schrieb Ævar Arnfjörð Bjarmason: On Wed, Apr 19, 2017 at 12:29 AM, René Scharfe wrote: Setting PARSE_OPT_NONEG takes away the ability to toggle the affected option. E.g. git clone would reject --checkout. Currently users can specify --no- options as

Re: [RFC PATCH] parse-options: disallow double-negations of options starting with no-

2017-04-19 Thread René Scharfe
Am 19.04.2017 um 11:08 schrieb Jacob Keller: From: Jacob Keller Many options can be negated by prefixing the option with "no-", for example "--3way" can be prefixed with "--no-3way" to disable it. Since 0f1930c58754 ("parse-options: allow positivation of options

Re: Draft of Git Rev News edition 26

2017-04-19 Thread Christian Couder
Hi Michael, > Hi Christian, > > Thanks for the ping on the draft. Thanks for you input on this! > Re gpg: Maybe some valuable point of information is what Werner Koch > himself said in that thread: > "That [the command line is not a stable API to GnuPG] is not true. The > command line

Re: [BUG REPORT] git 2.9.0 clone --recursive fails on cloning a submodule

2017-04-19 Thread Ævar Arnfjörð Bjarmason
On Sun, Jun 19, 2016 at 10:51 PM, Junio C Hamano wrote: > Jeff King writes: > >> Stefan, I think it might be worth revisiting the default set by d22eb04 >> to propagate shallowness from the super-project clone. In an ideal >> world, we would be asking each

[PATCH v3 12/12] rev-list: expose and document --single-worktree

2017-04-19 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy --- Documentation/rev-list-options.txt | 8 revision.c | 2 ++ 2 files changed, 10 insertions(+) diff --git a/Documentation/rev-list-options.txt b/Documentation/rev-list-options.txt index

[PATCH v3 11/12] revision.c: --reflog add HEAD reflog from all worktrees

2017-04-19 Thread Nguyễn Thái Ngọc Duy
Note that add_other_reflogs_to_pending() is a bit inefficient, since it scans reflog for all refs of each worktree, including shared refs, so the shared ref's reflog is scanned over and over again. We could update refs API to pass "per-worktree only" flag to avoid that. But long term we should be

[PATCH v3 09/12] revision.c: --all adds HEAD from all worktrees

2017-04-19 Thread Nguyễn Thái Ngọc Duy
Unless single_worktree is set, --all now adds HEAD from all worktrees. Since reachable.c code does not use setup_revisions(), we need to call other_head_refs_submodule() explicitly there to have the same effect on "git prune", so that we won't accidentally delete objects needed by some other

[PATCH v3 10/12] files-backend: make reflog iterator go through per-worktree reflog

2017-04-19 Thread Nguyễn Thái Ngọc Duy
refs/bisect is unfortunately per-worktree, so we need to look in per-worktree logs/refs/bisect in addition to per-repo logs/refs. The current iterator only goes through per-repo logs/refs. Ideally we should have something like merge_ref_iterator_begin (and maybe with a predicate), but for

[PATCH v3 06/12] refs: add refs_head_ref()

2017-04-19 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy --- refs.c | 19 +-- refs.h | 2 ++ 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/refs.c b/refs.c index 26474cb62a..a252ae43ee 100644 --- a/refs.c +++ b/refs.c @@ -1208,27 +1208,26 @@ int

[PATCH v3 08/12] refs: remove dead for_each_*_submodule()

2017-04-19 Thread Nguyễn Thái Ngọc Duy
These are used in revision.c. After the last patch they are replaced with the refs_ version. Delete them (except for_each_remote_ref_submodule which is still used by submodule.c) Signed-off-by: Nguyễn Thái Ngọc Duy --- Documentation/technical/api-ref-iteration.txt | 7

[PATCH v3 07/12] revision.c: use refs_for_each*() instead of for_each_*_submodule()

2017-04-19 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy --- revision.c | 48 1 file changed, 32 insertions(+), 16 deletions(-) diff --git a/revision.c b/revision.c index 295d4f8205..c329070c89 100644 --- a/revision.c +++ b/revision.c @@ -1189,12

[PATCH v3 04/12] refs.c: refactor get_submodule_ref_store(), share common free block

2017-04-19 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy --- refs.c | 12 +--- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/refs.c b/refs.c index 5d31fb6bcf..5902a3d9e5 100644 --- a/refs.c +++ b/refs.c @@ -1570,19 +1570,16 @@ struct ref_store *get_submodule_ref_store(const

[PATCH v3 05/12] refs: move submodule slash stripping code to get_submodule_ref_store

2017-04-19 Thread Nguyễn Thái Ngọc Duy
This is a better place that will benefit all submodule callers instead of just resolve_gitlink_ref() Signed-off-by: Nguyễn Thái Ngọc Duy --- refs.c | 33 + 1 file changed, 17 insertions(+), 16 deletions(-) diff --git a/refs.c b/refs.c index

[PATCH v3 03/12] revision.c: --indexed-objects add objects from all worktrees

2017-04-19 Thread Nguyễn Thái Ngọc Duy
This is the result of single_worktree flag never being set (no way to up until now). To get objects from current index only, set single_worktree. The other add_index_objects_to_pending's caller is mark_reachable_objects() (e.g. "git prune") which also mark objects from all indexes.

[PATCH v3 02/12] revision.c: refactor add_index_objects_to_pending()

2017-04-19 Thread Nguyễn Thái Ngọc Duy
The core code is factored out and take 'struct index_state *' instead so that we can reuse it to add objects from index files other than .git/index in the next patch. Signed-off-by: Nguyễn Thái Ngọc Duy --- revision.c | 18 -- 1 file changed, 12 insertions(+),

[PATCH v3 00/12] Fix git-gc losing objects in multi worktree

2017-04-19 Thread Nguyễn Thái Ngọc Duy
Changes since v2 [1] is relatively small. It still needs nd/worktree-kill-parse-ref of course. [1] http://public-inbox.org/git/20170318101153.6901-1-pclo...@gmail.com/ diff --git a/Documentation/technical/api-ref-iteration.txt b/Documentation/technical/api-ref-iteration.txt index

  1   2   >