[PATCH v2 09/11] built-in add -i: support `?` (prompt help)

2019-05-13 Thread Johannes Schindelin via GitGitGadget
From: Johannes Schindelin With this change, we print out the same colored help text that the Perl-based `git add -i` prints in the main loop when question mark is entered. Signed-off-by: Johannes Schindelin --- add-interactive.c | 22 +- 1 file changed, 21 insertions(+), 1

[PATCH v2 01/11] Start to implement a built-in version of `git add --interactive`

2019-05-13 Thread Johannes Schindelin via GitGitGadget
From: Johannes Schindelin This is hardly the first conversion of a Git command that is implemented as a script to a built-in. So far, the most successful strategy for such conversions has been to add a built-in helper and call that for more and more functionality from the script, as more and more

[PATCH v2 11/11] built-in add -i: implement the `help` command

2019-05-13 Thread Johannes Schindelin via GitGitGadget
From: Johannes Schindelin This imitates the code to show the help text from the Perl script `git-add--interactive.perl` in the built-in version. To make sure that it renders exactly like the Perl version of `git add -i`, we also add a test case for that to `t3701-add-interactive.sh`. Signed-off

[PATCH 0/2] pkt-line: fix incorrect function declaration

2019-05-13 Thread Johannes Schindelin via GitGitGadget
MS Visual C detected a mismatch between the declaration and the definition of set_packet_header(): it is declared with its second parameter missing the const attribute. It also detected a mismatch between the declaration and the definition of parse_opt_unknown_cb(). These problems must have bee

[PATCH 1/2] pkt-line: fix declaration of `set_packet_header()`

2019-05-13 Thread Johannes Schindelin via GitGitGadget
From: Johannes Schindelin When this function was changed in a97d00799a19 (remote-curl: use post_rpc() for protocol v2 also, 2019-02-21) from file-local to global, the declaration was incorrectly missing the `const` qualifier. Let's fix that. Signed-off-by: Johannes Schindelin --- pkt-line.h |

[PATCH 2/2] parse-options: adjust `parse_opt_unknown_cb()`s declared return type

2019-05-13 Thread Johannes Schindelin via GitGitGadget
From: Johannes Schindelin In f41179f16ba2 (parse-options: avoid magic return codes, 2019-01-27), the signature of the low-level parse-opt callback function was changed to return an `enum`. And while the implementations were changed, one declaration was left unchanged, still claiming to return `i

[PATCH 1/1] stash: document stash.useBuiltin

2019-05-14 Thread Johannes Schindelin via GitGitGadget
From: Johannes Schindelin The stash.useBuiltin variable introduced in 90a462725e ("stash: optionally use the scripted version again", 2019-02-25) was turned on by default, but had no documentation. Let's document it so that users who run into any stability issues with the C rewrite know there's

[PATCH 0/1] Document the stash.useBuiltin escape hatch

2019-05-14 Thread Johannes Schindelin via GitGitGadget
Shamelessly copy-edited from Ævar's d8d0a546f0 (rebase doc: document rebase.useBuiltin, 2018-11-14) :-D Johannes Schindelin (1): stash: document stash.useBuiltin Documentation/config/stash.txt | 15 +++ 1 file changed, 15 insertions(+) base-commit: ab15ad1a3b4b04a29415aef8c9afa2

[PATCH 1/5] Drop unused git-rebase--am.sh

2019-05-14 Thread Johannes Schindelin via GitGitGadget
From: Johannes Schindelin Since 21853626ea (built-in rebase: call `git am` directly, 2019-01-18), the built-in rebase already uses the built-in `git am` directly. Now that d03ebd411c (rebase: remove the rebase.useBuiltin setting, 2019-03-18) even removed the scripted rebase, there is no longer a

[PATCH 0/5] Clean up after the removal of the scripted rebase

2019-05-14 Thread Johannes Schindelin via GitGitGadget
Technically, there is still one part that is scripted: git rebase --preserve-merges. But that is already deprecated, and the remaining parts really are no longer scripted. Meaning that we do not need git-rebase--am.sh. While at it, clean up a few other places that reference the scripted rebase, a

[PATCH 2/5] t3400: stop referring to the scripted rebase

2019-05-14 Thread Johannes Schindelin via GitGitGadget
From: Johannes Schindelin One test case's title mentioned the then-current implementation detail that the `--am` backend was implemented in `git-rebase--am.sh`. This is no longer the case, so let's update the title to reflect the current reality. Signed-off-by: Johannes Schindelin --- t/t3400

[PATCH 3/5] .gitignore: there is no longer a built-in `git-rebase--interactive`

2019-05-14 Thread Johannes Schindelin via GitGitGadget
From: Johannes Schindelin This went away in 0609b741a4 (rebase -i: combine rebase--interactive.c with rebase.c, 2019-04-17). Signed-off-by: Johannes Schindelin --- .gitignore | 1 - 1 file changed, 1 deletion(-) diff --git a/.gitignore b/.gitignore index 875f3fc6e8..bcee4fda81 100644 --- a/.g

[PATCH 4/5] sequencer: the `am` and `rebase--interactive` scripts are gone

2019-05-14 Thread Johannes Schindelin via GitGitGadget
From: Johannes Schindelin Update a code comment that referred to those files as if they were still there. Signed-off-by: Johannes Schindelin --- sequencer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sequencer.c b/sequencer.c index f88a97fb10..334de14542 100644 --- a/s

[PATCH 5/5] rebase: fold git-rebase--common into the -p backend

2019-05-14 Thread Johannes Schindelin via GitGitGadget
From: Johannes Schindelin The only remaining scripted part of `git rebase` is the `--preserve-merges` backend. Meaning: there is little reason to keep the "library of common rebase functions" as a separate file. While moving the functions to `git-rebase--preserve-merges.sh`, we also drop the `mo

[PATCH 0/2] Fix two issues pointed out by Coverity

2019-05-21 Thread Johannes Schindelin via GitGitGadget
I looked very briefly over the issues pointed out by Coverity, and decided to pluck these two low-hanging pieces of fruit. Johannes Schindelin (2): rebase: replace incorrect logical negation by correct bitwise one bisect--helper: verify HEAD could be parsed before continuing builtin/bisect--

[PATCH 1/2] rebase: replace incorrect logical negation by correct bitwise one

2019-05-21 Thread Johannes Schindelin via GitGitGadget
From: Johannes Schindelin In bff014dac7d9 (builtin rebase: support the `verbose` and `diffstat` options, 2018-09-04), we added a line that wanted to remove the `REBASE_DIFFSTAT` bit from the flags, but it used an incorrect negation. Found by Coverity. Signed-off-by: Johannes Schindelin --- bu

[PATCH 2/2] bisect--helper: verify HEAD could be parsed before continuing

2019-05-21 Thread Johannes Schindelin via GitGitGadget
From: Johannes Schindelin In 06f5608c14e6 (bisect--helper: `bisect_start` shell function partially in C, 2019-01-02), we introduced a call to `get_oid()` and did not check whether it succeeded before using its output. Signed-off-by: Johannes Schindelin --- builtin/bisect--helper.c | 5 - 1

[PATCH 1/2] fill_stat_cache_info(): prepare for an fsmonitor fix

2019-05-24 Thread Johannes Schindelin via GitGitGadget
From: Johannes Schindelin We will need to pass down the `struct index_state` to `mark_fsmonitor_valid()` for an upcoming bug fix, and this here function calls that there function, so we need to extend the signature of `fill_stat_cache_info()` first. Signed-off-by: Johannes Schindelin --- apply

[PATCH 2/2] mark_fsmonitor_valid(): mark the index as changed if needed

2019-05-24 Thread Johannes Schindelin via GitGitGadget
From: Johannes Schindelin Without this bug fix, t7519's four "status doesn't detect unreported modifications" test cases would fail occasionally (and, oddly enough, *a lot* more frequently on Windows). The reason is that these test cases intentionally use the side effect of `git status` to re-wr

[PATCH 0/2] Fix racy fsmonitor

2019-05-24 Thread Johannes Schindelin via GitGitGadget
The t7519-status-fsmonitor.sh tests became a lot more flaky with the recent fsmonitor fix (js/fsmonitor-refresh-after-discarding-index). That fix, however, did not introduce the flakiness, but it just made it much more likely to be hit. And it seemed to be hit only on Windows. The reason, though,

[PATCH 1/1] bundle verify: error out if called without an object database

2019-05-27 Thread Johannes Schindelin via GitGitGadget
From: Johannes Schindelin The deal with bundles is: they really are thin packs, with very little sugar on top. So we really need a repository (or more appropriately, an object database) to work with, when asked to verify a bundle. Let's error out with a useful error message if `git bundle verify

[PATCH 0/1] bundle verify: improve the user experience when called without a .git/ directory

2019-05-27 Thread Johannes Schindelin via GitGitGadget
The git bundle verify command really needs access to a .git/ directory. But it did not make sure, instead erroring out with a BUG(), making for a terrible user experience. This patch fixes that. Johannes Schindelin (1): bundle verify: error out if called without an object database bundle.c

[PATCH 1/3] tests: mark a couple more test cases as requiring `rebase -p`

2019-05-28 Thread Johannes Schindelin via GitGitGadget
From: Johannes Schindelin The `--preserve-merges` option has been deprecated, and as a consequence we started to mark test cases that require that option to be supported, in preparation for removing that support eventually. Since we marked those test cases, a couple more crept into the test suit

[PATCH 0/3] Deprecate git rebase -p even more

2019-05-28 Thread Johannes Schindelin via GitGitGadget
Turns out that I forgot a couple of spots when I sent the patch series to deprecate git rebase -p earlier... Johannes Schindelin (3): tests: mark a couple more test cases as requiring `rebase -p` docs: say that `--rebase=preserve` is deprecated rebase docs: recommend `-r` over `-p` Documen

[PATCH 3/3] rebase docs: recommend `-r` over `-p`

2019-05-28 Thread Johannes Schindelin via GitGitGadget
From: Johannes Schindelin The `--preserve-merges` option is now deprecated in favor of `--rebase-merges`; Let's stop recommending the former. Signed-off-by: Johannes Schindelin --- Documentation/git-rebase.txt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Documentati

[PATCH 2/3] docs: say that `--rebase=preserve` is deprecated

2019-05-28 Thread Johannes Schindelin via GitGitGadget
From: Johannes Schindelin As of Git v2.22.0, the `--preserve-merges` backend of `git rebase` will be officially deprecated in favor of the `--rebase-merges` backend. Consequently, `git pull --rebase=preserve` will also be deprected. State this explicitly. Signed-off-by: Johannes Schindelin ---

[PATCH 0/1] Optimize run_diff_files()' rename detection

2019-06-08 Thread Johannes Schindelin via GitGitGadget
Just another patch from Git for Windows' branch thicket... Jeff Hostetler (1): diffcore-rename: speed up register_rename_src diffcore-rename.c | 13 + 1 file changed, 13 insertions(+) base-commit: 8104ec994ea3849a968b4667d072fedd1e688642 Published-As: https://github.com/gitgitga

[PATCH 0/1] Fix a test on NTFS (and probably HFS+)

2019-06-08 Thread Johannes Schindelin via GitGitGadget
My colleague Jameson Miller once presented me with a nice puzzle why the test suite failed on their system. Turns out that it is possible in PowerShell to spell the directory with a different case than on disk in cd , and subsequent calls to get the current working directory will use that case, ra

[PATCH 1/1] t0001: fix on case-insensitive filesystems

2019-06-08 Thread Johannes Schindelin via GitGitGadget
From: Johannes Schindelin On a case-insensitive filesystem, such as HFS+ or NTFS, it is possible that the idea Bash has of the current directory differs in case from what Git thinks it is. That's totally okay, though, and we should not expect otherwise. Reported by Jameson Miller. Signed-off-by

[PATCH 1/1] ci: split the `linux-gcc` job into two jobs

2019-06-13 Thread Johannes Schindelin via GitGitGadget
From: Johannes Schindelin This job was abused to not only run the test suite in a regular way but also with all kinds of `GIT_TEST_*` options set to non-default values. Let's split this into two, with the `linux-gcc` job running the default test suite, and the newly-introduced `linux-gcc-extra`

[PATCH 0/1] ci: split linux-gcc into linux-gcc and linux-gcc-extra

2019-06-13 Thread Johannes Schindelin via GitGitGadget
For people like me, who often look at our CI builds, it is hard to tell whether test suite failures in the linux-gcc job stem from the first make test run, or from the second one, after setting all kinds of GIT_TEST_* variables to non-default values. Let's make it easier on people like me. This

[PATCH 4/4] config: avoid calling `labs()` on too-large data type

2019-06-13 Thread Johannes Schindelin via GitGitGadget
From: Johannes Schindelin The `labs()` function operates, as the initial `l` suggests, on `long` parameters. However, in `config.c` we tried to use it on values of type `intmax_t`. This problem was found by GCC v9.x. To fix it, let's just "unroll" the function (i.e. negate the value if it is ne

[PATCH 2/4] kwset: allow building with GCC 8

2019-06-13 Thread Johannes Schindelin via GitGitGadget
From: Johannes Schindelin The kwset functionality makes use of the obstack code, which expects to be handed a function that can allocate large chunks of data. It expects that function to accept a `size` parameter of type `long`. This upsets GCC 8 on Windows, because `long` does not have the same

[PATCH 1/4] poll (mingw): allow compiling with GCC 8 and DEVELOPER=1

2019-06-13 Thread Johannes Schindelin via GitGitGadget
From: Johannes Schindelin The return type of the `GetProcAddress()` function is `FARPROC` which evaluates to `long long int (*)()`, i.e. it cannot be cast to the correct function signature by GCC 8. To work around that, we first cast to `void *` and go on with our merry lives. Signed-off-by: Jo

[PATCH 0/4] Support building with GCC v8.x/v9.x

2019-06-13 Thread Johannes Schindelin via GitGitGadget
I noticed a while ago that I could not build Git's master in Git for Windows' SDK when using GCC v8.x. This became a much less pressing problem when I discovered a serious bug that would not let us compile with ASLR/DEP enabled (the resulting executables would just throw segmentation faults left an

[PATCH 3/4] winansi: simplify loading the GetCurrentConsoleFontEx() function

2019-06-13 Thread Johannes Schindelin via GitGitGadget
From: Johannes Schindelin We introduced helper macros to simplify loading functions dynamically. Might just as well use them. This also side-steps a compiler warning when building with GCC v8.x: it would complain about casting between incompatible function pointers. Signed-off-by: Johannes Schi

[PATCH 1/1] t3404: fix a typo

2019-06-14 Thread Johannes Schindelin via GitGitGadget
From: Johannes Schindelin This one slipped through the review of a9279c678588 (sequencer: do not squash 'reword' commits when we hit conflicts, 2018-06-19). Signed-off-by: Johannes Schindelin --- t/t3404-rebase-interactive.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/

[PATCH 0/1] t3404: fix a typo

2019-06-14 Thread Johannes Schindelin via GitGitGadget
Just a typo I found while debugging something else. Johannes Schindelin (1): t3404: fix a typo t/t3404-rebase-interactive.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) base-commit: 0aae918dd929862d3ce0ea2960897787bb269a3b Published-As: https://github.com/gitgitgadget/git/releases

[PATCH 04/17] obstack: fix compiler warning

2019-06-18 Thread Johannes Schindelin via GitGitGadget
From: Johannes Schindelin MS Visual C suggests that the construct condition ? (int) i : (ptrdiff_t) d is incorrect. Let's fix this by casting to ptrdiff_t also for the positive arm of the conditional. Signed-off-by: Johannes Schindelin --- compat/obstack.h | 2 +- 1 file changed, 1 i

[PATCH 01/17] Mark .bat files as requiring CR/LF endings

2019-06-18 Thread Johannes Schindelin via GitGitGadget
From: Johannes Schindelin Just like the natural line ending for Unix shell scripts consist of a single Line Feed, the natural line ending for (DOS) Batch scripts consists of a Carriage Return followed by a Line Feed. It seems that both Unix shell script interpreters and the interpreter for Batch

[PATCH 05/17] mingw: replace mingw_startup() hack

2019-06-18 Thread Johannes Schindelin via GitGitGadget
From: Johannes Schindelin Git for Windows has special code to retrieve the command-line parameters (and even the environment) in UTF-16 encoding, so that they can be converted to UTF-8. This is necessary because Git for Windows wants to use UTF-8 encoded strings throughout its code, and the main(

[PATCH 00/17] Fix MSVC support, at long last

2019-06-18 Thread Johannes Schindelin via GitGitGadget
Philip Oakley and Jeff Hostetler worked quite a bit on getting Git to compile with MS Visual C again, and this patch series is the culmination of those efforts. With these patches, it is as easy as make MSVC=1 Note: the patches went through quite the number of iterations. For example, for a long

[PATCH 02/17] t0001 (mingw): do not expect a specific order of stdout/stderr

2019-06-18 Thread Johannes Schindelin via GitGitGadget
From: Johannes Schindelin When redirecting stdout/stderr to the same file, we cannot guarantee that stdout will come first. In fact, in this test case, it seems that an MSVC build always prints stderr first. In any case, this test case does not want to verify the *order* but the *presence* of b

[PATCH 16/17] msvc: avoid debug assertion windows in Debug Mode

2019-06-18 Thread Johannes Schindelin via GitGitGadget
From: Johannes Schindelin For regular debugging, it is pretty helpful when a debug assertion in a running application triggers a window that offers to start the debugger. However, when running the test suite, it is not so helpful, in particular when the debug assertions are then suppressed anywa

[PATCH 06/17] msvc: fix dependencies of compat/msvc.c

2019-06-18 Thread Johannes Schindelin via GitGitGadget
From: Johannes Schindelin The file compat/msvc.c includes compat/mingw.c, which means that we have to recompile compat/msvc.o if compat/mingw.c changes. Signed-off-by: Johannes Schindelin --- config.mak.uname | 2 ++ 1 file changed, 2 insertions(+) diff --git a/config.mak.uname b/config.mak.u

[PATCH v2 00/20] Fix MSVC support, at long last

2019-06-19 Thread Johannes Schindelin via GitGitGadget
Philip Oakley and Jeff Hostetler worked quite a bit on getting Git to compile with MS Visual C again, and this patch series is the culmination of those efforts. With these patches, it is as easy as make MSVC=1 Note: the patches went through quite the number of iterations. For example, for a long

[PATCH v2 01/20] mingw: fix a typo in the msysGit-specific section

2019-06-19 Thread Johannes Schindelin via GitGitGadget
From: Johannes Schindelin The msysGit project (i.e. Git for Windows 1.x' SDK) is safely dead for *years* already. This is probably the reason why nobody caught this typo until Carlo Arenas spotted a copy-edited version of it nearby. It is probably about time to rip out the remainders of msysGit/

[PATCH v2 02/20] Mark .bat files as requiring CR/LF endings

2019-06-19 Thread Johannes Schindelin via GitGitGadget
From: Johannes Schindelin Just like the natural line ending for Unix shell scripts consist of a single Line Feed, the natural line ending for (DOS) Batch scripts consists of a Carriage Return followed by a Line Feed. It seems that both Unix shell script interpreters and the interpreter for Batch

[PATCH v2 03/20] t0001 (mingw): do not expect a specific order of stdout/stderr

2019-06-19 Thread Johannes Schindelin via GitGitGadget
From: Johannes Schindelin When redirecting stdout/stderr to the same file, we cannot guarantee that stdout will come first. In fact, in this test case, it seems that an MSVC build always prints stderr first. In any case, this test case does not want to verify the *order* but the *presence* of b

[PATCH v2 07/20] msvc: fix dependencies of compat/msvc.c

2019-06-19 Thread Johannes Schindelin via GitGitGadget
From: Johannes Schindelin The file compat/msvc.c includes compat/mingw.c, which means that we have to recompile compat/msvc.o if compat/mingw.c changes. Signed-off-by: Johannes Schindelin --- config.mak.uname | 2 ++ 1 file changed, 2 insertions(+) diff --git a/config.mak.uname b/config.mak.u

[PATCH v2 06/20] mingw: replace mingw_startup() hack

2019-06-19 Thread Johannes Schindelin via GitGitGadget
From: Johannes Schindelin Git for Windows has special code to retrieve the command-line parameters (and even the environment) in UTF-16 encoding, so that they can be converted to UTF-8. This is necessary because Git for Windows wants to use UTF-8 encoded strings throughout its code, and the main(

[PATCH v2 05/20] obstack: fix compiler warning

2019-06-19 Thread Johannes Schindelin via GitGitGadget
From: Johannes Schindelin MS Visual C suggests that the construct condition ? (int) i : (ptrdiff_t) d is incorrect. Let's fix this by casting to ptrdiff_t also for the positive arm of the conditional. Signed-off-by: Johannes Schindelin --- compat/obstack.h | 2 +- 1 file changed, 1 i

[PATCH v2 19/20] msvc: avoid debug assertion windows in Debug Mode

2019-06-19 Thread Johannes Schindelin via GitGitGadget
From: Johannes Schindelin For regular debugging, it is pretty helpful when a debug assertion in a running application triggers a window that offers to start the debugger. However, when running the test suite, it is not so helpful, in particular when the debug assertions are then suppressed anywa

[PATCH v3 03/20] t0001 (mingw): do not expect a specific order of stdout/stderr

2019-06-25 Thread Johannes Schindelin via GitGitGadget
From: Johannes Schindelin When redirecting stdout/stderr to the same file, we cannot guarantee that stdout will come first. In fact, in this test case, it seems that an MSVC build always prints stderr first. In any case, this test case does not want to verify the *order* but the *presence* of b

[PATCH v3 00/20] Fix MSVC support, at long last

2019-06-25 Thread Johannes Schindelin via GitGitGadget
Philip Oakley and Jeff Hostetler worked quite a bit on getting Git to compile with MS Visual C again, and this patch series is the culmination of those efforts. With these patches, it is as easy as make MSVC=1 Note: the patches went through quite the number of iterations. For example, for a long

[PATCH v3 05/20] obstack: fix compiler warning

2019-06-25 Thread Johannes Schindelin via GitGitGadget
From: Johannes Schindelin MS Visual C suggests that the construct condition ? (int) i : (ptrdiff_t) d is incorrect. Let's fix this by casting to ptrdiff_t also for the positive arm of the conditional. Signed-off-by: Johannes Schindelin --- compat/obstack.h | 2 +- 1 file changed, 1 i

[PATCH v3 01/20] mingw: fix a typo in the msysGit-specific section

2019-06-25 Thread Johannes Schindelin via GitGitGadget
From: Johannes Schindelin The msysGit project (i.e. Git for Windows 1.x' SDK) is safely dead for *years* already. This is probably the reason why nobody caught this typo until Carlo Arenas spotted a copy-edited version of it nearby. It is probably about time to rip out the remainders of msysGit/

[PATCH v3 02/20] Mark .bat files as requiring CR/LF endings

2019-06-25 Thread Johannes Schindelin via GitGitGadget
From: Johannes Schindelin Just like the natural line ending for Unix shell scripts consist of a single Line Feed, the natural line ending for (DOS) Batch scripts consists of a Carriage Return followed by a Line Feed. It seems that both Unix shell script interpreters and the interpreter for Batch

[PATCH v3 07/20] msvc: fix dependencies of compat/msvc.c

2019-06-25 Thread Johannes Schindelin via GitGitGadget
From: Johannes Schindelin The file compat/msvc.c includes compat/mingw.c, which means that we have to recompile compat/msvc.o if compat/mingw.c changes. Signed-off-by: Johannes Schindelin --- config.mak.uname | 2 ++ 1 file changed, 2 insertions(+) diff --git a/config.mak.uname b/config.mak.u

[PATCH v3 06/20] mingw: replace mingw_startup() hack

2019-06-25 Thread Johannes Schindelin via GitGitGadget
From: Johannes Schindelin Git for Windows has special code to retrieve the command-line parameters (and even the environment) in UTF-16 encoding, so that they can be converted to UTF-8. This is necessary because Git for Windows wants to use UTF-8 encoded strings throughout its code, and the main(

[PATCH v3 19/20] msvc: avoid debug assertion windows in Debug Mode

2019-06-25 Thread Johannes Schindelin via GitGitGadget
From: Johannes Schindelin For regular debugging, it is pretty helpful when a debug assertion in a running application triggers a window that offers to start the debugger. However, when running the test suite, it is not so helpful, in particular when the debug assertions are then suppressed anywa

[PATCH 1/1] Let rebase.reschedulefailedexec only affect interactive rebases

2019-06-27 Thread Johannes Schindelin via GitGitGadget
From: Johannes Schindelin It does not make sense to stop non-interactive rebases when that config setting is set to `true`. Reported by Vas Sudanagunta via: https://github.com/git/git/commit/969de3ff0e0#commitcomment-33257187 Signed-off-by: Johannes Schindelin --- builtin/rebase.c |

[PATCH 0/1] Make rebase.reschedulefailedexec less overzealous

2019-06-27 Thread Johannes Schindelin via GitGitGadget
This config setting is pretty useful, but it unfortunately stops all non-interactive rebases with a bogus error message. This patch fixes that. Reported via a commit comment on GitHub [https://github.com/git/git/commit/969de3ff0e0#commitcomment-33257187]. Johannes Schindelin (1): Let rebase.res

[PATCH 0/1] gettext(windows): always use UTF-8

2019-06-27 Thread Johannes Schindelin via GitGitGadget
The main issue we work around here is that Windows does not have a UTF-8 "code page". Side note: there is actually a code page for UTF-8: 65001 (see https://docs.microsoft.com/en-us/windows/desktop/Intl/code-page-identifiers ). However, when experimenting with it, we ran into a multitude of issue

[PATCH 0/1] windows: embed a manifest

2019-06-27 Thread Johannes Schindelin via GitGitGadget
On Windows, you can embed a "manifest" into an executable that changes behavior in subtle (and not so subtle) ways. Let's embed one, to be able to define precisely what behavior we want. Cesar Eduardo Barros (1): mingw: embed a manifest to trick UAC into Doing The Right Thing compat/win32/git.

[PATCH 1/1] mingw: enable stack smashing protector

2019-06-27 Thread Johannes Schindelin via GitGitGadget
From: Johannes Schindelin To reduce Git for Windows' attack surface, we started using the Address Space Layout Randomization and Data Execution Prevention features in ce6a158561f9 (mingw: enable DEP and ASLR, 2019-05-08). To remove yet another attack vector, let's make use of gcc's stack smashin

[PATCH 0/1] mingw: enable GCC's stack smashing protector

2019-06-27 Thread Johannes Schindelin via GitGitGadget
Recently, I managed to upstream the Data Execution Prevention/Address Space Layout Randomization patches of Git for Windows. Now it is time to add to that by also enabling GCC's augmenting feature which reduces the attack surface even further. Johannes Schindelin (1): mingw: enable stack smashin

[PATCH 1/2] mingw: get pw_name in UTF-8 format

2019-06-27 Thread Johannes Schindelin via GitGitGadget
From: Johannes Schindelin Previously, we would have obtained the user name encoded in whatever the current code page is. Note: the "user name" here does not denote the full name but instead the short logon name. Signed-off-by: Johannes Schindelin --- compat/mingw.c | 10 -- 1 file cha

[PATCH 0/2] Let's use the Win32 API more precisely

2019-06-27 Thread Johannes Schindelin via GitGitGadget
For many Win32 functions, there actually exist two variants: one that takes const char * ("ANSI", meaning the current code page) and wchar_t * ("Unicode", i.e. UTF-16, at least for all practical matters). These functions have "A" and "W" suffixes, respectively, e.g. GetFileAttributesW(). The sy

[PATCH 2/2] mingw: use Unicode functions explicitly

2019-06-27 Thread Johannes Schindelin via GitGitGadget
From: Johannes Schindelin Many Win32 API functions actually exist in two variants: one with the `A` suffix that takes ANSI parameters (`char *` or `const char *`) and one with the `W` suffix that takes Unicode parameters (`wchar_t *` or `const wchar_t *`). The ANSI variant assumes that the strin

[PATCH v2 0/1] Make rebase.reschedulefailedexec less overzealous

2019-07-01 Thread Johannes Schindelin via GitGitGadget
This config setting is pretty useful, but it unfortunately stops all non-interactive rebases with a bogus error message. This patch fixes that. Reported via a commit comment on GitHub [https://github.com/git/git/commit/969de3ff0e0#commitcomment-33257187]. Changes since v1: * Based on Junio's ad

[PATCH v2 1/1] rebase --am: ignore rebase.reschedulefailedexec

2019-07-01 Thread Johannes Schindelin via GitGitGadget
From: Johannes Schindelin The `exec` command is specific to the interactive backend, therefore it does not make sense for non-interactive rebases to heed that config setting. We still want to error out if a non-interactive rebase is started with `--reschedule-failed-exec`, of course. Reported b

[PATCH v2 0/1] gettext(windows): always use UTF-8

2019-07-03 Thread Johannes Schindelin via GitGitGadget
The main issue we work around here is that Windows does not have a UTF-8 "code page". Side note: there is actually a code page for UTF-8: 65001 (see https://docs.microsoft.com/en-us/windows/desktop/Intl/code-page-identifiers ). However, when experimenting with it, we ran into a multitude of issue

[PATCH 1/1] Avoid illegal filenames when building Documentation on NTFS

2019-07-04 Thread Johannes Schindelin via GitGitGadget
From: Johannes Schindelin A `+` is not a valid part of a filename with Windows file systems (it is reserved because the `+` operator meant file concatenation back in the DOS days). When building in Git for Windows' SDK, the `make.exe` that interprets our `Makefile` is an MSYS2 program, which use

[PATCH 0/1] windows: avoid illegal filenames during a build

2019-07-04 Thread Johannes Schindelin via GitGitGadget
The + is not allowed on NTFS filesystems. Even if the MSYS2 make/bash we use to build Git for Windows can work around it, it is not necessary. Johannes Schindelin (1): Avoid illegal filenames when building Documentation on NTFS Documentation/Makefile | 88 +-

[PATCH 1/1] diff: munmap() file contents before running external diff

2019-07-04 Thread Johannes Schindelin via GitGitGadget
From: Johannes Schindelin When running an external diff from, say, a diff tool, it is safe to assume that we want to write the files in question. On Windows, that means that there cannot be any other process holding an open handle to said files. So let's make sure that `git diff` itself is not h

[PATCH 0/1] diff: release all handles before running external diff

2019-07-04 Thread Johannes Schindelin via GitGitGadget
On Windows, it is not possible to overwrite a file as long as any process holds a read handle to it. Even keeping regions memory-mapped prevents that. When git difftool calls git diff, it might be the user's intention to write the file(s) via the diff tool, so let's make sure that they are not mem

[PATCH 0/1] Give Git a HOME on Windows

2019-07-04 Thread Johannes Schindelin via GitGitGadget
The environment variable HOME is a well-known concept on Unix/Linux, but not so much on Windows. In fact, there are competing concepts, and they fulfill separate roles. Let's try to map the closest that we can find to HOME so that Git is happy. Git for Windows carries this patch since 2015, so I

[PATCH 0/1] Follow-up on top of js/mingw-use-utf8

2019-07-04 Thread Johannes Schindelin via GitGitGadget
A quick fix for a patch that is already in next. Johannes Schindelin (1): mingw: fix possible buffer overrun when calling `GetUserNameW()` compat/mingw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) base-commit: 94238859b9809afc806919cb7022a45cdc8e6748 Published-As: https://github.

[PATCH 1/1] mingw: fix possible buffer overrun when calling `GetUserNameW()`

2019-07-04 Thread Johannes Schindelin via GitGitGadget
From: Johannes Schindelin In 39a98e9b68b8 (mingw: get pw_name in UTF-8 format, 2019-06-27), this developer missed the fact that the `GetUserNameW()` function takes the number of characters as `len` parameter, not the number of bytes. Reported-by: Beat Bolli Signed-off-by: Johannes Schindelin -

[PATCH v2 1/1] diff: munmap() file contents before running external diff

2019-07-11 Thread Johannes Schindelin via GitGitGadget
From: Johannes Schindelin When running an external diff from, say, a diff tool, it is safe to assume that we want to write the files in question. On Windows, that means that there cannot be any other process holding an open handle to said files, or even just a mapped region. So let's make sure t

[PATCH v2 0/1] diff: release all handles before running external diff

2019-07-11 Thread Johannes Schindelin via GitGitGadget
On Windows, it is not possible to overwrite a file as long as any process holds a read handle to it. Even keeping regions memory-mapped prevents that. When git difftool calls git diff, it might be the user's intention to write the file(s) via the diff tool, so let's make sure that they are not mem

[PATCH 0/1] mingw: support spawning programs with paths containing spacesnames

2019-07-16 Thread Johannes Schindelin via GitGitGadget
This is a patch to support older Windows versions (e.g. Windows 7) better. I know, I know, Windows 7's End-Of-Life is now less than half a year away, but... I am unsure just how long Git for Windows will support Windows 7 beyond its officially-supported life; We still support Windows Vista, after

[PATCH 1/1] mingw: support spawning programs containing spaces in their names

2019-07-16 Thread Johannes Schindelin via GitGitGadget
From: Johannes Schindelin On some older Windows versions (e.g. Windows 7), the CreateProcessW() function does not really support spaces in its first argument, lpApplicationName. But it supports passing NULL as lpApplicationName, which makes it figure out the application from the (possibly quoted)

[PATCH 1/1] clean: show an error message when the path is too long

2019-07-16 Thread Johannes Schindelin via GitGitGadget
From: Johannes Schindelin Without an error message when stat() failed, e.g. `git clean` would abort without an error message, leaving the user quite puzzled. In particular on Windows, where the default maximum path length is quite small (yet there are ways to circumvent that limit in many cases)

[PATCH 0/1] Show an error if too-long paths are seen by git clean -dfx

2019-07-16 Thread Johannes Schindelin via GitGitGadget
This is particularly important on Windows, where PATH_MAX is very small compared to Unix/Linux. Johannes Schindelin (1): clean: show an error message when the path is too long builtin/clean.c | 3 ++- t/t7300-clean.sh | 11 +++ 2 files changed, 13 insertions(+), 1 deletion(-) base-

[PATCH v3 09/11] built-in add -i: support `?` (prompt help)

2019-07-16 Thread Johannes Schindelin via GitGitGadget
From: Johannes Schindelin With this change, we print out the same colored help text that the Perl-based `git add -i` prints in the main loop when question mark is entered. Signed-off-by: Johannes Schindelin --- add-interactive.c | 22 +- 1 file changed, 21 insertions(+), 1

[PATCH v3 01/11] Start to implement a built-in version of `git add --interactive`

2019-07-16 Thread Johannes Schindelin via GitGitGadget
From: Johannes Schindelin This is hardly the first conversion of a Git command that is implemented as a script to a built-in. So far, the most successful strategy for such conversions has been to add a built-in helper and call that for more and more functionality from the script, as more and more

[PATCH v3 04/11] built-in add -i: refresh the index before running `status`

2019-07-16 Thread Johannes Schindelin via GitGitGadget
From: Johannes Schindelin This is what the Perl version does, and therefore it is what the built-in version should do, too. Signed-off-by: Johannes Schindelin --- add-interactive.c | 4 +++- repository.c | 19 +++ repository.h | 7 +++ 3 files changed, 29 insert

[PATCH v3 00/11] git add -i: add a rudimentary version in C (supporting only status and help so far)

2019-07-16 Thread Johannes Schindelin via GitGitGadget
This is the first leg on the long journey to a fully built-in git add -i (next up: parts 2 [https://github.com/gitgitgadget/git/pull/171], 3 [https://github.com/gitgitgadget/git/pull/172], 4 [https://github.com/gitgitgadget/git/pull/173], 5 [https://github.com/gitgitgadget/git/pull/174], and 6 [ht

[PATCH v3 06/11] built-in add -i: implement the main loop

2019-07-16 Thread Johannes Schindelin via GitGitGadget
From: Johannes Schindelin The reason why we did not start with the main loop to begin with is that it is the first user of `list_and_choose()`, which uses the `list()` function that we conveniently introduced for use by the `status` command. Apart from the "and choose" part, there are more diffe

[PATCH v3 05/11] built-in add -i: color the header in the `status` command

2019-07-16 Thread Johannes Schindelin via GitGitGadget
From: Johannes Schindelin For simplicity, we only implemented the `status` command without colors. This patch starts adding color, matching what the Perl script `git-add--interactive.perl` does. Original-Patch-By: Daniel Ferreira Signed-off-by: Slavica Djukic Signed-off-by: Johannes Schindelin

[PATCH v3 11/11] built-in add -i: implement the `help` command

2019-07-16 Thread Johannes Schindelin via GitGitGadget
From: Johannes Schindelin This imitates the code to show the help text from the Perl script `git-add--interactive.perl` in the built-in version. To make sure that it renders exactly like the Perl version of `git add -i`, we also add a test case for that to `t3701-add-interactive.sh`. Signed-off

[PATCH v2 0/1] Show an error if too-long paths are seen by git clean -dfx

2019-07-18 Thread Johannes Schindelin via GitGitGadget
This is particularly important on Windows, where PATH_MAX is very small compared to Unix/Linux. Changes since v1: * Matched the warning message style to existing ones, * Fixed test in multiple ways: * Avoiding touch in favor of : >. * Using test_config. * Using test_i18ngrep instead of

[PATCH v2 1/1] clean: show an error message when the path is too long

2019-07-18 Thread Johannes Schindelin via GitGitGadget
From: Johannes Schindelin Without an error message when `lstat()` failed, `git clean` would abort without an error message, leaving the user quite puzzled. In particular on Windows, where the default maximum path length is quite small (yet there are ways to circumvent that limit in many cases),

[PATCH 00/24] Reinstate support for Visual Studio

2019-07-18 Thread Johannes Schindelin via GitGitGadget
A long time ago, we added support to build .sln and .vcproj files for use within Visual Studio, so that Git could be built in that popular IDE. This support languished for years and was finally brought back into Git for Windows partially through the jh/msvc branch that was just merged into master

[PATCH 04/24] Vcproj.pm: urlencode '<' and '>' when generating VC projects

2019-07-18 Thread Johannes Schindelin via GitGitGadget
From: Johannes Schindelin Signed-off-by: Johannes Schindelin --- contrib/buildsystems/Generators/Vcproj.pm | 8 1 file changed, 8 insertions(+) diff --git a/contrib/buildsystems/Generators/Vcproj.pm b/contrib/buildsystems/Generators/Vcproj.pm index b17800184c..737647e76a 100644 --- a

[PATCH 03/24] Vcproj.pm: do not configure VCWebServiceProxyGeneratorTool

2019-07-18 Thread Johannes Schindelin via GitGitGadget
From: Johannes Schindelin It is not necessary, and Visual Studio 2015 no longer supports it, anyway. Signed-off-by: Johannes Schindelin --- contrib/buildsystems/Generators/Vcproj.pm | 12 1 file changed, 12 deletions(-) diff --git a/contrib/buildsystems/Generators/Vcproj.pm b/co

[PATCH 18/24] msvc: add a Makefile target to pre-generate the Visual Studio solution

2019-07-18 Thread Johannes Schindelin via GitGitGadget
From: Johannes Schindelin The entire idea of generating the VS solution makes only sense if we generate it via Continuous Integration; otherwise potential users would still have to download the entire Git for Windows SDK. If we pre-generate the Visual Studio solution, Git can be built entirely w

[PATCH 12/24] contrib/buildsystems: error out on unknown option

2019-07-18 Thread Johannes Schindelin via GitGitGadget
From: Johannes Schindelin One time too many did this developer call the `generate` script passing a `--make-out=` option that was happily ignored (because there should be a space, not an equal sign, between `--make-out` and the path). And one time too many, this script not only ignored it but di

<    1   2   3   4   5   6   7   8   9   10   >