gitweb.git
Merge branch 'jk/send-email-rtrim-mailrc-alias' into... Junio C Hamano Fri, 15 Apr 2016 01:57:47 +0000 (18:57 -0700)

Merge branch 'jk/send-email-rtrim-mailrc-alias' into maint

"git send-email" had trouble parsing alias file in mailrc format
when lines in it had trailing whitespaces on them.

* jk/send-email-rtrim-mailrc-alias:
send-email: ignore trailing whitespace in mailrc alias file

Merge branch 'da/mergetool-delete-delete-conflict'... Junio C Hamano Fri, 15 Apr 2016 01:57:47 +0000 (18:57 -0700)

Merge branch 'da/mergetool-delete-delete-conflict' into maint

"git mergetool" did not work well with conflicts that both sides
deleted.

* da/mergetool-delete-delete-conflict:
mergetool: honor tempfile configuration when resolving delete conflicts
mergetool: support delete/delete conflicts

Merge branch 'jk/startup-info' into maintJunio C Hamano Fri, 15 Apr 2016 01:57:46 +0000 (18:57 -0700)

Merge branch 'jk/startup-info' into maint

The startup_info data, which records if we are working inside a
repository (among other things), are now uniformly available to Git
subcommand implementations, and Git avoids attempting to touch
references when we are not in a repository.

* jk/startup-info:
use setup_git_directory() in test-* programs
grep: turn off gitlink detection for --no-index
mailmap: do not resolve blobs in a non-repository
remote: don't resolve HEAD in non-repository
setup: set startup_info->have_repository more reliably
setup: make startup_info available everywhere

Merge branch 'jk/getwholeline-getdelim-empty' into... Junio C Hamano Fri, 15 Apr 2016 01:57:46 +0000 (18:57 -0700)

Merge branch 'jk/getwholeline-getdelim-empty' into maint

strbuf_getwholeline() did not NUL-terminate the buffer on certain
corner cases in its error codepath.

* jk/getwholeline-getdelim-empty:
strbuf_getwholeline: NUL-terminate getdelim buffer on error

Merge branch 'rj/xdiff-prepare-plug-leak-on-error-codep... Junio C Hamano Fri, 15 Apr 2016 01:57:45 +0000 (18:57 -0700)

Merge branch 'rj/xdiff-prepare-plug-leak-on-error-codepath' into maint

A small memory leak in an error codepath has been plugged in xdiff
code.

* rj/xdiff-prepare-plug-leak-on-error-codepath:
xdiff/xprepare: fix a memory leak
xdiff/xprepare: use the XDF_DIFF_ALG() macro to access flag bits

Merge branch 'gf/fetch-pack-direct-object-fetch' into... Junio C Hamano Fri, 15 Apr 2016 01:57:44 +0000 (18:57 -0700)

Merge branch 'gf/fetch-pack-direct-object-fetch' into maint

Fetching of history by naming a commit object name directly didn't
work across remote-curl transport.

* gf/fetch-pack-direct-object-fetch:
fetch-pack: update the documentation for "<refs>..." arguments
fetch-pack: fix object_id of exact sha1

Merge branch 'jk/rev-parse-local-env-vars' into maintJunio C Hamano Fri, 15 Apr 2016 01:57:44 +0000 (18:57 -0700)

Merge branch 'jk/rev-parse-local-env-vars' into maint

The "--local-env-vars" and "--resolve-git-dir" options of "git
rev-parse" failed to work outside a repository when the command's
option parsing was rewritten in 1.8.5 era.

* jk/rev-parse-local-env-vars:
rev-parse: let some options run outside repository
t1515: add tests for rev-parse out-of-repo helpers

Merge branch 'jk/config-get-urlmatch' into maintJunio C Hamano Fri, 15 Apr 2016 01:57:43 +0000 (18:57 -0700)

Merge branch 'jk/config-get-urlmatch' into maint

"git config --get-urlmatch", unlike other variants of the "git
config --get" family, did not signal error with its exit status
when there was no matching configuration.

* jk/config-get-urlmatch:
Documentation/git-config: fix --get-all description
Documentation/git-config: use bulleted list for exit codes
config: fail if --get-urlmatch finds no value

Merge branch 'pb/t7502-drop-dup' into maintJunio C Hamano Fri, 15 Apr 2016 01:37:18 +0000 (18:37 -0700)

Merge branch 'pb/t7502-drop-dup' into maint

Code clean-up.

* pb/t7502-drop-dup:
t/t7502 : drop duplicate test

Merge branch 'jk/test-httpd-config-nosystem' into maintJunio C Hamano Fri, 15 Apr 2016 01:37:17 +0000 (18:37 -0700)

Merge branch 'jk/test-httpd-config-nosystem' into maint

The tests that involve running httpd leaked the system-wide
configuration in /etc/gitconfig to the tested environment.

* jk/test-httpd-config-nosystem:
t/lib-httpd: pass through GIT_CONFIG_NOSYSTEM env

Merge branch 'sb/clone-t57-t56' into maintJunio C Hamano Fri, 15 Apr 2016 01:37:16 +0000 (18:37 -0700)

Merge branch 'sb/clone-t57-t56' into maint

Rename bunch of tests on "git clone" for better organization.

* sb/clone-t57-t56:
clone tests: rename t57* => t56*

Merge branch 'jk/credential-cache-comment-exit' into... Junio C Hamano Fri, 15 Apr 2016 01:37:16 +0000 (18:37 -0700)

Merge branch 'jk/credential-cache-comment-exit' into maint

A code clarification.

* jk/credential-cache-comment-exit:
credential-cache--daemon: clarify "exit" action semantics

Merge branch 'jc/index-pack' into maintJunio C Hamano Fri, 15 Apr 2016 01:37:15 +0000 (18:37 -0700)

Merge branch 'jc/index-pack' into maint

Code clean-up.

* jc/index-pack:
index-pack: add a helper function to derive .idx/.keep filename
index-pack: correct --keep[=<msg>]

Merge branch 'ss/exc-flag-is-a-collection-of-bits'... Junio C Hamano Fri, 15 Apr 2016 01:37:15 +0000 (18:37 -0700)

Merge branch 'ss/exc-flag-is-a-collection-of-bits' into maint

Code clean-up.

* ss/exc-flag-is-a-collection-of-bits:
dir: store EXC_FLAG_* values in unsigned integers

Merge branch 'mp/upload-pack-use-embedded-args' into... Junio C Hamano Fri, 15 Apr 2016 01:37:14 +0000 (18:37 -0700)

Merge branch 'mp/upload-pack-use-embedded-args' into maint

The embedded args argv-array in the child process is used to build
the command line to run pack-objects instead of using a separate
array of strings.

* mp/upload-pack-use-embedded-args:
upload-pack: use argv_array for pack_objects

Merge branch 'oa/doc-diff-check' into maintJunio C Hamano Fri, 15 Apr 2016 01:37:14 +0000 (18:37 -0700)

Merge branch 'oa/doc-diff-check' into maint

A minor documentation update.

* oa/doc-diff-check:
Documentation: git diff --check detects conflict markers

Merge branch 'pb/opt-cmdmode-doc' into maintJunio C Hamano Fri, 15 Apr 2016 01:37:13 +0000 (18:37 -0700)

Merge branch 'pb/opt-cmdmode-doc' into maint

Minor API documentation update.

* pb/opt-cmdmode-doc:
api-parse-options.txt: document OPT_CMDMODE()

Merge branch 'nd/apply-doc' into maintJunio C Hamano Fri, 15 Apr 2016 01:37:13 +0000 (18:37 -0700)

Merge branch 'nd/apply-doc' into maint

A minor documentation update.

* nd/apply-doc:
git-apply.txt: mention the behavior inside a subdir
git-apply.txt: remove a space

Merge branch 'cc/doc-recommend-performance-trace-to... Junio C Hamano Fri, 15 Apr 2016 01:37:12 +0000 (18:37 -0700)

Merge branch 'cc/doc-recommend-performance-trace-to-file' into maint

A minor documentation update.

* cc/doc-recommend-performance-trace-to-file:
Documentation: talk about pager in api-trace.txt

Merge branch 'mm/lockfile-error-message' into maintJunio C Hamano Fri, 15 Apr 2016 01:37:12 +0000 (18:37 -0700)

Merge branch 'mm/lockfile-error-message' into maint

* mm/lockfile-error-message:
lockfile: improve error message when lockfile exists
lockfile: mark strings for translation

ll-merge: fix typo in commentJunio C Hamano Thu, 14 Apr 2016 22:12:15 +0000 (15:12 -0700)

ll-merge: fix typo in comment

When a944af1d (merge: teach -Xours/-Xtheirs to binary ll-merge
driver, 2012-09-08) introduced FAVOR_OURS/FAVOR_THEIRS to the binary
ll-merge driver, it changed what happens to the merge result for the
outer merge, and updated the comment from:

The tentative merge result is "ours" for the final round, or
common ancestor for an internal merge. Still return "conflicted
merge" status.

to

The tentative merge result is the or common ancestor for an
internal merge.

What happened is obvious. I noticed the lack of definitive article
in front of "common" but failed to remove "or". Also I forgot to
describe what I did for the final merge, probably because I was
satisified by the description in the log message.

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

Merge branch 'sb/submodule-path-misc-bugs' into sb... Junio C Hamano Thu, 14 Apr 2016 19:47:44 +0000 (12:47 -0700)

Merge branch 'sb/submodule-path-misc-bugs' into sb/submodule-init

"git submodule" reports the paths of submodules the command
recurses into, but this was incorrect when the command was not run
from the root level of the superproject.

Any further comments? Otherwise will merge to 'next'.

* sb/submodule-path-misc-bugs: (600 commits)
t7407: make expectation as clear as possible
submodule update: test recursive path reporting from subdirectory
submodule update: align reporting path for custom command execution
submodule status: correct path handling in recursive submodules
submodule update --init: correct path handling in recursive submodules
submodule foreach: correct path display in recursive submodules
Git 2.8
Documentation: fix git-p4 AsciiDoc formatting
mingw: skip some tests in t9115 due to file name issues
t1300: fix the new --show-origin tests on Windows
t1300-repo-config: make it resilient to being run via 'sh -x'
config --show-origin: report paths with forward slashes
submodule: fix regression for deinit without submodules
l10n: pt_PT: Update and add new translations
l10n: ca.po: update translation
Git 2.8-rc4
Documentation: fix broken linkgit to git-config
Documentation: use ASCII quotation marks in git-p4
Revert "config.mak.uname: use clang for Mac OS X 10.6"
git-compat-util: st_add4: work around gcc 4.2.x compiler crash
...

Merge branch 'sb/submodule-helper-clone-regression... Junio C Hamano Thu, 14 Apr 2016 19:46:11 +0000 (12:46 -0700)

Merge branch 'sb/submodule-helper-clone-regression-fix' into sb/submodule-init

* sb/submodule-helper-clone-regression-fix:
submodule--helper, module_clone: catch fprintf failure
submodule--helper: do not borrow absolute_path() result for too long
submodule--helper, module_clone: always operate on absolute paths
submodule--helper clone: create the submodule path just once
submodule--helper: fix potential NULL-dereference
recursive submodules: test for relative paths

fsck_commit_buffer(): do not special case the last... Junio C Hamano Thu, 14 Apr 2016 17:18:11 +0000 (10:18 -0700)

fsck_commit_buffer(): do not special case the last validation

The pattern taken by all the validations in this function is:

if (notice a violation exists) {
err = report(... VIOLATION_KIND ...);
if (err)
return err;
}

where report() returns zero if specified kind of violation is set to
be ignored, and otherwise shows an error message and returns non-zero.

The last validation in the function immediately before the function
returns 0 to declare "all good" can cheat and directly return the
return value from report(), and the current code does so, i.e.

if (notice a violation exists)
return report(... VIOLATION_KIND ...);
return 0;

But that is a selfish code that declares it is the ultimate and
final form of the function, never to be enhanced later. To allow
and invite future enhancements, make the last test follow the same
pattern.

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

Start preparing for 2.8.2Junio C Hamano Wed, 13 Apr 2016 23:30:00 +0000 (16:30 -0700)

Start preparing for 2.8.2

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

imap-send: fix CRAM-MD5 response calculationKazuki Yamaguchi Fri, 8 Apr 2016 14:02:30 +0000 (23:02 +0900)

imap-send: fix CRAM-MD5 response calculation

Remove extra + 1 from resp_len, the length of the byte sequence to be
Base64 encoded and passed to the server as the response. Or the response
incorrectly contains an extra \0.

Signed-off-by: Kazuki Yamaguchi <k@rhe.jp>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

imap-send: check for NOLOGIN capability only when using... Kazuki Yamaguchi Fri, 8 Apr 2016 14:02:24 +0000 (23:02 +0900)

imap-send: check for NOLOGIN capability only when using LOGIN command

Don't check for NOLOGIN (LOGINDISABLED) capability when imap.authMethod
is specified.

LOGINDISABLED capability doesn't forbid using AUTHENTICATE, so it should
be allowed, or we can't connect to IMAP servers which only accepts
AUTHENTICATE command.

Signed-off-by: Kazuki Yamaguchi <k@rhe.jp>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Fourth batch for post 2.8 cycleJunio C Hamano Wed, 13 Apr 2016 21:19:29 +0000 (14:19 -0700)

Fourth batch for post 2.8 cycle

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

Merge branch 'tb/blame-force-read-cache-to-workaround... Junio C Hamano Wed, 13 Apr 2016 21:12:40 +0000 (14:12 -0700)

Merge branch 'tb/blame-force-read-cache-to-workaround-safe-crlf'

When running "git blame $path" with unnormalized data in the index
for the path, the data in the working tree was blamed, even though
"git add" would not have changed what is already in the index, due
to "safe crlf" that disables the line-end conversion. It has been
corrected.

* tb/blame-force-read-cache-to-workaround-safe-crlf:
correct blame for files commited with CRLF

Merge branch 'mg/complete-cherry-mark-to-log'Junio C Hamano Wed, 13 Apr 2016 21:12:39 +0000 (14:12 -0700)

Merge branch 'mg/complete-cherry-mark-to-log'

The completion scripts (in contrib/) did not include the
"--cherry-mark" option when completing "git log <HT>".

* mg/complete-cherry-mark-to-log:
completion: complete --cherry-mark for git log

Merge branch 'ep/trace-doc-sample-fix'Junio C Hamano Wed, 13 Apr 2016 21:12:38 +0000 (14:12 -0700)

Merge branch 'ep/trace-doc-sample-fix'

Fix a typo in an example in the trace API documentation.

* ep/trace-doc-sample-fix:
api-trace.txt: fix typo

Merge branch 'jc/makefile-redirection-stderr'Junio C Hamano Wed, 13 Apr 2016 21:12:37 +0000 (14:12 -0700)

Merge branch 'jc/makefile-redirection-stderr'

A minor fix in the Makefile.

* jc/makefile-redirection-stderr:
Makefile: fix misdirected redirections

Merge branch 'lt/pretty-expand-tabs'Junio C Hamano Wed, 13 Apr 2016 21:12:36 +0000 (14:12 -0700)

Merge branch 'lt/pretty-expand-tabs'

When "git log" shows the log message indented by 4-spaces, the
remainder of a line after a HT does not align in the way the author
originally intended. The command now expands tabs by default in
such a case, and allows the users to override it with a new option,
'--no-expand-tabs'.

* lt/pretty-expand-tabs:
pretty: test --expand-tabs
pretty: allow tweaking tabwidth in --expand-tabs
pretty: enable --expand-tabs by default for selected pretty formats
pretty: expand tabs in indented logs to make things line up properly

Merge branch 'mj/pull-rebase-autostash'Junio C Hamano Wed, 13 Apr 2016 21:12:36 +0000 (14:12 -0700)

Merge branch 'mj/pull-rebase-autostash'

"git pull --rebase" learned "--[no-]autostash" option, so that
the rebase.autostash configuration variable set to true can be
overridden from the command line.

* mj/pull-rebase-autostash:
t5520: test --[no-]autostash with pull.rebase=true
t5520: reduce commom lines of code
t5520: factor out common "failing autostash" code
t5520: factor out common "successful autostash" code
t5520: use better test to check stderr output
t5520: ensure consistent test conditions
t5520: use consistent capitalization in test titles
pull --rebase: add --[no-]autostash flag
git-pull.c: introduce git_pull_config()

Merge branch 'jn/mergetools-examdiff'Junio C Hamano Wed, 13 Apr 2016 21:12:36 +0000 (14:12 -0700)

Merge branch 'jn/mergetools-examdiff'

"git mergetools" learned to drive ExamDiff.

* jn/mergetools-examdiff:
mergetools: add support for ExamDiff
mergetools: create mergetool_find_win32_cmd() helper function for winmerge

Merge branch 'es/format-patch-doc-hide-no-patch'Junio C Hamano Wed, 13 Apr 2016 21:12:35 +0000 (14:12 -0700)

Merge branch 'es/format-patch-doc-hide-no-patch'

"git format-patch --help" showed `-s` and `--no-patch` as if these
are valid options to the command. We already hide `--patch` option
from the documentation, because format-patch is about showing the
diff, and the documentation now hides these options as well.

* es/format-patch-doc-hide-no-patch:
git-format-patch.txt: don't show -s as shorthand for multiple options

Merge branch 'js/mingw-tests-2.8'Junio C Hamano Wed, 13 Apr 2016 21:12:34 +0000 (14:12 -0700)

Merge branch 'js/mingw-tests-2.8'

Code clean-up.

* js/mingw-tests-2.8:
Windows: shorten code by re-using convert_slashes()

Merge branch 'cc/apply'Junio C Hamano Wed, 13 Apr 2016 21:12:34 +0000 (14:12 -0700)

Merge branch 'cc/apply'

Minor code clean-up.

* cc/apply:
builtin/apply: free patch when parse_chunk() fails
builtin/apply: handle parse_binary() failure
apply: remove unused call to free() in gitdiff_{old,new}name()
builtin/apply: get rid of useless 'name' variable

Merge branch 'sb/misc-cleanups'Junio C Hamano Wed, 13 Apr 2016 21:12:34 +0000 (14:12 -0700)

Merge branch 'sb/misc-cleanups'

Assorted minor clean-ups.

* sb/misc-cleanups:
credential-cache, send_request: close fd when done
bundle: don't leak an fd in case of early return
abbrev_sha1_in_line: don't leak memory
notes: don't leak memory in git_config_get_notes_strategy

Merge branch 'sk/send-pack-all-fix'Junio C Hamano Wed, 13 Apr 2016 21:12:33 +0000 (14:12 -0700)

Merge branch 'sk/send-pack-all-fix'

"git send-pack --all <there>" was broken when its command line
option parsing was written in the 2.6 timeframe.

* sk/send-pack-all-fix:
git-send-pack: fix --all option when used with directory

Merge branch 'sg/diff-multiple-identical-renames'Junio C Hamano Wed, 13 Apr 2016 21:12:32 +0000 (14:12 -0700)

Merge branch 'sg/diff-multiple-identical-renames'

"git diff -M" used to work better when two originally identical
files A and B got renamed to X/A and X/B by pairing A to X/A and B
to X/B, but this was broken in the 2.0 timeframe.

* sg/diff-multiple-identical-renames:
diffcore: fix iteration order of identical files during rename detection

Merge branch 'kn/for-each-tag-branch'Junio C Hamano Wed, 13 Apr 2016 21:12:31 +0000 (14:12 -0700)

Merge branch 'kn/for-each-tag-branch'

A minor documentation update.

* kn/for-each-tag-branch:
for-each-ref: fix description of '--contains' in manpage

Merge branch 'ky/branch-d-worktree'Junio C Hamano Wed, 13 Apr 2016 21:12:30 +0000 (14:12 -0700)

Merge branch 'ky/branch-d-worktree'

When "git worktree" feature is in use, "git branch -d" allowed
deletion of a branch that is checked out in another worktree

* ky/branch-d-worktree:
branch -d: refuse deleting a branch which is currently checked out

Merge branch 'rz/worktree-no-checkout'Junio C Hamano Wed, 13 Apr 2016 21:12:30 +0000 (14:12 -0700)

Merge branch 'rz/worktree-no-checkout'

"git worktree add" can be given "--no-checkout" option to only
create an empty worktree without checking out the files.

* rz/worktree-no-checkout:
worktree: add: introduce --checkout option

Merge branch 'rt/rebase-i-shorten-stop-report'Junio C Hamano Wed, 13 Apr 2016 21:12:30 +0000 (14:12 -0700)

Merge branch 'rt/rebase-i-shorten-stop-report'

The commit object name reported when "rebase -i" stops has been
shortened.

* rt/rebase-i-shorten-stop-report:
rebase-i: print an abbreviated hash when stop for editing

Merge branch 'rt/completion-help'Junio C Hamano Wed, 13 Apr 2016 21:12:29 +0000 (14:12 -0700)

Merge branch 'rt/completion-help'

Shell completion (in contrib/) updates.

* rt/completion-help:
completion: add 'revisions' and 'everyday' to 'git help'
completion: add option '--guides' to 'git help'

Merge branch 'ak/use-hashmap-iter-first-in-submodule... Junio C Hamano Wed, 13 Apr 2016 21:12:29 +0000 (14:12 -0700)

Merge branch 'ak/use-hashmap-iter-first-in-submodule-config'

Minor code cleanup.

* ak/use-hashmap-iter-first-in-submodule-config:
submodule-config: use hashmap_iter_first()

Merge branch 'jk/check-repository-format'Junio C Hamano Wed, 13 Apr 2016 21:12:28 +0000 (14:12 -0700)

Merge branch 'jk/check-repository-format'

The repository set-up sequence has been streamlined (the biggest
change is that there is no longer git_config_early()), so that we
do not attempt to look into refs/* when we know we do not have a
Git repository.

* jk/check-repository-format:
verify_repository_format: mark messages for translation
setup: drop repository_format_version global
setup: unify repository version callbacks
init: use setup.c's repo version verification
setup: refactor repo format reading and verification
config: drop git_config_early
check_repository_format_gently: stop using git_config_early
lazily load core.sharedrepository
wrap shared_repository global in get/set accessors
setup: document check_repository_format()

i18n: branch: move comment for translatorsVasco Almeida Wed, 13 Apr 2016 10:29:54 +0000 (10:29 +0000)

i18n: branch: move comment for translators

Move and split comment for translators (marked by TRANSLATORS) to be
immediately above the strings marked for translation.

As a result, the comment can now be extracted by xgettext.

Signed-off-by: Vasco Almeida <vascomalmeida@sapo.pt>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

i18n: branch: unmark string for translationVasco Almeida Wed, 13 Apr 2016 10:29:53 +0000 (10:29 +0000)

i18n: branch: unmark string for translation

Unmark strings for translation for command help/hint.
These strings can not be translated, just copied.

Signed-off-by: Vasco Almeida <vascomalmeida@sapo.pt>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

merge-octopus: abort if index does not match HEADElijah Newren Sun, 10 Apr 2016 06:13:38 +0000 (23:13 -0700)

merge-octopus: abort if index does not match HEAD

Signed-off-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

t6044: new merge testcases for when index doesn't match... Elijah Newren Sun, 10 Apr 2016 06:13:37 +0000 (23:13 -0700)

t6044: new merge testcases for when index doesn't match HEAD

With one exception, we require the index to exactly match the
current HEAD commit at the time git merge is invoked. This
expectation was even documented in git-merge.txt until commit
ebef7e5 (Documentation: simplify How Merge Works, 2010-01-23).

Most merge strategies enforced this requirement, but it turns out
not all did. The current exceptions were the following two:

* ff updates
* octopus merges

ff updates actually will error out if the staged change is to a path
modified between HEAD and the commit being merged. If the path(s)
that are staged are files unrelated to the changes between these two
commits, though, then an ff update will just keep these staged
changes around after the merge. This is the one exception we
expected to the abort-merge-if- index-doesn't-match-HEAD rule.

For octopus merges, the rule should be enforced. Unfortunately, the
current behavior of the code is to ignore the difference and use the
staged changes in place of whatever is in HEAD as it proceeds to
perform the merge. So if the staged changes can be cleanly merged
with all the other heads, then the staged changes will just be
incorported into the resulting commit. If the staged changes cannot
be cleanly merged with all the other heads, the merge is not aborted
-- merge conflicts are simply reported as if HEAD had originally
contained whatever the index did.

Add testcases that check our expectations. A subsequent commit will
correct the erroneous octopus merge behavior.

Signed-off-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

builtin/merge.c: fix a bug with trivial mergesElijah Newren Sun, 10 Apr 2016 06:13:40 +0000 (23:13 -0700)

builtin/merge.c: fix a bug with trivial merges

If read_tree_trivial() succeeds and produces a tree that is already
in the object store, then the index is not written to disk, leaving
it out-of-sync with both HEAD and the working tree.

In order to write the index back out to disk after a merge,
write_index_locked() needs to be called. For most merge strategies, this
is done from try_merge_strategy(). For fast forward updates, this is
done from checkout_fast_forward(). When trivial merges work, the call to
write_index_locked() is buried a little deeper:

merge_trivial()
-> write_tree_trivial()
-> write_cache_as_tree()
-> write_index_as_tree()
-> write_locked_index()

However, it is only called when !cache_tree_fully_valid(), which is how
this bug is triggered. But that also shows why this bug doesn't affect
any other merge strategies or cases.

Add a direct call to write_index_locked() from merge_trivial() to fix
this issue. Since the indirect call to write_locked_index() was
conditional on cache_tree_fully_valid(), it won't be written twice.

Signed-off-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

t7605: add a testcase demonstrating a bug with trivial... Elijah Newren Sun, 10 Apr 2016 06:13:39 +0000 (23:13 -0700)

t7605: add a testcase demonstrating a bug with trivial merges

Repeating a trivial merge more than once will leave the index out of
sync, despite being clean before the merge and operating on the
exact same heads as the first run. The recorded merge has the
correct tree and the working tree is brought up to date, it is just
the index that is left as it was before the merge. Every attempt to
repeat the merge beyond the first will leave the index in the same
weird out-of-sync state.

Signed-off-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

merge-recursive: do not check working copy when creatin... Elijah Newren Sun, 10 Apr 2016 06:13:36 +0000 (23:13 -0700)

merge-recursive: do not check working copy when creating a virtual merge base

There were a few cases in merge-recursive that could result in a
check for the presence of files in the working copy while trying to
create a virtual merge base. These were rare and innocuous, but
somewhat illogical. The two cases were:

* When there was naming conflicts (e.g. a D/F conflict) and we had to
pick a new unique name for a file. Since the new name is somewhat
arbitrary, it didn't matter that we consulted the working copy to
avoid picking a filename it has, but since the virtual merge base is
never checked out, it's a waste of time and slightly odd to do so.

* When two different files get renamed to the same name (on opposite
sides of the merge), we needed to delete the original filenames from
the cache and possibly also the working directory. The caller's check
for determining whether to delete from the working directory was a
call to would_lose_untracked(). It turns out this didn't matter
because remove_file() had logic to avoid modifying the working
directory when creating a virtual merge base, but there is no reason
for the caller to check the working directory in such circumstances.
It's a waste of time, if not also a bit weird.

Signed-off-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

merge-recursive: remove duplicate codeElijah Newren Sun, 10 Apr 2016 06:13:35 +0000 (23:13 -0700)

merge-recursive: remove duplicate code

In commit 51931bf (merge-recursive: Improve handling of rename
target vs. directory addition, 2011-08-11), I apparently added two
lines of code that were immediately duplicated a few lines later.
No idea why, other than it seems pretty clear this was a mistake:
there is no need to remove the same file twice; removing it once is
sufficient...especially since the intervening line was working with
a different file entirely.

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

i18n: builtin/rm.c: remove a comma ',' from stringVasco Almeida Sat, 9 Apr 2016 20:38:43 +0000 (20:38 +0000)

i18n: builtin/rm.c: remove a comma ',' from string

Remove a comma from string marked for translation. Make the string match the
one in builtin/mv.c. Now translators have do handle this string only once.

Signed-off-by: Vasco Almeida <vascomalmeida@sapo.pt>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

i18n: unpack-trees: mark strings for translationVasco Almeida Sat, 9 Apr 2016 20:38:39 +0000 (20:38 +0000)

i18n: unpack-trees: mark strings for translation

Mark strings seen by the user inside setup_unpack_trees_porcelain() and
display_error_msgs() functions for translation.

Signed-off-by: Vasco Almeida <vascomalmeida@sapo.pt>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

t3404: use write_scriptJunio C Hamano Tue, 12 Apr 2016 16:59:59 +0000 (09:59 -0700)

t3404: use write_script

The test uses hardcoded #!/bin/sh to create a pre-commit hook
script. Because the generated script uses $(command substitution),
which is not supported by /bin/sh on some platforms (e.g. Solaris),
the resulting pre-commit always fails.

Which is not noticeable as the test that uses the hook is about
checking the behaviour of the command when the hook fails ;-), but
nevertheless it is not testing what we wanted to test.

Use write_script so that the resulting script is run under the same
shell our scripted Porcelain commands are run, which must support
the necessary $(construct).

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

t1020: do not overuse printf and use write_scriptJunio C Hamano Sun, 10 Apr 2016 19:01:30 +0000 (12:01 -0700)

t1020: do not overuse printf and use write_script

The test prepares a sample file "dir/two" with a single incomplete
line in it with "printf", and also prepares a small helper script
"diff" to create a file with a single incomplete line in it, again
with "printf". The output from the latter is compared with an
expected output, again prepared with "printf" hence lacking the
final LF. There is no reason for this test to be using files with
an incomplete line at the end, and these look more like a mistake
of not using

printf "%s\n" "string to be written"

and using

printf "string to be written"

Depending on what would be in $GIT_PREFIX, using the latter form
could be a bug waiting to happen. Correct them.

Also, the test uses hardcoded #!/bin/sh to create a small helper
script. For a small task like what the generated script does, it
does not matter too much in that what appears as /bin/sh would not
be _so_ broken, but while we are at it, use write_script instead,
which happens to make the result easier to read by reducing need
of one level of quoting.

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

t5532: use write_scriptJeff King Sat, 9 Apr 2016 21:04:30 +0000 (17:04 -0400)

t5532: use write_script

The recent cleanup in b7cbbff switched t5532's use of
backticks to $(). This matches our normal shell style, which
is good. But it also breaks the test on Solaris, where
/bin/sh does not understand $().

Our normal shell style assumes a modern-ish shell which
knows about $(). However, some tests create small helper
scripts and just write "#!/bin/sh" into them. These scripts
either need to go back to using backticks, or they need to
respect $SHELL_PATH. The easiest way to do the latter is to
use write_script.

While we're at it, let's also stick the script creation
inside a test_expect block (our usual style), and split the
perl snippet into its own script (to prevent quoting
madness).

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

refs: on symref reflog expire, lock symref not referrentDavid Turner Thu, 7 Apr 2016 19:03:11 +0000 (15:03 -0400)

refs: on symref reflog expire, lock symref not referrent

When locking a symbolic ref to expire a reflog, lock the symbolic
ref (using REF_NODEREF) instead of its referent.

Add a test for this.

Signed-off-by: David Turner <dturner@twopensource.com>
Reviewed-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

refs: move resolve_ref_unsafe into common codeDavid Turner Thu, 7 Apr 2016 19:03:10 +0000 (15:03 -0400)

refs: move resolve_ref_unsafe into common code

Now that resolve_ref_unsafe's only interaction with the backend is
through read_raw_ref, we can move it into the common code. Later,
we'll replace read_raw_ref with a backend function.

Signed-off-by: David Turner <dturner@twopensource.com>
Reviewed-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

show_head_ref(): check the result of resolve_ref_namesp... Michael Haggerty Thu, 7 Apr 2016 19:03:09 +0000 (15:03 -0400)

show_head_ref(): check the result of resolve_ref_namespace()

Only use the result of resolve_ref_namespace() if it is non-NULL.

Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: David Turner <dturner@twopensource.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

check_aliased_update(): check that dst_name is non... Michael Haggerty Thu, 7 Apr 2016 19:03:08 +0000 (15:03 -0400)

check_aliased_update(): check that dst_name is non-NULL

If there is an error in resolve_ref_unsafe(), it returns NULL. We check
for this case, but not until after calling strip_namespace(). Instead,
call strip_namespace() *after* the NULL check.

Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: David Turner <dturner@twopensource.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

checkout_paths(): remove unneeded flag variableMichael Haggerty Thu, 7 Apr 2016 19:03:07 +0000 (15:03 -0400)

checkout_paths(): remove unneeded flag variable

It is never read, so we can pass NULL to resolve_ref_unsafe().

Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: David Turner <dturner@twopensource.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

cmd_merge(): remove unneeded flag variableMichael Haggerty Thu, 7 Apr 2016 19:03:06 +0000 (15:03 -0400)

cmd_merge(): remove unneeded flag variable

It is never read, so we can pass NULL to resolve_ref_unsafe().

Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: David Turner <dturner@twopensource.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

fsck_head_link(): remove unneeded flag variableMichael Haggerty Thu, 7 Apr 2016 19:03:05 +0000 (15:03 -0400)

fsck_head_link(): remove unneeded flag variable

It is never read, so we can pass NULL to resolve_ref_unsafe().

Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: David Turner <dturner@twopensource.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

read_raw_ref(): change flags parameter to unsigned intMichael Haggerty Thu, 7 Apr 2016 19:03:04 +0000 (15:03 -0400)

read_raw_ref(): change flags parameter to unsigned int

read_raw_ref() is going to be part of the vtable for reference backends,
so clean up its interface to use "unsigned int flags" rather than "int
flags". Its caller still uses signed int for its flags arguments. But
changing that would touch a lot of code, so leave it for now.

Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: David Turner <dturner@twopensource.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

files-backend: inline resolve_ref_1() into resolve_ref_... Michael Haggerty Thu, 7 Apr 2016 19:03:03 +0000 (15:03 -0400)

files-backend: inline resolve_ref_1() into resolve_ref_unsafe()

resolve_ref_unsafe() wasn't doing anything useful anymore.

Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: David Turner <dturner@twopensource.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

read_raw_ref(): manage own scratch spaceMichael Haggerty Thu, 7 Apr 2016 19:03:02 +0000 (15:03 -0400)

read_raw_ref(): manage own scratch space

Instead of creating scratch space in resolve_ref_unsafe() and passing
it down through resolve_ref_1 to read_raw_ref(), teach read_raw_ref()
to manage its own scratch space. This reduces coupling across the
functions at the cost of some extra allocations.

Also, when read_raw_ref() is implemented for different reference
backends, the other implementations might have different scratch
space requirements.

Note that we now preserve errno across the calls to strbuf_release(),
which calls free() and can thus theoretically overwrite errno.

Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: David Turner <dturner@twopensource.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

files-backend: break out ref readingDavid Turner Thu, 7 Apr 2016 19:03:01 +0000 (15:03 -0400)

files-backend: break out ref reading

Refactor resolve_ref_1 in terms of a new function read_raw_ref, which
is responsible for reading ref data from the ref storage.

Later, we will make read_raw_ref a pluggable backend function, and make
resolve_ref_unsafe common.

Signed-off-by: David Turner <dturner@twopensource.com>
Helped-by: Duy Nguyen <pclouds@gmail.com>
Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

resolve_ref_1(): eliminate local variable "bad_name"Michael Haggerty Thu, 7 Apr 2016 19:03:00 +0000 (15:03 -0400)

resolve_ref_1(): eliminate local variable "bad_name"

We can use (*flags & REF_BAD_NAME) for that purpose.

Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: David Turner <dturner@twopensource.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

resolve_ref_1(): reorder codeMichael Haggerty Thu, 7 Apr 2016 19:02:59 +0000 (15:02 -0400)

resolve_ref_1(): reorder code

There is no need to adjust *flags if we're just about to fail.

Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: David Turner <dturner@twopensource.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

resolve_ref_1(): eliminate local variableMichael Haggerty Thu, 7 Apr 2016 19:02:58 +0000 (15:02 -0400)

resolve_ref_1(): eliminate local variable

In place of `buf`, use `refname`, which is anyway a better description
of what is being pointed at.

Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: David Turner <dturner@twopensource.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

resolve_ref_unsafe(): ensure flags is always setMichael Haggerty Thu, 7 Apr 2016 19:02:57 +0000 (15:02 -0400)

resolve_ref_unsafe(): ensure flags is always set

If the caller passes flags==NULL, then set it to point at a local
scratch variable. This removes the need for a lot of "if (flags)"
guards in resolve_ref_1() and resolve_missing_loose_ref().

Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: David Turner <dturner@twopensource.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

resolve_ref_unsafe(): use for loop to count up to MAXDEPTHMichael Haggerty Thu, 7 Apr 2016 19:02:56 +0000 (15:02 -0400)

resolve_ref_unsafe(): use for loop to count up to MAXDEPTH

The loop's there anyway; we might as well use it.

Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: David Turner <dturner@twopensource.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

resolve_missing_loose_ref(): simplify semanticsMichael Haggerty Thu, 7 Apr 2016 19:02:55 +0000 (15:02 -0400)

resolve_missing_loose_ref(): simplify semantics

Make resolve_missing_loose_ref() only responsible for looking up a
packed reference, without worrying about whether we want to read or
write the reference and without setting errno on failure. Move the other
logic to the caller.

Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: David Turner <dturner@twopensource.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

t1430: improve test coverage of deletion of badly-named... Michael Haggerty Thu, 7 Apr 2016 19:02:54 +0000 (15:02 -0400)

t1430: improve test coverage of deletion of badly-named refs

Check "branch -d broken...ref"

Check various combinations of

* Deleting using "update-ref -d"
* Deleting using "update-ref --no-deref -d"
* Deleting using "branch -d"

in the following combinations of symref -> ref:

* badname -> broken...ref
* badname -> broken...ref (dangling)
* broken...symref -> master
* broken...symref -> idonotexist (dangling)

Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: David Turner <dturner@twopensource.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

t1430: test for-each-ref in the presence of badly-named... Michael Haggerty Thu, 7 Apr 2016 19:02:53 +0000 (15:02 -0400)

t1430: test for-each-ref in the presence of badly-named refs

Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: David Turner <dturner@twopensource.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

t1430: don't rely on symbolic-ref for creating broken... Michael Haggerty Thu, 7 Apr 2016 19:02:52 +0000 (15:02 -0400)

t1430: don't rely on symbolic-ref for creating broken symrefs

It's questionable whether it should even work.

Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: David Turner <dturner@twopensource.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

t1430: clean up broken refs/tags/shadowMichael Haggerty Thu, 7 Apr 2016 19:02:51 +0000 (15:02 -0400)

t1430: clean up broken refs/tags/shadow

Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: David Turner <dturner@twopensource.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

t1430: test the output and error of some commands more... Michael Haggerty Thu, 7 Apr 2016 19:02:50 +0000 (15:02 -0400)

t1430: test the output and error of some commands more carefully

Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: David Turner <dturner@twopensource.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

refs: move for_each_*ref* functions into common codeDavid Turner Thu, 7 Apr 2016 19:02:49 +0000 (15:02 -0400)

refs: move for_each_*ref* functions into common code

Make do_for_each_ref take a submodule as an argument instead of a
ref_cache. Since all for_each_*ref* functions are defined in terms of
do_for_each_ref, we can then move them into the common code.

Later, we can simply make do_for_each_ref into a backend function.

Signed-off-by: David Turner <dturner@twopensource.com>
Reviewed-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

refs: move head_ref{,_submodule} to the common codeDavid Turner Thu, 7 Apr 2016 19:02:48 +0000 (15:02 -0400)

refs: move head_ref{,_submodule} to the common code

These don't use any backend-specific functions. These were previously
defined in terms of the do_head_ref helper function, but since they
are otherwise identical, we don't need that function.

Signed-off-by: David Turner <dturner@twopensource.com>
Reviewed-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

git_config_set_multivar_in_file: handle "unset" errorsJeff King Sat, 9 Apr 2016 17:43:54 +0000 (13:43 -0400)

git_config_set_multivar_in_file: handle "unset" errors

We pass off to the "_gently" form to do the real work, and
just die() if it returned an error. However, our die message
de-references "value", which may be NULL if the request was
to unset a variable. Nobody using glibc noticed, because it
simply prints "(null)", which is good enough for the test
suite (and presumably very few people run across this in
practice). But other libc implementations (like Solaris) may
segfault.

Let's not only fix that, but let's make the message more
clear about what is going on in the "unset" case.

Reported-by: "Tom G. Christensen" <tgc@jupiterrise.com>
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

git_config_set_multivar_in_file: all non-zero returns... Jeff King Sat, 9 Apr 2016 17:42:54 +0000 (13:42 -0400)

git_config_set_multivar_in_file: all non-zero returns are errors

This function is just a thin wrapper for the "_gently" form
of the function. But the gently form is designed to feed
builtin/config.c, which passes our return code directly to
its exit status, and thus uses positive error values for
some cases. We check only negative values, meaning we would
fail to die in some cases (e.g., a malformed key).

This may or may not be triggerable in practice; we tend to
use this non-gentle form only when setting internal
variables, which would not have malformed keys.

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

config: lower-case first word of error stringsJeff King Sat, 9 Apr 2016 17:42:31 +0000 (13:42 -0400)

config: lower-case first word of error strings

This follows our usual style (both throughout git, and
throughout the rest of this file).

This covers the whole file, but note that I left the capitalization in
the multi-sentence:

error: malformed value...
error: Must be one of ...

because it helps make it clear that we are starting a new sentence in
the second one.

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

http: differentiate socks5:// and socks5h://Junio C Hamano Fri, 8 Apr 2016 19:16:06 +0000 (12:16 -0700)

http: differentiate socks5:// and socks5h://

Felix Ruess <felix.ruess@gmail.com> noticed that with configuration

$ git config --global 'http.proxy=socks5h://127.0.0.1:1080'

connections to remote sites time out, waiting for DNS resolution.

The logic to detect various flavours of SOCKS proxy and ask the
libcurl layer to use appropriate one understands the proxy string
that begin with socks5, socks4a, etc., but does not know socks5h,
and we end up using CURLPROXY_SOCKS5. The correct one to use is
CURLPROXY_SOCKS5_HOSTNAME.

https://curl.haxx.se/libcurl/c/CURLOPT_PROXY.html says

..., socks5h:// (the last one to enable socks5 and asking the
proxy to do the resolving, also known as CURLPROXY_SOCKS5_HOSTNAME
type).

which is consistent with the way the breakage was reported.

Tested-by: Felix Ruess <felix.ruess@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

i18n: builtin/branch.c: mark option for translationVasco Almeida Fri, 8 Apr 2016 20:02:45 +0000 (20:02 +0000)

i18n: builtin/branch.c: mark option for translation

Mark description and parameter for option "set-upstream-to" for translation.

Signed-off-by: Vasco Almeida <vascomalmeida@sapo.pt>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

i18n: index-pack: use plural string instead of normal oneVasco Almeida Fri, 8 Apr 2016 20:02:39 +0000 (20:02 +0000)

i18n: index-pack: use plural string instead of normal one

Git could output "completed with 1 local objects", but in this
case using "object" instead of "objects" is the correct form.

Use Q_() instead of _().

Signed-off-by: Vasco Almeida <vascomalmeida@sapo.pt>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Third batch for post 2.8 cycleJunio C Hamano Fri, 8 Apr 2016 21:34:11 +0000 (14:34 -0700)

Third batch for post 2.8 cycle

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

Merge branch 'ss/msvc'Junio C Hamano Fri, 8 Apr 2016 21:29:13 +0000 (14:29 -0700)

Merge branch 'ss/msvc'

Build updates for MSVC.

* ss/msvc:
MSVC: use shipped headers instead of fallback definitions
MSVC: vsnprintf in Visual Studio 2015 doesn't need SNPRINTF_SIZE_CORR any more

Merge branch 'oa/doc-diff-check'Junio C Hamano Fri, 8 Apr 2016 21:29:13 +0000 (14:29 -0700)

Merge branch 'oa/doc-diff-check'

A minor documentation update.

* oa/doc-diff-check:
Documentation: git diff --check detects conflict markers

Merge branch 'pb/opt-cmdmode-doc'Junio C Hamano Fri, 8 Apr 2016 21:29:12 +0000 (14:29 -0700)

Merge branch 'pb/opt-cmdmode-doc'

Minor API documentation update.

* pb/opt-cmdmode-doc:
api-parse-options.txt: document OPT_CMDMODE()

Merge branch 'nd/apply-report-skip'Junio C Hamano Fri, 8 Apr 2016 21:29:12 +0000 (14:29 -0700)

Merge branch 'nd/apply-report-skip'

"git apply -v" learned to report paths in the patch that were
skipped via --include/--exclude mechanism or being outside the
current working directory.

* nd/apply-report-skip:
apply: report patch skipping in verbose mode

Merge branch 'nd/apply-doc'Junio C Hamano Fri, 8 Apr 2016 21:29:12 +0000 (14:29 -0700)

Merge branch 'nd/apply-doc'

A minor documentation update.

* nd/apply-doc:
git-apply.txt: mention the behavior inside a subdir
git-apply.txt: remove a space

Merge branch 'jc/merge-refuse-new-root'Junio C Hamano Fri, 8 Apr 2016 21:29:11 +0000 (14:29 -0700)

Merge branch 'jc/merge-refuse-new-root'

"git merge" used to allow merging two branches that have no common
base by default, which led to a brand new history of an existing
project created and then get pulled by an unsuspecting maintainer,
which allowed an unnecessary parallel history merged into the
existing project. The command has been taught not to allow this by
default, with an escape hatch "--allow-unrelated-histories" option
to be used in a rare event that merges histories of two projects
that started their lives independently.

* jc/merge-refuse-new-root:
merge: refuse to create too cool a merge by default

configure: remove checking for HMAC_CTX_cleanupKazuki Yamaguchi Fri, 8 Apr 2016 16:22:16 +0000 (01:22 +0900)

configure: remove checking for HMAC_CTX_cleanup

We don't need it, as we no longer use HMAC_CTX_cleanup() directly.

Signed-off-by: Kazuki Yamaguchi <k@rhe.jp>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

imap-send: avoid deprecated TLSv1_method()Kazuki Yamaguchi Fri, 8 Apr 2016 16:22:15 +0000 (01:22 +0900)

imap-send: avoid deprecated TLSv1_method()

Use SSLv23_method always and disable SSL if needed.

TLSv1_method() function is deprecated in OpenSSL 1.1.0 and the compiler
emits a warning.

SSLv23_method() is also deprecated, but the alternative, TLS_method(),
is new in OpenSSL 1.1.0 so requires checking by configure. Stick to
SSLv23_method() for now (this is aliased to TLS_method()).

Signed-off-by: Kazuki Yamaguchi <k@rhe.jp>
Signed-off-by: Junio C Hamano <gitster@pobox.com>