[PATCH v3 1/1] ci(osx): use new location of the `perforce` cask

2019-10-22 Thread Johannes Schindelin via GitGitGadget
From: Johannes Schindelin The Azure Pipelines builds are failing for macOS due to a change in the location of the perforce cask. The command outputs the following error: + brew install caskroom/cask/perforce Error: caskroom/cask was moved. Tap homebrew/cask-cask instead. So let's try to

[PATCH 2/3] sequencer: export the function to get the path of `.git/rebase-merge/`

2019-10-22 Thread Johannes Schindelin via GitGitGadget
From: Johannes Schindelin The presence of this path will be used in the next commit to fix an incorrect piece of advice in `git commit` when in the middle of a rebase. Signed-off-by: Johannes Schindelin --- sequencer.c | 4 ++-- sequencer.h | 1 + 2 files changed, 3 insertions(+), 2 deletions(

[PATCH 0/3] commit: fix advice for empty commits during rebases

2019-10-22 Thread Johannes Schindelin via GitGitGadget
In dcb500dc16c (cherry-pick/revert: advise using --skip, 2019-07-02), we introduced a helpful message that suggests to run git cherry-pick --skip (instead of the previous message that talked about git reset) when a cherry-pick failed due to an empty patch. However, the same message is displayed d

[PATCH 3/3] commit: give correct advice for empty commit during a rebase

2019-10-22 Thread Johannes Schindelin via GitGitGadget
From: Johannes Schindelin In dcb500dc16c (cherry-pick/revert: advise using --skip, 2019-07-02), `git commit` learned to suggest to run `git cherry-pick --skip` when trying to cherry-pick an empty patch. However, it was overlooked that there are more conditions than just a `git cherry-pick` when

[PATCH 1/3] cherry-pick: add test for `--skip` advice in `git commit`

2019-10-22 Thread Johannes Schindelin via GitGitGadget
From: Johannes Schindelin In dcb500dc16c (cherry-pick/revert: advise using --skip, 2019-07-02), `git commit` learned to suggest to run `git cherry-pick --skip` when trying to cherry-pick an empty patch, but that was never tested for. Here is a test that verifies that a message is given to the us

[PATCH v3 2/2] git_path(): handle `.lock` files correctly

2019-10-21 Thread Johannes Schindelin via GitGitGadget
From: Johannes Schindelin Ever since worktrees were introduced, the `git_path()` function _really_ needed to be called e.g. to get at the path to `logs/HEAD` (`HEAD` is specific to the worktree, and therefore so is its reflog). However, the wrong path is returned for `logs/HEAD.lock`. This does

[PATCH v3 0/2] Handle git_path() with lock files correctly in worktrees

2019-10-21 Thread Johannes Schindelin via GitGitGadget
I stumbled over this during my recent work in Git GUI [https://github.com/gitgitgadget/git/pull/361] that was originally really only intended to use the correct hooks directory. It turns out that my fears that index.lock was mishandled were unfounded, hence this patch series has a lot lower priori

[PATCH v3 1/2] t1400: wrap setup code in test case

2019-10-21 Thread Johannes Schindelin via GitGitGadget
From: Johannes Schindelin Without this, you cannot use `--run=<...>` to skip that part, and a run with `--run=0` (which is a common way to determine the test case number corresponding to a given test case title). Signed-off-by: Johannes Schindelin --- t/t1400-update-ref.sh | 18 ++-

[PATCH v2 2/2] ci(visual-studio): actually run the tests in parallel

2019-10-21 Thread Johannes Schindelin via GitGitGadget
From: Johannes Schindelin Originally, the CI/PR builds that build and test using Visual Studio were implemented imitating `linux-clang`, i.e. still using the `Makefile`-based build infrastructure. Later (but still before the patches made their way into git.git's `master`), however, this was chan

[PATCH v2 0/2] Fix the speed of the CI (Visual Studio) tests

2019-10-21 Thread Johannes Schindelin via GitGitGadget
I made a mistake when converting the make/prove-based test job to a test-tool run-command testsuite one: I lost the parallelization, resulting in way slower CI runs. Also, I forgot to build with DEVELOPER=1, i.e. with stricter compile flags. This pair of patches fixes both issues. Changes since

[PATCH v2 1/2] ci(visual-studio): use strict compile flags, and optimization

2019-10-21 Thread Johannes Schindelin via GitGitGadget
From: Johannes Schindelin To make full use of the work that went into the Visual Studio build & test jobs in our CI/PR builds, let's turn on strict compiler flags. This will give us the benefit of Visual C's compiler warnings (which, at times, seem to catch things that GCC does not catch, and vic

[PATCH 2/2] ci(visual-studio): actually run the tests in parallel

2019-10-20 Thread Johannes Schindelin via GitGitGadget
From: Johannes Schindelin Originally, the CI/PR builds that build and test using Visual Studio were implemented imitating `linux-clang`, i.e. still using the `Makefile`-based build infrastructure. Later (but still before the patches made their way into git.git's `master`), however, this was chan

[PATCH 0/2] Fix the speed of the CI (Visual Studio) tests

2019-10-20 Thread Johannes Schindelin via GitGitGadget
I made a mistake when converting the make/prove-based test job to a test-tool run-command testsuite one: I lost the parallelization, resulting in way slower CI runs. Also, I forgot to build with DEVELOPER=1, i.e. with stricter compile flags. This pair of patches fixes both issues. Johannes Schi

[PATCH 1/2] ci(visual-studio): use strict compile flags, and optimization

2019-10-20 Thread Johannes Schindelin via GitGitGadget
From: Johannes Schindelin To make full use of the work that went into the Visual Studio build & test jobs in our CI/PR builds, let's turn on strict compiler flags. This will give us the benefit of Visual C's compiler warnings (which, at times, seem to catch things that GCC does not catch, and vic

[PATCH v2 2/2] git_path(): handle `.lock` files correctly

2019-10-17 Thread Johannes Schindelin via GitGitGadget
From: Johannes Schindelin Ever since worktrees were introduced, the `git_path()` function _really_ needed to be called e.g. to get at the path to `logs/HEAD` (`HEAD` is specific to the worktree). However, the wrong path is returned for `logs/HEAD.lock`. This does not matter as long as the Git ex

[PATCH v2 1/2] t1400: wrap setup code in test case

2019-10-17 Thread Johannes Schindelin via GitGitGadget
From: Johannes Schindelin Without this, you cannot use `--run=<...>` to skip that part, and a run with `--run=0` (which is a common way to determine the test case number corresponding to a given test case title). Signed-off-by: Johannes Schindelin --- t/t1400-update-ref.sh | 18 ++-

[PATCH v2 0/2] Handle git_path() with lock files correctly in worktrees

2019-10-17 Thread Johannes Schindelin via GitGitGadget
I stumbled over this during my recent work in Git GUI [https://github.com/gitgitgadget/git/pull/361] that was originally really only intended to use the correct hooks directory. It turns out that my fears that index.lock was mishandled were unfounded, hence this patch series has a lot lower priori

[PATCH v2 1/1] ci(osx): use new location of the `perforce` cask

2019-10-17 Thread Johannes Schindelin via GitGitGadget
From: Johannes Schindelin The CI builds are failing for Mac OS X due to a change in the location of the perforce cask. The command outputs the following error: + brew install caskroom/cask/perforce Error: caskroom/cask was moved. Tap homebrew/cask-cask instead. So let's try to call `bre

[PATCH v2 0/3] Revive 'pcre2-chartables-leakfix'

2019-10-16 Thread Johannes Schindelin via GitGitGadget
As I had stated several times, I was really unhappy how the original fix harped on nedmalloc and totally ignored runtime-configured custom allocators. So this is, at long last, my attempt to give this a new life. It is based off of maint and needs trivial merge conflict resolutions relative to mas

[PATCH 3/3] grep: avoid leak of chartables in PCRE2

2019-10-16 Thread Johannes Schindelin via GitGitGadget
From: Johannes Schindelin 94da9193a6 ("grep: add support for PCRE v2", 2017-06-01) introduced a small memory leak visible with valgrind in t7813. Complete the creation of a PCRE2 specific variable that was missing from the original change and free the generated table just like it is done for PCR

[PATCH 0/3] Revive 'pcre2-chartables-leakfix'

2019-10-16 Thread Johannes Schindelin via GitGitGadget
As I had stated several times, I was really unhappy how the original fix harped on nedmalloc and totally ignored runtime-configured custom allocators. So this is, at long last, my attempt to give this a new life. It is based off of maint and needs trivial merge conflict resolutions relative to mas

[PATCH 0/2] Handle git_path() with lock files correctly in worktrees

2019-10-16 Thread Johannes Schindelin via GitGitGadget
I stumbled over this during my recent work in Git GUI [https://github.com/gitgitgadget/git/pull/361] that was originally really only intended to use the correct hooks directory. Technically, the first patch is not needed (because I decided against adding a test to t1400 in the end, in favor of t15

[PATCH 1/2] t1400: wrap setup code in test case

2019-10-16 Thread Johannes Schindelin via GitGitGadget
From: Johannes Schindelin Without this, you cannot use `--run=<...>` to skip that part, and a run with `--run=0` (which is a common way to determine the test case number corresponding to a given test case title). Signed-off-by: Johannes Schindelin --- t/t1400-update-ref.sh | 18 ++-

[PATCH 2/2] git_path(): handle `.lock` files correctly

2019-10-16 Thread Johannes Schindelin via GitGitGadget
From: Johannes Schindelin Ever since worktrees were introduced, the `git_path()` function _really_ needed to be called e.g. to get at the `index`. However, the wrong path is returned for `index.lock`. This does not matter as long as the Git executable is doing the asking, as the path for that `i

[PATCH 1/1] ci(osx): use new location of the `perforce` cask

2019-10-15 Thread Johannes Schindelin via GitGitGadget
From: Johannes Schindelin The CI builds are failing for Mac OS X due to a change in the location of the perforce cask. The command outputs the following error: + brew install caskroom/cask/perforce Error: caskroom/cask was moved. Tap homebrew/cask-cask instead. Preface the "brew install

[PATCH 0/1] t1308-config-set: fix a test that has a typo

2019-10-10 Thread Johannes Schindelin via GitGitGadget
I am currently trying to whittle down the number of open PRs at https://github.com/git/git, and this is one of the patches I deem valuable enough (and complete enough) to put through to the Git mailing list even when the original contributor has gone silent. Tanay Abhra (1): t1308-config-set: f

[PATCH 0/1] Pass through the exit code of post-checkout

2019-10-10 Thread Johannes Schindelin via GitGitGadget
This is my attempt to revive an old discussion [https://public-inbox.org/git/20180314003816.ge147...@aiede.svl.corp.google.com/] (related to this StackOverflow thread [https://stackoverflow.com/questions/25561485/git-rebase-i-with-squash-cannot-detach-head] ). > [...] is this the right behavior

[PATCH 1/1] switch/restore: consistently pass through exit code of `post-checkout`

2019-10-10 Thread Johannes Schindelin via GitGitGadget
From: Johannes Schindelin Currently, the exit code of the `post-checkout` hook becomes the exit code of the `git restore` (or the equivalent `git checkout`) command, _iff_ no error occurred during the `restore` operation. That allows versatile scripting where the `post-checkout` failure modes ca

[PATCH 1/1] doc(stash): clarify the description of `save`

2019-10-10 Thread Johannes Schindelin via GitGitGadget
From: Johannes Schindelin The original phrasing of this paragraph made at least one person stumble over the word "from" (thinking that it was a typo and "from" was intended), and other readers chimed in, agreeing that it was confusing: https://public-inbox.org/git/0102016b8d597569-c1f6cfdc-cb45-4

[PATCH 0/1] Make the description of git stash save clearer

2019-10-10 Thread Johannes Schindelin via GitGitGadget
This is an attempt to revive the discussion started in https://public-inbox.org/git/0102016b8d597569-c1f6cfdc-cb45-4428-8737-cb1bc30655d8-000...@eu-west-1.amazonses.com/#t Johannes Schindelin (1): doc(stash): clarify the description of `save` Documentation/git-stash.txt | 5 +++-- 1 file chan

[PATCH 1/1] xdiffi: fix typos and touch up comments

2019-10-08 Thread Johannes Schindelin via GitGitGadget
From: Johannes Schindelin Inspired by the thoroughly stale https://github.com/git/git/pull/159, this patch fixes a couple of typos, rewraps and clarifies some comments. Signed-off-by: Johannes Schindelin --- xdiff/xdiffi.c | 99 -- 1 file changed

[PATCH 0/1] xdiffi: fix typos and touch up comments

2019-10-08 Thread Johannes Schindelin via GitGitGadget
Some of these changes are best viewed with --color-words. Johannes Schindelin (1): xdiffi: fix typos and touch up comments xdiff/xdiffi.c | 99 -- 1 file changed, 55 insertions(+), 44 deletions(-) base-commit: b744c3af07a15aaeb1b82fab689995fd55

[PATCH v4 1/1] Make gitdir work with worktrees, respect core.hooksPath, etc

2019-10-08 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. Other paths i

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

2019-10-08 Thread Johannes Schindelin via GitGitGadget
This is yet another patch from Git for Windows. Changes since v3: * Adjusted the commit message to reflect that this is no longer only about the hooks directory. * Added a code comment to indicate how the list of keys was determined that are used for the gitdir priming. * The gitdir cach

[PATCH 1/1] Add a helper to reverse index_pos_to_insert_pos()

2019-10-07 Thread Johannes Schindelin via GitGitGadget
From: Johannes Schindelin We have just introduced the helper `index_pos_to_insert_pos()` to help avoiding underflows when returning `-1 - pos` for cases where we want to return an insert position, using the ones' complement (as `int`). As pointed out during the review of the patch series that in

[PATCH 0/1] Fallout from azure-pipelines-msvc

2019-10-07 Thread Johannes Schindelin via GitGitGadget
This is a spill-over from my patch series that introduces support for building Git using Visual Studio in our CI builds, based on a suggestion by Johannes Sixt: complete the symmetry by adding a helper that does the opposite of index_pos_to_insert_pos(). I tried to be super inventive and came up

[PATCH v2 0/1] fetch --multiple: respect --jobs=

2019-10-05 Thread Johannes Schindelin via GitGitGadget
I saw with sadness that pd/fetch-jobs went nowhere, and read in the most recent What's Cooking mail that it was even dropped. This is my attempt to resurrect the idea (although without the overhead of trying to support a first-class UI to control submodule and multiple-remote fetches independently

[PATCH v2 1/1] fetch: let --jobs= parallelize --multiple, too

2019-10-05 Thread Johannes Schindelin via GitGitGadget
From: Johannes Schindelin So far, `--jobs=` only parallelizes submodule fetches/clones, not `--multiple` fetches, which is unintuitive, given that the option's name does not say anything about submodules in particular. Let's change that. With this patch, also fetches from multiple remotes are pa

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

2019-10-04 Thread Johannes Schindelin via GitGitGadget
This is yet another patch from Git for Windows. Changes since v2: * The paths returned by git rev-parse --git-path are now cached, and the cache is primed with the most common paths. Changes since v1: * Rather than a fine-grained override of gitdir just for the hooks path, we now spawn

[PATCH v3 1/1] Fix gitdir e.g. to respect core.hooksPath

2019-10-04 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

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

2019-10-04 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 v3 04/13] compat/win32/path-utils.h: add #include guards

2019-10-04 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 v3 03/13] winansi: use FLEX_ARRAY to avoid compiler warning

2019-10-04 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 v3 09/13] vcxproj: include more generated files

2019-10-04 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 v3 13/13] ci: also build and test with MS Visual Studio on Azure Pipelines

2019-10-04 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 v3 00/13] ci: include a Visual Studio build & test in our Azure Pipeline

2019-10-04 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 v3 12/13] ci: really use shallow clones on Azure Pipelines

2019-10-04 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 v3 05/13] msvc: ignore some libraries when linking

2019-10-04 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 v3 10/13] test-tool run-command: learn to run (parts of) the testsuite

2019-10-04 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

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

2019-10-04 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 v3 02/13] msvc: avoid using minus operator on unsigned types

2019-10-04 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 v3 11/13] tests: let --immediate and --write-junit-xml play well together

2019-10-04 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 v3 08/13] vcxproj: only copy `git-remote-http.exe` once it was built

2019-10-04 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 v3 01/13] push: do not pretend to return `int` from `die_push_simple()`

2019-10-04 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 1/1] stash apply: report status correctly even in a worktree's subdirectory

2019-10-04 Thread Johannes Schindelin via GitGitGadget
From: Johannes Schindelin When Git wants to spawn a child Git process inside a worktree's subdirectory while `GIT_DIR` is set, we need to take care of specifying the work tree's top-level directory explicitly because it cannot be discovered: the current directory is _not_ the top-level directory

[PATCH v2 0/1] stash apply: be prepared to run in a worktree's subdirectory

2019-10-04 Thread Johannes Schindelin via GitGitGadget
I saw this issue a couple times in my setup, and always wondered why nobody else seemed to be hit by this. When I finally found/made some time to investigate, I found out that it really requires a specific setup: I have many worktrees connected to my main git.git clone, often run inside t/ and I do

[PATCH v2 1/1] range-diff: internally force `diff.noprefix=true`

2019-10-02 Thread Johannes Schindelin via GitGitGadget
From: Johannes Schindelin When parsing the diffs, `range-diff` expects to see the prefixes `a/` and `b/` in the diff headers. These prefixes can be forced off via the config setting `diff.noprefix=true`. As `range-diff` is not prepared for that situation, this will cause a segmentation fault. L

[PATCH v2 0/1] Avoid segmentation fault in git range-diff when diff.noprefix=true

2019-10-02 Thread Johannes Schindelin via GitGitGadget
This PR was inspired by this bug report: https://public-inbox.org/git/20191002141615.gb17...@kitsune.suse.cz/T/#me576615d7a151cf2ed46186c482fbd88f9959914 Changes since v1: * Use a command-line option instead of a command-line config setting. * Instead of forcing a prefix, force no prefix (and

[PATCH 1/1] range-diff: internally force `diff.noprefix=false`

2019-10-02 Thread Johannes Schindelin via GitGitGadget
From: Johannes Schindelin When parsing the diffs, `range-diff` expects to see the prefixes `a/` and `b/` in the diff headers. These prefixes can be forced off via the config setting `diff.noprefix=true`. As `range-diff` is not prepared for that situation, this will cause a segmentation fault. L

[PATCH 0/1] Avoid segmentation fault in git range-diff when diff.noprefix=true

2019-10-02 Thread Johannes Schindelin via GitGitGadget
This PR was inspired by this bug report: https://public-inbox.org/git/20191002141615.gb17...@kitsune.suse.cz/T/#me576615d7a151cf2ed46186c482fbd88f9959914 Johannes Schindelin (1): range-diff: internally force `diff.noprefix=false` range-diff.c | 3 ++- t/t3206-range-diff.sh | 4

[PATCH 0/1] fetch --multiple: respect --jobs=

2019-10-01 Thread Johannes Schindelin via GitGitGadget
I saw with sadness that pd/fetch-jobs went nowhere, and read in the most recent What's Cooking mail that it was even dropped. This is my attempt to resurrect the idea (although without the overhead of trying to support a first-class UI to control submodule and multiple-remote fetches independently

[PATCH 1/1] fetch: let --jobs= parallelize --multiple, too

2019-10-01 Thread Johannes Schindelin via GitGitGadget
From: Johannes Schindelin So far, `--jobs=` only parallelizes submodule fetches/clones, not `--multiple` fetches, which is unintuitive, given that the option's name does not say anything about submodules in particular. Let's change that. With this patch, also fetches from multiple remotes are pa

[PATCH 0/1] Include hdr-check in the CI builds

2019-10-01 Thread Johannes Schindelin via GitGitGadget
Our hdr-check target is now functional in more ways than before. Let's run it as part of the CI builds. I offered this idea in a review of dl/honor-cflags-in-hdr-check [https://public-inbox.org/git/nycvar.qro.7.76.6.1909261452340.15...@tvgsbejvaqbjf.bet/] but it was not picked up. So I offer it

[PATCH 1/1] ci: run `hdr-check` as part of the `Static Analysis` job

2019-10-01 Thread Johannes Schindelin via GitGitGadget
From: Johannes Schindelin Signed-off-by: Johannes Schindelin --- azure-pipelines.yml| 2 +- ci/install-dependencies.sh | 3 ++- ci/run-static-analysis.sh | 3 +++ 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index c329b7218b..

[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 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

[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 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 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 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

[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 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 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 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 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 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 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

[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 1/1] respect core.hooksPath, falling back to .git/hooks

2019-09-26 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

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

2019-09-26 Thread Johannes Schindelin via GitGitGadget
This is yet another patch from Git for Windows. Johannes Schindelin (1): respect core.hooksPath, falling back to .git/hooks git-gui.sh | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) base-commit: 60c60b627e81bf84e1cb01729d2ae882178f079d Published-As: https://github.com/gitgitgadg

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

2019-09-26 Thread Johannes Schindelin via GitGitGadget
... and yet another patch that is carried in Git for Windows for quite a long time. This commit was contributed as https://github.com/patthoyts/git/gui/pull/6 which was ignored for almost three years, and then as https://github.com/prati0100/git-gui/pull/2 which was rejected in favor of a mailin

[PATCH 1/1] git gui: fix staging a second line to a 1-line file

2019-09-26 Thread Johannes Schindelin via GitGitGadget
From: Johannes Schindelin When a 1-line file is augmented by a second line, and the user tries to stage that single line via the "Stage Line" context menu item, we do not want to see "apply: corrupt patch at line 5". The reason for this error was that the hunk header looks like this: @@

[PATCH 0/1] git gui: fix staging a second line to a 1-line file

2019-09-26 Thread Johannes Schindelin via GitGitGadget
Yet another patch that is carried in Git for Windows for quite a long time. This fixes https://github.com/git-for-windows/git/issues/515. This commit was contributed as https://github.com/patthoyts/git/gui/pull/7 which was ignored for almost three years, and then as https://github.com/prati0100/

[PATCH 4/4] git-gui--askyesno (mingw): use Git for Windows' icon, if available

2019-09-26 Thread Johannes Schindelin via GitGitGadget
From: Johannes Schindelin For additional GUI goodness. Signed-off-by: Johannes Schindelin --- git-gui--askyesno | 12 1 file changed, 12 insertions(+) diff --git a/git-gui--askyesno b/git-gui--askyesno index 45b0260eff..c0c82e7cbd 100755 --- a/git-gui--askyesno +++ b/git-gui--ask

[PATCH 3/4] git-gui--askyesno: allow overriding the window title

2019-09-26 Thread Johannes Schindelin via GitGitGadget
From: Johannes Schindelin "Question?" is maybe not the most informative thing to ask. In the absence of better information, it is the best we can do, of course. However, Git for Windows' auto updater just learned the trick to use git-gui--askyesno to ask the user whether to update now or not. An

[PATCH 2/4] git gui: set GIT_ASKPASS=git-gui--askpass if not set yet

2019-09-26 Thread Johannes Schindelin via GitGitGadget
From: Johannes Schindelin Signed-off-by: Johannes Schindelin --- git-gui.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/git-gui.sh b/git-gui.sh index 76d8139b8d..66f046a0c7 100755 --- a/git-gui.sh +++ b/git-gui.sh @@ -1248,6 +1248,9 @@ set have_tk85 [expr {[package vcompare $tk_versi

[PATCH 0/4] git-gui: GIT_ASK_YESNO/GIT_ASKPASS patches from Git for Windows

2019-09-26 Thread Johannes Schindelin via GitGitGadget
This is another set of patches from Git for Windows' fork that have been sitting there since 2010, providing cross-platform GUI helpers to ask the user a question or allow typing in a password. This patch series was first submitted as https://github.com/patthoyts/git-gui/pull/5 which was ignored

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

2019-09-26 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 04/13] compat/win32/path-utils.h: add #include guards

2019-09-26 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 02/13] msvc: avoid using minus operator on unsigned types

2019-09-26 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 08/13] vcxproj: only copy `git-remote-http.exe` once it was built

2019-09-26 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 03/13] winansi: use FLEX_ARRAY to avoid compiler warning

2019-09-26 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 07/13] msvc: work around a bug in GetEnvironmentVariable()

2019-09-26 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 11/13] tests: let --immediate and --write-junit-xml play well together

2019-09-26 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 10/13] test-tool run-command: learn to run (parts of) the testsuite

2019-09-26 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

  1   2   3   4   5   6   7   8   9   10   >