Re: [PATCH] receive: denyCurrentBranch=updateinstead should not blindly update

2018-10-18 Thread Eric Sunshine
On Fri, Oct 19, 2018 at 12:57 AM Junio C Hamano wrote: > The handling of receive.denyCurrentBranch=updateInstead was added to > a switch statement that handles other values of the variable, but > all the other case arms only checked a condition to reject the > attempted push, or let later logic

Re: [PATCH 1/1] commit-reach: fix first-parent heuristic

2018-10-18 Thread Junio C Hamano
"Derrick Stolee via GitGitGadget" writes: > We can also re-run the performance tests from commit 4fbcca4e > "commit-reach: make can_all_from_reach... linear". > > Performance was measured on the Linux repository using > 'test-tool reach can_all_from_reach'. The input included rows seeded by >

[PATCH] receive: denyCurrentBranch=updateinstead should not blindly update

2018-10-18 Thread Junio C Hamano
The handling of receive.denyCurrentBranch=updateInstead was added to a switch statement that handles other values of the variable, but all the other case arms only checked a condition to reject the attempted push, or let later logic in the same function to still intervene, so that a push that does

[PATCH v3] fetch: replace string-list used as a look-up table with a hashmap

2018-10-18 Thread Junio C Hamano
In find_non_local_tags() helper function (used to implement the "follow tags"), we use string_list_has_string() on two string lists as a way to see if a refname has already been processed, etc. All this code predates more modern in-core lookup API like hashmap; replace them with two hashmaps and

Re: receive.denyCurrentBranch=updateInstead updates working tree even when receive.denyNonFastForwards rejects push

2018-10-18 Thread Junio C Hamano
Junio C Hamano writes: > Rajesh Madamanchi writes: > >> Hi, I am looking to report the below behavior when seems incorrect to >> me when receive.denyCurrentBranch is set to updateInstead and >> receive.denyNonFastForwards is set to true. > > It seems that we took a lazy but incorrect route

Re: [PATCH v2 0/3] Clear flags before each v2 request

2018-10-18 Thread Junio C Hamano
Jonathan Tan writes: > Jonathan Tan (3): > upload-pack: make have_obj not global > upload-pack: make want_obj not global > upload-pack: clear flags before each v2 request It took a bit of time why 2/3 did not apply cleanly but it turns out this is based on a slightly older tip of 'master'

Re: [PATCH v4 9/9] Documentation/config: add odb..promisorRemote

2018-10-18 Thread Junio C Hamano
Jonathan Nieder writes: > Junio C Hamano wrote: > ... >> It is a good idea to implicitly include the promisor-remote to the >> set of secondary places to consult to help existing versions of Git, >> but once the repository starts fetching incomplete subgraphs and >> adding new

Re: [PATCH 0/1] commit-reach: fix first-parent heuristic

2018-10-18 Thread Junio C Hamano
"Derrick Stolee via GitGitGadget" writes: > I originally reported this fix [1] after playing around with the trace2 > series for measuring performance. Since trace2 isn't merging quickly, I > pulled the performance fix patch out and am sending it on its own. The only > difference here is that we

Re: [PATCH] multi-pack-index: avoid dead store for struct progress

2018-10-18 Thread Junio C Hamano
Carlo Marcelo Arenas Belón writes: > it is initialized unconditionally by a call to start_progress > below. > > Signed-off-by: Carlo Marcelo Arenas Belón > --- > midx.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/midx.c b/midx.c > index ea2f3ffe2e..4fac0cd08a

Re: [PATCH v2 02/13] ci/lib.sh: encapsulate Travis-specific things

2018-10-18 Thread Junio C Hamano
SZEDER Gábor writes: > On Mon, Oct 15, 2018 at 03:12:00AM -0700, Johannes Schindelin via > GitGitGadget wrote: >> diff --git a/ci/lib.sh b/ci/lib.sh >> index 06970f7213..8532555b4e 100755 >> --- a/ci/lib.sh >> +++ b/ci/lib.sh >> @@ -1,5 +1,26 @@ >> # Library of functions shared by all CI

Re: [PATCH v1 1/1] index_bulk_checkin(): Take off_t, not size_t

2018-10-18 Thread Junio C Hamano
tbo...@web.de writes: > bulk-checkin.c | 4 ++-- > bulk-checkin.h | 2 +- > 2 files changed, 3 insertions(+), 3 deletions(-) If you lost SP in your editor, then it is OK but if format-patch lost it for some reason, plasee tell me as we need to find the bug. > > diff --git a/bulk-checkin.c

Re: [PATCH] diff: don't attempt to strip prefix from absolute Windows paths

2018-10-18 Thread Junio C Hamano
Johannes Sixt writes: > Use is_absolute_path() to detect Windows style absolute paths. When cd676a51 ("diff --relative: output paths as relative to the current subdirectory", 2008-02-12) was done, neither "is_dir_sep()" nor "has_dos_drive_prefix()" existed---the latter had to wait until

Re: [PATCH] config.mak.dev: enable -Wunused-function

2018-10-18 Thread Junio C Hamano
Ramsay Jones writes: > I haven't looked too deeply, but this seems to be caused by > Junio's commit 42c89ea70a ("SQUASH??? - convert the other user of > string-list as db", 2018-10-17) which removes a call to the > add_existing() function - the subject of the warning. That is very

Re: [PATCH 1/3] t6501: use --quiet when testing gc stderr

2018-10-18 Thread Junio C Hamano
Derrick Stolee writes: > This code from builtin/gc.c makes it look like we are doing that: > >     if (gc_write_commit_graph) >     write_commit_graph_reachable(get_object_directory(), 0, > !quiet && !daemonized); > > But really,

Re: [PATCH v1 1/2] reset: don't compute unstaged changes after reset when --quiet

2018-10-18 Thread Junio C Hamano
Ben Peart writes: > Note the status command after the reset doesn't really change as it > still must lstat() every file (the 0.02 difference is well within the > variability of run to run differences). Of course, it would not make an iota of difference, whether reset refreshes the cached stat

Re: [PATCH v4 9/9] Documentation/config: add odb..promisorRemote

2018-10-18 Thread Jonathan Nieder
Junio C Hamano wrote: > Jonathan Tan writes: >> Jonathan Nieder wrote: >>> [object] >>> missingObjectRemote = local-cache-remote >>> missingObjectRemote = origin >> >> In the presence of missingObjectRemote, old versions of Git, when lazily >> fetching, would only

Re: receive.denyCurrentBranch=updateInstead updates working tree even when receive.denyNonFastForwards rejects push

2018-10-18 Thread Junio C Hamano
Rajesh Madamanchi writes: > Hi, I am looking to report the below behavior when seems incorrect to > me when receive.denyCurrentBranch is set to updateInstead and > receive.denyNonFastForwards is set to true. It seems that we took a lazy but incorrect route while adding the DENY_UPDATE_INSTEAD

Re: [PATCH v4 9/9] Documentation/config: add odb..promisorRemote

2018-10-18 Thread Junio C Hamano
Jonathan Tan writes: >> [object] >> missingObjectRemote = local-cache-remote >> missingObjectRemote = origin >> > In the presence of missingObjectRemote, old versions of Git, when lazily > fetching, would only know to try the extensions.partialClone remote. But >

Re: [RFC PATCH 0/2] Bring the_repository into cmd_foo

2018-10-18 Thread Stefan Beller
On Thu, Oct 18, 2018 at 2:01 PM Jonathan Tan wrote: > > > > Or instead we could accelerate the long term plan of removing a > > > hard coded the_repository and have each cmd builtin take an additional > > > repository pointer from the init code, such that we'd bring all of Git to > > > work on

[PATCH] alias: detect loops in mixed execution mode

2018-10-18 Thread Ævar Arnfjörð Bjarmason
Add detection for aliasing loops in cases where one of the aliases re-invokes git as a shell command. This catches cases like: [alias] foo = !git bar bar = !git foo Before this change running "git {foo,bar}" would create a forkbomb. Now using the aliasing loop detection and call

Re: [PATCH] send-email: explicitly disable authentication

2018-10-18 Thread Joshua Watt
On Thu, 2018-10-18 at 17:53 -0400, Eric Sunshine wrote: > On Thu, Oct 18, 2018 at 5:16 PM Joshua Watt > wrote: > > It can be necessary to disable SMTP authentication by a mechanism > > other > > than sendemail.smtpuser being undefined. For example, if the user > > has > > sendemail.smtpuser set

Re: [PATCH v2 02/13] ci/lib.sh: encapsulate Travis-specific things

2018-10-18 Thread SZEDER Gábor
On Mon, Oct 15, 2018 at 03:12:00AM -0700, Johannes Schindelin via GitGitGadget wrote: > diff --git a/ci/lib.sh b/ci/lib.sh > index 06970f7213..8532555b4e 100755 > --- a/ci/lib.sh > +++ b/ci/lib.sh > @@ -1,5 +1,26 @@ > # Library of functions shared by all CI scripts > > +if test true =

Re: [PATCH] send-email: explicitly disable authentication

2018-10-18 Thread Eric Sunshine
On Thu, Oct 18, 2018 at 5:16 PM Joshua Watt wrote: > It can be necessary to disable SMTP authentication by a mechanism other > than sendemail.smtpuser being undefined. For example, if the user has > sendemail.smtpuser set globally but wants to disable authentication > locally in one repository. >

[PATCH] send-email: explicitly disable authentication

2018-10-18 Thread Joshua Watt
It can be necessary to disable SMTP authentication by a mechanism other than sendemail.smtpuser being undefined. For example, if the user has sendemail.smtpuser set globally but wants to disable authentication locally in one repository. --smtp-auth and sendemail.smtpauth now understand the value

Re: [RFC PATCH 0/2] Bring the_repository into cmd_foo

2018-10-18 Thread Jonathan Tan
> > Or instead we could accelerate the long term plan of removing a > > hard coded the_repository and have each cmd builtin take an additional > > repository pointer from the init code, such that we'd bring all of Git to > > work on arbitrary repositories. Then the standard test suite should be >

[PATCH v2 2/3] upload-pack: make want_obj not global

2018-10-18 Thread Jonathan Tan
Because upload_pack_v2() can be invoked multiple times in the same process, the static variable want_obj may not be empty when it is invoked. To make further analysis of this situation easier, make the variable local; analysis will be done in a subsequent patch. The new local variable in

[PATCH v2 0/3] Clear flags before each v2 request

2018-10-18 Thread Jonathan Tan
To explain the differences in this version of the patch set, I'll quote an email [1] from Junio: [1] https://public-inbox.org/git/xmqq5zxzvnq1@gitster-ct.c.googlers.com/ > The change to the code itself sort-of makes sense (I say sort-of > because I didn't carefully look at the callers to see

[PATCH v2 1/3] upload-pack: make have_obj not global

2018-10-18 Thread Jonathan Tan
Because upload_pack_v2() can be invoked multiple times in the same process, the static variable have_obj may not be empty when it is invoked. To make further analysis of this situation easier, make the variable local; analysis will be done in a subsequent patch. The new local variable in

[PATCH v2 3/3] upload-pack: clear flags before each v2 request

2018-10-18 Thread Jonathan Tan
Suppose a server has the following commit graph: A B \ / O We create a client by cloning A from the server with depth 1, and add many commits to it (so that future fetches span multiple requests due to lengthy negotiation). If it then fetches B using protocol v2, the fetch spanning

Shouldn't git be able to apply diffs that it created with --ignore-whitespace?

2018-10-18 Thread Mahmoud Al-Qudsi
Hello again all, I think I've previously broached this subject before, but I think I perhaps wasn't clear enough about what I was trying to do or why I feel that git is at fault here. (I'm running git 2.19.1) Starting with a fully-committed, not-dirty codebase, I open(ed) a poorly formatted,

Re: [PATCH] multi-pack-index: avoid dead store for struct progress

2018-10-18 Thread Carlo Arenas
On Thu, Oct 18, 2018 at 12:36 PM Derrick Stolee wrote: > > Is there a tool that reports a wasted > initialization that you used to find this? I'd used clang's analyzer recently to track a similar issue before in a different codebase, but not for this specific case. Carlo

Re: [PATCH] multi-pack-index: avoid dead store for struct progress

2018-10-18 Thread Derrick Stolee
On 10/18/2018 2:59 PM, Carlo Marcelo Arenas Belón wrote: it is initialized unconditionally by a call to start_progress below. Signed-off-by: Carlo Marcelo Arenas Belón --- midx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/midx.c b/midx.c index ea2f3ffe2e..4fac0cd08a

Re: [PATCH] diff: don't attempt to strip prefix from absolute Windows paths

2018-10-18 Thread Johannes Sixt
Am 18.10.18 um 20:49 schrieb Stefan Beller: > On Thu, Oct 18, 2018 at 11:38 AM Johannes Sixt wrote: > >> There is one peculiarity, though: [...] > > The explanation makes sense, and the code looks good. > Do we want to have a test for this niche case? > Good point. That would be the

[PATCH v1 1/1] index_bulk_checkin(): Take off_t, not size_t

2018-10-18 Thread tboegi
From: Torsten Bögershausen When streaming data from disk into a blob, use off_t instead of size_t, which is a better choice for file length. Signed-off-by: Torsten Bögershausen --- This is based on an old patch from 2017, which never made it to the list. I think it make sense to have

Re: [PATCH 4/9] submodule.c: move global changed_submodule_names into fetch submodule struct

2018-10-18 Thread Stefan Beller
On Wed, Oct 17, 2018 at 2:26 PM Jonathan Tan wrote: > > > The `changed_submodule_names` are only used for fetching, so let's make it > > part of the struct that is passed around for fetching submodules. > > Keep the titles of commit messages to 50 characters or under. renamed > > > +static void

Re: [PATCH v1 1/2] reset: don't compute unstaged changes after reset when --quiet

2018-10-18 Thread Ben Peart
On 10/18/2018 2:26 PM, Duy Nguyen wrote: On Thu, Oct 18, 2018 at 8:18 PM Ben Peart wrote: I actually started my effort to speed up reset by attempting to multi-thread refresh_index(). You can see a work in progress at:

[PATCH] multi-pack-index: avoid dead store for struct progress

2018-10-18 Thread Carlo Marcelo Arenas Belón
it is initialized unconditionally by a call to start_progress below. Signed-off-by: Carlo Marcelo Arenas Belón --- midx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/midx.c b/midx.c index ea2f3ffe2e..4fac0cd08a 100644 --- a/midx.c +++ b/midx.c @@ -941,7 +941,7 @@ static

Re: [PATCH] diff: don't attempt to strip prefix from absolute Windows paths

2018-10-18 Thread Stefan Beller
On Thu, Oct 18, 2018 at 11:38 AM Johannes Sixt wrote: > There is one peculiarity, though: [...] The explanation makes sense, and the code looks good. Do we want to have a test for this niche case?

[PATCH] unpack-trees: avoid dead store for struct progress

2018-10-18 Thread Carlo Marcelo Arenas Belón
it is unconditionally initialized a few lines below Signed-off-by: Carlo Marcelo Arenas Belón --- unpack-trees.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/unpack-trees.c b/unpack-trees.c index f25089b878..88dc9a615e 100644 --- a/unpack-trees.c +++ b/unpack-trees.c @@

[RFC PATCH 2/2 (BREAKS BUILD)] builtin/merge-base.c: do not rely on the_repository any more

2018-10-18 Thread Stefan Beller
To avoid creeping in the dependency of the_repository, use GIT_NO_THE_REPOSITORY in the test to prove it still works. Signed-off-by: Stefan Beller --- This doesn't work yet, as we have not converted get_oid, yet. It proves that GIT_NO_THE_REPOSITORY works, though. Stefan builtin/merge-base.c

[RFC PATCH 1/2] repository: have get_the_repository() to remove the_repository dependency

2018-10-18 Thread Stefan Beller
The struct 'the_repo' contains all data that of the main repository. As we move more and more globals into this struct, the usual way of accessing these is using 'the_repository', which can be used as a drop in replacement for accessing the migrated globals. However during the migration of

[PATCH] diff: don't attempt to strip prefix from absolute Windows paths

2018-10-18 Thread Johannes Sixt
git diff can be invoked with absolute paths. Typically, this triggers the --no-index case. Then the absolute paths remain in the file names that are printed in the output. There is one peculiarity, though: When the command is invoked from a a sub-directory in a repository, then it is attempted to

[RFC PATCH 0/2] Bring the_repository into cmd_foo

2018-10-18 Thread Stefan Beller
> On Wed, Oct 17, 2018 at 5:41 AM Derrick Stolee wrote: >> I had one high-level question: How are we testing that these "arbitrary >> repository" changes are safe? > [...] > Or instead we could accelerate the long term plan of removing a > hard coded the_repository and have each cmd builtin take

Re: [PATCH v1 1/2] reset: don't compute unstaged changes after reset when --quiet

2018-10-18 Thread Duy Nguyen
On Thu, Oct 18, 2018 at 8:18 PM Ben Peart wrote: > I actually started my effort to speed up reset by attempting to > multi-thread refresh_index(). You can see a work in progress at: > > https://github.com/benpeart/git/pull/new/refresh-index-multithread-gvfs > > The patch doesn't always work as

Re: [PATCH v1 1/2] reset: don't compute unstaged changes after reset when --quiet

2018-10-18 Thread Ben Peart
On 10/18/2018 2:36 AM, Jeff King wrote: On Thu, Oct 18, 2018 at 12:40:48PM +0900, Junio C Hamano wrote: Jeff King writes: Whereas for the new config variable, you'd probably set it not because you want it quiet all the time, but because you want to get some time savings. So there it does

[PATCH/RFC] thread-utils: better wrapper to avoid #ifdef NO_PTHREADS

2018-10-18 Thread Nguyễn Thái Ngọc Duy
On Thu, Oct 18, 2018 at 7:09 PM Jeff King wrote: > > In this particular case though I think we should be able to avoid so > > much #if if we make a wrapper for pthread api that would return an > > error or something when pthread is not available. But similar > > situation may happen elsewhere

Re: [PATCH 0/9] Resending sb/submodule-recursive-fetch-gets-the-tip

2018-10-18 Thread Stefan Beller
On Thu, Oct 18, 2018 at 12:30 AM Junio C Hamano wrote: > > Stefan Beller writes: > > > This is based on ao/submodule-wo-gitmodules-checked-out. > > > > This resends origin/sb/submodule-recursive-fetch-gets-the-tip, resolving > > the issues pointed out via > >

[PATCH 1/1] commit-reach: fix first-parent heuristic

2018-10-18 Thread Derrick Stolee via GitGitGadget
From: Derrick Stolee The algorithm in can_all_from_reach_with_flags() performs a depth- first-search, terminated by generation number, intending to use a hueristic that "important" commits are found in the first-parent history. This heuristic is valuable in scenarios like fetch negotiation.

[PATCH 0/1] commit-reach: fix first-parent heuristic

2018-10-18 Thread Derrick Stolee via GitGitGadget
I originally reported this fix [1] after playing around with the trace2 series for measuring performance. Since trace2 isn't merging quickly, I pulled the performance fix patch out and am sending it on its own. The only difference here is that we don't have the tracing to verify the performance

Re: [PATCH] config.mak.dev: enable -Wunused-function

2018-10-18 Thread Jeff King
On Thu, Oct 18, 2018 at 05:48:16PM +0200, Duy Nguyen wrote: > > - conditional compilation, where we may or may not need a > > static helper. These generally fall into one of two > > categories: > > > > - the call should not be conditional, but rather the > > function body

Re: [PATCH] config.mak.dev: enable -Wunused-function

2018-10-18 Thread Ramsay Jones
On 18/10/2018 08:05, Jeff King wrote: > We explicitly omitted -Wunused-function when we added > -Wextra, but there is no need: the current code compiles > cleanly with it. And it's worth having, since it can let you > know when there are cascading effects from a cleanup (e.g., > deleting one

No --no-gpg-sign option with "git rebase"

2018-10-18 Thread Luca Weiss
See subject, would be quite useful to have this. ("Countermand commit.gpgSign configuration variable that is set to force each and every commit to be signed.") Thanks, Luca

Re: [PATCH] config.mak.dev: enable -Wunused-function

2018-10-18 Thread Duy Nguyen
On Thu, Oct 18, 2018 at 9:05 AM Jeff King wrote: > > We explicitly omitted -Wunused-function when we added > -Wextra, but there is no need: the current code compiles > cleanly with it. And it's worth having, since it can let you > know when there are cascading effects from a cleanup (e.g., >

Re: [PATCH v4] branch: introduce --show-current display option

2018-10-18 Thread Eric Sunshine
On Thu, Oct 18, 2018 at 5:51 AM Johannes Schindelin wrote: > On Wed, 17 Oct 2018, Eric Sunshine wrote: > > On Wed, Oct 17, 2018 at 6:18 AM Johannes Schindelin > > wrote: > > > My suspicion: it is essentially the `(exit 117)` that adds about 100ms to > > > every of those 67 test cases. > > > >

Re: [PATCH v2 13/13] commit-graph: specify OID version for SHA-256

2018-10-18 Thread Derrick Stolee
On 10/17/2018 8:06 PM, brian m. carlson wrote: On Wed, Oct 17, 2018 at 04:31:19PM +0200, Duy Nguyen wrote: On Wed, Oct 17, 2018 at 12:44 AM brian m. carlson wrote: Honestly, anything in the .git directory that is not the v3 pack indexes or the loose object file should be in exactly one hash

Re: [PATCH 0/3] Use commit-graph by default

2018-10-18 Thread Derrick Stolee
On 10/17/2018 11:47 PM, Junio C Hamano wrote: If I recall correctly, one more task that was discussed but hasn't been addressed well is how the generation and incremental update of it should integrate with the normal repository maintenance workflow (perhaps "gc --auto"). If we are going to turn

Re: [PATCH 1/3] t6501: use --quiet when testing gc stderr

2018-10-18 Thread Derrick Stolee
On 10/18/2018 1:23 AM, Junio C Hamano wrote: "Derrick Stolee via GitGitGadget" writes: From: Derrick Stolee The test script t6501-freshen-objects.sh has some tests that care if 'git gc' has any output to stderr. This is intended to say that no warnings occurred related to broken links.

Re: [RFC v2] revision: Add --sticky-default option

2018-10-18 Thread Andreas Gruenbacher
On Thu, 18 Oct 2018 at 08:53, Jeff King wrote: > On Wed, Oct 17, 2018 at 03:49:47PM +0200, Andreas Gruenbacher wrote: > > @@ -2431,7 +2446,11 @@ int setup_revisions(int argc, const char **argv, > > struct rev_info *revs, struct s > > opt->tweak(revs, opt); > > if

How to start contributing

2018-10-18 Thread Πλάτων Κιορπελίδης
Hello, I’m a computer science student and I’m interested in contributing to git. I’ve read the GSoC git page with the ideas and micro-projects as I’m interested in participating next summer. I’ve also read the Documentation at the GitHub mirror. I’ve never worked on such large project and I don’t

Re: On overriding make variables from the environment...

2018-10-18 Thread Junio C Hamano
SZEDER Gábor writes: > So, then it's either 'config.mak', or passing a 'CC=$CC' argument to > _all_ make commands, including those that are not supposed to build > anything, but only run the tests. I find the latter aesthetically not > particularly pleasing. The config.mak file is available

Re: [RFC] revision: Add --sticky-default option

2018-10-18 Thread Junio C Hamano
Andreas Gruenbacher writes: >> > # is --stdin a selector, too? >> > branches | git log --stdin --not origin/master > > Yes, it's a positive selector (since --not doesn't apply to --stdin). But you should be able to do printf "%s\n" ^maint master | git rev-list --stdin Replace the

Re: [RFC] revision: Add --sticky-default option

2018-10-18 Thread Andreas Gruenbacher
On Thu, 18 Oct 2018 at 05:23, Junio C Hamano wrote: > Jeff King writes: > > > I'd probably call it something verbose and boring like > > --use-default-with-uninteresting or --default-on-negative. > > I dunno. > > These two names are improvement, but there needs a hint that the > change we are

Re: [RFC] revision: Add --sticky-default option

2018-10-18 Thread Andreas Gruenbacher
On Thu, 18 Oct 2018 at 08:59, Junio C Hamano wrote: > Jeff King writes: > > Just to play devil's advocate, how about this: > > > > git log --branches=jk/* --not origin/master > > > > Right now that shows nothing if there are no matching branches. But I > > think under the proposed behavior, it

[PATCH v2 4/5] add read_author_script() to libgit

2018-10-18 Thread Phillip Wood
From: Phillip Wood Add read_author_script() to sequencer.c based on the implementation in builtin/am.c and update read_am_author_script() to use read_author_script(). The sequencer code that reads the author script will be updated in the next commit. Signed-off-by: Phillip Wood --- Notes:

Re: On overriding make variables from the environment...

2018-10-18 Thread Johannes Schindelin
Hi Gábor, On Wed, 17 Oct 2018, SZEDER Gábor wrote: > On Tue, Oct 16, 2018 at 03:40:01PM -0700, Jonathan Nieder wrote: > > SZEDER Gábor wrote: > > > On Tue, Oct 16, 2018 at 02:54:56PM -0700, Jonathan Nieder wrote: > > >> SZEDER Gábor wrote: > > > > >>> Our Makefile has lines like these: > > >>>

[PATCH v2 5/5] sequencer: use read_author_script()

2018-10-18 Thread Phillip Wood
From: Phillip Wood Use the new function added in the last commit to read the author script, updating read_env_script() and read_author_ident(). We now have a single code path that reads the author script for am and all flavors of rebase. This changes the behavior of read_env_script() as

[PATCH v2 1/5] am: don't die in read_author_script()

2018-10-18 Thread Phillip Wood
From: Phillip Wood The caller is already prepared to handle errors returned from this function so there is no need for it to die if it cannot read the file. Suggested-by: Eric Sunshine Signed-off-by: Phillip Wood --- builtin/am.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff

[PATCH v2 0/5] am/rebase: share read_author_script()

2018-10-18 Thread Phillip Wood
From: Phillip Wood Thanks to Eric for his feedback on v1. I've rerolled based on that. Patches 1 & 2 are new and try to address some of the concerns Eric raised, particularly the error handling for a badly edited author script. See the notes on patches 4 & 5 for the changes to those (they were

[PATCH v2 3/5] am: rename read_author_script()

2018-10-18 Thread Phillip Wood
From: Phillip Wood Rename read_author_script() in preparation for adding a shared read_author_script() function to libgit. Signed-off-by: Phillip Wood --- builtin/am.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/builtin/am.c b/builtin/am.c index

[PATCH v2 2/5] am: improve author-script error reporting

2018-10-18 Thread Phillip Wood
From: Phillip Wood If there are errors in a user edited author-script there was no indication of what was wrong. This commit adds some specific error messages depending on the problem. It also relaxes the requirement that the variables appear in a specific order in the file to match the behavior

Re: [PATCH v4] branch: introduce --show-current display option

2018-10-18 Thread Johannes Schindelin
Hi Eric, On Wed, 17 Oct 2018, Eric Sunshine wrote: > On Wed, Oct 17, 2018 at 6:18 AM Johannes Schindelin > wrote: > > I realized yesterday that the &&-chain linting we use for every single > > test case takes a noticeable chunk of time: > > > > $ time ./t0006-date.sh --quiet > >

Re: [PATCH 1/1] subtree: make install targets depend on build targets

2018-10-18 Thread Christian Hesse
Junio C Hamano on Thu, 2018/10/18 11:09: > Jonathan Nieder writes: > > > The rule says > > > > install-html: html > > $(INSTALL) -d -m 755 $(DESTDIR)$(htmldir) > > $(INSTALL) -m 644 $^ $(DESTDIR)$(htmldir) > > > > and $^ substitutes to "html" after this change. > > Sorry about that.

Re: [PATCH 0/9] Resending sb/submodule-recursive-fetch-gets-the-tip

2018-10-18 Thread Junio C Hamano
Stefan Beller writes: > This is based on ao/submodule-wo-gitmodules-checked-out. > > This resends origin/sb/submodule-recursive-fetch-gets-the-tip, resolving > the issues pointed out via > origin/xxx/sb-submodule-recursive-fetch-gets-the-tip-in-pu > by basing this series on

Re: [PATCH 1/3] ref-filter: free memory from used_atom

2018-10-18 Thread Оля Тележная
чт, 18 окт. 2018 г. в 9:51, Junio C Hamano : > > Jeff King writes: > > > Presumably it came from the manual comment-style fixup. > > Wow, that was embarrassing. Thanks for catching it. Jeff, thanks a lot! I just sent new version where I fixed all known issues including that comment. > > > > >

[PATCH v2 3/3] ref-filter: free item->value and item->value->s

2018-10-18 Thread Olga Telezhnaya
Release item->value. Initialize item->value->s dynamically and then release its resources. Release some local variables. Final goal of this patch is to reduce number of memory leaks. Signed-off-by: Olga Telezhnaia --- ref-filter.c | 96 +--- 1

[PATCH v2 1/3] ref-filter: free memory from used_atom

2018-10-18 Thread Olga Telezhnaya
Release memory from used_atom variable for reducing number of memory leaks. Signed-off-by: Olga Telezhnaia --- ref-filter.c | 4 1 file changed, 4 insertions(+) diff --git a/ref-filter.c b/ref-filter.c index e1bcb4ca8a197..70f1d13ab3beb 100644 --- a/ref-filter.c +++ b/ref-filter.c @@

[PATCH v2 2/3] ls-remote: release memory instead of UNLEAK

2018-10-18 Thread Olga Telezhnaya
Use ref_array_clear() to release memory instead of UNLEAK macros. Signed-off-by: Olga Telezhnaia --- builtin/ls-remote.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/builtin/ls-remote.c b/builtin/ls-remote.c index 1a25df7ee15b4..6a0cdec30d2d7 100644 ---

Re: [PATCH] config.mak.dev: enable -Wunused-function

2018-10-18 Thread Jeff King
On Thu, Oct 18, 2018 at 03:05:22AM -0400, Jeff King wrote: > diff --git a/config.mak.dev b/config.mak.dev > index 92d268137f..bbeeff44fe 100644 > --- a/config.mak.dev > +++ b/config.mak.dev > @@ -34,7 +34,6 @@ ifeq ($(filter extra-all,$(DEVOPTS)),) > CFLAGS += -Wno-empty-body > CFLAGS +=

[PATCH] config.mak.dev: enable -Wunused-function

2018-10-18 Thread Jeff King
We explicitly omitted -Wunused-function when we added -Wextra, but there is no need: the current code compiles cleanly with it. And it's worth having, since it can let you know when there are cascading effects from a cleanup (e.g., deleting one function lets you delete its static helpers). There

Re: [RFC] revision: Add --sticky-default option

2018-10-18 Thread Junio C Hamano
Jeff King writes: > Just to play devil's advocate, how about this: > > git log --branches=jk/* --not origin/master > > Right now that shows nothing if there are no matching branches. But I > think under the proposed behavior, it would start showing HEAD, which > seems counter-intuitive. > > Or

Re: [RFC v2] revision: Add --sticky-default option

2018-10-18 Thread Jeff King
On Wed, Oct 17, 2018 at 03:49:47PM +0200, Andreas Gruenbacher wrote: > @@ -2431,7 +2446,11 @@ int setup_revisions(int argc, const char **argv, > struct rev_info *revs, struct s > opt->tweak(revs, opt); > if (revs->show_merge) > prepare_show_merge(revs); > -

Re: [PATCH 1/3] ref-filter: free memory from used_atom

2018-10-18 Thread Junio C Hamano
Jeff King writes: > Presumably it came from the manual comment-style fixup. Wow, that was embarrassing. Thanks for catching it. > > With that fix, the tests run fine for me under ASan/UBSan (with the > exception of t5310, but that's fixed already in a parallel topic). > > -Peff

Re: [RFC] revision: Add --sticky-default option

2018-10-18 Thread Jeff King
On Thu, Oct 18, 2018 at 12:23:26PM +0900, Junio C Hamano wrote: > Jeff King writes: > > > I'd probably call it something verbose and boring like > > --use-default-with-uninteresting or --default-on-negative. > > I dunno. > > These two names are improvement, but there needs a hint that the >

Re: [PATCH v1 1/2] reset: don't compute unstaged changes after reset when --quiet

2018-10-18 Thread Jeff King
On Thu, Oct 18, 2018 at 12:40:48PM +0900, Junio C Hamano wrote: > Jeff King writes: > > > Whereas for the new config variable, you'd probably set it not because > > you want it quiet all the time, but because you want to get some time > > savings. So there it does make sense to me to explain. >

Re: [PATCH 1/3] ref-filter: free memory from used_atom

2018-10-18 Thread Jeff King
On Fri, Oct 12, 2018 at 11:35:01AM +0900, Junio C Hamano wrote: > Junio C Hamano writes: > > > Olga Telezhnaya writes: > > These three patches seem to cause t6300 to fail with an attempt to > free an invalid pointer in "git for-each-ref --format='%(push)'" > (6300.25) I dug into this a bit.

Re: [PATCH v2 2/2] merge-recursive: avoid showing conflicts with merge branch before HEAD

2018-10-18 Thread Junio C Hamano
Elijah Newren writes: > @@ -1283,6 +1302,18 @@ static int merge_mode_and_contents(struct > merge_options *o, > const char *branch2, > struct merge_file_info *result) > { > + if (o->branch1 != branch1) { > + /* >