Commit Graph

104078 Commits

Author SHA1 Message Date
Nico Rieck
8a3a3677f5 gitk: Escape file paths before piping to git log
Fixes https://github.com/git-for-windows/git/issues/2293

Signed-off-by: Nico Rieck <nico.rieck@gmail.com>
2019-11-04 07:33:46 +01:00
Johannes Schindelin
7517225972 gitk: prevent overly long command lines
To avoid running into command line limitations, some of Git's commands
support the `--stdin` option.

Let's use exactly this option in the three rev-list/log invocations in
gitk that would otherwise possibly run the danger of trying to invoke a
too-long command line.

While it is easy to redirect either stdin or stdout in Tcl/Tk scripts,
what we need here is both. We need to capture the output, yet we also
need to pipe in the revs/files arguments via stdin (because stdin does
not have any limit, unlike the command line). To help this, we use the
neat Tcl feature where you can capture stdout and at the same time feed
a fixed string as stdin to the spawned process.

One non-obvious aspect about this change is that the `--stdin` option
allows to specify revs, the double-dash, and files, but *no* other
options such as `--not`. This is addressed by prefixing the "negative"
revs with `^` explicitly rather than relying on the `--not` option
(thanks for coming up with that idea, Max!).

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

Analysis-and-initial-patch-by: Max Kirillov <max@max630.net>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2019-11-04 07:33:46 +01:00
Johannes Schindelin
5b8234a522 Start the merging-rebase to v2.24.0
This commit starts the rebase of 68e694557a to 1cc4bc0fcd9
2019-11-04 07:33:33 +01:00
Junio C Hamano
da72936f54 Git 2.24
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2019-11-04 13:33:06 +09:00
Junio C Hamano
1d34d425d4 Merge branch 'bc/doc-use-docbook-5'
Finishing touches to the recent update to the build procedure for
the documentation.

* bc/doc-use-docbook-5:
  manpage-bold-literal.xsl: match for namespaced "d:literal" in template
2019-11-04 13:33:06 +09:00
Junio C Hamano
dac1d83c91 Merge branch 'ds/commit-graph-on-fetch'
Regression fix.

* ds/commit-graph-on-fetch:
  commit-graph: fix writing first commit-graph during fetch
  t5510-fetch.sh: demonstrate fetch.writeCommitGraph bug
2019-11-04 13:33:06 +09:00
Junio C Hamano
c32ca691c2 Merge branch 'jt/delay-fetch-if-missing'
Work-around a lazy fetch glitch.

* jt/delay-fetch-if-missing:
  fetch: delay fetch_if_missing=0 until after config
2019-11-04 13:33:05 +09:00
Junio C Hamano
ab6b50e4c8 Merge https://github.com/prati0100/git-gui
* https://github.com/prati0100/git-gui:
  git-gui: improve Japanese translation
  git-gui: add a readme
  git-gui: support for diff3 conflict style
  git-gui: use existing interface to query a path's attribute
  git-gui (Windows): use git-bash.exe if it is available
  treewide: correct several "up-to-date" to "up to date"
  Fix build with core.autocrlf=true
2019-11-04 13:29:38 +09:00
Junio C Hamano
93bf7423dd Merge tag 'l10n-2.24.0-rnd2' of https://github.com/git-l10n/git-po
l10n-2.24.0-rnd2

* tag 'l10n-2.24.0-rnd2' of https://github.com/git-l10n/git-po:
  l10n: zh_CN: for git v2.24.0 l10n round 1~2
  l10n: de.po: Update German translation
  l10n: sv.po: Update Swedish translation (4695t0f0u)
  l10n: bg.po: Updated Bulgarian translation (4694)
  l10n: vi(4694t): Updated translation for v2.24.0
  l10n: es: 2.24.0 round 2
  l10n: it.po: update the Italian translation for Git 2.24.0 round #2
  l10n: fr v2.24.0 rnd2
  l10n: git.pot: v2.24.0 round 2 (1 new)
  l10n: it.po: update the Italian translation for Git 2.24.0
  l10n: fr 2.24.0 rnd 1
  l10n: git.pot: v2.24.0 round 1 (35 new, 16 removed)
  l10n: bg.po: Updated Bulgarian translation (4693)
  l10n: sv.po: Update Swedish translation (4674t0f0u)
  l10n: Update Catalan translation
2019-11-04 13:25:13 +09:00
Johannes Schindelin
44c15909b8 Merge pull request #2383 from derrickstolee/fetch-first-write-fail
Fix `fetch.writeCommitGraph` failure first fetch
2019-11-03 00:23:26 +01:00
Jiang Xin
a5cd71ca4a l10n: zh_CN: for git v2.24.0 l10n round 1~2
Translate 36 new messages (4694t0f0u) for git 2.24.0.

Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
2019-11-02 20:51:12 +08:00
Elijah Newren
efd5444238 RelNotes/2.24.0: fix self-contradictory note
As per Wikipedia, "In current technical usage, for one to state that a
feature is deprecated is merely a recommendation against using it."  It
is thus contradictory to claim that something is not "officially
deprecated" and then to immediately state that we are both discouraging
its use and pointing people elsewhere.

Signed-off-by: Elijah Newren <newren@gmail.com>
Reviewed-by: Taylor Blau <me@ttaylorr.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2019-11-02 15:03:01 +09:00
Martin Ågren
55aca515eb manpage-bold-literal.xsl: match for namespaced "d:literal" in template
We recently regressed our rendering with Asciidoctor of "literal"
elements in our manpages, i.e, stuff we have placed within `backticks`
in order to render as monospace. In particular, we lost the bold
rendering of such literal text.

The culprit is f6461b82b9 ("Documentation: fix build with Asciidoctor 2",
2019-09-15), where we switched from DocBook 4.5 to DocBook 5 with
Asciidoctor. As part of the switch, we started using the namespaced
DocBook XSLT stylesheets rather than the non-namespaced ones. (See
f6461b82b9 for more details on why we changed to the namespaced ones.)

The bold literals are implemented as an XSLT snippet <xsl:template
match="literal">...</xsl:template>. Now that we use namespaces, this
doesn't pick up our literals like it used to.

Match for "d:literal" in addition to just "literal", after defining the
d namespace. ("d" is what
http://docbook.sourceforge.net/release/xsl-ns/current/manpages/docbook.xsl
uses.) Note that we need to keep matching without the namespace for
AsciiDoc.

This boldness was introduced by 5121a6d993 ("Documentation: option to
render literal text as bold for manpages", 2009-03-27) and made the
default in 5945717009 ("Documentation: bold literals in man",
2016-05-31).

One reason this was not caught in review is that our doc-diff tool diffs
without any boldness, i.e., it "only" compares text. As pointed out by
Peff in review of this patch, one can use `MAN_KEEP_FORMATTING=1
./doc-diff <...>`

This has been optically tested with AsciiDoc 8.6.10, Asciidoctor 1.5.5
and Asciidoctor 2.0.10. I've also verified that doc-diff produces the
empty output for all three programs, as expected, and that with the
MAN_KEEP_FORMATTING trick, AsciiDoc yields no diff, whereas with
Asciidoctor, we get bold literals, just like we want.

Signed-off-by: Martin Ågren <martin.agren@gmail.com>
Acked-by: brian m. carlson <sandals@crustytoothpaste.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2019-11-02 14:46:42 +09:00
Elijah Newren
849e43680d RelNotes/2.24.0: typofix
Signed-off-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2019-11-02 14:43:51 +09:00
Matthias Rüster
798d66e35d l10n: de.po: Update German translation
Signed-off-by: Matthias Rüster <matthias.ruester@gmail.com>
Reviewed-by: Ralf Thielow <ralf.thielow@gmail.com>
Reviewed-by: Phillip Szelat <phillip.szelat@gmail.com>
2019-10-31 09:35:59 +01:00
Peter Krefting
c1d0038746 l10n: sv.po: Update Swedish translation (4695t0f0u)
Signed-off-by: Peter Krefting <peter@softwolves.pp.se>
2019-10-30 23:22:13 +01:00
Johannes Schindelin
9356bff6c5 Merge 'readme' into HEAD
Add a README.md for GitHub goodness.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
v2.24.0-rc2.windows.1
2019-10-30 11:56:09 +01:00
Johannes Schindelin
a6a307830a Merge pull request #1354 from dscho/phase-out-show-ignored-directory-gracefully
Phase out `--show-ignored-directory` gracefully
2019-10-30 11:56:08 +01:00
Johannes Schindelin
ba6596f976 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-10-30 11:56:08 +01:00
Johannes Schindelin
cf47e2e7de 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-10-30 11:56:08 +01:00
Johannes Schindelin
ae0b1333b2 Merge branch 'busybox-w32'
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2019-10-30 11:56:08 +01:00
Johannes Schindelin
1e29828545 Merge pull request #1897 from piscisaureus/symlink-attr
Specify symlink type in .gitattributes
2019-10-30 11:56:07 +01:00
Johannes Schindelin
7bd740a2c3 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-10-30 11:56:07 +01:00
Johannes Schindelin
29b10f46f9 Merge branch 'kblees/kb/symlinks' 2019-10-30 11:56:07 +01:00
Johannes Schindelin
c545999174 Merge branch 'msys2' 2019-10-30 11:56:06 +01:00
Johannes Schindelin
e11ac57dd1 Merge branch 'long-paths' 2019-10-30 11:56:06 +01:00
Johannes Schindelin
2e0759a748 Merge branch 'dont-clean-junctions-fscache'
We already avoid traversing NTFS junction points in `git clean -dfx`.
With this topic branch, we do that when the FSCache is enabled, too.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2019-10-30 11:56:06 +01:00
Derrick Stolee
22c3347f47 Merge branch 'fscache-and-sparse-checkout'
When updating the skip-worktree bits in the index to align with new
values in a sparse-checkout file, Git scans the entire working
directory with lstat() calls. In a sparse-checkout, many of these
lstat() calls are for paths that do not exist.

Enable the fscache feature during this scan.

In a local test of a repo with ~2.2 million paths, updating the index
with `git read-tree -m -u HEAD` with a sparse-checkout file containing
only `/.gitattributes` improved from 2-3 minutes to 15-20 seconds.

More work could be done to stop running lstat() calls when recursing
into directories that are known to not exist.
2019-10-30 11:56:06 +01:00
Johannes Schindelin
314570237e Merge pull request #1937 from benpeart/fscache-NtQueryDirectoryFile-gfw
fscache: teach fscache to use NtQueryDirectoryFile
2019-10-30 11:56:05 +01:00
Johannes Schindelin
7fba35ad47 Merge pull request #1934 from benpeart/fscache-thread-safe-enable-gfw
fscache: make fscache_enable() thread safe
2019-10-30 11:56:05 +01:00
Johannes Schindelin
e7a7d35ea8 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-10-30 11:56:05 +01:00
Johannes Schindelin
f4d2e4f77f Merge pull request #1910 from benpeart/fscache_statistics-gfw
fscache: add fscache hit statistics
2019-10-30 11:56:05 +01:00
Johannes Schindelin
d7cc4e8a52 Merge pull request #1914 from benpeart/free-fscache-after-add-gfw
At the end of the add command, disable and free the fscache
2019-10-30 11:56:05 +01:00
Johannes Schindelin
4126d9860d Merge pull request #1911 from benpeart/git_test_fscache-gfw
fscache: add GIT_TEST_FSCACHE support
2019-10-30 11:56:04 +01:00
Johannes Schindelin
bd36251dd2 Merge pull request #1909 from benpeart/free-fscache-after-status-gfw
status: disable and free fscache at the end of the status command
2019-10-30 11:56:04 +01:00
Johannes Schindelin
65c9878f25 Merge pull request #1908 from benpeart/FindFirstFileEx-gfw
fscache: use FindFirstFileExW to avoid retrieving the short name
2019-10-30 11:56:04 +01:00
Johannes Schindelin
84522f8d7d Merge pull request #1827 from benpeart/fscache_refresh_index
Enable the filesystem cache (fscache) in refresh_index().
2019-10-30 11:56:04 +01:00
Johannes Schindelin
b008ec41b4 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-10-30 11:56:03 +01:00
Johannes Schindelin
b0d552563f Merge pull request #1426 from atetubou/fetch_pack
fetch-pack.c: enable fscache for stats under .git/objects
2019-10-30 11:56:03 +01:00
Johannes Schindelin
f0fa1634bd Merge pull request #1344 from jeffhostetler/perf_add_excludes_with_fscache
dir.c: make add_excludes aware of fscache during status
2019-10-30 11:56:03 +01:00
Johannes Schindelin
e418a89751 Merge pull request #971 from jeffhostetler/jeffhostetler/add_preload_fscache
add: use preload-index and fscache for performance
2019-10-30 11:56:03 +01:00
Johannes Schindelin
d9ea373914 Merge pull request #994 from jeffhostetler/jeffhostetler/fscache_nfd
fscache: add not-found directory cache to fscache
2019-10-30 11:56:03 +01:00
Johannes Schindelin
35581fe04e Merge branch 'fscache' 2019-10-30 11:56:02 +01:00
Johannes Schindelin
47068135de Merge 'add-p-many-files'
This topic branch allows `add -p` and `add -i` with a large number of
files. It is kind of a hack that was never really meant to be
upstreamed. Let's see if we can do better in the built-in `add -p`.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2019-10-30 11:56:02 +01:00
Johannes Schindelin
67ae31f883 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-10-30 11:56:02 +01:00
Johannes Schindelin
d4257d3d96 Merge branch 'ready-for-upstream'
This is the branch thicket of patches in Git for Windows that are
considered ready for upstream. To keep them in a ready-to-submit shape,
they are kept as close to the beginning of the branch thicket as
possible.
2019-10-30 11:56:02 +01:00
Johannes Schindelin
366654a77e SECURITY.md: document Git for Windows' policies
This is the recommended way on GitHub to describe policies revolving around
security issues and about supported versions.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2019-10-30 11:56:01 +01:00
Johannes Schindelin
dff55a91ea status: verify that --show-ignored-directory prints a warning
The option is deprecated now, and we better make sure that keeps saying
so until we finally remove it.

Suggested by Kevin Willford.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2019-10-30 11:56:01 +01:00
Johannes Schindelin
20673556fd status: carry the --no-lock-index option for backwards-compatibility
When a third-party tool periodically runs `git status` in order to keep
track of the state of the working tree, it is a bad idea to lock the
index: it might interfere with interactive commands executed by the
user, e.g. when the user wants to commit files.

Git for Windows introduced the `--no-lock-index` option a long time ago
to fix that (it made it into Git for Windows v2.9.2(3)) by simply
avoiding to write that file.

The downside is that the periodic `git status` calls will be a little
bit more wasteful because they may have to refresh the index repeatedly,
only to throw away the updates when it exits. This cannot really be
helped, though, as tools wanting to get a periodic update of the status
have no way to predict when the user may want to lock the index herself.

Sadly, a competing approach was submitted (by somebody who apparently
has less work on their plate than this maintainer) that made it into
v2.15.0 but is *different*: instead of a `git status`-only option, it is
an option that comes *before* the Git command and is called differently,
too.

Let's give previous users a chance to upgrade to newer Git for Windows
versions by handling the `--no-lock-index` option, still, though with a
big fat warning.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2019-10-30 11:56:01 +01:00
Alejandro Barreto
6d7463f67c Document how $HOME is set on Windows
Git documentation refers to $HOME and $XDG_CONFIG_HOME often, but does not specify how or where these values come from on Windows where neither is set by default. The new documentation reflects the behavior of setup_windows_environment() in compat/mingw.c.

Signed-off-by: Alejandro Barreto <alejandro.barreto@ni.com>
2019-10-30 11:56:01 +01:00