Re: [PATCH v3 2/2] t0028: add more tests

2019-09-30 Thread Alexandr Miloslavskiy
On 28.09.2019 6:47, Junio C Hamano wrote: s/bugged/buggy/ perhaps? Usually people do not place hidden listening devices in tests ;-) Yes, hinting those hidden listening devices was an oversight. Thanks for your help in putting them back undercover! I understand that you already changed the

Re: [PATCH v3] commit-graph: remove a duplicate assignment

2019-09-30 Thread Alex Henrie
On Sun, Sep 29, 2019 at 7:22 PM Junio C Hamano wrote: > > Alex Henrie writes: > > > The variable g was being set to the same value both at the beginning of > > the function and before the loop. The assignment before the loop was > > kept because it helps clarify what the loop does, and the redund

Re: [PATCH v4] diffcore-break: use a goto instead of a redundant if statement

2019-09-30 Thread Alex Henrie
On Sun, Sep 29, 2019 at 7:36 PM Junio C Hamano wrote: > > Alex Henrie writes: > > > The condition "if (q->nr <= j)" checks whether the loop exited normally > > or via a break statement. This check can be avoided by replacing the > > jump out of the inner loop with a jump to the end of the outer l

Re: Bi-Weekly Standup - Time/timezone in calendar?

2019-09-30 Thread Thomas Gummerer
On 09/28, Junio C Hamano wrote: > Thomas Gummerer writes: > > >> I thought it was to be 1700 UTC, which currently is 1800 BST her in UK, and > >> 1900 CST in Europe. > > > > That's my recollection as well, and what the calendar should say. > > Thanks for flagging this! > > > > I don't know. I'd

Re: Git in Outreachy December 2019?

2019-09-30 Thread Eric Wong
Johannes Schindelin wrote: > On Tue, 24 Sep 2019, Eric Wong wrote: > > Johannes Schindelin wrote: > > > On Mon, 16 Sep 2019, Emily Shaffer wrote: > > > > - try and make progress towards running many tests from a single test > > > >file in parallel - maybe this is too big, I'm not sure if we

Re: [PATCH 1/1] respect core.hooksPath, falling back to .git/hooks

2019-09-30 Thread Johannes Schindelin
Hi, On Fri, 27 Sep 2019, Pratyush Yadav wrote: > On 27/09/19 08:10AM, Bert Wesarg wrote: > > On Fri, Sep 27, 2019 at 12:40 AM Pratyush Yadav > > wrote: > > > > > > On 26/09/19 02:17PM, Johannes Schindelin via GitGitGadget wrote: > > > > From: Johannes Schindelin > > > > > > > > Since v2.9.0, G

[PATCH v2 0/1] git-gui: respect core.hooksPath, falling back to .git/hooks

2019-09-30 Thread Johannes Schindelin via GitGitGadget
This is yet another patch from Git for Windows. Changes since v1: * Rather than a fine-grained override of gitdir just for the hooks path, we now spawn git rev-parse --git-path [...] every time gitdir is called with arguments. This makes the code safer, although at the cost of potentially

[PATCH v2 1/1] respect core.hooksPath, falling back to .git/hooks

2019-09-30 Thread Johannes Schindelin via GitGitGadget
From: Johannes Schindelin Since v2.9.0, Git knows about the config variable core.hookspath that allows overriding the path to the directory containing the Git hooks. Since v2.10.0, the `--git-path` option respects that config variable, too, so we may just as well use that command. For Git versi

Re: [PATCH v4] diffcore-break: use a goto instead of a redundant if statement

2019-09-30 Thread Junio C Hamano
Alex Henrie writes: > Well, I admit that code clarity is somewhat subjective. To me it's not > obvious that "if (q->nr <= j)" means "if the loop exited normally", I actually do not have too much problem with this side of the equation. I however do see problem with squashing the two diff_q calls

Re: [PATCH 02/13] msvc: avoid using minus operator on unsigned types

2019-09-30 Thread Johannes Schindelin
Hi Denton, On Thu, 26 Sep 2019, Denton Liu wrote: > On Thu, Sep 26, 2019 at 11:01:32PM +0200, Johannes Schindelin wrote: > > > > On Thu, 26 Sep 2019, Denton Liu wrote: > > > > > Hi Dscho, > > > > > > On Thu, Sep 26, 2019 at 01:30:10AM -0700, Johannes Schindelin via > > > GitGitGadget wrote: > >

Re: [PATCH 11/13] tests: let --immediate and --write-junit-xml play well together

2019-09-30 Thread Johannes Schindelin
Hi Junio, On Sun, 29 Sep 2019, Junio C Hamano wrote: > "Johannes Schindelin via GitGitGadget" > writes: > > > diff --git a/t/test-lib.sh b/t/test-lib.sh > > index d1ba33745a..f21c781e68 100644 > > --- a/t/test-lib.sh > > +++ b/t/test-lib.sh > > @@ -695,7 +695,7 @@ test_failure_ () { > > say_

[PATCH v2 01/13] push: do not pretend to return `int` from `die_push_simple()`

2019-09-30 Thread Johannes Schindelin via GitGitGadget
From: Johannes Schindelin This function is marked as `NORETURN`, and it indeed does not want to return anything. So let's not declare it with the return type `int`. This fixes the following warning when building with MSVC: C4646: function declared with 'noreturn' has non-void return type

[PATCH v2 00/13] ci: include a Visual Studio build & test in our Azure Pipeline

2019-09-30 Thread Johannes Schindelin via GitGitGadget
Git's Continuous Integration (CI) includes an Azure Pipeline that builds Git on Linux, macOS and Windows, in the former two cases even in multiple configurations (using GCC vs clang, 32-bit vs 64-bit, etc). On Windows, we only build using GCC, using (a subset of) Git for Windows' SDK. Recently, a

[PATCH v2 03/13] winansi: use FLEX_ARRAY to avoid compiler warning

2019-09-30 Thread Johannes Schindelin via GitGitGadget
From: Johannes Schindelin MSVC would complain thusly: C4200: nonstandard extension used: zero-sized array in struct/union Let's just use the `FLEX_ARRAY` constant that we introduced for exactly this type of scenario. Signed-off-by: Johannes Schindelin --- compat/winansi.c | 2 +- 1 file

[PATCH v2 02/13] msvc: avoid using minus operator on unsigned types

2019-09-30 Thread Johannes Schindelin via GitGitGadget
From: Johannes Schindelin MSVC complains about this with `-Wall`, which can be taken as a sign that this is indeed a real bug. The symptom is: C4146: unary minus operator applied to unsigned type, result still unsigned Let's avoid this warning in the minimal way, e.g. writing `-

[PATCH v2 04/13] compat/win32/path-utils.h: add #include guards

2019-09-30 Thread Johannes Schindelin via GitGitGadget
From: Johannes Schindelin This adds the common guards that allow headers to be #include'd multiple times. Signed-off-by: Johannes Schindelin --- compat/win32/path-utils.h | 5 + 1 file changed, 5 insertions(+) diff --git a/compat/win32/path-utils.h b/compat/win32/path-utils.h index 0f70d4

[PATCH v2 05/13] msvc: ignore some libraries when linking

2019-09-30 Thread Johannes Schindelin via GitGitGadget
From: Johannes Schindelin To build with MSVC, we "translate" GCC options to MSVC options, and part of those options refer to the libraries to link into the final executable. Currently, this part looks somewhat like this on Windows: -lcurl -lnghttp2 -lidn2 -lssl -lcrypto -lssl -lcrypto -l

[PATCH v2 06/13] msvc: handle DEVELOPER=1

2019-09-30 Thread Johannes Schindelin via GitGitGadget
From: Johannes Schindelin We frequently build Git using the `DEVELOPER=1` make setting as a shortcut to enable all kinds of more stringent compiler warnings. Those compiler warnings are relatively specific to GCC, though, so let's try our best to translate them to the equivalent options to pass

[PATCH v2 09/13] vcxproj: include more generated files

2019-09-30 Thread Johannes Schindelin via GitGitGadget
From: Johannes Schindelin In the CI builds, we bundle all generated files into a so-called artifacts `.tar` file, so that the test phase can fan out into multiple parallel builds. This patch makes sure that all files are included in the `vcxproj` target which are needed for that artifacts `.tar`

[PATCH v2 12/13] ci: really use shallow clones on Azure Pipelines

2019-09-30 Thread Johannes Schindelin via GitGitGadget
From: Johannes Schindelin This was a left-over from the previous YAML schema, and it no longer works. The problem was noticed while editing `azure-pipelines.yml` in VS Code with the very helpful "Azure Pipelines" extension (syntax highlighting and intellisense for `azure-pipelines.yml`...). Sign

[PATCH v2 07/13] msvc: work around a bug in GetEnvironmentVariable()

2019-09-30 Thread Johannes Schindelin via GitGitGadget
From: Johannes Schindelin The return value of that function is 0 both for variables that are unset, as well as for variables whose values are empty. To discern those two cases, one has to call `GetLastError()`, whose return value is `ERROR_ENVVAR_NOT_FOUND` and `ERROR_SUCCESS`, respectively. Exc

[PATCH v2 08/13] vcxproj: only copy `git-remote-http.exe` once it was built

2019-09-30 Thread Johannes Schindelin via GitGitGadget
From: Johannes Schindelin In b18ae14a8f6 (vcxproj: also link-or-copy builtins, 2019-07-29), we started to copy or hard-link the built-ins as a post-build step of the `git` project. At the same time, we tried to copy or hard-link `git-remote-http.exe`, but it is quite possible that it was not bui

[PATCH v2 13/13] ci: also build and test with MS Visual Studio on Azure Pipelines

2019-09-30 Thread Johannes Schindelin via GitGitGadget
From: Johannes Schindelin ... because we can, now. Technically, we actually build using `MSBuild`, which is however pretty close to building interactively in Visual Studio. As there is no convenient way to run Git's test suite in Visual Studio, we unpack a Portable Git to run it, using the just-

[PATCH v2 11/13] tests: let --immediate and --write-junit-xml play well together

2019-09-30 Thread Johannes Schindelin via GitGitGadget
From: Johannes Schindelin When the `--immediate` option is in effect, any test failure will immediately exit the test script. Together with `--write-junit-xml`, we will want the JUnit-style `.xml` file to be finalized (and not leave the XML incomplete). Let's make it so. This comes in particular

[PATCH v2 10/13] test-tool run-command: learn to run (parts of) the testsuite

2019-09-30 Thread Johannes Schindelin via GitGitGadget
From: Johannes Schindelin Git for Windows jumps through hoops to provide a development environment that allows to build Git and to run its test suite. To that end, an entire MSYS2 system, including GNU make and GCC is offered as "the Git for Windows SDK". It does come at a price: an initial downl

Re: [PATCH v2 07/19] hashmap_get takes "const struct hashmap_entry *"

2019-09-30 Thread Eric Wong
Derrick Stolee wrote: > On 9/23/2019 9:03 PM, Eric Wong wrote: > > This is less error-prone than "const void *" as the compiler > > now detects invalid types being passed. > [snip] > > diff --git a/hashmap.h b/hashmap.h > > index 40bcc64289..2a4b4a3954 100644 > > --- a/hashmap.h > > +++ b/hashmap.

Re: [PATCH v2 00/19] hashmap bug/safety/ease-of-use fixes

2019-09-30 Thread Eric Wong
Johannes Schindelin wrote: > Hi Eric, > > On Tue, 24 Sep 2019, Eric Wong wrote: > > > Patches 1-11 are largely unchanged from the original series with the > > exception of 2, which is new and posted at: > > > > https://public-inbox.org/git/20190908074953.kux7zz4y7iolqko4@whir/ > > > > 12-17

Re: [PATCH 1/1] git-gui (Windows): use git-bash.exe if it is available

2019-09-30 Thread Johannes Schindelin
Hi, On Fri, 27 Sep 2019, Pratyush Yadav wrote: > On 26/09/19 10:46AM, Thomas Klaeger via GitGitGadget wrote: > > From: Thomas Klaeger > > > > Git for Windows 2.x ships with an executable that starts the Git Bash > > with all the environment variables and what not properly set up. It is > > also

Re: [PATCH v2 10/19] introduce container_of macro

2019-09-30 Thread Eric Wong
Derrick Stolee wrote: > On 9/23/2019 9:03 PM, Eric Wong wrote: > > This macro is popular within the Linux kernel for supporting > > intrusive data structures such as linked lists, red-black trees, > > and chained hash tables while allowing the compiler to do > > type checking. > > > > I intend to

Re: [PATCH 1/2] Move git_sort(), a stable sort, into into libgit.a

2019-09-30 Thread Johannes Schindelin
Hi Junio, On Sat, 28 Sep 2019, Junio C Hamano wrote: > "Johannes Schindelin via GitGitGadget" > writes: > > > --- > > Makefile | 2 +- > > compat/mingw.c| 5 - > > git-compat-util.h | 4 +++- > > compat/qsort.c => qsort.c | 2 +- > > 4 files changed, 5 i

Re: [PATCH 2/2] git-gui: support for diff3 conflict style

2019-09-30 Thread Bert Wesarg
Pratyush, On Sun, Sep 29, 2019 at 5:04 PM Pratyush Yadav wrote: > > Hi Philip, Bert, > > Is there any way I can test this change? Philip, I ran the rebase you > mention in the GitHub issue [0], and I get that '9c8cba6862abe5ac821' is > an unknown revision. > > Is there any quick way I can reprodu

[PATCH v2 2/2] git-gui: support for diff3 conflict style

2019-09-30 Thread Bert Wesarg
This adds highlight support for the diff3 conflict style. The common pre-image will be reversed to --, because it has been removed and replaced with ours or theirs side respectively. Signed-off-by: Bert Wesarg --- git-gui.sh | 3 +++ lib/diff.tcl | 17 - 2 files changed, 19 i

[PATCH v2 1/2] git-gui: use existing interface to query a path's attribute

2019-09-30 Thread Bert Wesarg
Replace the hand-coded call to git check-attr with the already provided one. Signed-off-by: Bert Wesarg --- lib/diff.tcl | 15 +-- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/lib/diff.tcl b/lib/diff.tcl index 958a0fa..0fd4600 100644 --- a/lib/diff.tcl +++ b/lib/diff

Re: RFC: Cryptographic attestation for email-based patch workflows

2019-09-30 Thread Konstantin Ryabitsev
On Fri, Sep 27, 2019 at 08:24:37AM -0700, d...@linuxprogrammer.org wrote: - generate a signify-compatible cryptographic signature of the verbatim patch content, perhaps slightly normalized for things like LF vs. CRLF line endings (see minisign/libsodium for crypto details) - include both the sig

Re: [PATCH v2 2/6] midx: add progress to write_midx_file Add progress to write_midx_file. Progress is displayed when the MIDX_PROGRESS flag is set.

2019-09-30 Thread William Baker
On 9/27/19 8:49 PM, Junio C Hamano wrote: diff --git a/midx.c b/midx.c index b2673f52e8..54e4e93b2b 100644 --- a/midx.c +++ b/midx.c @@ -449,6 +449,8 @@ struct pack_list { uint32_t nr; uint32_t alloc; struct multi_pack_index *m; + struct progre

Re: [PATCH v2 18/19] OFFSETOF_VAR macro to simplify hashmap iterators

2019-09-30 Thread Junio C Hamano
Eric Wong writes: > While we cannot rely on a `__typeof__' operator being portable > to use with `offsetof'; we can calculate the pointer offset > using an existing pointer and the address of a member using > pointer arithmetic. > +/* > + * like offsetof(), but takes a pointer to type instead of

Re: [PATCH v2 1/6] midx: add MIDX_PROGRESS flag

2019-09-30 Thread William Baker
On 9/27/19 8:40 PM, Junio C Hamano wrote: > SZEDER Gábor writes: > >>> +#define MIDX_PROGRESS (1 << 0) >> >> Please consider using an enum. > > If they are used by assiging one of their values, definitely a good > idea to use an enum. Are debuggers clever enough that they can > tell, when t

[PATCH v3] promisor-remote: skip move_to_tail when no-op

2019-09-30 Thread Emily Shaffer
Previously, when promisor_remote_move_to_tail() is called for a promisor_remote which is currently the final element in promisors, a cycle is created in the promisors linked list. This cycle leads to a double free later on in promisor_remote_clear() when the final element of the promisors list is r

[PATCH] dir: special case check for the possibility that pathspec is NULL

2019-09-30 Thread Elijah Newren
Commits 404ebceda01c ("dir: also check directories for matching pathspecs", 2019-09-17) and 89a1f4aaf765 ("dir: if our pathspec might match files under a dir, recurse into it", 2019-09-17) added calls to match_pathspec() and do_match_pathspec() passing along their pathspec parameter. Both match_pa

[PATCH v3 1/2] git-gui: use existing interface to query a path's attribute

2019-09-30 Thread Bert Wesarg
Replace the hand-coded call to git check-attr with the already provided one. Signed-off-by: Bert Wesarg --- lib/diff.tcl | 15 +-- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/lib/diff.tcl b/lib/diff.tcl index 958a0fa..0fd4600 100644 --- a/lib/diff.tcl +++ b/lib/diff

[PATCH v2 1/2] Move git_sort(), a stable sort, into into libgit.a

2019-09-30 Thread Johannes Schindelin via GitGitGadget
From: Johannes Schindelin The `qsort()` function is not guaranteed to be stable, i.e. it does not promise to maintain the order of items it is told to consider equal. In contrast, the `git_sort()` function we carry in `compat/qsort.c` _is_ stable, by virtue of implementing a merge sort algorithm.

[PATCH v2 1/8] fast-export: fix exporting a tag and nothing else

2019-09-30 Thread Elijah Newren
fast-export allows specifying revision ranges, which can be used to export a tag without exporting the commit it tags. fast-export handled this rather poorly: it would emit a "from :0" directive. Since marks start at 1 and increase, this means it refers to an unknown commit and fast-import will c

[PATCH v2 3/8] fast-import: allow tags to be identified by mark labels

2019-09-30 Thread Elijah Newren
Mark identifiers are used in fast-export and fast-import to provide a label to refer to earlier content. Blobs are given labels because they need to be referenced in the commits where they first appear with a given filename, and commits are given labels because they can be the parents of other com

[PATCH v2 7/8] t9350: add tests for tags of things other than a commit

2019-09-30 Thread Elijah Newren
Multiple changes here: * add a test for a tag of a blob * add a test for a tag of a tag of a commit * add a comment to the tests for (possibly nested) tags of trees, making it clear that these tests are doing much less than you might expect Signed-off-by: Elijah Newren --- t/t9350-

[PATCH v2 0/8] fast export/import: handle nested tags, improve incremental exports

2019-09-30 Thread Elijah Newren
This series improves the incremental export story for fast-export and fast-import (--export-marks and --import-marks fell a bit short), fixes a couple small export/import bugs, and enables handling nested tags. In particular, the nested tags handling makes it so that fast-export and fast-import ca

[PATCH v2 5/8] fast-export: add support for --import-marks-if-exists

2019-09-30 Thread Elijah Newren
fast-import has support for both an --import-marks flag and an --import-marks-if-exists flag; the latter of which will not die() if the file does not exist. fast-export only had support for an --import-marks flag; add an --import-marks-if-exists flag for consistency. Signed-off-by: Elijah Newren

[PATCH v2 2/8] fast-import: fix handling of deleted tags

2019-09-30 Thread Elijah Newren
If our input stream includes a tag which is later deleted, we were not properly deleting it. We did have a step which would delete it, but we left a tag in the tag list noting that it needed to be updated, and the updating of annotated tags occurred AFTER ref deletion. So, when we record that a t

[PATCH v2 6/8] fast-export: allow user to request tags be marked with --mark-tags

2019-09-30 Thread Elijah Newren
Add a new option, --mark-tags, which will output mark identifiers with each tag object. This improves the incremental export story with --export-marks since it will allow us to record that annotated tags have been exported, and it is also needed as a step towards supporting nested tags. Signed-of

[PATCH v2 4/8] fast-import: add support for new 'alias' command

2019-09-30 Thread Elijah Newren
fast-export and fast-import have nice --import-marks flags which allow for incremental migrations. However, if there is a mark in fast-export's file of marks without a corresponding mark in the one for fast-import, then we run the risk that fast-export tries to send new objects relative to the mar

[PATCH v2 8/8] fast-export: handle nested tags

2019-09-30 Thread Elijah Newren
Signed-off-by: Elijah Newren --- builtin/fast-export.c | 30 ++ t/t9350-fast-export.sh | 2 +- 2 files changed, 19 insertions(+), 13 deletions(-) diff --git a/builtin/fast-export.c b/builtin/fast-export.c index d32e1e9327..58a74de42a 100644 --- a/builtin/fast-export

Re: [PATCH v4 04/24] merge-recursive: provide a better label for diff3 common ancestor

2019-09-30 Thread Jeff King
On Sat, Aug 17, 2019 at 11:41:24AM -0700, Elijah Newren wrote: > In commit 7ca56aa07619 ("merge-recursive: add a label for ancestor", > 2010-03-20), a label was added for the '||' line to make it have > the more informative heading '|| merged common ancestors', with > the statement: > >

[PATCH v2 0/2] Git's rename detection requires a stable sort

2019-09-30 Thread Johannes Schindelin via GitGitGadget
With the en/merge-recursive-cleanup patches already having advanced to next, the problem I discovered when rebasing Git for Windows' branch thicket becomes quite relevant now: t3030.35 fails consistently in the MSVC build & test (this part of the Azure Pipeline will be upstreamed later). The solut

Re: [PATCH v4 04/24] merge-recursive: provide a better label for diff3 common ancestor

2019-09-30 Thread Jeff King
On Mon, Sep 30, 2019 at 05:14:37PM -0400, Jeff King wrote: > > This chosen label was perfectly reasonable when recursiveness kicks in, > > i.e. when there are multiple merge bases. (I can't think of a better > > label in such cases.) But it is actually somewhat misleading when there > > is a uni

Re: [PATCH v4] diffcore-break: use a goto instead of a redundant if statement

2019-09-30 Thread Alex Henrie
On Mon, Sep 30, 2019 at 3:48 AM Junio C Hamano wrote: > > Alex Henrie writes: > > > Well, I admit that code clarity is somewhat subjective. To me it's not > > obvious that "if (q->nr <= j)" means "if the loop exited normally", > > I actually do not have too much problem with this side of the > eq

Re: [PATCH v3] promisor-remote: skip move_to_tail when no-op

2019-09-30 Thread Jeff King
On Mon, Sep 30, 2019 at 01:28:18PM -0700, Emily Shaffer wrote: > Previously, when promisor_remote_move_to_tail() is called for a > promisor_remote which is currently the final element in promisors, a > cycle is created in the promisors linked list. This cycle leads to a > double free later on in p

Re: [PATCH v2 1/1] git-add--interactive.perl: Add progress counter in the prompt

2019-09-30 Thread Johannes Schindelin
For completeness: this is what the contributor wrote in https://github.com/gitgitgadget/git/pull/349#issuecomment-536405428 Thanks for your comments. I've modified the patch and I hope it is more suitable now. I just used a repl to get the output and sent that as a patch. I don't really know perl

[PATCH v2 2/2] diffcore_rename(): use a stable sort

2019-09-30 Thread Johannes Schindelin via GitGitGadget
From: Johannes Schindelin During Git's rename detection, the file names are sorted. At the moment, this job is performed by `qsort()`. As that function is not guaranteed to implement a stable sort algorithm, this can lead to inconsistent and/or surprising behavior: a rename might be detected diff

[PATCH v4] promisor-remote: skip move_to_tail when no-op

2019-09-30 Thread Emily Shaffer
Previously, when promisor_remote_move_to_tail() is called for a promisor_remote which is currently the final element in promisors, a cycle is created in the promisors linked list. This cycle leads to a double free later on in promisor_remote_clear() when the final element of the promisors list is r

Re: [PATCH] dir: special case check for the possibility that pathspec is NULL

2019-09-30 Thread Denton Liu
Hi Elijah, On Mon, Sep 30, 2019 at 12:11:06PM -0700, Elijah Newren wrote: > Commits 404ebceda01c ("dir: also check directories for matching > pathspecs", 2019-09-17) and 89a1f4aaf765 ("dir: if our pathspec might > match files under a dir, recurse into it", 2019-09-17) added calls to > match_pathsp

[PATCH] merge-recursive: fix the diff3 common ancestor label for virtual commits

2019-09-30 Thread Elijah Newren
In commit 743474cbfa8b ("merge-recursive: provide a better label for diff3 common ancestor", 2019-08-17), the label for the common ancestor was changed from always being "merged common ancestors" to instead be based on the number of merge bases: >=2: "merged common ancestors"

[PATCH] shallow.c: Don't free unallocated slabs

2019-09-30 Thread Ali Utku Selen
Fix possible segfault when cloning a submodule shallow. Signed-off-by: Ali Utku Selen --- It is possible to have unallocated slabs in shallow.c's commit_depth for a shallow submodule with many commits. Easiest way to reproduce this I found was changing COMMIT_SLAB_SIZE to 32 and run t7406-submod

[PATCH v5] diffcore-break: use a goto instead of a redundant if statement

2019-09-30 Thread Alex Henrie
The condition "if (q->nr <= j)" checks whether the loop exited normally or via a break statement. Avoid this check by replacing the jump out of the inner loop with a jump to the end of the outer loop, which makes it obvious that diff_q is not executed when the peer survives. Signed-off-by: Alex He

[PATCH v5] commit-graph: remove a duplicate assignment

2019-09-30 Thread Alex Henrie
Leave the variable 'g' uninitialized before it is set just before its first use in front of a loop, which is a much more appropriate place to indicate what it is used for. Also initialize the variable 'num_commits' just before the loop instead of at the beginning of the function for the same reaso

[PATCH v5] wrapper: use a loop instead of repetitive statements

2019-09-30 Thread Alex Henrie
A check into the history of this code revealed no particular reason for the code to be written in this way. All popular compilers are capable of unrolling loops if it benefits performance, and once this code is replaced with a loop, the magic number 6 used in multiple places in this function can be

Re: [PATCH v4] promisor-remote: skip move_to_tail when no-op

2019-09-30 Thread Christian Couder
On Tue, Oct 1, 2019 at 12:03 AM Emily Shaffer wrote: > > Previously, when promisor_remote_move_to_tail() is called for a > promisor_remote which is currently the final element in promisors, a > cycle is created in the promisors linked list. This cycle leads to a > double free later on in promisor_

Re: [PATCH 1/1] git-gui (Windows): use git-bash.exe if it is available

2019-09-30 Thread Johannes Sixt
Am 30.09.19 um 12:27 schrieb Johannes Schindelin: > On Fri, 27 Sep 2019, Pratyush Yadav wrote: >>> + if {$cmdLine != $normalized && [file exists $cmdLine]} { >> >> Why the $cmdLine != $normalized? When would they be equal? The string >> substitution should always change $cmdLine. > > Except when

Re: [PATCH] merge-recursive: fix the diff3 common ancestor label for virtual commits

2019-09-30 Thread Elijah Newren
On Mon, Sep 30, 2019 at 3:55 PM Elijah Newren wrote: > > In commit 743474cbfa8b ("merge-recursive: provide a better label for > diff3 common ancestor", 2019-08-17), the label for the common ancestor > was changed from always being > > "merged common ancestors" > > to instead be based on t

[PATCH v2] merge-recursive: fix the diff3 common ancestor label for virtual commits

2019-09-30 Thread Elijah Newren
In commit 743474cbfa8b ("merge-recursive: provide a better label for diff3 common ancestor", 2019-08-17), the label for the common ancestor was changed from always being "merged common ancestors" to instead be based on the number of merge bases: >=2: "merged common ancestors"