Commit Graph

96875 Commits

Author SHA1 Message Date
Johannes Schindelin
3dfe7f7bb9 built-in rebase: demonstrate that ORIG_HEAD is not set correctly
The ORIG_HEAD pseudo ref is supposed to refer to the original,
pre-rebase state after a successful rebase. Let's add a regression test
to prove that this regressed: With GIT_TEST_REBASE_USE_BUILTIN=false,
this test case passes, with GIT_TEST_REBASE_USE_BUILTIN=true (or unset),
it fails.

Reported by Nazri Ramliy.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2019-03-07 10:23:00 +01:00
Johannes Schindelin
f13cff1f64 built-in rebase: use the correct reflog when switching branches
By mistake, we used the reflog intended for ORIG_HEAD.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2019-03-07 10:22:59 +01:00
Johannes Schindelin
6264310893 built-in rebase: no need to check out onto twice
In the case that the rebase boils down to a fast-forward, the built-in
rebase reset the working tree twice: once to start the rebase at `onto`,
then realizing that the original (pre-rebase) HEAD was an ancestor and
we basically already fast-forwarded to the post-rebase HEAD,
`reset_head()` was called to update the original ref and to point HEAD
back to it.

That second `reset_head()` call does not need to touch the working tree,
though, as it does not change the actual tip commit (and therefore the
working tree should stay unchanged anyway): only the ref needs to be
updated (because the rebase detached the HEAD, and we want to go back to
the branch on which the rebase was started).

But that second `reset_head()` was called without the flag to leave the
working tree alone (the reason: when that call was introduced, that flag
was not yet even thought of). Let's avoid that unnecessary work by
passing that flag.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2019-03-07 10:22:59 +01:00
Johannes Schindelin
da5a923050 Merge pull request #2102 from dscho/fix-msvc
msvc: add forgotten source file
2019-02-28 13:37:18 +01:00
Johannes Schindelin
d4d3efbe10 msvc: add forgotten source file
In 1cadad6f65 (git clone <url> C:\cygwin\home\USER\repo' is working
(again), 2018-12-15), we introduced a new source file, containing
utility functions on Windows. But we forgot to adjust the MSVC section.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2019-02-28 13:31:50 +01:00
Johannes Schindelin
fcbaede58b Merge pull request #2101 from yashb5/typo-gitattributes
gitattributes.txt: fix typo
2019-02-28 13:15:03 +01:00
Yash Bhatambare
c0f7219ba1 gitattributes.txt: fix typo
`UTF-16-LE-BOM` to `UTF-16LE-BOM`.

this closes https://github.com/git-for-windows/git/issues/2095

Signed-off-by: Yash Bhatambare <ybhatambare@gmail.com>
2019-02-28 17:01:47 +05:30
Johannes Schindelin
2481c4cbe9 Merge pull request #2091 from dscho/symlink-attr-extra
Touch up symlink .gitattributes support
v2.21.0.windows.1
2019-02-26 17:13:28 +01:00
Johannes Schindelin
f6431ebcae Merge pull request #2092 from dscho/mingw-safer-compat-poll
fixup! poll: lazy-load GetTickCount64()
2019-02-25 23:17:39 +01:00
Bert Belder
74e71f1c3c mingw: allow to specify the symlink type in .gitattributes
On Windows, symbolic links have a type: a "file symlink" must point at
a file, and a "directory symlink" must point at a directory. If the
type of symlink does not match its target, it doesn't work.

Git does not record the type of symlink in the index or in a tree. On
checkout it'll guess the type, which only works if the target exists
at the time the symlink is created. This may often not be the case,
for example when the link points at a directory inside a submodule.

By specifying `symlink=file` or `symlink=dir` the user can specify what
type of symlink Git should create, so Git doesn't have to rely on
unreliable heuristics.

Signed-off-by: Bert Belder <bertbelder@gmail.com>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2019-02-25 21:26:11 +01:00
Johannes Schindelin
ec3a6e598e Merge pull request #2093 from dscho/release-gc-repack
Drop duplicate patch
2019-02-25 21:09:32 +01:00
Johannes Schindelin
7da09845f1 fixup! gc/repack: release packs when needed
This drops the patch that made it already upstream (and Git for Windows
added the line *another* time)...

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2019-02-25 08:14:54 +01:00
Johannes Schindelin
bf6414811d fixup! poll: lazy-load GetTickCount64()
This is another left-over from the pre-Vista times.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2019-02-24 22:51:35 +01:00
Johannes Schindelin
65225ba2dd Introduce helper to create symlinks that knows about index_state
On Windows, symbolic links actually have a type depending on the target:
it can be a file or a directory.

In certain circumstances, this poses problems, e.g. when a symbolic link
is supposed to point into a submodule that is not checked out, so there
is no way for Git to auto-detect the type.

To help with that, we will add support over the course of the next
commits to specify that symlink type via the Git attributes. This
requires an index_state, though, something that Git for Windows'
`symlink()` replacement cannot know about because the function signature
is defined by the POSIX standard and not ours to change.

So let's introduce a helper function to create symbolic links that
*does* know about the index_state.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2019-02-24 22:03:28 +01:00
Johannes Schindelin
0ea8e6532d fixup! Win32: symlink: specify symlink type in .gitattributes
Since `git_check_attr()` implicitly depends on the index, we really
should redo this in a manner that has a chance of going into upstream:
by introducing an index-aware helper function to create symbolic links,
and to override that in a Windows-specific manner instead.

In preparation for this, let's drop the original commit for now.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2019-02-24 22:01:27 +01:00
Johannes Schindelin
0fd7b8c613 Merge pull request #1354 from dscho/phase-out-show-ignored-directory-gracefully
Phase out `--show-ignored-directory` gracefully
2019-02-24 21:43:13 +01:00
Johannes Schindelin
3a852e7fbb Merge branch 'status-no-lock-index'
This branch allows third-party tools to call `git status
--no-lock-index` to avoid lock contention with the interactive Git usage
of the actual human user.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2019-02-24 21:43:12 +01:00
Jameson Miller
11f4841e33 Merge 'builtin-stash-rebase-v3'
To avoid having to play tricks as in earlier rounds, we bit the sour
apple and rebased the `builtin-stash-rebase-v3` branch thicket onto the
commit starting Git for Windows' merging-rebase.

(The merging-rebase pulls in the previous branch thicket via a "fake
merge", i.e. a merge commit that does not actually apply any changes
from the merged commit history. This has the unfortunate side effect of
confusing `merge` into thinking that any branch that was merged into an
earlier round does not need to be merged again.)

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2019-02-24 21:43:12 +01:00
Johannes Schindelin
e3b193c3b4 Merge 'readme' into HEAD
Add a README.md for GitHub goodness.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2019-02-24 21:43:11 +01:00
Johannes Schindelin
4ae836b9e0 Merge branch 'fix-terminal-prompt'
This fixes the issue identified in

	https://github.com/git-for-windows/git/issues/1498

where Git would not fall back to reading credentials from a Win32
Console when the credentials could not be read from the terminal via the
Bash hack (that is necessary to support running in a MinTTY).

Tested in a Powershell window.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2019-02-24 21:43:10 +01:00
Johannes Schindelin
d4f952ba50 Merge pull request #1170 from dscho/mingw-kill-process
Handle Ctrl+C in Git Bash nicely

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2019-02-24 21:43:10 +01:00
Johannes Schindelin
f2737ea948 Merge branch 'fsync-object-files-always'
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2019-02-24 21:43:09 +01:00
Johannes Schindelin
2bf950fdd4 Merge pull request #1937 from benpeart/fscache-NtQueryDirectoryFile-gfw
fscache: teach fscache to use NtQueryDirectoryFile
2019-02-24 21:43:09 +01:00
Johannes Schindelin
3b8fa2ad57 Merge pull request #1934 from benpeart/fscache-thread-safe-enable-gfw
fscache: make fscache_enable() thread safe
2019-02-24 21:43:08 +01:00
Johannes Schindelin
a884dd28ac Merge remote-tracking branch 'benpeart/fscache-per-thread-gfw'
This brings substantial wins in performance because the FSCache is now
per-thread, being merged to the primary thread only at the end, so we do
not have to lock (except while merging).

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2019-02-24 21:43:07 +01:00
Johannes Schindelin
3f3ca1b684 Merge pull request #1910 from benpeart/fscache_statistics-gfw
fscache: add fscache hit statistics
2019-02-24 21:43:04 +01:00
Johannes Schindelin
11a8206f6a Merge pull request #1914 from benpeart/free-fscache-after-add-gfw
At the end of the add command, disable and free the fscache
2019-02-24 21:43:03 +01:00
Johannes Schindelin
f78bd8c6c4 Merge pull request #1911 from benpeart/git_test_fscache-gfw
fscache: add GIT_TEST_FSCACHE support
2019-02-24 21:43:03 +01:00
Johannes Schindelin
2dc8736655 Merge pull request #1909 from benpeart/free-fscache-after-status-gfw
status: disable and free fscache at the end of the status command
2019-02-24 21:43:02 +01:00
Johannes Schindelin
e542f2d866 Merge pull request #1908 from benpeart/FindFirstFileEx-gfw
fscache: use FindFirstFileExW to avoid retrieving the short name
2019-02-24 21:43:02 +01:00
Johannes Schindelin
7d1d09dc97 Merge pull request #1827 from benpeart/fscache_refresh_index
Enable the filesystem cache (fscache) in refresh_index().
2019-02-24 21:43:01 +01:00
Johannes Schindelin
3a645b01ce Merge 'docker-volumes-are-no-symlinks'
This was pull request #1645 from ZCube/master

Support windows container.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2019-02-24 21:43:01 +01:00
Johannes Schindelin
d12a55cd5c Merge pull request #1468 from atetubou/fscache_checkout_flush
checkout.c: enable fscache for checkout again

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2019-02-24 21:43:00 +01:00
Johannes Schindelin
cffcaadb52 Merge pull request #1426 from atetubou/fetch_pack
fetch-pack.c: enable fscache for stats under .git/objects
2019-02-24 21:43:00 +01:00
Johannes Schindelin
d4b788f3b6 Merge pull request #1344 from jeffhostetler/perf_add_excludes_with_fscache
dir.c: make add_excludes aware of fscache during status
2019-02-24 21:42:59 +01:00
Johannes Schindelin
e0f856b986 Merge pull request #971 from jeffhostetler/jeffhostetler/add_preload_fscache
add: use preload-index and fscache for performance
2019-02-24 21:42:59 +01:00
Johannes Schindelin
6777db5e8a Merge branch 'core-longpaths-everywhere'
Git for Windows supports the core.longPaths config setting to allow
writing/reading long paths via the \\?\ trick for a long time now.

However, for that support to work, it is absolutely necessary that
git_default_config() is given a chance to parse the config. Otherwise
Git will be non the wiser.

So let's make sure that as many commands that previously failed to
parse the core.* settings now do that, implicitly enabling long path
support in a lot more places.

Note: this is not a perfect solution, and it cannot be, as there is
a chicken-and-egg problem in reading the config itself...

This fixes https://github.com/git-for-windows/git/issues/1218

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2019-02-24 21:42:58 +01:00
Johannes Schindelin
5a8f282711 Merge pull request #994 from jeffhostetler/jeffhostetler/fscache_nfd
fscache: add not-found directory cache to fscache
2019-02-24 21:42:58 +01:00
Johannes Schindelin
1a2fb817d3 Merge branch 'spawn-with-spaces'
This change lets us spawn .bat scripts whose paths contain spaces.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2019-02-24 21:42:57 +01:00
Johannes Schindelin
ac6fe9ec81 Merge branch 'clean-long-paths'
This addresses https://github.com/git-for-windows/git/issues/521

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2019-02-24 21:42:57 +01:00
Johannes Schindelin
7c0f65ca5f Merge pull request #305 from dscho/msysgit_issues_182
Allow `add -p` and `add -i` with a large number of files
2019-02-24 21:42:56 +01:00
Johannes Schindelin
ce0a5a6806 Merge pull request #1897 from piscisaureus/symlink-attr
Specify symlink type in .gitattributes
2019-02-24 21:42:56 +01:00
Johannes Schindelin
887b70c27d Merge branch 'kblees/kb/symlinks' 2019-02-24 21:42:55 +01:00
Johannes Schindelin
0466f6efec Merge branch 'msys2' 2019-02-24 21:42:55 +01:00
Johannes Schindelin
741a9abcd1 Merge branch 'long-paths' 2019-02-24 21:42:54 +01:00
Johannes Schindelin
c649543df5 Merge branch 'fscache' 2019-02-24 21:42:53 +01:00
Johannes Schindelin
d0a40ab8de Merge branch 'gitk-and-git-gui-patches'
These are Git for Windows' Git GUI and gitk patches. We will have to
decide at some point what to do about them, but that's a little lower
priority (as Git GUI seems to be unmaintained for the time being, and
the gitk maintainer keeps a very low profile on the Git mailing list,
too).

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2019-02-24 21:42:53 +01:00
Johannes Schindelin
d398515a8a Merge 'gitk' into HEAD 2019-02-24 21:42:01 +01:00
Johannes Schindelin
87677b9997 Merge branch 'git-gui-askyesno'
These changes are necessary to support better Git for Windows' new
auto-update feature.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2019-02-24 21:42:00 +01:00
Johannes Schindelin
61cccea635 Merge pull request #1032 from max630/gitgui_GIT_GIT_unset
git-gui: correctly restore GIT_DIR after invoking commands
2019-02-24 21:42:00 +01:00