gitweb.git
Merge branch 'js/t5404-path-fix'Junio C Hamano Wed, 25 Apr 2018 04:29:00 +0000 (13:29 +0900)

Merge branch 'js/t5404-path-fix'

Test fix.

* js/t5404-path-fix:
t5404: relax overzealous test

Merge branch 'jk/ref-array-push'Junio C Hamano Wed, 25 Apr 2018 04:28:59 +0000 (13:28 +0900)

Merge branch 'jk/ref-array-push'

API clean-up aournd ref-filter code.

* jk/ref-array-push:
ref-filter: factor ref_array pushing into its own function
ref-filter: make ref_array_item allocation more consistent
ref-filter: use "struct object_id" consistently

Merge branch 'en/doc-typoes'Junio C Hamano Wed, 25 Apr 2018 04:28:58 +0000 (13:28 +0900)

Merge branch 'en/doc-typoes'

Docfix.

* en/doc-typoes:
Documentation: normalize spelling of 'normalised'
Documentation: fix several one-character-off spelling errors

Merge branch 'lw/daemon-log-destination'Junio C Hamano Wed, 25 Apr 2018 04:28:58 +0000 (13:28 +0900)

Merge branch 'lw/daemon-log-destination'

Recent introduction of "--log-destination" option to "git daemon"
did not work well when the daemon was run under "--inetd" mode.

* lw/daemon-log-destination:
daemon.c: fix condition for redirecting stderr

Merge branch 'mn/send-email-credential-doc'Junio C Hamano Wed, 25 Apr 2018 04:28:57 +0000 (13:28 +0900)

Merge branch 'mn/send-email-credential-doc'

Doc update.

* mn/send-email-credential-doc:
send-email: simplify Gmail example in the documentation

Merge branch 'ak/bisect-doc-typofix'Junio C Hamano Wed, 25 Apr 2018 04:28:56 +0000 (13:28 +0900)

Merge branch 'ak/bisect-doc-typofix'

Docfix.

* ak/bisect-doc-typofix:
Documentation/git-bisect.txt: git bisect term → git bisect terms

Merge branch 'br/mergetools-guiffy'Junio C Hamano Wed, 25 Apr 2018 04:28:54 +0000 (13:28 +0900)

Merge branch 'br/mergetools-guiffy'

"git mergetools" learned talking to guiffy.

* br/mergetools-guiffy:
mergetools: add support for guiffy

Merge branch 'nd/worktree-move'Junio C Hamano Wed, 25 Apr 2018 04:28:54 +0000 (13:28 +0900)

Merge branch 'nd/worktree-move'

Test update.

* nd/worktree-move:
t2028: tighten grep expression to make "move worktree" test more robust

Merge branch 'ks/branch-list-detached-rebase-i'Junio C Hamano Wed, 25 Apr 2018 04:28:53 +0000 (13:28 +0900)

Merge branch 'ks/branch-list-detached-rebase-i'

"git branch --list" during an interrupted "rebase -i" now lets
users distinguish the case where a detached HEAD is being rebased
and a normal branch is being rebased.

* ks/branch-list-detached-rebase-i:
t3200: verify "branch --list" sanity when rebasing from detached HEAD
branch --list: print useful info whilst interactive rebasing a detached HEAD

Merge branch 'jk/t5561-missing-curl'Junio C Hamano Wed, 25 Apr 2018 04:28:53 +0000 (13:28 +0900)

Merge branch 'jk/t5561-missing-curl'

Test fixes.

* jk/t5561-missing-curl:
t5561: skip tests if curl is not available
t5561: drop curl stderr redirects

Merge branch 'bw/commit-partial-from-subdirectory-fix'Junio C Hamano Wed, 25 Apr 2018 04:28:53 +0000 (13:28 +0900)

Merge branch 'bw/commit-partial-from-subdirectory-fix'

"cd sub/dir && git commit ../path" ought to record the changes to
the file "sub/path", but this regressed long time ago.

* bw/commit-partial-from-subdirectory-fix:
commit: allow partial commits with relative paths

Merge branch 'jk/relative-directory-fix'Junio C Hamano Wed, 25 Apr 2018 04:28:52 +0000 (13:28 +0900)

Merge branch 'jk/relative-directory-fix'

Some codepaths, including the refs API, get and keep relative
paths, that go out of sync when the process does chdir(2). The
chdir-notify API is introduced to let these codepaths adjust these
cached paths to the new current directory.

* jk/relative-directory-fix:
refs: use chdir_notify to update cached relative paths
set_work_tree: use chdir_notify
add chdir-notify API
trace.c: export trace_setup_key
set_git_dir: die when setenv() fails

Merge branch 'jk/flockfile-stdio'Junio C Hamano Wed, 25 Apr 2018 04:28:52 +0000 (13:28 +0900)

Merge branch 'jk/flockfile-stdio'

Code clean-up.

* jk/flockfile-stdio:
config: move flockfile() closer to unlocked functions

Merge branch 'pw/rebase-signoff'Junio C Hamano Wed, 25 Apr 2018 04:28:51 +0000 (13:28 +0900)

Merge branch 'pw/rebase-signoff'

"git rebase" has learned to honor "--signoff" option when using
backends other than "am" (but not "--preserve-merges").

* pw/rebase-signoff:
rebase --keep-empty: always use interactive rebase
rebase -p: error out if --signoff is given
rebase: extend --signoff support

Merge branch 'pw/rebase-keep-empty-fixes'Junio C Hamano Wed, 25 Apr 2018 04:28:49 +0000 (13:28 +0900)

Merge branch 'pw/rebase-keep-empty-fixes'

"git rebase --keep-empty" still removed an empty commit if the
other side contained an empty commit (due to the "does an
equivalent patch exist already?" check), which has been corrected.

* pw/rebase-keep-empty-fixes:
rebase: respect --no-keep-empty
rebase -i --keep-empty: don't prune empty commits
rebase --root: stop assuming squash_onto is unset

Merge branch 'cb/git-gui-ttk-style'Junio C Hamano Wed, 25 Apr 2018 04:28:49 +0000 (13:28 +0900)

Merge branch 'cb/git-gui-ttk-style'

"git gui" has been taught to work with old versions of tk (like
8.5.7) that do not support "ttk::style theme use" as a way to query
the current theme.

* cb/git-gui-ttk-style:
git-gui: workaround ttk:style theme use

Merge branch 'bp/git-gui-bind-kp-enter'Junio C Hamano Wed, 25 Apr 2018 04:28:48 +0000 (13:28 +0900)

Merge branch 'bp/git-gui-bind-kp-enter'

"git gui" performs commit upon CTRL/CMD+ENTER but the
CTRL/CMD+KP_ENTER (i.e. enter key on the numpad) did not have the
same key binding. It now does.

* bp/git-gui-bind-kp-enter:
git-gui: bind CTRL/CMD+numpad ENTER to do_commit

Merge branch 'bb/git-gui-ssh-key-files'Junio C Hamano Wed, 25 Apr 2018 04:28:48 +0000 (13:28 +0900)

Merge branch 'bb/git-gui-ssh-key-files'

"git gui" learned that "~/.ssh/id_ecdsa.pub" and
"~/.ssh/id_ed25519.pub" are also possible SSH key files.

* bb/git-gui-ssh-key-files:
git-gui: search for all current SSH key types

Merge branch 'svn/authors-prog-2' of git://bogomips... Junio C Hamano Wed, 11 Apr 2018 23:05:28 +0000 (08:05 +0900)

Merge branch 'svn/authors-prog-2' of git://bogomips.org/git-svn

* 'svn/authors-prog-2' of git://bogomips.org/git-svn:
git-svn: allow empty email-address using authors-prog and authors-file
git-svn: search --authors-prog in PATH too

Revert "Merge branch 'en/rename-directory-detection'"Junio C Hamano Wed, 11 Apr 2018 09:07:11 +0000 (18:07 +0900)

Revert "Merge branch 'en/rename-directory-detection'"

This reverts commit e4bb62fa1eeee689744b413e29a50b4d1dae6886, reversing
changes made to 468165c1d8a442994a825f3684528361727cd8c0.

The topic appears to inflict severe regression in renaming merges,
even though the promise of it was that it would improve them.

We do not yet know which exact change in the topic was wrong, but in
the meantime, let's play it safe and revert it out of 'master'
before real Git-using projects are harmed.

Signed-off-by: Junio C Hamano <gitster@pobox.com>

The third batch for 2.18Junio C Hamano Wed, 11 Apr 2018 04:13:49 +0000 (13:13 +0900)

The third batch for 2.18

Signed-off-by: Junio C Hamano <gitster@pobox.com>

Merge branch 'eb/cred-helper-ignore-sigpipe'Junio C Hamano Wed, 11 Apr 2018 04:09:57 +0000 (13:09 +0900)

Merge branch 'eb/cred-helper-ignore-sigpipe'

When credential helper exits very quickly without reading its
input, it used to cause Git to die with SIGPIPE, which has been
fixed.

* eb/cred-helper-ignore-sigpipe:
credential: ignore SIGPIPE when writing to credential helpers

Merge branch 'lv/tls-1.3'Junio C Hamano Wed, 11 Apr 2018 04:09:57 +0000 (13:09 +0900)

Merge branch 'lv/tls-1.3'

When built with more recent cURL, GIT_SSL_VERSION can now specify
"tlsv1.3" as its value.

* lv/tls-1.3:
http: allow use of TLS 1.3

Merge branch 'pk/test-avoid-pipe-hiding-exit-status'Junio C Hamano Wed, 11 Apr 2018 04:09:56 +0000 (13:09 +0900)

Merge branch 'pk/test-avoid-pipe-hiding-exit-status'

Test cleanup.

* pk/test-avoid-pipe-hiding-exit-status:
test: avoid pipes in git related commands for test

Merge branch 'rs/status-with-removed-submodule'Junio C Hamano Wed, 11 Apr 2018 04:09:56 +0000 (13:09 +0900)

Merge branch 'rs/status-with-removed-submodule'

"git submodule status" misbehaved on a submodule that has been
removed from the working tree.

* rs/status-with-removed-submodule:
submodule: check for NULL return of get_submodule_ref_store()

Merge branch 'nd/combined-test-helper'Junio C Hamano Wed, 11 Apr 2018 04:09:56 +0000 (13:09 +0900)

Merge branch 'nd/combined-test-helper'

Small test-helper programs have been consolidated into a single
binary.

* nd/combined-test-helper: (36 commits)
t/helper: merge test-write-cache into test-tool
t/helper: merge test-wildmatch into test-tool
t/helper: merge test-urlmatch-normalization into test-tool
t/helper: merge test-subprocess into test-tool
t/helper: merge test-submodule-config into test-tool
t/helper: merge test-string-list into test-tool
t/helper: merge test-strcmp-offset into test-tool
t/helper: merge test-sigchain into test-tool
t/helper: merge test-sha1-array into test-tool
t/helper: merge test-scrap-cache-tree into test-tool
t/helper: merge test-run-command into test-tool
t/helper: merge test-revision-walking into test-tool
t/helper: merge test-regex into test-tool
t/helper: merge test-ref-store into test-tool
t/helper: merge test-read-cache into test-tool
t/helper: merge test-prio-queue into test-tool
t/helper: merge test-path-utils into test-tool
t/helper: merge test-online-cpus into test-tool
t/helper: merge test-mktemp into test-tool
t/helper: merge (unused) test-mergesort into test-tool
...

Merge branch 'sb/packfiles-in-repository'Junio C Hamano Wed, 11 Apr 2018 04:09:55 +0000 (13:09 +0900)

Merge branch 'sb/packfiles-in-repository'

Refactoring of the internal global data structure continues.

* sb/packfiles-in-repository:
packfile: keep prepare_packed_git() private
packfile: allow find_pack_entry to handle arbitrary repositories
packfile: add repository argument to find_pack_entry
packfile: allow reprepare_packed_git to handle arbitrary repositories
packfile: allow prepare_packed_git to handle arbitrary repositories
packfile: allow prepare_packed_git_one to handle arbitrary repositories
packfile: add repository argument to reprepare_packed_git
packfile: add repository argument to prepare_packed_git
packfile: add repository argument to prepare_packed_git_one
packfile: allow install_packed_git to handle arbitrary repositories
packfile: allow rearrange_packed_git to handle arbitrary repositories
packfile: allow prepare_packed_git_mru to handle arbitrary repositories

Merge branch 'sb/object-store'Junio C Hamano Wed, 11 Apr 2018 04:09:55 +0000 (13:09 +0900)

Merge branch 'sb/object-store'

Refactoring the internal global data structure to make it possible
to open multiple repositories, work with and then close them.

Rerolled by Duy on top of a separate preliminary clean-up topic.
The resulting structure of the topics looked very sensible.

* sb/object-store: (27 commits)
sha1_file: allow sha1_loose_object_info to handle arbitrary repositories
sha1_file: allow map_sha1_file to handle arbitrary repositories
sha1_file: allow map_sha1_file_1 to handle arbitrary repositories
sha1_file: allow open_sha1_file to handle arbitrary repositories
sha1_file: allow stat_sha1_file to handle arbitrary repositories
sha1_file: allow sha1_file_name to handle arbitrary repositories
sha1_file: add repository argument to sha1_loose_object_info
sha1_file: add repository argument to map_sha1_file
sha1_file: add repository argument to map_sha1_file_1
sha1_file: add repository argument to open_sha1_file
sha1_file: add repository argument to stat_sha1_file
sha1_file: add repository argument to sha1_file_name
sha1_file: allow prepare_alt_odb to handle arbitrary repositories
sha1_file: allow link_alt_odb_entries to handle arbitrary repositories
sha1_file: add repository argument to prepare_alt_odb
sha1_file: add repository argument to link_alt_odb_entries
sha1_file: add repository argument to read_info_alternates
sha1_file: add repository argument to link_alt_odb_entry
sha1_file: add raw_object_store argument to alt_odb_usable
pack: move approximate object count to object store
...

Merge branch 'jc/test-must-be-empty'Junio C Hamano Wed, 11 Apr 2018 04:09:54 +0000 (13:09 +0900)

Merge branch 'jc/test-must-be-empty'

Test helper update.

* jc/test-must-be-empty:
test_must_be_empty: simplify file existence check

Merge branch 'cc/perf-aggregate-sort'Junio C Hamano Wed, 11 Apr 2018 04:09:54 +0000 (13:09 +0900)

Merge branch 'cc/perf-aggregate-sort'

Perf-test update.

* cc/perf-aggregate-sort:
perf/aggregate: add --sort-by=regression option
perf/aggregate: add display_dir()

Merge branch 'ab/doc-hash-brokenness'Junio C Hamano Wed, 11 Apr 2018 04:09:54 +0000 (13:09 +0900)

Merge branch 'ab/doc-hash-brokenness'

Doc updates.

* ab/doc-hash-brokenness:
doc hash-function-transition: clarify what SHAttered means
doc hash-function-transition: clarify how older gits die on NewHash

Merge branch 'bc/hash-independent-tests'Junio C Hamano Wed, 11 Apr 2018 04:09:54 +0000 (13:09 +0900)

Merge branch 'bc/hash-independent-tests'

Tests that rely on the exact hardcoded values of object names have
been updated in preparation for hash function migration.

* bc/hash-independent-tests:
t2107: abstract away SHA-1-specific constants
t2101: abstract away SHA-1-specific constants
t2101: modernize test style
t2020: abstract away SHA-1 specific constants
t1507: abstract away SHA-1-specific constants
t1411: abstract away SHA-1-specific constants
t1405: sort reflog entries in a hash-independent way
t1300: abstract away SHA-1-specific constants
t1304: abstract away SHA-1-specific constants
t1011: abstract away SHA-1-specific constants

Merge branch 'ab/drop-contrib-examples'Junio C Hamano Wed, 11 Apr 2018 04:09:54 +0000 (13:09 +0900)

Merge branch 'ab/drop-contrib-examples'

* ab/drop-contrib-examples:
Remove contrib/examples/*

The second batch for 2.18Junio C Hamano Tue, 10 Apr 2018 07:32:45 +0000 (16:32 +0900)

The second batch for 2.18

Signed-off-by: Junio C Hamano <gitster@pobox.com>

Merge branch 'ys/bisect-object-id-missing-conversion... Junio C Hamano Tue, 10 Apr 2018 07:28:24 +0000 (16:28 +0900)

Merge branch 'ys/bisect-object-id-missing-conversion-fix'

Code clean-up.

* ys/bisect-object-id-missing-conversion-fix:
bisect: use oid_to_hex() for converting object_id hashes to hex strings

Merge branch 'yk/filter-branch-non-committish-refs'Junio C Hamano Tue, 10 Apr 2018 07:28:23 +0000 (16:28 +0900)

Merge branch 'yk/filter-branch-non-committish-refs'

when refs that do not point at committish are given, "git
filter-branch" gave a misleading error messages. This has been
corrected.

* yk/filter-branch-non-committish-refs:
filter-branch: fix errors caused by refs that point at non-committish

Merge branch 'nd/trace-with-env'Junio C Hamano Tue, 10 Apr 2018 07:28:22 +0000 (16:28 +0900)

Merge branch 'nd/trace-with-env'

Code cleanup.

* nd/trace-with-env:
run-command: use strbuf_addstr() for adding a string to a strbuf

Merge branch 'nd/parseopt-completion-more'Junio C Hamano Tue, 10 Apr 2018 07:28:22 +0000 (16:28 +0900)

Merge branch 'nd/parseopt-completion-more'

The mechanism to use parse-options API to automate the command line
completion continues to get extended and polished.

* nd/parseopt-completion-more:
completion: use __gitcomp_builtin in _git_cherry
completion: use __gitcomp_builtin in _git_ls_tree
completion: delete option-only completion commands
completion: add --option completion for most builtin commands
completion: factor out _git_xxx calling code
completion: mention the oldest version we need to support
git.c: add hidden option --list-parseopt-builtins
git.c: move cmd_struct declaration up

Merge branch 'ds/bsearch-hash'Junio C Hamano Tue, 10 Apr 2018 07:28:22 +0000 (16:28 +0900)

Merge branch 'ds/bsearch-hash'

Code to find the length to uniquely abbreviate object names based
on packfile content, which is a relatively recent addtion, has been
optimized to use the same fan-out table.

* ds/bsearch-hash:
sha1_name: use bsearch_pack() in unique_in_pack()
sha1_name: use bsearch_pack() for abbreviations
packfile: define and use bsearch_pack()
sha1_name: convert struct min_abbrev_data to object_id

Merge branch 'ws/rebase-p'Junio C Hamano Tue, 10 Apr 2018 07:28:21 +0000 (16:28 +0900)

Merge branch 'ws/rebase-p'

Code clean-up.

* ws/rebase-p:
rebase: remove merges_option and a blank line
rebase: remove unused code paths from git_rebase__interactive__preserve_merges
rebase: remove unused code paths from git_rebase__interactive
rebase: add and use git_rebase__interactive__preserve_merges
rebase: extract functions out of git_rebase__interactive
rebase: reindent function git_rebase__interactive
rebase: update invocation of rebase dot-sourced scripts
rebase-interactive: simplify pick_on_preserving_merges

Merge branch 'jk/diff-highlight-graph-fix'Junio C Hamano Tue, 10 Apr 2018 07:28:21 +0000 (16:28 +0900)

Merge branch 'jk/diff-highlight-graph-fix'

"diff-highlight" filter (in contrib/) learned to undertand "git log
--graph" output better.

* jk/diff-highlight-graph-fix:
diff-highlight: detect --graph by indent
diff-highlight: use flush() helper consistently
diff-highlight: test graphs with --color
diff-highlight: test interleaved parallel lines of history
diff-highlight: prefer "echo" to "cat" in tests
diff-highlight: use test_tick in graph test
diff-highlight: correct test graph diagram

Merge branch 'nd/remove-ignore-env-field'Junio C Hamano Tue, 10 Apr 2018 07:28:20 +0000 (16:28 +0900)

Merge branch 'nd/remove-ignore-env-field'

Code clean-up for the "repository" abstraction.

* nd/remove-ignore-env-field:
repository.h: add comment and clarify repo_set_gitdir
repository: delete ignore_env member
sha1_file.c: move delayed getenv(altdb) back to setup_git_env()
repository.c: delete dead functions
repository.c: move env-related setup code back to environment.c
repository: initialize the_repository in main()

Merge branch 'ps/contains-id-error-message'Junio C Hamano Tue, 10 Apr 2018 07:28:20 +0000 (16:28 +0900)

Merge branch 'ps/contains-id-error-message'

"git tag --contains no-such-commit" gave a full list of options
after giving an error message.

* ps/contains-id-error-message:
parse-options: do not show usage upon invalid option value

The first batch for 2.18 cycleJunio C Hamano Mon, 9 Apr 2018 23:31:10 +0000 (08:31 +0900)

The first batch for 2.18 cycle

Signed-off-by: Junio C Hamano <gitster@pobox.com>

Merge branch 'tg/stash-untracked-with-pathspec-fix'Junio C Hamano Mon, 9 Apr 2018 23:25:45 +0000 (08:25 +0900)

Merge branch 'tg/stash-untracked-with-pathspec-fix'

"git stash push -u -- <pathspec>" gave an unnecessary and confusing
error message when there was no tracked files that match the
<pathspec>, which has been fixed.

* tg/stash-untracked-with-pathspec-fix:
stash: drop superfluos pathspec parameter
stash push -u: don't create empty stash
stash push: avoid printing errors
stash: fix nonsense pipeline

Merge branch 'nd/worktree-prune'Junio C Hamano Mon, 9 Apr 2018 23:25:45 +0000 (08:25 +0900)

Merge branch 'nd/worktree-prune'

The way "git worktree prune" worked internally has been simplified,
by assuming how "git worktree move" moves an existing worktree to a
different place.

* nd/worktree-prune:
worktree prune: improve prune logic when worktree is moved
worktree: delete dead code
gc.txt: more details about what gc does

Merge branch 'bc/object-id'Junio C Hamano Mon, 9 Apr 2018 23:25:45 +0000 (08:25 +0900)

Merge branch 'bc/object-id'

Conversion from uchar[20] to struct object_id continues.

* bc/object-id: (36 commits)
convert: convert to struct object_id
sha1_file: introduce a constant for max header length
Convert lookup_replace_object to struct object_id
sha1_file: convert read_sha1_file to struct object_id
sha1_file: convert read_object_with_reference to object_id
tree-walk: convert tree entry functions to object_id
streaming: convert istream internals to struct object_id
tree-walk: convert get_tree_entry_follow_symlinks internals to object_id
builtin/notes: convert static functions to object_id
builtin/fmt-merge-msg: convert remaining code to object_id
sha1_file: convert sha1_object_info* to object_id
Convert remaining callers of sha1_object_info_extended to object_id
packfile: convert unpack_entry to struct object_id
sha1_file: convert retry_bad_packed_offset to struct object_id
sha1_file: convert assert_sha1_type to object_id
builtin/mktree: convert to struct object_id
streaming: convert open_istream to use struct object_id
sha1_file: convert check_sha1_signature to struct object_id
sha1_file: convert read_loose_object to use struct object_id
builtin/index-pack: convert struct ref_delta_entry to object_id
...

Merge branch 'ma/shortlog-revparse'Junio C Hamano Mon, 9 Apr 2018 23:25:44 +0000 (08:25 +0900)

Merge branch 'ma/shortlog-revparse'

"git shortlog cruft" aborted with a BUG message when run outside a
Git repository. The command has been taught to complain about
extra and unwanted arguments on its command line instead in such a
case.

* ma/shortlog-revparse:
shortlog: disallow left-over arguments outside repo
shortlog: add usage-string for stdin-reading
git-shortlog.txt: reorder usages

Merge branch 'ab/install-symlinks'Junio C Hamano Mon, 9 Apr 2018 23:25:44 +0000 (08:25 +0900)

Merge branch 'ab/install-symlinks'

The build procedure learned to optionally use symbolic links
(instead of hardlinks and copies) to install "git-foo" for built-in
commands, whose binaries are all identical.

* ab/install-symlinks:
Makefile: optionally symlink libexec/git-core binaries to bin/git
Makefile: add a gitexecdir_relative variable
Makefile: fix broken bindir_relative variable

Merge branch 'ml/filter-branch-no-op-error'Junio C Hamano Mon, 9 Apr 2018 23:25:44 +0000 (08:25 +0900)

Merge branch 'ml/filter-branch-no-op-error'

"git filter-branch" learned to use a different exit code to allow
the callers to tell the case where there was no new commits to
rewrite from other error cases.

* ml/filter-branch-no-op-error:
filter-branch: return 2 when nothing to rewrite

Merge branch 'ab/pcre-v2'Junio C Hamano Mon, 9 Apr 2018 23:25:43 +0000 (08:25 +0900)

Merge branch 'ab/pcre-v2'

Git can be built to use either v1 or v2 of the PCRE library, and so
far, the build-time configuration USE_LIBPCRE=YesPlease instructed
the build procedure to use v1, but now it means v2. USE_LIBPCRE1
and USE_LIBPCRE2 can be used to explicitly choose which version to
use, as before.

* ab/pcre-v2:
Makefile: make USE_LIBPCRE=YesPlease mean v2, not v1
configure: detect redundant --with-libpcre & --with-libpcre1
configure: fix a regression in PCRE v1 detection

Merge branch 'ti/fetch-everything-local-optim'Junio C Hamano Mon, 9 Apr 2018 23:25:43 +0000 (08:25 +0900)

Merge branch 'ti/fetch-everything-local-optim'

A "git fetch" from a repository with insane number of refs into a
repository that is already up-to-date still wasted too many cycles
making many lstat(2) calls to see if these objects at the tips
exist as loose objects locally. These lstat(2) calls are optimized
away by enumerating all loose objects beforehand.

It is unknown if the new strategy negatively affects existing use
cases, fetching into a repository with many loose objects from a
repository with small number of refs.

* ti/fetch-everything-local-optim:
fetch-pack.c: use oidset to check existence of loose object

Merge branch 'en/rename-directory-detection'Junio C Hamano Mon, 9 Apr 2018 23:25:43 +0000 (08:25 +0900)

Merge branch 'en/rename-directory-detection'

Rename detection logic in "diff" family that is used in "merge" has
learned to guess when all of x/a, x/b and x/c have moved to z/a,
z/b and z/c, it is likely that x/d added in the meantime would also
want to move to z/d by taking the hint that the entire directory
'x' moved to 'z'. A bug causing dirty files involved in a rename
to be overwritten during merge has also been fixed as part of this
work.

* en/rename-directory-detection: (29 commits)
merge-recursive: ensure we write updates for directory-renamed file
merge-recursive: avoid spurious rename/rename conflict from dir renames
directory rename detection: new testcases showcasing a pair of bugs
merge-recursive: fix remaining directory rename + dirty overwrite cases
merge-recursive: fix overwriting dirty files involved in renames
merge-recursive: avoid clobbering untracked files with directory renames
merge-recursive: apply necessary modifications for directory renames
merge-recursive: when comparing files, don't include trees
merge-recursive: check for file level conflicts then get new name
merge-recursive: add computation of collisions due to dir rename & merging
merge-recursive: check for directory level conflicts
merge-recursive: add get_directory_renames()
merge-recursive: make a helper function for cleanup for handle_renames
merge-recursive: split out code for determining diff_filepairs
merge-recursive: make !o->detect_rename codepath more obvious
merge-recursive: fix leaks of allocated renames and diff_filepairs
merge-recursive: introduce new functions to handle rename logic
merge-recursive: move the get_renames() function
directory rename detection: tests for handling overwriting dirty files
directory rename detection: tests for handling overwriting untracked files
...

Documentation: normalize spelling of 'normalised'Elijah Newren Thu, 5 Apr 2018 17:20:27 +0000 (10:20 -0700)

Documentation: normalize spelling of 'normalised'

This could be a localization issue, but we had about four dozen
"normalize"s (or variants, e.g. normalized, renormalize, etc.), and only
one "normalised" (no other variants), so normalize normalised into
normalized.

Signed-off-by: Elijah Newren <newren@gmail.com>
Reviewed-by: Stefan Beller <sbeller@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Documentation: fix several one-character-off spelling... Elijah Newren Thu, 5 Apr 2018 17:20:26 +0000 (10:20 -0700)

Documentation: fix several one-character-off spelling errors

Signed-off-by: Elijah Newren <newren@gmail.com>
Reviewed-by: Stefan Beller <sbeller@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

daemon.c: fix condition for redirecting stderrLucas Werkmeister Tue, 3 Apr 2018 22:13:07 +0000 (00:13 +0200)

daemon.c: fix condition for redirecting stderr

Since the --log-destination option was added in 0c591cacb ("daemon: add
--log-destination=(stderr|syslog|none)", 2018-02-04) with the explicit
goal of allowing logging to stderr when running in inetd mode, we should
not always redirect stderr to /dev/null in inetd mode, but rather only
when stderr is not being used for logging.

Signed-off-by: Lucas Werkmeister <mail@lucaswerkmeister.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

t5404: relax overzealous testJohannes Schindelin Fri, 6 Apr 2018 19:31:22 +0000 (21:31 +0200)

t5404: relax overzealous test

In 0b294c0abf0 (make deleting a missing ref more quiet, 2008-07-08), we
added a test to verify that deleting an already-deleted ref does not
show an error.

Our test simply looks for the substring 'error' in the output of the
`git push`, which might look innocuous on the face of it.

Suppose, however, that you are a big fan of whales. Or even better: your
IT administrator has a whale of a time picking cute user names, e.g.
referring to you (due to your like of India Pale Ales) as "one of the
cuter rorquals" (see https://en.wikipedia.org/wiki/Rorqual to learn a
thing or two about rorquals) and hence your home directory becomes
/home/cuterrorqual. If you now run t5404, it fails! Why? Because the
test calls `git push origin :b3` which outputs:

To /home/cuterrorqual/git/t/trash directory.t5404-tracking-branches/.
- [deleted] b3

Note how there is no error displayed in that output? But of course
"error" is a substring of "cuterrorqual". And so that `grep error
output` finds something.

This bug was not, actually, caught having "error" as a substring of the
user name but while working in a worktree called "colorize-push-errors",
whose name was part of that output, too, suggesting that not even
testing for the *word* `error` via `git grep -w error output` would fix
the underlying issue.

This patch chooses instead to look for the prefix "error:" at the
beginning of the line, so that there can be no ambiguity that any catch
was indeed a message generated by Git's `error_builtin()` function.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Acked-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

ref-filter: factor ref_array pushing into its own functionJeff King Fri, 6 Apr 2018 18:59:45 +0000 (14:59 -0400)

ref-filter: factor ref_array pushing into its own function

In preparation for callers constructing their own ref_array
structs, let's move our own internal push operation into its
own function.

While we're at it, we can replace REALLOC_ARRAY() with
ALLOC_GROW(), which should give the growth operation
amortized linear complexity (as opposed to growing by one,
which is potentially quadratic, though in-place realloc
growth often makes this faster in practice).

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

ref-filter: make ref_array_item allocation more consistentJeff King Fri, 6 Apr 2018 18:59:26 +0000 (14:59 -0400)

ref-filter: make ref_array_item allocation more consistent

We have a helper function to allocate ref_array_item
structs, but it only takes a subset of the possible fields
in the struct as initializers. We could have it accept an
argument for _every_ field, but that becomes a pain for the
fields which some callers don't want to set initially.

Instead, let's be explicit that it takes only the minimum
required to create the ref, and that callers should then
fill in the rest themselves.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

ref-filter: use "struct object_id" consistentlyJeff King Fri, 6 Apr 2018 18:58:32 +0000 (14:58 -0400)

ref-filter: use "struct object_id" consistently

Internally we store a "struct object_id", and all of our
callers have one to pass us. But we insist that they peel it
to its bare-sha1 hash, which we then hashcpy() into place.
Let's pass it around as an object_id, which future-proofs us
for a post-sha1 world.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

send-email: simplify Gmail example in the documentationMichal Nazarewicz Sat, 7 Apr 2018 10:07:23 +0000 (11:07 +0100)

send-email: simplify Gmail example in the documentation

There is no need for use to manually call ‘git credential’ especially
as the interface isn’t super user-friendly and a bit confusing. ‘git
send-email’ will do that for them at the first execution and if the
password matches, it will be saved in the store.

Simplify the documentaion so it dosn’t include the ‘git credential’
invocation (which was incorrect anyway as it should use ‘approve’
instead of ‘fill’) and instead just mentions that credentials helper
must be set up.

Signed-off-by: Michał Nazarewicz <mina86@mina86.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Documentation/git-bisect.txt: git bisect term → git... Anders Kaseorg Fri, 6 Apr 2018 20:21:19 +0000 (16:21 -0400)

Documentation/git-bisect.txt: git bisect term → git bisect terms

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

mergetools: add support for guiffyBill Ritcher Thu, 5 Apr 2018 13:55:01 +0000 (08:55 -0500)

mergetools: add support for guiffy

Add guiffy as difftool and mergetool

guiffy is available on Windows, Linux, and MacOS

Signed-off-by: Bill Ritcher <Bill_Ritcher@guiffy.com>
Reviewed-by: David Aguilar <davvid@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

git-svn: allow empty email-address using authors-prog... Andreas Heiduk Sat, 24 Mar 2018 10:20:46 +0000 (11:20 +0100)

git-svn: allow empty email-address using authors-prog and authors-file

The email address in --authors-file and --authors-prog can be empty but
git-svn translated it into a fictional email address in the form

jondoe <jondoe@6aafaa21e0fb4338a68ab372a049893d>

containing the SVN repository UUID. Now git-svn behaves like git-commit:
If the email is *explicitly* set to the empty string using '<>', the
commit does not contain an email address, only the name:

jondoe <>

Allowing to remove the email address *intentionally* prevents automatic
systems from sending emails to those fictional addresses and avoids
cluttering the log output with unnecessary stuff.

Signed-off-by: Andreas Heiduk <asheiduk@gmail.com>
Signed-off-by: Eric Wong <e@80x24.org>

commit: allow partial commits with relative pathsBrandon Williams Tue, 3 Apr 2018 17:57:45 +0000 (10:57 -0700)

commit: allow partial commits with relative paths

Commit 8894d53580 (commit: allow partial commits with relative paths,
2011-07-30) ensured that partial commits were allowed when a user
supplies a relative pathspec but then this was regressed in 5879f5684c
(remove prefix argument from pathspec_prefix, 2011-09-04) when the
prefix argument to 'pathspec_prefix' removed and the 'list_paths'
function wasn't properly adjusted to cope with the change, resulting in
over-eager pruning of the tree that is overlayed on the index.

This fixes the regression and adds a regression test so this can be
prevented in the future.

Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

t5561: skip tests if curl is not availableJeff King Tue, 3 Apr 2018 14:01:57 +0000 (10:01 -0400)

t5561: skip tests if curl is not available

It's possible to have libcurl installed but not the curl
command-line utility. The latter is not generally needed for
Git's http support, but we use it in t5561 for basic tests
of http-backend's functionality. Let's detect when it's
missing and skip this test.

Note that we can't mark the individual tests with the CURL
prerequisite. They're in a shared t556x_common that uses the
GET and POST functions as a level of indirection, and it's
only our implementations of those functions in t5561 that
requires curl. It's not a problem, though, as literally
every test in the script would depend on the prerequisite
anyway.

Reported-by: Jens Krüger <Jens.Krueger@frm2.tum.de>
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

t5561: drop curl stderr redirectsJeff King Tue, 3 Apr 2018 14:01:41 +0000 (10:01 -0400)

t5561: drop curl stderr redirects

For a normal test run, stderr is already redirected to
/dev/null by the test suite. When used with "-v",
suppressing stderr is actively harmful, as it may hide the
reason for curl failing.

Reported-by: Jens Krüger <Jens.Krueger@frm2.tum.de>
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

t2028: tighten grep expression to make "move worktree... Eric Sunshine Tue, 3 Apr 2018 09:25:41 +0000 (05:25 -0400)

t2028: tighten grep expression to make "move worktree" test more robust

Following a rename of worktree "source" to "destination", the "move
worktree" test uses grep to verify that the output of "git worktree list
--porcelain" does not contain "source" (and does contain "destination").
Unfortunately, the grep expression is too loose and can match
unexpectedly. For example, if component of the test trash directory path
matches "source" (e.g. "/home/me/sources/git/t/trash*"), then the test
will be fooled into thinking that "source" still exists. Tighten the
expression to avoid such accidental matches.

While at it, drop an unused variable ("toplevel") from the test and
tighten a similarly too-loose expression in a related test.

Reported-by: Jens Krüger <Jens.Krueger@frm2.tum.de>
Signed-off-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

t3200: verify "branch --list" sanity when rebasing... Eric Sunshine Tue, 3 Apr 2018 14:47:15 +0000 (20:17 +0530)

t3200: verify "branch --list" sanity when rebasing from detached HEAD

"git branch --list" shows an in-progress rebase as:

* (no branch, rebasing <branch>)
master
...

However, if the rebase is started from a detached HEAD, then there is no
<branch>, and it would attempt to print a NULL pointer. The previous
commit fixed this problem, so add a test to verify that the output is
sane in this situation.

Signed-off-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Kaartic Sivaraam <kaartic.sivaraam@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

branch --list: print useful info whilst interactive... Kaartic Sivaraam Tue, 3 Apr 2018 04:31:00 +0000 (10:01 +0530)

branch --list: print useful info whilst interactive rebasing a detached HEAD

When rebasing interactively (rebase -i), "git branch --list" prints
a line indicating the current branch being rebased. This works well
when the interactive rebase is initiated when a local branch is
checked out.

This doesn't play well when the rebase is initiated on a detached
HEAD. When "git branch --list" tries to print information related
to the interactive rebase in this case it tries to print the name
of a branch using an uninitialized variable and thus tries to
print a "null pointer string". As a consequence, it does not provide
useful information while also inducing undefined behaviour.

So, print the point from which the rebase was started when interactive
rebasing a detached HEAD.

Signed-off-by: Kaartic Sivaraam <kaartic.sivaraam@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

git-svn: search --authors-prog in PATH tooAndreas Heiduk Sun, 4 Mar 2018 11:22:36 +0000 (12:22 +0100)

git-svn: search --authors-prog in PATH too

In 36db1eddf9 ("git-svn: add --authors-prog option", 2009-05-14) the path
to authors-prog was made absolute because git-svn changes the current
directory in some situations. This makes sense if the program is part of
the repository but prevents searching via $PATH.

The old behaviour is still retained, but if the file does not exists, then
authors-prog is searched for in $PATH as any other command.

Signed-off-by: Andreas Heiduk <asheiduk@gmail.com>
Signed-off-by: Eric Wong <e@80x24.org>

Git 2.17 v2.17.0Junio C Hamano Mon, 2 Apr 2018 17:13:35 +0000 (10:13 -0700)

Git 2.17

Signed-off-by: Junio C Hamano <gitster@pobox.com>

Merge tag 'l10n-2.17.0-rnd1' of git://github.com/git... Junio C Hamano Mon, 2 Apr 2018 17:12:38 +0000 (10:12 -0700)

Merge tag 'l10n-2.17.0-rnd1' of git://github.com/git-l10n/git-po

l10n for Git 2.17.0 round 1

* tag 'l10n-2.17.0-rnd1' of git://github.com/git-l10n/git-po:
l10n: de.po: translate 132 new messages
l10n: zh_CN: review for git v2.17.0 l10n round 1
l10n: zh_CN: for git v2.17.0 l10n round 1
l10n: ko.po: Update Korean translation
l10n: fr.po: v2.17.0 no fuzzy
l10n: sv.po: Update Swedish translation (3376t0f0u)
l10n: Update Catalan translation
l10n: fr.po v2.17.0 round 1
l10n: vi.po(3376t): Updated Vietnamese translation for v2.17
l10n: bg.po: Updated Bulgarian translation (3376t)
l10n: es.po: Update Spanish translation 2.17.0
l10n: git.pot: v2.17.0 round 1 (132 new, 44 removed)
l10n: es.po: fixes to Spanish translation

Merge branch 'pw/add-p-single'Junio C Hamano Mon, 2 Apr 2018 17:10:54 +0000 (10:10 -0700)

Merge branch 'pw/add-p-single'

Hotfix.

* pw/add-p-single:
add -p: fix 2.17.0-rc* regression due to moved code

add -p: fix 2.17.0-rc* regression due to moved codeÆvar Arnfjörð Bjarmason Sat, 31 Mar 2018 12:50:58 +0000 (12:50 +0000)

add -p: fix 2.17.0-rc* regression due to moved code

Fix a regression in 88f6ffc1c2 ("add -p: only bind search key if
there's more than one hunk", 2018-02-13) which is present in
2.17.0-rc*, but not 2.16.0.

In Perl, regex variables like $1 always refer to the last regex
match. When the aforementioned change added a new regex match between
the old match and the corresponding code that was expecting $1, the $1
variable would always be undef, since the newly inserted regex match
doesn't have any captures.

As a result the "/" feature to search for a string in a hunk by regex
completely broke, on git.git:

$ perl -pi -e 's/Git/Tig/g' README.md
$ ./git --exec-path=$PWD add -p
[..]
Stage this hunk [y,n,q,a,d,j,J,g,/,s,e,?]? s
Split into 4 hunks.
[...]
Stage this hunk [y,n,q,a,d,j,J,g,/,s,e,?]? /Many
Use of uninitialized value $1 in string eq at /home/avar/g/git/git-add--interactive line 1568, <STDIN> line 1.
search for regex? Many

I.e. the initial "/regex" command wouldn't work, and would always emit
a warning and ask again for a regex, now it works as intended again.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

l10n: de.po: translate 132 new messagesRalf Thielow Fri, 16 Mar 2018 17:41:16 +0000 (18:41 +0100)

l10n: de.po: translate 132 new messages

Translate 132 new messages came from git.pot update in abc8de64d (l10n:
git.pot: v2.17.0 round 1 (132 new, 44 removed)).

Signed-off-by: Ralf Thielow <ralf.thielow@gmail.com>

config: move flockfile() closer to unlocked functionsJeff King Fri, 30 Mar 2018 19:26:15 +0000 (15:26 -0400)

config: move flockfile() closer to unlocked functions

Commit 260d408e32 (config: use getc_unlocked when reading
from file, 2015-04-16) taught git_config_from_file() to lock
the filehandle so that we could safely use the faster
unlocked functions to access the handle.

However, it split the logic into two places:

1. The master lock/unlock happens in git_config_from_file().

2. The decision to use the unlocked functions happens in
do_config_from_file().

That means that if anybody calls the latter function, they
will accidentally use the unlocked functions without holding
the lock. And indeed, git_config_from_stdin() does so.

In practice, this hasn't been a problem since this code
isn't generally multi-threaded (and even if some Git program
happened to have another thread running, it's unlikely to be
reading from stdin). But it's a good practice to make sure
we're always holding the lock before using the unlocked
functions.

Helped-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

refs: use chdir_notify to update cached relative pathsJeff King Fri, 30 Mar 2018 18:35:12 +0000 (14:35 -0400)

refs: use chdir_notify to update cached relative paths

Commit f57f37e2e1 (files-backend: remove the use of
git_path(), 2017-03-26) introduced a regression when a
relative $GIT_DIR is used in a working tree:

- when we initialize the ref backend, we make a copy of
get_git_dir(), which may be relative

- later, we may call setup_work_tree() and chdir to the
root of the working tree

- further calls to the ref code will use the stored git
directory, but relative paths will now point to the
wrong place

The new test in t1501 demonstrates one such instance (the
bug causes us to write the ref update to the nonsense
"relative/relative/.git").

Since setup_work_tree() now uses chdir_notify, we can just
ask it update our relative paths when necessary.

Reported-by: Rafael Ascensao <rafa.almas@gmail.com>
Helped-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

set_work_tree: use chdir_notifyJeff King Fri, 30 Mar 2018 18:35:08 +0000 (14:35 -0400)

set_work_tree: use chdir_notify

When we change to the top of the working tree, we manually
re-adjust $GIT_DIR and call set_git_dir() again, in order to
update any relative git-dir we'd compute earlier.

Instead of the work-tree code having to know to call the
git-dir code, let's use the new chdir_notify interface.
There are two spots that need updating, with a few
subtleties in each:

1. the set_git_dir() code needs to chdir_notify_register()
so it can be told when to update its path.

Technically we could push this down into repo_set_gitdir(),
so that even repository structs besides the_repository
could benefit from this. But that opens up a lot of
complications:

- we'd still need to touch set_git_dir(), because it
does some other setup (like setting $GIT_DIR in the
environment)

- submodules using other repository structs get
cleaned up, which means we'd need to remove them
from the chdir_notify list

- it's unlikely to fix any bugs, since we shouldn't
generally chdir() in the middle of working on a
submodule

2. setup_work_tree now needs to call chdir_notify(), and
can lose its manual set_git_dir() call.

Note that at first glance it looks like this undoes the
absolute-to-relative optimization added by 044bbbcb63
(Make git_dir a path relative to work_tree in
setup_work_tree(), 2008-06-19). But for the most part
that optimization was just _undoing_ the
relative-to-absolute conversion which the function was
doing earlier (and which is now gone).

It is true that if you already have an absolute git_dir
that the setup_work_tree() function will no longer make
it relative as a side effect. But:

- we generally do have relative git-dir's due to the
way the discovery code works

- if we really care about making git-dir's relative
when possible, then we should be relativizing them
earlier (e.g., when we see an absolute $GIT_DIR we
could turn it relative, whether we are going to
chdir into a worktree or not). That would cover all
cases, including ones that 044bbbcb63 did not.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

add chdir-notify APIJeff King Fri, 30 Mar 2018 18:35:04 +0000 (14:35 -0400)

add chdir-notify API

If one part of the code does a permanent chdir(), then this
invalidates any relative paths that may be held by other
parts of the code. For example, setup_work_tree() moves us
to the top of the working tree, which may invalidate a
previously stored relative gitdir.

We've hacked around this case by teaching setup_work_tree()
to re-run set_git_dir() with an adjusted path, but this
stomps all over the idea of module boundaries.
setup_work_tree() shouldn't have to know all of the places
that need to be fed an adjusted path. And indeed, there's at
least one other place (the refs code) which needs adjusting.

Let's provide an API to let code that stores relative paths
"subscribe" to updates to the current working directory.
This means that callers of chdir() don't need to know about
all subscribers ahead of time; they can simply consult a
dynamically built list.

Note that our helper function to reparent relative paths
uses the simple remove_leading_path(). We could in theory
use the much smarter relative_path(), but that led to some
problems as described in 41894ae3a3 (Use simpler
relative_path when set_git_dir, 2013-10-14). Since we're
aiming to replace the setup_work_tree() code here, let's
follow its lead.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

trace.c: export trace_setup_keyNguyễn Thái Ngọc Duy Fri, 30 Mar 2018 18:34:59 +0000 (14:34 -0400)

trace.c: export trace_setup_key

This is so that we can print traces based on this key outside trace.c.

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

set_git_dir: die when setenv() failsJeff King Fri, 30 Mar 2018 18:34:46 +0000 (14:34 -0400)

set_git_dir: die when setenv() fails

The set_git_dir() function returns an error if setenv()
fails, but there are zero callers who pay attention to this
return value. If this ever were to happen, it could cause
confusing results, as sub-processes would see a potentially
stale GIT_DIR (e.g., if it is relative and we chdir()-ed to
the root of the working tree).

We _could_ try to fix each caller, but there's really
nothing useful to do after this failure except die. Let's
just lump setenv() failure into the same category as malloc
failure: things that should never happen and cause us to
abort catastrophically.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Merge branch 'jh/partial-clone'Junio C Hamano Thu, 29 Mar 2018 22:39:59 +0000 (15:39 -0700)

Merge branch 'jh/partial-clone'

Hotfix.

* jh/partial-clone:
upload-pack: disable object filtering when disabled by config
unpack-trees: release oid_array after use in check_updates()

upload-pack: disable object filtering when disabled... Jonathan Nieder Wed, 28 Mar 2018 20:33:03 +0000 (13:33 -0700)

upload-pack: disable object filtering when disabled by config

When upload-pack gained partial clone support (v2.17.0-rc0~132^2~12,
2017-12-08), it was guarded by the uploadpack.allowFilter config item
to allow server operators to control when they start supporting it.

That config item didn't go far enough, though: it controls whether the
'filter' capability is advertised, but if a (custom) client ignores
the capability advertisement and passes a filter specification anyway,
the server would handle that despite allowFilter being false.

This is particularly significant if a security bug is discovered in
this new experimental partial clone code. Installations without
uploadpack.allowFilter ought not to be affected since they don't
intend to support partial clone, but they would be swept up into being
vulnerable.

Simplify and limit the attack surface by making uploadpack.allowFilter
disable the feature, not just the advertisement of it.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

credential: ignore SIGPIPE when writing to credential... Erik E Brady Thu, 29 Mar 2018 18:00:56 +0000 (11:00 -0700)

credential: ignore SIGPIPE when writing to credential helpers

The credential subsystem can trigger SIGPIPE when writing to an
external helper if that helper closes its stdin before reading the
whole input. Normally this is rare, since helpers would need to read
that input to make a decision about how to respond, but:

1. It's reasonable to configure a helper which only handles "get"
while ignoring "store". Such a handler might not read stdin
for "store", thereby rapidly closing stdin upon helper exit.

2. A broken or misbehaving helper might exit immediately. That's an
error, but it's not reasonable for it to take down the parent Git
process with SIGPIPE.

Even with such a helper, seeing this problem should be rare. Getting
SIGPIPE requires the helper racily exiting before we've written the
fairly small credential output.

Signed-off-by: Erik E Brady <brady@cisco.com>
Reviewed-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

http: allow use of TLS 1.3Loganaden Velvindron Thu, 29 Mar 2018 10:14:18 +0000 (14:14 +0400)

http: allow use of TLS 1.3

Add a tlsv1.3 option to http.sslVersion in addition to the existing
tlsv1.[012] options. libcurl has supported this since 7.52.0.

This requires OpenSSL 1.1.1 with TLS 1.3 enabled or curl built with
recent versions of NSS or BoringSSL as the TLS backend.

Signed-off-by: Loganaden Velvindron <logan@hackers.mu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

rebase --keep-empty: always use interactive rebasePhillip Wood Tue, 20 Mar 2018 11:10:57 +0000 (11:10 +0000)

rebase --keep-empty: always use interactive rebase

rebase --merge accepts --keep-empty but just ignores it, by using an
implicit interactive rebase the user still gets the rename detection
of a merge based rebase but with with --keep-empty support.

If rebase --keep-empty without --interactive or --merge stops for the
user to resolve merge conflicts then 'git rebase --continue' will
fail. This is because it uses a different code path that does not
create $git_dir/rebase-apply. As rebase --keep-empty was implemented
using cherry-pick it has never supported the am options and now that
interactive rebases support --signoff there is no loss of
functionality by using an implicit interactive rebase.

Signed-off-by: Phillip Wood <phillip.wood@dunelm.org.uk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

rebase -p: error out if --signoff is givenPhillip Wood Tue, 20 Mar 2018 11:10:56 +0000 (11:10 +0000)

rebase -p: error out if --signoff is given

rebase --preserve-merges does not support --signoff so error out
rather than just silently ignoring it so that the user knows the
commits will not be signed off.

Signed-off-by: Phillip Wood <phillip.wood@dunelm.org.uk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

rebase: extend --signoff supportPhillip Wood Tue, 20 Mar 2018 11:10:55 +0000 (11:10 +0000)

rebase: extend --signoff support

Allow --signoff to be used with --interactive and --merge. In
interactive mode only commits marked to be picked, edited or reworded
will be signed off.

The main motivation for this patch was to allow one to run 'git rebase
--exec "make check" --signoff' which is useful when preparing a patch
series for publication and is more convenient than doing the signoff
with another --exec command.

This change also allows --root without --onto to work with --signoff
as well (--root with --onto was already supported).

Signed-off-by: Phillip Wood <phillip.wood@dunelm.org.uk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Merge branch 'pw/rebase-keep-empty-fixes' into pw/rebas... Junio C Hamano Thu, 29 Mar 2018 18:08:09 +0000 (11:08 -0700)

Merge branch 'pw/rebase-keep-empty-fixes' into pw/rebase-signoff

* pw/rebase-keep-empty-fixes:
rebase: respect --no-keep-empty
rebase -i --keep-empty: don't prune empty commits
rebase --root: stop assuming squash_onto is unset
Git 2.16.2

rebase: respect --no-keep-emptyPhillip Wood Tue, 20 Mar 2018 10:03:15 +0000 (10:03 +0000)

rebase: respect --no-keep-empty

$OPT_SPEC has always allowed --no-keep-empty so lets start handling
it.

Signed-off-by: Phillip Wood <phillip.wood@dunelm.org.uk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

rebase -i --keep-empty: don't prune empty commitsPhillip Wood Tue, 20 Mar 2018 10:03:14 +0000 (10:03 +0000)

rebase -i --keep-empty: don't prune empty commits

If there are empty commits on the left hand side of $upstream...HEAD
then the empty commits on the right hand side that we want to keep are
pruned by --cherry-pick. Fix this by using --cherry-mark instead of
--cherry-pick and keeping the commits that are empty or are not marked
as cherry-picks.

Signed-off-by: Phillip Wood <phillip.wood@dunelm.org.uk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

l10n: zh_CN: review for git v2.17.0 l10n round 1Ray Chen Thu, 29 Mar 2018 07:09:20 +0000 (15:09 +0800)

l10n: zh_CN: review for git v2.17.0 l10n round 1

Signed-off-by: Ray Chen <oldsharp@gmail.com>

l10n: zh_CN: for git v2.17.0 l10n round 1Jiang Xin Thu, 22 Feb 2018 01:17:34 +0000 (09:17 +0800)

l10n: zh_CN: for git v2.17.0 l10n round 1

Translate 132 new messages (3376t0f0u) for git 2.17.0-rc0.

Reviewed-by: 依云 <lilydjwg@gmail.com>
Reviewed-by: Fangyi Zhou <fangyi.zhou@yuriko.moe>
Signed-off-by: Jiang Xin <worldhello.net@gmail.com>

submodule: check for NULL return of get_submodule_ref_s... René Scharfe Wed, 28 Mar 2018 21:14:08 +0000 (23:14 +0200)

submodule: check for NULL return of get_submodule_ref_store()

If we can't find a ref store for a submodule then assume the latter
is not initialized (or was removed). Print a status line accordingly
instead of causing a segmentation fault by passing NULL as the first
parameter of refs_head_ref().

Reported-by: Jeremy Feusi <jeremy@feusi.co>
Reviewed-by: Stefan Beller <sbeller@google.com>
Initial-Test-By: Stefan Beller <sbeller@google.com>
Helped-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Rene Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Git 2.17-rc2 v2.17.0-rc2Junio C Hamano Wed, 28 Mar 2018 18:05:14 +0000 (11:05 -0700)

Git 2.17-rc2

Signed-off-by: Junio C Hamano <gitster@pobox.com>

Merge branch 'tg/stash-doc-typofix'Junio C Hamano Wed, 28 Mar 2018 18:04:25 +0000 (11:04 -0700)

Merge branch 'tg/stash-doc-typofix'

Hotfix.

* tg/stash-doc-typofix:
git-stash.txt: remove extra square bracket

Merge branch 'pc/submodule-helper'Junio C Hamano Wed, 28 Mar 2018 18:04:25 +0000 (11:04 -0700)

Merge branch 'pc/submodule-helper'

Hotfix.

* pc/submodule-helper:
submodule deinit: handle non existing pathspecs gracefully

Merge branch 'nd/parseopt-completion'Junio C Hamano Wed, 28 Mar 2018 18:04:24 +0000 (11:04 -0700)

Merge branch 'nd/parseopt-completion'

Hotfix for recently graduated topic that give help to completion
scripts from the Git subcommands that are being completed

* nd/parseopt-completion:
t9902: disable test on the list of merge-strategies under GETTEXT_POISON
completion: clear cached --options when sourcing the completion script

test: avoid pipes in git related commands for testPratik Karki Tue, 27 Mar 2018 17:31:37 +0000 (23:16 +0545)

test: avoid pipes in git related commands for test

Avoid using pipes downstream of Git commands since the exit codes
of commands upstream of pipes get swallowed, thus potentially
hiding failure of those commands. Instead, capture Git command
output to a file and apply the downstream command(s) to that file.

Signed-off-by: Pratik Karki <predatoramigo@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>