Commit graph

54341 commits

Author SHA1 Message Date
Junio C Hamano 9462ac7211 Merge branch 'tg/t5570-drop-racy-test'
An inherently racy test that caused intermittent failures has been
removed.

* tg/t5570-drop-racy-test:
  Revert "t/lib-git-daemon: record daemon log"
  t5570: drop racy test
2019-01-18 13:49:55 -08:00
Junio C Hamano 74ae0652c4 Merge branch 'jk/dev-build-format-security'
Earlier we added "-Wformat-security" to developer builds, assuming
that "-Wall" (which includes "-Wformat" which in turn is required
to use "-Wformat-security") is always in effect.  This is not true
when config.mak.autogen is in use, unfortunately.  This has been
fixed by unconditionally adding "-Wall" to developer builds.

* jk/dev-build-format-security:
  config.mak.dev: add -Wall, primarily for -Wformat, to help autoconf users
2019-01-18 13:49:55 -08:00
Junio C Hamano 77fbd96aeb Merge branch 'so/cherry-pick-always-allow-m1'
"git cherry-pick -m1" was forbidden when picking a non-merge
commit, even though there _is_ parent number 1 for such a commit.
This was done to avoid mistakes back when "cherry-pick" was about
picking a single commit, but is no longer useful with "cherry-pick"
that can pick a range of commits.  Now the "-m$num" option is
allowed when picking any commit, as long as $num names an existing
parent of the commit.

Technically this is a backward incompatible change; hopefully
nobody is relying on the error-checking behaviour.

* so/cherry-pick-always-allow-m1:
  t3506: validate '-m 1 -ff' is now accepted for non-merge commits
  t3502: validate '-m 1' argument is now accepted for non-merge commits
  cherry-pick: do not error on non-merge commits when '-m 1' is specified
  t3510: stop using '-m 1' to force failure mid-sequence of cherry-picks
2019-01-18 13:49:54 -08:00
Junio C Hamano 726f89c2dd Merge branch 'nd/worktree-remove-with-uninitialized-submodules'
"git worktree remove" and "git worktree move" refused to work when
there is a submodule involved.  This has been loosened to ignore
uninitialized submodules.

* nd/worktree-remove-with-uninitialized-submodules:
  worktree: allow to (re)move worktrees with uninitialized submodules
2019-01-18 13:49:54 -08:00
Junio C Hamano bb20dbbc20 Merge branch 'sg/test-bash-version-fix'
The test suite tried to see if it is run under bash, but the check
itself failed under some other implementations of shell (notably
under NetBSD).  This has been corrected.

* sg/test-bash-version-fix:
  test-lib: check Bash version for '-x' without using shell arrays
2019-01-18 13:49:54 -08:00
Junio C Hamano 9f2eba2b90 Merge branch 'rb/hpe'
Portability updates for the HPE NonStop platform.

* rb/hpe:
  compat/regex/regcomp.c: define intptr_t and uintptr_t on NonStop
  git-compat-util.h: add FLOSS headers for HPE NonStop
  config.mak.uname: support for modern HPE NonStop config.
  transport-helper: drop read/write errno checks
  transport-helper: use xread instead of read
2019-01-18 13:49:54 -08:00
Junio C Hamano e805dc1892 Merge branch 'ed/simplify-setup-git-dir'
Code simplification.

* ed/simplify-setup-git-dir:
  Simplify handling of setup_git_directory_gently() failure cases.
2019-01-18 13:49:54 -08:00
Junio C Hamano b84e297753 Merge branch 'cy/zsh-completion-SP-in-path'
With zsh, "git cmd path<TAB>" was completed to "git cmd path name"
when the completed path has a special character like SP in it,
without any attempt to keep "path name" a single filename.  This
has been fixed to complete it to "git cmd path\ name" just like
Bash completion does.

* cy/zsh-completion-SP-in-path:
  completion: treat results of git ls-tree as file paths
  zsh: complete unquoted paths with spaces correctly
2019-01-18 13:49:54 -08:00
Junio C Hamano c433857894 Merge branch 'cy/completion-typofix'
Typofix.

* cy/completion-typofix:
  completion: fix typo in git-completion.bash
2019-01-18 13:49:54 -08:00
Junio C Hamano 81bf66b760 Merge branch 'ew/ban-strncat'
The "strncat()" function is now among the banned functions.

* ew/ban-strncat:
  banned.h: mark strncat() as banned
2019-01-18 13:49:53 -08:00
Junio C Hamano d01a3faa50 Merge branch 'ds/commit-graph-assert-missing-parents'
Tightening error checking in commit-graph writer.

* ds/commit-graph-assert-missing-parents:
  commit-graph: writing missing parents is a BUG
2019-01-18 13:49:53 -08:00
Junio C Hamano 540ee40e11 Merge branch 'es/doc-worktree-guessremote-config'
Doc clarification.

* es/doc-worktree-guessremote-config:
  doc/config: do a better job of introducing 'worktree.guessRemote'
2019-01-18 13:49:53 -08:00
Junio C Hamano 3942920966 Merge branch 'sb/submodule-unset-core-worktree-when-worktree-is-lost'
The core.worktree setting in a submodule repository should not be
pointing at a directory when the submodule loses its working tree
(e.g. getting deinit'ed), but the code did not properly maintain
this invariant.

* sb/submodule-unset-core-worktree-when-worktree-is-lost:
  submodule deinit: unset core.worktree
  submodule--helper: fix BUG message in ensure_core_worktree
  submodule: unset core.worktree if no working tree is present
  submodule update: add regression test with old style setups
2019-01-18 13:49:53 -08:00
Junio C Hamano 1ed943e9ae Merge branch 'ma/asciidoctor'
Some of the documentation pages formatted incorrectly with
Asciidoctor, which have been fixed.

* ma/asciidoctor:
  git-status.txt: render tables correctly under Asciidoctor
  Documentation: do not nest open blocks
  git-column.txt: fix section header
2019-01-18 13:49:53 -08:00
Junio C Hamano ec27a94013 Merge branch 'jn/stripspace-wo-repository'
"git stripspace" should be usable outside a git repository, but
under the "-s" or "-c" mode, it didn't.

* jn/stripspace-wo-repository:
  stripspace: allow -s/-c outside git repository
2019-01-18 13:49:53 -08:00
Junio C Hamano 4744d03a47 Merge branch 'sb/submodule-fetchjobs-default-to-one'
"git submodule update" ought to use a single job unless asked, but
by mistake used multiple jobs, which has been fixed.

* sb/submodule-fetchjobs-default-to-one:
  submodule update: run at most one fetch job unless otherwise set
2019-01-18 13:49:52 -08:00
Junio C Hamano 9c51ad5853 Merge branch 'la/quiltimport-keep-non-patch'
"git quiltimport" learned "--keep-non-patch" option.

* la/quiltimport-keep-non-patch:
  git-quiltimport: add --keep-non-patch option
2019-01-18 13:49:52 -08:00
Junio C Hamano 3434569fc2 Merge branch 'nd/style-opening-brace'
Code clean-up.

* nd/style-opening-brace:
  style: the opening '{' of a function is in a separate line
2019-01-18 13:49:52 -08:00
Junio C Hamano e07074d3f0 Merge branch 'ds/gc-doc-typofix'
Typofix.

* ds/gc-doc-typofix:
  git-gc.txt: fix typo about gc.writeCommitGraph
2019-01-18 13:49:52 -08:00
Junio C Hamano 77556354bb Second batch after 2.20
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2019-01-14 15:33:36 -08:00
Junio C Hamano 3dc50ccf7d Merge branch 'do/gitweb-strict-export-conf-doc'
Doc update.

* do/gitweb-strict-export-conf-doc:
  docs: fix $strict_export text in gitweb.conf.txt
2019-01-14 15:29:33 -08:00
Junio C Hamano f2b6aa98be Merge branch 'nd/indentation-fix'
Code cleanup.

* nd/indentation-fix:
  Indent code with TABs
2019-01-14 15:29:32 -08:00
Junio C Hamano 9a01f165d4 Merge branch 'en/directory-renames-nothanks-doc-update'
Doc update.

* en/directory-renames-nothanks-doc-update:
  git-rebase.txt: update note about directory rename detection and am
2019-01-14 15:29:32 -08:00
Junio C Hamano d076ad1330 Merge branch 'bw/mailmap'
* bw/mailmap:
  mailmap: update brandon williams's email address
2019-01-14 15:29:32 -08:00
Junio C Hamano 94022736ea Merge branch 'fd/gitweb-snapshot-conf-doc-fix'
Doc update.

* fd/gitweb-snapshot-conf-doc-fix:
  docs/gitweb.conf: config variable typo
2019-01-14 15:29:32 -08:00
Junio C Hamano 25d90d1cb7 Merge branch 'tb/use-common-win32-pathfuncs-on-cygwin'
Cygwin update.

* tb/use-common-win32-pathfuncs-on-cygwin:
  git clone <url> C:\cygwin\home\USER\repo' is working (again)
2019-01-14 15:29:32 -08:00
Junio C Hamano d95f610c64 Merge branch 'km/rebase-doc-typofix'
Doc update.

* km/rebase-doc-typofix:
  rebase docs: drop stray word in merge command description
2019-01-14 15:29:32 -08:00
Junio C Hamano 6e5be1f2d5 Merge branch 'md/exclude-promisor-objects-fix-cleanup'
Code clean-up.

* md/exclude-promisor-objects-fix-cleanup:
  revision.c: put promisor option in specialized struct
2019-01-14 15:29:31 -08:00
Junio C Hamano ecdc7cbbac Merge branch 'tb/log-G-binary'
"git log -G<regex>" looked for a hunk in the "git log -p" patch
output that contained a string that matches the given pattern.
Optimize this code to ignore binary files, which by default will
not show any hunk that would match any pattern (unless textconv or
the --text option is in effect, that is).

* tb/log-G-binary:
  log -G: ignore binary files
2019-01-14 15:29:31 -08:00
Junio C Hamano 932b867be0 Merge branch 'sb/diff-color-moved-config-option-fixup'
Minor inconsistency fix.

* sb/diff-color-moved-config-option-fixup:
  diff: align move detection error handling with other options
2019-01-14 15:29:31 -08:00
Junio C Hamano 20b3bc1558 Merge branch 'hn/highlight-sideband-keywords'
Lines that begin with a certain keyword that come over the wire, as
well as lines that consist only of one of these keywords, ought to
be painted in color for easier eyeballing, but the latter was
broken ever since the feature was introduced in 2.19, which has
been corrected.

* hn/highlight-sideband-keywords:
  sideband: color lines with keyword only
2019-01-14 15:29:30 -08:00
Junio C Hamano edb3273cd2 Merge branch 'cb/test-lint-cp-a'
BSD port update.

* cb/test-lint-cp-a:
  tests: add lint for non portable cp -a
2019-01-14 15:29:30 -08:00
Junio C Hamano 37a99f8105 Merge branch 'cb/t5004-empty-tar-archive-fix'
BSD port update.

* cb/t5004-empty-tar-archive-fix:
  t5004: avoid using tar for empty packages
2019-01-14 15:29:30 -08:00
Junio C Hamano 0890c8aa0d Merge branch 'cb/openbsd-allows-reading-directory'
BSD port update.

* cb/openbsd-allows-reading-directory:
  config.mak.uname: OpenBSD uses BSD semantics with fread for directories
2019-01-14 15:29:30 -08:00
Junio C Hamano 68f1c0d102 Merge branch 'hb/t0061-dot-in-path-fix'
Test update.

* hb/t0061-dot-in-path-fix:
  t0061: do not fail test if '.' is part of $PATH
2019-01-14 15:29:29 -08:00
Junio C Hamano 4084df42c2 Merge branch 'nd/checkout-noisy'
"git checkout [<tree-ish>] path..." learned to report the number of
paths that have been checked out of the index or the tree-ish,
which gives it the same degree of noisy-ness as the case in which
the command checks out a branch.

* nd/checkout-noisy:
  t0027: squelch checkout path run outside test_expect_* block
  checkout: print something when checking out paths
2019-01-14 15:29:29 -08:00
Junio C Hamano d4c9027021 Merge branch 'ab/commit-graph-progress-fix'
* ab/commit-graph-progress-fix:
  commit-graph: split up close_reachable() progress output
2019-01-14 15:29:28 -08:00
Junio C Hamano d6f05a435f Merge branch 'nd/attr-pathspec-in-tree-walk'
The traversal over tree objects has learned to honor
":(attr:label)" pathspec match, which has been implemented only for
enumerating paths on the filesystem.

* nd/attr-pathspec-in-tree-walk:
  tree-walk: support :(attr) matching
  dir.c: move, rename and export match_attrs()
  pathspec.h: clean up "extern" in function declarations
  tree-walk.c: make tree_entry_interesting() take an index
  tree.c: make read_tree*() take 'struct repository *'
2019-01-14 15:29:28 -08:00
Junio C Hamano c333fe7368 Merge branch 'md/list-lazy-objects-fix'
"git rev-list --exclude-promisor-objects" had to take an object
that does not exist locally (and is lazily available) from the
command line without barfing, but the code dereferenced NULL.

* md/list-lazy-objects-fix:
  list-objects.c: don't segfault for missing cmdline objects
2019-01-14 15:29:28 -08:00
Derrick Stolee b8b4cb27e6 git-gc.txt: fix typo about gc.writeCommitGraph
Reported-by: Stefan Haller <stefan@haller-berlin.de>
Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2019-01-08 11:14:04 -08:00
Laura Abbott 1eadaa3978 git-quiltimport: add --keep-non-patch option
git-am has the --keep-non-patch option to pass -b to
git-mailinfo for keeping subject prefixes intact. Allow
this option to be used with quiltimport as well.

Signed-off-by: Laura Abbott <labbott@redhat.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2019-01-07 15:29:34 -08:00
Nguyễn Thái Ngọc Duy 00a6d4d1d2 worktree: allow to (re)move worktrees with uninitialized submodules
Uninitialized submodules have nothing valueable for us to be worried
about. They are just SHA-1. Let "worktree remove" and "worktree move"
continue in this case so that people can still use multiple worktrees
on repos with optional submodules that are never populated, like
sha1collisiondetection in git.git when checked out by doc-diff script.

Note that for "worktree remove", it is possible that a user
initializes a submodule (*), makes some commits (but not push), then
deinitializes it. At that point, the submodule is unpopulated, but the
precious new commits are still in

    $GIT_COMMON_DIR/worktrees/<worktree>/modules/<submodule>

directory and we should not allow removing the worktree or we lose
those commits forever. The new directory check is added to prevent
this.

(*) yes they are screwed anyway by doing this since "git submodule"
    would add submodule.* in $GIT_COMMON_DIR/config, which is shared
    across multiple worktrees. But it does not mean we let them be
    screwed even more.

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2019-01-07 09:26:33 -08:00
Thomas Gummerer 6163f3f1a4 config.mak.dev: add -Wall, primarily for -Wformat, to help autoconf users
801fa63a90 ("config.mak.dev: add -Wformat-security", 2018-09-08)
added the "-Wformat-security" to the flags set in config.mak.dev.
In the gcc man page this is documented as:

         If -Wformat is specified, also warn about uses of format
         functions that represent possible security problems.  [...]

The commit did however not add the "-Wformat" flag, but instead
relied on the fact that "-Wall" is set in the Makefile by default
and that "-Wformat" is part of "-Wall".

Unfortunately, those who use config.mak.autogen generated with the
autoconf to configure toolchain do *not* get "-Wall" in their CFLAGS
and the added -Wformat-security had no effect.  Worse yet, newer
versions of gcc (gcc 8.2.1 in this particular case) warn about the
lack of "-Wformat" and thus compilation fails only with this option
set.

We could fix it by adding "-Wformat", but in general we do want all
checks included in "-Wall", so let's add it to config.mak.dev to
cover more cases.

Signed-off-by: Thomas Gummerer <t.gummerer@gmail.com>
Helped-by: Jeff King <peff@peff.net>
Helped-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2019-01-07 09:02:08 -08:00
Sergey Organov 1c320135e1 t3506: validate '-m 1 -ff' is now accepted for non-merge commits
Signed-off-by: Sergey Organov <sorganov@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2019-01-07 08:44:37 -08:00
Sergey Organov 4d67b4e474 t3502: validate '-m 1' argument is now accepted for non-merge commits
Signed-off-by: Sergey Organov <sorganov@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2019-01-07 08:44:37 -08:00
Thomas Gummerer 3c78e97d5d Revert "t/lib-git-daemon: record daemon log"
This reverts commit 314a73d658 (t/lib-git-daemon: record daemon log,
2018-01-25), which let tests use the output of git-daemon.

The previous commit removed the last user of deamon.log in the tests,
there's no good way to make checking for output in the log
race-proof.  Revert this commit as well, to make sure others are not
tempted to use daemon.log in tests in the future, which would lead to
racy tests.

The original commit had one change that still makes sense, namely
switching read/echo for "read -r" and "printf", which relays the data
more faithfully.  Don't revert that piece here, as it is still a
useful change.

Suggested-by: Jeff King <peff@peff.net>
Signed-off-by: Thomas Gummerer <t.gummerer@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2019-01-07 07:45:11 -08:00
Junio C Hamano ecbdaf0899 First batch after 2.20.1
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2019-01-04 13:39:39 -08:00
Junio C Hamano ea8620b401 Merge branch 'mk/http-backend-kill-children-before-exit'
The http-backend CGI process did not correctly clean up the child
processes it spawns to run upload-pack etc. when it dies itself,
which has been corrected.

* mk/http-backend-kill-children-before-exit:
  http-backend: enable cleaning up forked upload/receive-pack on exit
2019-01-04 13:33:35 -08:00
Junio C Hamano 1328d29943 Merge branch 'sd/stash-wo-user-name'
A properly configured username/email is required under
user.useConfigOnly in order to create commits; now "git stash"
(even though it creates commit objects to represent stash entries)
command is exempt from the requirement.

* sd/stash-wo-user-name:
  stash: tolerate missing user identity
2019-01-04 13:33:34 -08:00
Junio C Hamano 84d178316f Merge branch 'sg/clone-initial-fetch-configuration'
Refspecs configured with "git -c var=val clone" did not propagate
to the resulting repository, which has been corrected.

* sg/clone-initial-fetch-configuration:
  Documentation/clone: document ignored configuration variables
  clone: respect additional configured fetch refspecs during initial fetch
  clone: use a more appropriate variable name for the default refspec
2019-01-04 13:33:34 -08:00