Commit graph

55083 commits

Author SHA1 Message Date
Junio C Hamano aa1edf14f9 Merge branch 'js/remote-curl-i18n'
Error messages given from the http transport have been updated so
that they can be localized.

* js/remote-curl-i18n:
  remote-curl: mark all error messages for translation
2019-04-16 19:28:05 +09:00
Junio C Hamano 764bd200e1 Merge branch 'js/anonymize-remote-curl-diag'
remote-http transport did not anonymize URLs reported in its error
messages at places.

* js/anonymize-remote-curl-diag:
  curl: anonymize URLs in error messages and warnings
2019-04-16 19:28:04 +09:00
Junio C Hamano 6d281f70cc Merge branch 'ma/asciidoctor-fixes-more'
Documentation mark-up fixes.

* ma/asciidoctor-fixes-more:
  Documentation: turn middle-of-line tabs into spaces
  git-svn.txt: drop escaping '\' that ends up being rendered
  git.txt: remove empty line before list continuation
  config/fsck.txt: avoid starting line with dash
  config/diff.txt: drop spurious backtick
2019-04-16 19:28:04 +09:00
Junio C Hamano 8ddee13597 Merge branch 'ma/asciidoctor-fixes'
Build fix around use of asciidoctor instead of asciidoc

* ma/asciidoctor-fixes:
  asciidoctor-extensions: fix spurious space after linkgit
  Documentation/Makefile: add missing dependency on asciidoctor-extensions
  Documentation/Makefile: add missing xsl dependencies for manpages
2019-04-16 19:28:04 +09:00
Junio C Hamano 24d73d2a4c Merge branch 'jt/test-protocol-version'
Help developers by making it easier to run most of the tests under
different versions of over-the-wire protocols.

* jt/test-protocol-version:
  t5552: compensate for v2 filtering ref adv.
  tests: fix protocol version for overspecifications
  t5700: only run with protocol version 1
  t5512: compensate for v0 only sending HEAD symrefs
  t5503: fix overspecification of trace expectation
  tests: always test fetch of unreachable with v0
  t5601: check ssh command only with protocol v0
  tests: define GIT_TEST_PROTOCOL_VERSION
2019-04-16 19:28:03 +09:00
Junio C Hamano 8a9a837a63 Merge branch 'nd/diff-parseopt-3'
Third batch to teach the diff machinery to use the parse-options
API.

* nd/diff-parseopt-3:
  diff-parseopt: convert --submodule
  diff-parseopt: convert --ignore-submodules
  diff-parseopt: convert --textconv
  diff-parseopt: convert --ext-diff
  diff-parseopt: convert --quiet
  diff-parseopt: convert --exit-code
  diff-parseopt: convert --color-words
  diff-parseopt: convert --word-diff-regex
  diff-parseopt: convert --word-diff
  diff-parseopt: convert --[no-]color
  diff-parseopt: convert --[no-]follow
  diff-parseopt: convert -R
  diff-parseopt: convert -a|--text
  diff-parseopt: convert --full-index
  diff-parseopt: convert --binary
  diff-parseopt: convert --anchored
  diff-parseopt: convert --diff-algorithm
  diff-parseopt: convert --histogram
  diff-parseopt: convert --patience
  diff-parseopt: convert --[no-]indent-heuristic
2019-04-16 19:28:03 +09:00
Junio C Hamano e35b8cb8e2 The fourth batch
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2019-04-10 02:19:09 +09:00
Junio C Hamano 32414ceb85 Merge branch 'jt/submodule-fetch-errmsg'
Error message update.

* jt/submodule-fetch-errmsg:
  submodule: explain first attempt failure clearly
2019-04-10 02:14:26 +09:00
Junio C Hamano c063a537be Merge branch 'jk/sha1dc'
Build update for SHA-1 with collision detection.

* jk/sha1dc:
  Makefile: fix unaligned loads in sha1dc with UBSan
2019-04-10 02:14:26 +09:00
Junio C Hamano 2d3372883f Merge branch 'jk/promote-ggg'
Suggest GitGitGadget instead of submitGit as a way to submit
patches based on GitHub PR to us.

* jk/promote-ggg:
  point pull requesters to GitGitGadget
2019-04-10 02:14:25 +09:00
Junio C Hamano 7caf4cfb81 Merge branch 'ar/t4150-remove-cruft'
Test cleanup.

* ar/t4150-remove-cruft:
  t4150: remove unused variable
2019-04-10 02:14:25 +09:00
Junio C Hamano fa1b86e457 Merge branch 'js/rebase-deprecate-preserve-merges'
"git rebase --rebase-merges" replaces its old "--preserve-merges"
option; the latter is now marked as deprecated.

* js/rebase-deprecate-preserve-merges:
  rebase: deprecate --preserve-merges
2019-04-10 02:14:24 +09:00
Junio C Hamano 20fe798b1b Merge branch 'ms/worktree-add-atomic-mkdir'
"git worktree add" used to do a "find an available name with stat
and then mkdir", which is race-prone.  This has been fixed by using
mkdir and reacting to EEXIST in a loop.

* ms/worktree-add-atomic-mkdir:
  worktree: fix worktree add race
2019-04-10 02:14:24 +09:00
Junio C Hamano 31df2c1019 Merge branch 'jk/line-log-with-patch'
"git log -L<from>,<to>:<path>" with "-s" did not suppress the patch
output as it should.  This has been corrected.

* jk/line-log-with-patch:
  line-log: detect unsupported formats
  line-log: suppress diff output with "-s"
2019-04-10 02:14:23 +09:00
Junio C Hamano ac9e40e8ef Merge branch 'ra/t3600-test-path-funcs'
A GSoC micro.

* ra/t3600-test-path-funcs:
  t3600: use helpers to replace test -d/f/e/s <path>
  t3600: modernize style
  test functions: add function `test_file_not_empty`
2019-04-10 02:14:23 +09:00
Junio C Hamano 917f2cd1c2 Merge branch 'nd/rewritten-ref-is-per-worktree'
"git rebase" uses the refs/rewritten/ hierarchy to store its
intermediate states, which inherently makes the hierarchy per
worktree, but it didn't quite work well.

* nd/rewritten-ref-is-per-worktree:
  Make sure refs/rewritten/ is per-worktree
  files-backend.c: reduce duplication in add_per_worktree_entries_to_dir()
  files-backend.c: factor out per-worktree code in loose_fill_ref_dir()
2019-04-10 02:14:23 +09:00
Junio C Hamano 1828e52efc Merge branch 'jh/resize-convert-scratch-buffer'
When the "clean" filter can reduce the size of a huge file in the
working tree down to a small "token" (a la Git LFS), there is no
point in allocating a huge scratch area upfront, but the buffer is
sized based on the original file size.  The convert mechanism now
allocates very minimum and reallocates as it receives the output
from the clean filter process.

* jh/resize-convert-scratch-buffer:
  convert: avoid malloc of original file size
2019-04-10 02:14:22 +09:00
Junio C Hamano b582c1681e Merge branch 'dl/ignore-docs'
Doc update.

* dl/ignore-docs:
  docs: move core.excludesFile from git-add to gitignore
  git-clean.txt: clarify ignore pattern files
2019-04-10 02:14:22 +09:00
Junio C Hamano 081b08c45c Merge branch 'ja/dir-rename-doc-markup-fix'
Doc update.

* ja/dir-rename-doc-markup-fix:
  Doc: fix misleading asciidoc formating
2019-04-10 02:14:21 +09:00
Junio C Hamano 0b2094b06b Merge branch 'dl/reset-doc-no-wrt-abbrev'
Doc update.

* dl/reset-doc-no-wrt-abbrev:
  git-reset.txt: clarify documentation
2019-04-10 02:14:21 +09:00
Junio C Hamano 041f5ea1cf The third batch
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2019-03-20 15:19:48 +09:00
Junio C Hamano 0c45fa32ec Merge branch 'br/commit-tree-parseopt'
The command line parser of "git commit-tree" has been rewritten to
use the parse-options API.

* br/commit-tree-parseopt:
  commit-tree: utilize parse-options api
2019-03-20 15:16:08 +09:00
Junio C Hamano f6c75e392e Merge branch 'jk/config-type-color-ends-with-lf'
"git config --type=color ..." is meant to replace "git config --get-color"
but there is a slight difference that wasn't documented, which is
now fixed.

* jk/config-type-color-ends-with-lf:
  config: document --type=color output is a complete line
2019-03-20 15:16:08 +09:00
Junio C Hamano 6b5688b760 Merge branch 'ma/clear-repository-format'
The setup code has been cleaned up to avoid leaks around the
repository_format structure.

* ma/clear-repository-format:
  setup: fix memory leaks with `struct repository_format`
  setup: free old value before setting `work_tree`
2019-03-20 15:16:07 +09:00
Junio C Hamano 83b13e284c Merge branch 'jk/virtual-objects-do-exist'
A recent update broke "is this object available to us?" check for
well-known objects like an empty tree (which should yield "yes",
even when there is no on-disk object for an empty tree), which has
been corrected.

* jk/virtual-objects-do-exist:
  rev-list: allow cached objects in existence check
2019-03-20 15:16:07 +09:00
Junio C Hamano 27cdbdd134 Merge branch 'jk/no-sigpipe-during-network-transport'
On platforms where "git fetch" is killed with SIGPIPE (e.g. OSX),
the upload-pack that runs on the other end that hangs up after
detecting an error could cause "git fetch" to die with a signal,
which led to a flakey test.  "git fetch" now ignores SIGPIPE during
the network portion of its operation (this is not a problem as we
check the return status from our write(2)s).

* jk/no-sigpipe-during-network-transport:
  fetch: ignore SIGPIPE during network operation
  fetch: avoid calling write_or_die()
2019-03-20 15:16:06 +09:00
Junio C Hamano ea327760d3 Merge branch 'jk/fsck-doc'
"git fsck --connectivity-only" omits computation necessary to sift
the objects that are not reachable from any of the refs into
unreachable and dangling.  This is now enabled when dangling
objects are requested (which is done by default, but can be
overridden with the "--no-dangling" option).

* jk/fsck-doc:
  fsck: always compute USED flags for unreachable objects
  doc/fsck: clarify --connectivity-only behavior
2019-03-20 15:16:06 +09:00
Junio C Hamano 88255bba45 Merge branch 'js/stress-test-ui-tweak'
Dev support.

* js/stress-test-ui-tweak:
  tests: introduce --stress-jobs=<N>
  tests: let --stress-limit=<N> imply --stress
2019-03-20 15:16:05 +09:00
Junio C Hamano 9fbcc3d203 Merge branch 'js/rebase-orig-head-fix'
"git rebase" that was reimplemented in C did not set ORIG_HEAD
correctly, which has been corrected.

* js/rebase-orig-head-fix:
  built-in rebase: set ORIG_HEAD just once, before the rebase
  built-in rebase: demonstrate that ORIG_HEAD is not set correctly
  built-in rebase: use the correct reflog when switching branches
  built-in rebase: no need to check out `onto` twice
2019-03-20 15:16:05 +09:00
Junio C Hamano 1b8f4dc580 Merge branch 'jk/bisect-final-output'
The final report from "git bisect" used to show the suspected
culprit using a raw "diff-tree", with which there is no output for
a merge commit.  This has been updated to use a more modern and
human readable output that still is concise enough.

* jk/bisect-final-output:
  bisect: make diff-tree output prettier
  bisect: fix internal diff-tree config loading
  bisect: use string arguments to feed internal diff-tree
2019-03-20 15:16:04 +09:00
Junio C Hamano 3cef67694c Merge branch 'ab/makefile-help-devs-more'
CFLAGS now can be tweaked when invoking Make while using
DEVELOPER=YesPlease; this did not work well before.

* ab/makefile-help-devs-more:
  Makefile: allow for combining DEVELOPER=1 and CFLAGS="..."
  Makefile: move the setting of *FLAGS closer to "include"
  Makefile: Move *_LIBS assignment into its own section
  Makefile: add/remove comments at top and tweak whitespace
  Makefile: move "strip" assignment down from flags
  Makefile: remove an out-of-date comment
2019-03-20 15:16:04 +09:00
Junio C Hamano 0e94f7aa73 Merge git://ozlabs.org/~paulus/gitk
* git://ozlabs.org/~paulus/gitk:
  gitk: Update Bulgarian translation (317t)
2019-03-18 11:18:49 +09:00
Alexander Shopov dec59817c1 gitk: Update Bulgarian translation (317t)
Signed-off-by: Alexander Shopov <ash@kambanaria.org>
Signed-off-by: Paul Mackerras <paulus@ozlabs.org>
2019-03-14 20:16:17 +11:00
Jonathan Tan bd5e567dc7 submodule: explain first attempt failure clearly
When cloning with --recurse-submodules a superproject with at least one
submodule with HEAD pointing to an unborn branch, the clone goes
something like this:

	Cloning into 'test'...
	<messages about cloning of superproject>
	Submodule '<name>' (<uri>) registered for path '<submodule path>'
	Cloning into '<submodule path>'...
	fatal: Couldn't find remote ref HEAD
	Unable to fetch in submodule path '<submodule path>'
	<messages about fetching with SHA-1>
	From <uri>
	 * branch            <hash> -> FETCH_HEAD
	Submodule path '<submodule path>': checked out '<hash>'

In other words, first, a fetch is done with no hash arguments (that is,
a fetch of HEAD) resulting in a "Couldn't find remote ref HEAD" error;
then, a fetch is done given a hash, which succeeds.

The fetch given a hash was added in fb43e31f2b ("submodule: try harder
to fetch needed sha1 by direct fetching sha1", 2016-02-24), and the
"Unable to fetch..." message was downgraded from a fatal error to a
notice in e30d833671 ("git-submodule.sh: try harder to fetch a
submodule", 2018-05-16).

This commit improves the notice to be clearer that we are retrying the
fetch, and that the previous messages (in particular, the fatal errors
from fetch) do not necessarily indicate that the whole command fails. In
other words:

 - If the HEAD-fetch succeeds and we then have the commit we want,
   git-submodule prints no explanation.
 - If the HEAD-fetch succeeds and we do not have the commit we want, but
   the hash-fetch succeeds, git-submodule prints no explanation.
 - If the HEAD-fetch succeeds and we do not have the commit we want, but
   the hash-fetch fails, git-submodule prints a fatal error.
 - If the HEAD-fetch fails, fetch prints a fatal error, and
   git-submodule informs the user that it will retry by fetching
   specific commits by hash.
   - If the hash-fetch then succeeds, git-submodule prints no
     explanation (besides the ones already printed).
   - If the HEAD-fetch then fails, git-submodule prints a fatal error.

It could be said that we should just eliminate the HEAD-fetch
altogether, but that changes some behavior (in particular, some refs
that were opportunistically updated would no longer be), so I have left
that alone for now.

There is an analogous situation with the fetching code in fetch_finish()
and surrounding functions. For now, I have added a NEEDSWORK.

Signed-off-by: Jonathan Tan <jonathantanmy@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2019-03-14 09:36:48 +09:00
Jeff King 07a20f569b Makefile: fix unaligned loads in sha1dc with UBSan
The sha1dc library uses unaligned loads on platforms that support them.
This is normally what you'd want for performance, but it does cause
UBSan to complain when we compile with SANITIZE=undefined. Just like we
set -DNO_UNALIGNED_LOADS for our own code in that case, we should set
-DSHA1DC_FORCE_ALIGNED_ACCESS.

Of course that does nothing without pulling in the patches from sha1dc
to respect that define. So let's do that, too, updating both the
submodule link and our in-tree copy (from the same commit).

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2019-03-13 13:45:52 +09:00
Andrei Rybak e041d0781b t4150: remove unused variable
In commit 735285b403 ("am: fix signoff when other trailers are present",
2017-08-08) tests using variable $signoff were rewritten and it is no
longer used, so just remove it from the test setup.

Signed-off-by: Andrei Rybak <rybak.a.v@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2019-03-13 11:09:46 +09:00
Jeff King c3a7dd70c4 point pull requesters to GitGitGadget
In the contributing guide and PR template seen by people who open pull
requests on GitHub, we mention the submitGit tool, which gives an
alternative to figuring out the mailing list. These days we also have
the similar GitGitGadget tool, and we should make it clear that this
is also an option.

We could continue to mention _both_ tools, but it's probably better to
pick one in order to avoid overwhelming the user with choice. After all,
one of the purposes here is to reduce friction for first-time or
infrequent contributors. And there are a few reasons to prefer GGG:

  1. submitGit seems to still have a few rough edges. E.g., it doesn't
     munge timestamps to help threaded mail readers handled out-of-order
     delivery.

  2. Subjectively, GGG seems to be more commonly used on the list these
     days, especially by list regulars.

  3. GGG seems to be under more active development (likely related to
     point 2).

So let's actually swap out submitGit for GGG. While we're there, let's
put another link to the GGG page in the PR template, because that's
where users who are learning about it for the first time will want to go
to read more.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2019-03-13 11:07:50 +09:00
Johannes Schindelin 427c3bd28a rebase: deprecate --preserve-merges
We have something much better now: --rebase-merges (which is a
complete re-design --preserve-merges, with a lot of issues fixed such as
the inability to reorder commits with --preserve-merges).

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2019-03-12 16:29:00 +09:00
Michal Suchanek 7af01f2367 worktree: fix worktree add race
Git runs a stat loop to find a worktree name that's available and
then does mkdir on the found name. Turn it to mkdir loop to avoid
another invocation of worktree add finding the same free name and
creating the directory first.

Signed-off-by: Michal Suchanek <msuchanek@suse.de>
Acked-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2019-03-12 15:56:11 +09:00
Martin Ågren 185f9a0ea0 asciidoctor-extensions: fix spurious space after linkgit
When we render, e.g., "linkgit:gitglossary[7]." with Asciidoctor, we get
"gitglossary(7) ." with a space between the linkgit macro expansion and
the punctuation. We can fix this by dropping the trailing newline after
we've turned `linkgit:foo[bar]` into `<citerefentry>..</citerefentry>`.

The diff produced by `USE_ASCIIDOCTOR=Yes ./doc-diff HEAD^ HEAD` is
almost 6000 lines large and shows how this fixes "git-foo(x) ,", "(see
git-bar(y) )" and so on. One might wonder whether this also turns, e.g.,
"see linkgit:foo[1] for more" into "see foo(1)for more", but no. We get
"...</citerefentry> for more" in the XML, see, e.g., git-am.xml, so the
space ends up in git-am.1 just fine. The same is true for the HTML output.

Signed-off-by: Martin Ågren <martin.agren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2019-03-11 18:22:07 +09:00
Martin Ågren a15ef383e7 Documentation/Makefile: add missing dependency on asciidoctor-extensions
asciidoctor-extensions.rb has never changed, but when it does -- such as
in the next commit --, it helps if the xml-files depend on it. We're
casting the net a bit too wide here, since we'll be rebuilding even with
AsciiDoc, which won't look at this file. But since this file changes so
rarely, that should be ok. It's better than missing a dependency.

Similarly, most of the html-files are produced directly from ".txt';
make the html-files too depend on asciidoctor-extensions.rb, both
the HTMLified manual pages as well as the user-manual that does use
.xml intermediary.

Signed-off-by: Martin Ågren <martin.agren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2019-03-11 18:18:42 +09:00
Jeff King 05314efaea line-log: detect unsupported formats
If you use "log -L" with an output format like "--raw" or "--stat",
we'll silently ignore the format and just output the normal patch.
Let's detect and complain about this, which at least tells the user
what's going on.

The tests here aren't exhaustive over the set of all formats, but it
should at least let us know if somebody breaks the format-checking.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2019-03-11 16:31:07 +09:00
Junio C Hamano e902e9bcae The second batch
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2019-03-11 16:18:22 +09:00
Junio C Hamano be9f1c0224 Sync with maint
* maint:
  mingw: allow building with an MSYS2 runtime v3.x
2019-03-11 16:16:34 +09:00
Junio C Hamano a07baf33e3 Merge branch 'js/rebase-recreate-merge'
Docfix.

* js/rebase-recreate-merge:
  rebase docs: fix "gitlink" typo
2019-03-11 16:16:26 +09:00
Junio C Hamano d61ddb5189 Merge branch 'js/untravis-windows'
Dev support.

* js/untravis-windows:
  travis: remove the hack to build the Windows job on Azure Pipelines
2019-03-11 16:16:26 +09:00
Junio C Hamano 443442ec71 Merge branch 'rd/gc-prune-doc-fix'
Doxfix.

* rd/gc-prune-doc-fix:
  docs/git-gc: fix typo "--prune=all" to "--prune=now"
2019-03-11 16:16:26 +09:00
Junio C Hamano c0d97d299e Merge branch 'js/find-lib-h-with-ls-files-when-possible'
The Makefile uses 'find' utility to enumerate all the *.h header
files, which is expensive on platforms with slow filesystems; it
now optionally uses "ls-files" if working within a repository,
which is a trick similar to how all sources are enumerated to run
ETAGS on.

* js/find-lib-h-with-ls-files-when-possible:
  Makefile: use `git ls-files` to list header files, if possible
2019-03-11 16:16:25 +09:00
Junio C Hamano 1de413bc1d Merge branch 'rj/hdr-check-gcrypt-fix'
The set of header files used by "make hdr-check" unconditionally
included sha256/gcrypt.h, even when it is not used, causing the
make target to fail.  We now skip it when GCRYPT_SHA256 is not in
use.

* rj/hdr-check-gcrypt-fix:
  Makefile: fix 'hdr-check' when GCRYPT not installed
2019-03-11 16:16:25 +09:00
Junio C Hamano 2274fc75c3 Merge branch 'jk/guard-bswap-header'
The include file compat/bswap.h has been updated so that it is safe
to (accidentally) include it more than once.

* jk/guard-bswap-header:
  compat/bswap: add include header guards
2019-03-11 16:16:25 +09:00