Re: What's cooking in git.git (Jan 2019, #02; Tue, 15)

2019-01-15 Thread Junio C Hamano
Junio C Hamano writes: > * js/commit-graph-read-overflow-fix (2019-01-15) 3 commits > - Makefile: correct example fuzz build > - commit-graph: fix buffer read-overflow > - commit-graph, fuzz: add fuzzer for commit-graph > > The code to read the commit-graph file was not prepared to see a > c

Re: [PATCH 1/5] compat/obstack: fix -Wcast-function-type warnings

2019-01-15 Thread Junio C Hamano
SZEDER Gábor writes: >> Well, first I'm not sure what changes Ævar meant to be backported. >> Back then I briefly glanced at glibc's gitweb [1], but didn't see >> anything remotely relevant to these compiler errors. > > So, I looked at the gnulib repository, where glibc got it's > obstack.{c,h} f

Re: [PATCH v2 0/4] Sideband the whole fetch v2 response

2019-01-15 Thread Junio C Hamano
Jonathan Tan writes: > We could make the caller of demultiplex_sideband() store the outbuf, but > at this point, it might be better to refactor packet_reader into its own > file and have it depend on both pkt-line.h and sideband.h. I do not know or too deeply care about the pkt-line / sideband d

Re: What's cooking in git.git (Jan 2019, #02; Tue, 15)

2019-01-15 Thread Junio C Hamano
Eric Wong writes: > Junio C Hamano wrote: >> * ew/ban-strncat (2019-01-02) 1 commit >> (merged to 'next' on 2019-01-08 at 3bba2ae2bb) >> + banned.h: mark strncat() as banned > > Can you squash in Eric Sunshine's speling fix in my commit message? > (s/iself/itself/) > https://public-inbox.org/

Re: What's cooking in git.git (Jan 2019, #02; Tue, 15)

2019-01-15 Thread Junio C Hamano
Duy Nguyen writes: > On Wed, Jan 16, 2019 at 5:31 AM Junio C Hamano wrote: >> [Discarded] >> >> * nd/backup-log (2018-12-10) 24 commits > > Discarding this series is not at all a problem. But should I be > worried about the silence on this one? Perhaps nobody is interested in > the idea and it's

Re: What's cooking in git.git (Jan 2019, #02; Tue, 15)

2019-01-15 Thread Eric Wong
Junio C Hamano wrote: > * ew/ban-strncat (2019-01-02) 1 commit > (merged to 'next' on 2019-01-08 at 3bba2ae2bb) > + banned.h: mark strncat() as banned Can you squash in Eric Sunshine's speling fix in my commit message? (s/iself/itself/) https://public-inbox.org/git/CAPig+cR2w3S==3-zstjmuB9jw4H

Re: Git bomb still present (at least in SUSE)?

2019-01-15 Thread Jonathan Nieder
(moving conversation to the main Git list. I hope that's okay.) Hi, Jeff King wrote: > On Tue, Jan 15, 2019 at 02:35:29PM +0100, Marketa Calabkova wrote: >> meggy@irbis:/tmp/test> /usr/bin/time git clone >> https://github.com/Katee/git-bomb.git >> Cloning into 'git-bomb'... >> remote: Enumeratin

Re: [Bug report] Git incorrectly selects language in macos

2019-01-15 Thread Jonathan Nieder
Nate Weaver wrote: > Upon further digging, this is an issue in gettext's code on macOS: > The function _nl_language_preferences_default (in langprefs.c) specifically > breaks early when it sees the literal string "en" in the list (from the > "AppleLanguages" defaults key), but not when it gets "en

Re: [Bug report] Git incorrectly selects language in macos

2019-01-15 Thread Jonathan Nieder
Nate Weaver wrote: >>> On Fri, Sep 14, 2018 at 10:20 PM Niko Dzhus wrote: Looks like the issue appeared after updating git from brew. [...] A quick search revealed that brew changed how it builds git recently. I think, it just didn't include i18n by default before, so I never

Re: [PATCH 1/5] compat/obstack: fix -Wcast-function-type warnings

2019-01-15 Thread Jonathan Nieder
Hi, SZEDER Gábor wrote: > On Fri, Jan 11, 2019 at 07:51:18PM +0100, SZEDER Gábor wrote: >> As to re-importing obstack.{c,h} from upstream, we've made some >> portability fixes to these files, and neither of the commit messages >> of those fixes mention that they are backports from upstream. OTOH

Re: [PATCH v2 0/4] Sideband the whole fetch v2 response

2019-01-15 Thread Jonathan Tan
> > Ah...yes, you're right. I forgot to build before running the tests. I'll > > take a look. > > Thanks. Thanks once again for taking a look. It turns out that it's because progress messages are sometimes split across PKT-LINEs depending on your luck, and we need to retain the "leftover" on a \2

Re: What's cooking in git.git (Jan 2019, #02; Tue, 15)

2019-01-15 Thread Duy Nguyen
On Wed, Jan 16, 2019 at 5:31 AM Junio C Hamano wrote: > [Discarded] > > * nd/backup-log (2018-12-10) 24 commits Discarding this series is not at all a problem. But should I be worried about the silence on this one? Perhaps nobody is interested in the idea and it's better to drop it? -- Duy

Re: [PATCH 1/5] compat/obstack: fix -Wcast-function-type warnings

2019-01-15 Thread SZEDER Gábor
On Fri, Jan 11, 2019 at 07:51:18PM +0100, SZEDER Gábor wrote: > On Fri, Jan 11, 2019 at 10:03:01AM -0800, Junio C Hamano wrote: > > SZEDER Gábor writes: > > > > > On Thu, Jan 10, 2019 at 01:22:00PM -0800, Junio C Hamano wrote: > > >> Ævar Arnfjörð Bjarmason writes: > > >> ... > > >> > I.e. is t

Re: [PATCH v3 0/2] support for filtering trees and blobs based on depth

2019-01-15 Thread Junio C Hamano
Junio C Hamano writes: > This is turning out to be messier than I like. > > The topic is tangled with too many things in flight and I think I > reduced its dependencies down to nd/the-index and > sb/more-repo-in-api plus then-current tip of master (and that is why > it is based on a1411cecc7), bu

Re: [PATCH v3 0/2] support for filtering trees and blobs based on depth

2019-01-15 Thread Junio C Hamano
Jonathan Tan writes: >> This applies suggestions from Jonathan Tan and Junio. These are mostly >> stylistic and readability changes, although there is also an added test case >> in t/t6112-rev-list-filters-objects.sh which checks for the scenario when >> filtering which would exclude a blob, but

Re: What's cooking in git.git (Jan 2019, #02; Tue, 15)

2019-01-15 Thread Junio C Hamano
Denton Liu writes: > The current patch should be kicked out in favour of the new revision, > v5 [1]. It hasn't been reviewed yet, though, so I expect some revisions > before it's finalised. Thanks. > After our discussion here[2], I resubmitted a new patch describing the > use-case of the featur

Re: [PATCH v2 0/4] Sideband the whole fetch v2 response

2019-01-15 Thread Junio C Hamano
Jonathan Tan writes: >> Jonathan Tan writes: >> >> >> Jonathan Tan writes: >> >> >> >> > Like v1, this is on origin/ms/packet-err-check. >> >> >> >> By the way, when merged to 'pu' as one of the earlier topic, t5409 >> >> starts to fail under --stress. >> >> >> >> $ git checkout 'origin/p

Re: [PATCH v2 0/4] Sideband the whole fetch v2 response

2019-01-15 Thread Jonathan Tan
> Jonathan Tan writes: > > >> Jonathan Tan writes: > >> > >> > Like v1, this is on origin/ms/packet-err-check. > >> > >> By the way, when merged to 'pu' as one of the earlier topic, t5409 > >> starts to fail under --stress. > >> > >>$ git checkout 'origin/pu^{/^Merge branch .jt/fetch-v2-s

Re: What's cooking in git.git (Jan 2019, #02; Tue, 15)

2019-01-15 Thread Denton Liu
On Tue, Jan 15, 2019 at 02:31:06PM -0800, Junio C Hamano wrote: > * dl/merge-cleanup-scissors-fix (2018-11-21) 2 commits > - merge: add scissors line on merge conflict > - t7600: clean up 'merge --squash c3 with c7' test > > The list of conflicted paths shown in the editor while concluding a >

Re: [PATCH v2 0/4] Sideband the whole fetch v2 response

2019-01-15 Thread Junio C Hamano
Jonathan Tan writes: >> Jonathan Tan writes: >> >> > Like v1, this is on origin/ms/packet-err-check. >> >> By the way, when merged to 'pu' as one of the earlier topic, t5409 >> starts to fail under --stress. >> >> $ git checkout 'origin/pu^{/^Merge branch .jt/fetch-v2-sideband}' >>

Re: [PATCH v5 3/3] Makefile: correct example fuzz build

2019-01-15 Thread Junio C Hamano
Josh Steadmon writes: > Sorry for being too vague. The problem with only including FUZZ_CXXFLAGS > is that all the .c files need to be compiled with coverage tracking > enabled, not just the fuzzer itself. OK. > We could fix the comment by setting both CFLAGS and FUZZ_CXXFLAGS, but > since we'r

What's cooking in git.git (Jan 2019, #02; Tue, 15)

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

[PATCH v6 3/3] Makefile: correct example fuzz build

2019-01-15 Thread Josh Steadmon
The comment explaining how to build the fuzzers was broken in 927c77e7d4d ("Makefile: use FUZZ_CXXFLAGS for linking fuzzers", 2018-11-14). When building fuzzers, all .c files must be compiled with coverage tracing enabled. This is not possible when using only FUZZ_CXXFLAGS, as that flag is only ap

[PATCH v6 1/3] commit-graph, fuzz: Add fuzzer for commit-graph

2019-01-15 Thread Josh Steadmon
Break load_commit_graph_one() into a new function, parse_commit_graph(). The latter function operates on arbitrary buffers, which makes it suitable as a fuzzing target. Since parse_commit_graph() is only called by load_commit_graph_one() (and the fuzzer described below), we omit error messages that

[PATCH v6 2/3] commit-graph: fix buffer read-overflow

2019-01-15 Thread Josh Steadmon
fuzz-commit-graph identified a case where Git will read past the end of a buffer containing a commit graph if the graph's header has an incorrect chunk count. A simple bounds check in parse_commit_graph() prevents this. Signed-off-by: Josh Steadmon --- commit-graph.c | 14 --

[PATCH v6 0/3] Add commit-graph fuzzer and fix buffer overflow

2019-01-15 Thread Josh Steadmon
Add a new fuzz test for the commit graph and fix a buffer read-overflow that it discovered. Additionally, fix the Makefile instructions for building fuzzers. Changes since V5: * Conform to commit message standards for the 1st patch in the series. * Clarify commit message for the 3rd patch in t

Inconsistent Behavior using 'Reference'

2019-01-15 Thread Bret Barkelew
The repo/workspace (not the cache, the code we’re going to build) that we’re trying to initialize uses several submodules. We’ve notice that if we use ‘clone’ first on the parent repository, then call ‘git submodule update --init --recursive --reference ’ inside the parent repository, the same path

Re: [PATCH v2 0/4] Sideband the whole fetch v2 response

2019-01-15 Thread Jonathan Tan
> Jonathan Tan writes: > > > Like v1, this is on origin/ms/packet-err-check. > > By the way, when merged to 'pu' as one of the earlier topic, t5409 > starts to fail under --stress. > > $ git checkout 'origin/pu^{/^Merge branch .jt/fetch-v2-sideband}' > $ make > $ cd t && sh ./

Re: [PATCH v5 3/3] Makefile: correct example fuzz build

2019-01-15 Thread Josh Steadmon
On 2019.01.15 12:39, Junio C Hamano wrote: > Josh Steadmon writes: > > > Signed-off-by: Josh Steadmon > > --- > > Makefile | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/Makefile b/Makefile > > index 6b72f37c29..bbcfc2bc9f 100644 > > --- a/Makefile > > +++ b/Make

Re: Students projects: looking for small and medium project ideas

2019-01-15 Thread Alban Gruin
Hi Matthieu, Le 14/01/2019 à 18:53, Matthieu Moy a écrit : > Hi, > > I haven't been active for a while on this list, but for those who don't > know me, I'm a CS teacher and I'm regularly offering my students to > contribute to open-source projects as part of their school projects. A > few nice fe

Re: [PATCH v2 0/4] Sideband the whole fetch v2 response

2019-01-15 Thread Junio C Hamano
Jonathan Tan writes: > Like v1, this is on origin/ms/packet-err-check. By the way, when merged to 'pu' as one of the earlier topic, t5409 starts to fail under --stress. $ git checkout 'origin/pu^{/^Merge branch .jt/fetch-v2-sideband}' $ make $ cd t && sh ./t5409-col*.sh

Re: [PATCH/RFC v1 1/1] test-lint: sed -E (or -a, -l) are not portable

2019-01-15 Thread Eric Sunshine
On Tue, Jan 15, 2019 at 3:31 PM wrote: > From `man sed` (on a Mac OS X box): > The -E, -a and -i options are non-standard FreeBSD extensions and may not be > available > on other operating systems. > [...] > To be on the safe side, don't allow it. > > Signed-off-by: Torsten Bögershausen > --- >

Re: [PATCH 0/6] getenv() timing fixes

2019-01-15 Thread Junio C Hamano
Jeff King writes: > So actually, that's pretty easy to do without writing much code at all. > Something like: > > #define xgetenv(name) strintern(getenv(name)) > > It means we're effectively storing the environment twice in the worst > case, but that's probably not a big deal. Unless we have a

Re: [PATCH v5 3/3] Makefile: correct example fuzz build

2019-01-15 Thread Junio C Hamano
Josh Steadmon writes: > Signed-off-by: Josh Steadmon > --- > Makefile | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/Makefile b/Makefile > index 6b72f37c29..bbcfc2bc9f 100644 > --- a/Makefile > +++ b/Makefile > @@ -3104,7 +3104,7 @@ cover_db_html: cover_db > # An exam

Re: [Bug report] Git incorrectly selects language in macos

2019-01-15 Thread Eric Sunshine
On Tue, Jan 15, 2019 at 2:06 PM Nate Weaver wrote: > Nevermind: I've been informed that this has already been fixed on the git > trunk > for gettext, and will be in the next release. > > (See: https://savannah.gnu.org/bugs/?49560) Thanks for the follow-up report. It's good to know that this is f

Re: [PATCH v5 1/3] commit-graph, fuzz: Add fuzzer for commit-graph

2019-01-15 Thread Junio C Hamano
Josh Steadmon writes: > Breaks load_commit_graph_one() into a new function, s/Breaks/Break/ > parse_commit_graph(). The latter function operates on arbitrary buffers, > which makes it suitable as a fuzzing target. Since parse_commit_graph() > is only called by load_commit_graph_one() (and the f

[PATCH/RFC v1 1/1] test-lint: sed -E (or -a, -l) are not portable

2019-01-15 Thread tboegi
From: Torsten Bögershausen From `man sed` (on a Mac OS X box): The -E, -a and -i options are non-standard FreeBSD extensions and may not be available on other operating systems. From `man sed` on a Linux box: REGULAR EXPRESSIONS POSIX.2 BREs should be supported, but they aren't completel

[PATCH v5 3/3] Makefile: correct example fuzz build

2019-01-15 Thread Josh Steadmon
Signed-off-by: Josh Steadmon --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 6b72f37c29..bbcfc2bc9f 100644 --- a/Makefile +++ b/Makefile @@ -3104,7 +3104,7 @@ cover_db_html: cover_db # An example command to build against libFuzzer from L

[PATCH v5 2/3] commit-graph: fix buffer read-overflow

2019-01-15 Thread Josh Steadmon
fuzz-commit-graph identified a case where Git will read past the end of a buffer containing a commit graph if the graph's header has an incorrect chunk count. A simple bounds check in parse_commit_graph() prevents this. Signed-off-by: Josh Steadmon --- commit-graph.c | 14 --

[PATCH v5 0/3] Add commit-graph fuzzer and fix buffer overflow

2019-01-15 Thread Josh Steadmon
Add a new fuzz test for the commit graph and fix a buffer read-overflow that it discovered. Additionally, fix the Makefile instructions for building fuzzers. Changes since V4: * Ensure that corrupt_graph_and_verify() in t5318 changes to the proper directory before accessing any files. Chang

[PATCH v5 1/3] commit-graph, fuzz: Add fuzzer for commit-graph

2019-01-15 Thread Josh Steadmon
Breaks load_commit_graph_one() into a new function, parse_commit_graph(). The latter function operates on arbitrary buffers, which makes it suitable as a fuzzing target. Since parse_commit_graph() is only called by load_commit_graph_one() (and the fuzzer described below), we omit error messages tha

Re: [PATCH v4 2/3] commit-graph: fix buffer read-overflow

2019-01-15 Thread Josh Steadmon
On 2019.01.12 11:57, SZEDER Gábor wrote: > On Thu, Dec 13, 2018 at 11:43:57AM -0800, Josh Steadmon wrote: > > diff --git a/t/t5318-commit-graph.sh b/t/t5318-commit-graph.sh > > index 5fe21db99f..a1b5a75882 100755 > > --- a/t/t5318-commit-graph.sh > > +++ b/t/t5318-commit-graph.sh > > @@ -366,21 +36

Re: [PATCH v2 0/4] Sideband the whole fetch v2 response

2019-01-15 Thread Junio C Hamano
Jonathan Tan writes: > @@ -474,6 +474,7 @@ void packet_reader_init(struct packet_reader *reader, int > fd, > reader->buffer = packet_buffer; > reader->buffer_size = sizeof(packet_buffer); > reader->options = options; > + reader->me = "git"; > } This was somewhat unexpecte

Re: [PATCH 0/6] getenv() timing fixes

2019-01-15 Thread Jeff King
On Tue, Jan 15, 2019 at 02:41:42PM -0500, Jeff King wrote: > The more involved one (that doesn't pass along memory ownership) is > something like: > > static struct hashmap env_cache; > > const char *getenv_safe(const char *name) > { > > if (e = hashmap_get(&env_cache, name)) >

New to git. Need help!

2019-01-15 Thread Kaustubh Shankar
Hello everyone, I'm new to this mailing list and have also joined the IRC channel recently. I want to start contributing by possibly fixing small bugs or errors. I have gone through the suggested guidelines and documentation but it is too large and I don't know where to start. If anybody could hel

Re: [PATCH 0/6] getenv() timing fixes

2019-01-15 Thread Jeff King
On Tue, Jan 15, 2019 at 11:32:56AM -0800, Junio C Hamano wrote: > Jeff King writes: > > > On Sat, Jan 12, 2019 at 10:51:42AM -0800, Stefan Beller wrote: > > > >> > I wonder, and not as "you should do this" feedback on this series, just > >> > >> There is a getenv_safe() in environment.c, but I

[PATCH v2 2/4] sideband: reverse its dependency on pkt-line

2019-01-15 Thread Jonathan Tan
A subsequent patch will teach struct packet_reader a new field that, if set, instructs it to interpret read data as multiplexed. This will create a dependency from pkt-line to sideband. To avoid a circular dependency, split recv_sideband() into 2 parts: the reading loop (left in recv_sideband()) a

[PATCH v2 0/4] Sideband the whole fetch v2 response

2019-01-15 Thread Jonathan Tan
Like v1, this is on origin/ms/packet-err-check. Thanks, Junio, for your reviews. Jonathan Tan (4): pkt-line: introduce struct packet_writer sideband: reverse its dependency on pkt-line {fetch,upload}-pack: sideband v2 fetch response tests: define GIT_TEST_SIDEBAND_ALL Documentation/tech

[PATCH v2 3/4] {fetch,upload}-pack: sideband v2 fetch response

2019-01-15 Thread Jonathan Tan
Currently, a response to a fetch request has sideband support only while the packfile is being sent, meaning that the server cannot send notices until the start of the packfile. Extend sideband support in protocol v2 fetch responses to the whole response. upload-pack will advertise it if the uploa

[PATCH v2 1/4] pkt-line: introduce struct packet_writer

2019-01-15 Thread Jonathan Tan
A future patch will allow the client to request multiplexing of the entire fetch response (and not only during packfile transmission), which in turn allows the server to send progress and keepalive messages at any time during the response. It will be convenient for a future patch if writing option

[PATCH v2 4/4] tests: define GIT_TEST_SIDEBAND_ALL

2019-01-15 Thread Jonathan Tan
Define a GIT_TEST_SIDEBAND_ALL environment variable meant to be used from tests. When set to true, this overrides uploadpack.allowsidebandall to true, allowing the entire test suite to be run as if this configuration is in place for all repositories. As of this patch, all tests pass whether GIT_TE

Re: [PATCH 0/6] getenv() timing fixes

2019-01-15 Thread Stefan Beller
On Tue, Jan 15, 2019 at 11:32 AM Junio C Hamano wrote: > > Jeff King writes: > > > On Sat, Jan 12, 2019 at 10:51:42AM -0800, Stefan Beller wrote: > > > >> > I wonder, and not as "you should do this" feedback on this series, just > >> > >> There is a getenv_safe() in environment.c, but I guess a x

Broken interactive rebase text after some UTF-8 characters

2019-01-15 Thread Michal Nowak
Hello, on OpenIndiana 2018.10 (illumos kernel) line of the interactive rebase text after a particular name (Gergő Mihály Doma) is broken: pick 1ea94c756c 10202 loader: use screen-#rows to find bottom left co-ordinates Reviewed by: Toomas Soome Reviewed by: Gergő Mihály Doma Approved by: Ro

Re: [PATCH 0/6] getenv() timing fixes

2019-01-15 Thread Junio C Hamano
Jeff King writes: > On Sat, Jan 12, 2019 at 10:51:42AM -0800, Stefan Beller wrote: > >> > I wonder, and not as "you should do this" feedback on this series, just >> >> There is a getenv_safe() in environment.c, but I guess a xgetenv() that >> takes the same parameters as getenv() is better for e

Re: [PATCH 2/6] commit: copy saved getenv() result

2019-01-15 Thread Jeff King
On Tue, Jan 15, 2019 at 11:25:45AM -0800, Stefan Beller wrote: > > Stefan was routinely running coverity, though I haven't seen results in > > a while. I think we should make sure that continues, as it did turn up > > some useful results (and a lot of cruft, too, but on the whole I have > > found

Re: [PATCH v2 2/3] setup: do not use invalid `repository_format`

2019-01-15 Thread Jeff King
On Mon, Jan 14, 2019 at 07:34:56PM +0100, Martin Ågren wrote: > If `read_repository_format()` encounters an error, `format->version` > will be -1 and all other fields of `format` will be undefined. However, > in `setup_git_directory_gently()`, we use `repo_fmt.hash_algo` > regardless of the value

Re: [PATCH 2/6] commit: copy saved getenv() result

2019-01-15 Thread Stefan Beller
> Stefan was routinely running coverity, though I haven't seen results in > a while. I think we should make sure that continues, as it did turn up > some useful results (and a lot of cruft, too, but on the whole I have > found it useful). coverity had some outage (end of last year?-ish) and then c

[RFC PATCH] gitk: Don't mark files with new time-stamp as modified

2019-01-15 Thread Jacob Kroon
Run 'git update-index --refresh' in order to get rid of false positives about unstaged changes in files. To reproduce: 1. git status # no local changes 2. touch 3. gitk # file shows up as unstaged modified file 4. git update-index --refresh 5. gitk # file does not show up See link below for more

Re: [PATCH 3/4] {fetch,upload}-pack: sideband v2 fetch response

2019-01-15 Thread Jonathan Tan
> OK, so the "fetch" side enables sideband-all any time it knows that > the other side supports it. > > It feels a bit strange at the logical level that reader.me is set > only when we are going to talk over "sideband-all". I know that at > the implementation level, reader.me is only looked at wh

Re: [PATCH 2/6] commit: copy saved getenv() result

2019-01-15 Thread Jeff King
On Tue, Jan 15, 2019 at 03:05:50PM +0100, Johannes Schindelin wrote: > > But certainly it would not be the first such instance in our code base. > > Just because a lot of our code has grown historically does not mean that > we need to add code that shares the same shortcomings. FREE_AND_NULL() wa

Re: [PATCH 0/6] getenv() timing fixes

2019-01-15 Thread Jeff King
On Sat, Jan 12, 2019 at 10:51:42AM -0800, Stefan Beller wrote: > > I wonder, and not as "you should do this" feedback on this series, just > > There is a getenv_safe() in environment.c, but I guess a xgetenv() that > takes the same parameters as getenv() is better for ease of use. Yes, but it pu

Re: [PATCH 0/6] getenv() timing fixes

2019-01-15 Thread Jeff King
On Sat, Jan 12, 2019 at 12:31:21PM +0100, Ævar Arnfjörð Bjarmason wrote: > > So anyway. Here are a handful of what seem like pretty low-hanging > > fruit. Beyond the first one, I'm not sure if they're triggerable, but > > they're easy to fix. There are 100+ grep matches that I _didn't_ audit, > >

Re: [Bug report] Git incorrectly selects language in macos

2019-01-15 Thread Nate Weaver
--Nate Weaver (Wevah) > On Jan 15, 2019, at 10:43:48, Nate Weaver wrote: > >> On Jan 15, 2019, at 09:35:52, Nate Weaver wrote: >> >>> On Sep 16, 2018, at 02:15:33, Eric Sunshine wrote: >>> >>> On Fri, Sep 14, 2018 at 10:20 PM Niko Dzhus wrote: Looks like the issue appeared after upda

Re: [PATCH 1/1] add --edit: truncate the patch file

2019-01-15 Thread Junio C Hamano
"Johannes Schindelin via GitGitGadget" writes: > Of course, this file should not be left lying around. But at least in > one case, there was a stale copy, larger than the current diff. So the > result was a corrupt diff. After creating the fd (now with O_TRUNC), we die in a few places. - Failu

Re: [PATCH 0/1] Be careful about left-over files from git add --edit runs

2019-01-15 Thread Junio C Hamano
"Johannes Schindelin via GitGitGadget" writes: > J Wyman reported almost a year ago (and I fixed this issue in Git for > Windows around that time) that the .git/ADD_EDIT.patch file might still lie > around at the beginning of git add --edit from previous runs, and if the new > patch is smaller th

Re: [PATCH v2 0/2] Accept error packets in any context

2019-01-15 Thread Junio C Hamano
Jonathan Nieder writes: > It's handled fine by the merge 7be333a6362882e8ffceef3de830dbbfafe5 > (Merge branch 'js/smart-http-detect-remote-error' into pu, 2019-01-11), > though. So I think what is in "pu" is okay, without shooting any series > down. Yeah, I think I wiggled that topic branch

Re: [PATCH 2/4] sideband: reverse its dependency on pkt-line

2019-01-15 Thread Jonathan Tan
> Junio C Hamano writes: > > > Lack of corresponding comment bothers readers. In all of > > REMOTE_ERROR, PROGRESS and PROTOCOL_ERROR cases, the other helper > > stuffs the message in outbuf in "switch (band) { ... }" and writes > > it out with xwrite(2, outbuf.buf, outbuf.len) [*1*], so I can s

Re: [PATCH] new-workdir: Never try to recurse into submodules on the initial checkout.

2019-01-15 Thread Junio C Hamano
Jonathan Nieder writes: > That said, it's better than nothing at all, which is why Marc proposes > making it not attempt to check out the submodules right away, instead > permitting the user to make the best of things. OK. Then I do agree with the hardcoded "--no-recurse" given to "git checkout

Re: [PATCH 2/4] sideband: reverse its dependency on pkt-line

2019-01-15 Thread Jonathan Tan
> Jonathan Tan writes: > > > +int recv_sideband(const char *me, int in_stream, int out) > > +{ > > + char buf[LARGE_PACKET_MAX + 1]; > > + int retval = 0; > > + int len; > > + > > + while (1) { > > + len = packet_read(in_stream, NULL, NULL, buf, LARGE_PACKET_MAX, > > 0); > > +

Re: [PATCH] revision.c: fix sparse warnings (sparse algorithm)

2019-01-15 Thread Junio C Hamano
Derrick Stolee writes: > On 1/13/2019 3:55 PM, Ramsay Jones wrote: >> Signed-off-by: Ramsay Jones >> --- >> >> Hi Derrick, >> >> If you need to re-roll your 'ds/push-sparse-tree-walk' branch, could >> you please squash this into the relevant patch [commit 9949aaeef4 >> ("revision: implement spar

Re: [PATCH v4 3/6] pack-objects: add --sparse option

2019-01-15 Thread Junio C Hamano
Derrick Stolee writes: > Instead of "we must stay dumb" I wanted to say "we are not dumber (in > this case)". Thanks, then what we aim for are compatible ;-) I do agree that we should make sure we will not ever become overly stupid. > To properly test "these objects are included," do we have a

Re: [PATCH 1/4] pkt-line: introduce struct packet_writer

2019-01-15 Thread Jonathan Tan
> Jonathan Tan writes: > > The patch itself look quite noisy, but in esssense, at the lowest > level we used to have a single format_packet() that was used to > write out normal payload and an error message prefixed with "ERR "; > now the users of the function are updated to call one of the two >

Re: [PATCH v2 0/5] tree-walk object_id refactor

2019-01-15 Thread Junio C Hamano
"brian m. carlson" writes: > There are a small number of places in our codebase where we cast a > buffer of unsigned char to a struct object_id pointer. When we have > GIT_MAX_RAWSZ set to 32 (because we have SHA-256), one of these places > (the buffer for tree objects) can lead to us copying too

Re: [PATCH 0/8] WIP: trace2: a new trace facility

2019-01-15 Thread Jeff Hostetler
On 1/14/2019 8:05 PM, Jonathan Nieder wrote: Hi, Jeff Hostetler wrote: This patch series contains a new trace2 facility that hopefully addresses the recent trace- and structured-logging-related discussions. The intent is to eventually replace the existing trace_ routines (or to route them t

Re: [Bug report] Git incorrectly selects language in macos

2019-01-15 Thread Nate Weaver
> On Jan 15, 2019, at 09:35:52, Nate Weaver wrote: > >> On Sep 16, 2018, at 02:15:33, Eric Sunshine wrote: >> >> On Fri, Sep 14, 2018 at 10:20 PM Niko Dzhus wrote: >>> Looks like the issue appeared after updating git from brew. >>> >>> A quick search revealed that brew changed how it builds g

Re: [PATCH 6/7] Git.pm: introduce environment variable GIT_TEST_PRETEND_TTY

2019-01-15 Thread Phillip Wood
On 15/01/2019 13:50, Johannes Schindelin wrote: Hi Phillip, On Mon, 14 Jan 2019, Phillip Wood wrote: Hi Salvica/Johannes Close ;-) Sorry Slavica On 20/12/2018 12:09, Slavica Djukic via GitGitGadget wrote: From: Slavica Djukic To enable testing the colored output on Windows, enable T

Re: [Bug report] Git incorrectly selects language in macos

2019-01-15 Thread Nate Weaver
> On Sep 16, 2018, at 02:15:33, Eric Sunshine wrote: > > On Fri, Sep 14, 2018 at 10:20 PM Niko Dzhus wrote: >> Looks like the issue appeared after updating git from brew. >> >> A quick search revealed that brew changed how it builds git recently. >> I think, it just didn't include i18n by defau

[PATCH 1/1] add --edit: truncate the patch file

2019-01-15 Thread Johannes Schindelin via GitGitGadget
From: Johannes Schindelin If there is already a .git/ADD_EDIT.patch file, we fail to truncate it properly, which could result in very funny errors. Of course, this file should not be left lying around. But at least in one case, there was a stale copy, larger than the current diff. So the result

[PATCH 0/1] Be careful about left-over files from git add --edit runs

2019-01-15 Thread Johannes Schindelin via GitGitGadget
J Wyman reported almost a year ago (and I fixed this issue in Git for Windows around that time) that the .git/ADD_EDIT.patch file might still lie around at the beginning of git add --edit from previous runs, and if the new patch is smaller than the old one, the resulting diff is obviously corrupt.

Re: [PATCH] new-workdir: Never try to recurse into submodules on the initial checkout.

2019-01-15 Thread Marc Branchaud
On 2019-01-14 4:58 p.m., Jonathan Nieder wrote: Hi, Junio C Hamano wrote: Jonathan Nieder writes: Marc Branchaud wrote: The new workdir is empty before the checkout, so attempts to recurse into a non-existent submodule directory fail. Signed-off-by: Marc Branchaud --- Thanks for report

Re: [PATCH] new-workdir: Never try to recurse into submodules on the initial checkout.

2019-01-15 Thread Marc Branchaud
On 2019-01-14 4:34 p.m., Jonathan Nieder wrote: Hi, Marc Branchaud wrote: The new workdir is empty before the checkout, so attempts to recurse into a non-existent submodule directory fail. Signed-off-by: Marc Branchaud --- Thanks for reporting. Can you describe the error message when it f

Re: [PATCH v4 3/6] pack-objects: add --sparse option

2019-01-15 Thread Derrick Stolee
On 1/11/2019 5:30 PM, Junio C Hamano wrote: "Derrick Stolee via GitGitGadget" writes: From: Derrick Stolee Add a '--sparse' option flag to the pack-objects builtin. This allows the user to specify that they want to use the new logic for walking trees. This logic currently does not differ fro

[PATCHv2] new-workdir: Never try to recurse into submodules on the initial checkout.

2019-01-15 Thread Marc Branchaud
The new workdir is empty before the checkout, so attempts to recurse into a non-existent submodule directory fail. Signed-off-by: Marc Branchaud --- Changed to use --no-recurse-submodules instead of -c submodule.recurse=false, as Jonathan suggested. M. contrib/workdir/git-new-

Re: [PATCH] revision.c: fix sparse warnings (sparse algorithm)

2019-01-15 Thread Derrick Stolee
On 1/13/2019 3:55 PM, Ramsay Jones wrote: Signed-off-by: Ramsay Jones --- Hi Derrick, If you need to re-roll your 'ds/push-sparse-tree-walk' branch, could you please squash this into the relevant patch [commit 9949aaeef4 ("revision: implement sparse algorithm", 2018-12-14)]. This commit cause

'git add .' failing to stage files in OS X

2019-01-15 Thread Lewis Cawthorne
I'm having a problem on my MacBook. When I do `git add .` and then do `git status`, all my files in the current directory and subdirectory remain untracked. I'm not sure if it's a bug in the OS X version of git I'm using (I tried upgrading) or something specific to the setup on my Mac (I've tried

Re: [PATCH 2/6] commit: copy saved getenv() result

2019-01-15 Thread Johannes Schindelin
Hi Peff, On Sat, 12 Jan 2019, Jeff King wrote: > On Fri, Jan 11, 2019 at 07:07:15PM -0800, Junio C Hamano wrote: > > > > diff --git a/builtin/commit.c b/builtin/commit.c > > > index 004b816635..7d2e0b61e5 100644 > > > --- a/builtin/commit.c > > > +++ b/builtin/commit.c > > > @@ -351,7 +351,7 @@

Worktree creation race

2019-01-15 Thread Marketa Calabkova
Hello, I am writing to report a bug. The original report is from my colleague, I am also providing his suggestions. There is insufficient locking for worktree addition. Adding worktree may fail. The problem is that git reads the directory entries in $GIT_DIR/worktrees, finds a worktree name th

Re: [PATCH 6/7] Git.pm: introduce environment variable GIT_TEST_PRETEND_TTY

2019-01-15 Thread Johannes Schindelin
Hi Phillip, On Mon, 14 Jan 2019, Phillip Wood wrote: > Hi Salvica/Johannes Close ;-) > On 20/12/2018 12:09, Slavica Djukic via GitGitGadget wrote: > > From: Slavica Djukic > > > > To enable testing the colored output on Windows, enable TTY > > by using environment variable GIT_TEST_PRETEND_TT

Re: t0021-conversion: flaky filter process test

2019-01-15 Thread Johannes Schindelin
Hi, On Fri, 11 Jan 2019, SZEDER Gábor wrote: > [...] > > Now, in our tests commands are executed in rapid succession, so it's > highly probable that those files are racily clean, and, consequently, > 'git checkout' has to look at the contents of the files, meaning that > it has to run the clean

race condition after calling git reset --keep

2019-01-15 Thread Thibault Kruse
Hi, trying to wrap git, I ran into this problem using git 2.17.1 on Ubuntu 18.04.1. When fast-forwarding like this: git reset --keep remotes/origin/master sometimes git returns an error like: error: Entry 'foo.txt' not uptodate. Cannot merge. fatal: Could not reset index file to rev

Re: [PATCH 6/7] Git.pm: introduce environment variable GIT_TEST_PRETEND_TTY

2019-01-15 Thread Slavica Djukic
Hi Phillip, First of all, thank you for taking your time to review this patch series. On 14-Jan-19 12:13 PM, Phillip Wood wrote: Hi Salvica/Johannes On 20/12/2018 12:09, Slavica Djukic via GitGitGadget wrote: From: Slavica Djukic To enable testing the colored output on Windows, enable TTY b

[PATCH] technical doc: add a design doc for the evolve command

2019-01-15 Thread Phillip Wood
Hi Stefan Sorry for the delay in replying to your message, Christmas and the New Year got in the way. On 20/11/2018 20:19, Stefan Xenos wrote: >> This explains why we have 'origin' fields in the meta commits, it might >> be worth putting a forward reference or note earlier on to explain why >> re

Re: Gitignore documentation

2019-01-15 Thread Duy Nguyen
On Tue, Jan 15, 2019 at 4:38 AM Jonathan Nieder wrote: > > Hi, > > Junio C Hamano wrote: > > > Patterns with slash is anchored at > > one directory, and that directory is the one that has per-directory > > .gitignore file. Patterns without slash (including a patte

Zhejiang Wuchuan Industrial Co., Ltd [Appointment Request] at LIFESTYLE EXPO TOKYO 2019 [January]

2019-01-15 Thread Eiichi Hasegawa LIFESTYLE EXPO TOKYO Show Management
Dear International Sales & Marketing Director, Zhejiang Wuchuan Industrial Co., Ltd Hello, this is Eiichi Hasegawa from LIFESTYLE EXPO TOKYO 2019 Show Management. This is to ask you for an appointment at LIFESTYLE EXPO TOKYO 2019 [January] (January 30 - February 1, 2019). If you are planning on