Skip to content

Two things I totally forgot #1864

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Oct 4, 2018
Merged

Conversation

dscho
Copy link
Member

@dscho dscho commented Oct 4, 2018

One thing is a fix for a patch in the builtin-rebase part: it had been pointed out that one of the patches introduced a 0 where a NULL would have been correct (I had missed this because it was not sent as a reply to the original mail thread).

The other thing is more subtle, and even more worrisome: due to the way we start with a merging rebase, all patches that had been part of a previous branch thicket are assumed to be applied already. But this is not the case for branches we merged directly from https://github.com/gitster/git's branches: they would have to be re-applied. Previously, this was not a problem because merging rebases always rebased everything on top of the initial merge commit. But with the introduction of git rebase --rebase-merges, we switched to that mode, and that mode uses the no-rebase-cousins mode by default. Meaning: branches we merged that are not based on Git for Windows' master, but are based on commits reachable from core Git's master, are lost during merging rebases.

I noticed this yesterday, by pure luck, with the patch that teaches Git GUI about core.hooksPath. It was applied, but subsequently lost in a merging rebase.

Happily, I could verify (by looking manually through the latest 10 merging rebases) that this was the only such case.

This PR addresses both oversights.

dscho added 4 commits October 4, 2018 14:46
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 versions older than v2.5.0 (which was the first version to
support the `--git-path` option for the `rev-parse` command), we
simply fall back to the previous code.

This fixes git-for-windows#1755

Initial-patch-by: Philipp Gortan <[email protected]>
Signed-off-by: Johannes Schindelin <[email protected]>
The constant `0` is not the correct one for pointers.

Signed-off-by: Johannes Schindelin <[email protected]>
Ramsay pointed this out, but not in the email thread of the patches
themselves, so I had missed this earlier.

Signed-off-by: Johannes Schindelin <[email protected]>
@dscho dscho requested a review from jamill October 4, 2018 12:57
@dscho dscho merged commit 79ff0c6 into git-for-windows:master Oct 4, 2018
@dscho dscho deleted the reinstate-cousins branch October 4, 2018 18:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants