gitweb.git
transport-helper.c: refactor set_helper_option()Nguyễn Thái Ngọc Duy Sun, 12 Jun 2016 10:53:44 +0000 (17:53 +0700)

transport-helper.c: refactor set_helper_option()

For now we can handle two types, string and boolean, in
set_helper_option(). Later on we'll add string_list support, which does
not fit well. The new function strbuf_set_helper_option() can be reused
for a separate function that handles string-list.

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

remote-curl.c: convert fetch_git() to use argv_arrayNguyễn Thái Ngọc Duy Sun, 12 Jun 2016 10:53:43 +0000 (17:53 +0700)

remote-curl.c: convert fetch_git() to use argv_array

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

tests: remove no-op full-svn-test targetEric Wong Tue, 23 Feb 2016 06:26:59 +0000 (06:26 +0000)

tests: remove no-op full-svn-test target

git-svn has not supported GIT_SVN_NO_OPTIMIZE_COMMITS for
the "set-tree" sub-command in 9 years since commit 490f49ea5899
("git-svn: remove optimized commit stuff for set-tree").

So remove this target and TSVN variable to avoid confusion.

ref: http://mid.gmane.org/56C9B7B7.7030406@f2.dion.ne.jp

Helped-by: Kazutoshi Satoda <k_satoda@f2.dion.ne.jp>
Signed-off-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Sync with 2.7.2Junio C Hamano Mon, 22 Feb 2016 21:16:12 +0000 (13:16 -0800)

Sync with 2.7.2

Merge branch 'js/git-remote-add-url-insteadof-test'Junio C Hamano Mon, 22 Feb 2016 21:15:01 +0000 (13:15 -0800)

Merge branch 'js/git-remote-add-url-insteadof-test'

* js/git-remote-add-url-insteadof-test:
t5505: 'remote add x y' should work when url.y.insteadOf = x

Merge branch 'jk/config-include'Junio C Hamano Mon, 22 Feb 2016 21:14:48 +0000 (13:14 -0800)

Merge branch 'jk/config-include'

* jk/config-include:
git-config: better document default behavior for `--include`

Merge branch 'ew/connect-verbose'Junio C Hamano Mon, 22 Feb 2016 21:14:33 +0000 (13:14 -0800)

Merge branch 'ew/connect-verbose'

* ew/connect-verbose:
t5570: add tests for "git {clone,fetch,pull} -v"

Git 2.7.2 v2.7.2Junio C Hamano Mon, 22 Feb 2016 21:12:56 +0000 (13:12 -0800)

Git 2.7.2

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

Merge branch 'nd/ita-cleanup' into maintJunio C Hamano Mon, 22 Feb 2016 21:10:21 +0000 (13:10 -0800)

Merge branch 'nd/ita-cleanup' into maint

Paths that have been told the index about with "add -N" are not
quite yet in the index, but a few commands behaved as if they
already are in a harmful way.

* nd/ita-cleanup:
grep: make it clear i-t-a entries are ignored
add and use a convenience macro ce_intent_to_add()
blame: remove obsolete comment

Merge branch 'pw/completion-stash' into maintJunio C Hamano Mon, 22 Feb 2016 21:10:20 +0000 (13:10 -0800)

Merge branch 'pw/completion-stash' into maint

* pw/completion-stash:
completion: fix mis-indentation in _git_stash()

Merge branch 'mm/clean-doc-fix' into maintJunio C Hamano Mon, 22 Feb 2016 21:10:20 +0000 (13:10 -0800)

Merge branch 'mm/clean-doc-fix' into maint

The documentation for "git clean" has been corrected; it mentioned
that .git/modules/* are removed by giving two "-f", which has never
been the case.

* mm/clean-doc-fix:
Documentation/git-clean.txt: don't mention deletion of .git/modules/*

Merge branch 'dw/mergetool-vim-window-shuffle' into... Junio C Hamano Mon, 22 Feb 2016 21:10:19 +0000 (13:10 -0800)

Merge branch 'dw/mergetool-vim-window-shuffle' into maint

The vimdiff backend for "git mergetool" has been tweaked to arrange
and number buffers in the order that would match the expectation of
majority of people who read left to right, then top down and assign
buffers 1 2 3 4 "mentally" to local base remote merge windows based
on that order.

* dw/mergetool-vim-window-shuffle:
mergetool: reorder vim/gvim buffers in three-way diffs

Merge branch 'ah/stripspace-optstring' into maintJunio C Hamano Mon, 22 Feb 2016 21:10:19 +0000 (13:10 -0800)

Merge branch 'ah/stripspace-optstring' into maint

* ah/stripspace-optstring:
stripspace: call U+0020 a "space" instead of a "blank"

Merge branch 'ks/svn-pathnameencoding-4' of git://git... Junio C Hamano Mon, 22 Feb 2016 18:29:46 +0000 (10:29 -0800)

Merge branch 'ks/svn-pathnameencoding-4' of git://git.bogomips.org/git-svn

* 'ks/svn-pathnameencoding-4' of git://git.bogomips.org/git-svn:
git-svn: apply "svn.pathnameencoding" before URL encoding
git-svn: enable "svn.pathnameencoding" on dcommit
git-svn: hoist out utf8 prep from t9129 to lib-git-svn

Merge branch 'pw/completion-stash'Junio C Hamano Mon, 22 Feb 2016 18:27:24 +0000 (10:27 -0800)

Merge branch 'pw/completion-stash'

* pw/completion-stash:
completion: fix mis-indentation in _git_stash()

completion: fix mis-indentation in _git_stash()SZEDER Gábor Mon, 22 Feb 2016 13:02:50 +0000 (14:02 +0100)

completion: fix mis-indentation in _git_stash()

Signed-off-by: SZEDER Gábor <szeder@ira.uka.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

git-svn: apply "svn.pathnameencoding" before URL encodingKazutoshi Satoda Mon, 8 Feb 2016 15:21:02 +0000 (00:21 +0900)

git-svn: apply "svn.pathnameencoding" before URL encoding

The conversion from "svn.pathnameencoding" to UTF-8 should be applied
first, and then URL encoding should be applied on the resulting UTF-8
path. The reversed order of these transforms (used before this fix)
makes non-UTF-8 URL which causes error from Subversion such as
"Filesystem has no item: '...' path not found" when sending a rename (or
a copy) from non-ASCII path.

[ew: t9115 test case added (requires SVN_HTTPD_PORT set to test),
squash LC_ALL=$a_utf8_locale export from Kazutoshi for Cygwin]

Signed-off-by: Kazutoshi SATODA <k_satoda@f2.dion.ne.jp>
Signed-off-by: Eric Wong <normalperson@yhbt.net>

git-svn: enable "svn.pathnameencoding" on dcommitKazutoshi Satoda Mon, 8 Feb 2016 15:20:31 +0000 (00:20 +0900)

git-svn: enable "svn.pathnameencoding" on dcommit

Without the initialization of $self->{pathnameencoding}, conversion in
repo_path() is always skipped as $self->{pathnameencoding} is undefined
even if "svn.pathnameencoding" is configured.

The lack of conversion results in mysterious failure of dcommit (e.g.
"Malformed XML") which happen only when a commit involves a change on
non-ASCII path.

[ew: add test case to t9115,
squash LC_ALL=$a_utf8_locale export from Kazutoshi for Cygwin]

Signed-off-by: Kazutoshi SATODA <k_satoda@f2.dion.ne.jp>
Signed-off-by: Eric Wong <normalperson@yhbt.net>

git-svn: hoist out utf8 prep from t9129 to lib-git-svnEric Wong Mon, 22 Feb 2016 02:17:51 +0000 (02:17 +0000)

git-svn: hoist out utf8 prep from t9129 to lib-git-svn

We will be reusing this in t9115.

Suggested-by: Kazutoshi Satoda <k_satoda@f2.dion.ne.jp>
Signed-off-by: Eric Wong <normalperson@yhbt.net>

Merge branch 'maint'Junio C Hamano Wed, 17 Feb 2016 18:14:39 +0000 (10:14 -0800)

Merge branch 'maint'

* maint:
Start preparing for 2.7.2
git-cvsserver.perl: fix typo

Seventh batch for the 2.8 cycleJunio C Hamano Wed, 17 Feb 2016 18:13:57 +0000 (10:13 -0800)

Seventh batch for the 2.8 cycle

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

Merge branch 'dw/mergetool-vim-window-shuffle'Junio C Hamano Wed, 17 Feb 2016 18:13:34 +0000 (10:13 -0800)

Merge branch 'dw/mergetool-vim-window-shuffle'

The vimdiff backend for "git mergetool" has been tweaked to arrange
and number buffers in the order that would match the expectation of
majority of people who read left to right, then top down and assign
buffers 1 2 3 4 "mentally" to local base remote merge windows based
on that order.

* dw/mergetool-vim-window-shuffle:
mergetool: reorder vim/gvim buffers in three-way diffs

Merge branch 'ah/stripspace-optstring'Junio C Hamano Wed, 17 Feb 2016 18:13:33 +0000 (10:13 -0800)

Merge branch 'ah/stripspace-optstring'

* ah/stripspace-optstring:
stripspace: call U+0020 a "space" instead of a "blank"

Merge branch 'mm/clean-doc-fix'Junio C Hamano Wed, 17 Feb 2016 18:13:33 +0000 (10:13 -0800)

Merge branch 'mm/clean-doc-fix'

The documentation for "git clean" has been corrected; it mentioned
that .git/modules/* are removed by giving two "-f", which has never
been the case.

* mm/clean-doc-fix:
Documentation/git-clean.txt: don't mention deletion of .git/modules/*

Merge branch 'jk/rerere-xsnprintf'Junio C Hamano Wed, 17 Feb 2016 18:13:33 +0000 (10:13 -0800)

Merge branch 'jk/rerere-xsnprintf'

Some calls to strcpy(3) triggers a false warning from static
analysers that are less intelligent than humans, and reducing the
number of these false hits helps us notice real issues. A few
calls to strcpy(3) in "git rerere" that are already safe has been
rewritten to avoid false wanings.

* jk/rerere-xsnprintf:
rerere: replace strcpy with xsnprintf

Merge branch 'jk/test-path-utils-xsnprintf'Junio C Hamano Wed, 17 Feb 2016 18:13:32 +0000 (10:13 -0800)

Merge branch 'jk/test-path-utils-xsnprintf'

Some calls to strcpy(3) triggers a false warning from static
analysers that are less intelligent than humans, and reducing the
number of these false hits helps us notice real issues. A few
calls to strcpy(3) in test-path-utils that are already safe has
been rewritten to avoid false wanings.

* jk/test-path-utils-xsnprintf:
test-path-utils: use xsnprintf in favor of strcpy

Merge branch 'da/user-useconfigonly'Junio C Hamano Wed, 17 Feb 2016 18:13:31 +0000 (10:13 -0800)

Merge branch 'da/user-useconfigonly'

The "user.useConfigOnly" configuration variable can be used to
force the user to always set user.email & user.name configuration
variables, serving as a reminder for those who work on multiple
projects and do not want to put these in their $HOME/.gitconfig.

* da/user-useconfigonly:
ident: add user.useConfigOnly boolean for when ident shouldn't be guessed
fmt_ident: refactor strictness checks

Merge branch 'nd/clear-gitenv-upon-use-of-alias'Junio C Hamano Wed, 17 Feb 2016 18:13:31 +0000 (10:13 -0800)

Merge branch 'nd/clear-gitenv-upon-use-of-alias'

The automatic typo correction applied to an alias was broken
with a recent change already in 'master'.

* nd/clear-gitenv-upon-use-of-alias:
restore_env(): free the saved environment variable once we are done
git: simplify environment save/restore logic
git: protect against unbalanced calls to {save,restore}_env()
git: remove an early return from save_env_before_alias()

Merge branch 'mg/mingw-test-fix'Junio C Hamano Wed, 17 Feb 2016 18:13:29 +0000 (10:13 -0800)

Merge branch 'mg/mingw-test-fix'

An earlier adjustment of test mistakenly used write_script
to prepare a file whose exact content matters for the test;
reverting that part fixes the breakage for those who use
SHELL_PATH that is different from /bin/sh.

* mg/mingw-test-fix:
t9100: fix breakage when SHELL_PATH is not /bin/sh

Merge branch 'js/mingw-tests'Junio C Hamano Wed, 17 Feb 2016 18:13:28 +0000 (10:13 -0800)

Merge branch 'js/mingw-tests'

Test scripts have been updated to remove assumptions that are not
portable between Git for POSIX and Git for Windows, or to skip ones
with expectations that are not satisfiable on Git for Windows.

* js/mingw-tests: (21 commits)
gitignore: ignore generated test-fake-ssh executable
mingw: do not bother to test funny file names
mingw: skip a test in t9130 that cannot pass on Windows
mingw: handle the missing POSIXPERM prereq in t9124
mingw: avoid illegal filename in t9118
mingw: mark t9100's test cases with appropriate prereqs
t0008: avoid absolute path
mingw: work around pwd issues in the tests
mingw: fix t9700's assumption about directory separators
mingw: skip test in t1508 that fails due to path conversion
tests: turn off git-daemon tests if FIFOs are not available
mingw: disable mkfifo-based tests
mingw: accomodate t0060-path-utils for MSYS2
mingw: fix t5601-clone.sh
mingw: let lstat() fail with errno == ENOTDIR when appropriate
mingw: try to delete target directory before renaming
mingw: prepare the TMPDIR environment variable for shell scripts
mingw: factor out Windows specific environment setup
Git.pm: stop assuming that absolute paths start with a slash
mingw: do not trust MSYS2's MinGW gettext.sh
...

Merge branch 'jk/drop-rsync-transport'Junio C Hamano Wed, 17 Feb 2016 18:13:28 +0000 (10:13 -0800)

Merge branch 'jk/drop-rsync-transport'

It turns out "git clone" over rsync transport has been broken when
the source repository has packed references for a long time, and
nobody noticed nor complained about it.

* jk/drop-rsync-transport:
transport: drop support for git-over-rsync

Start preparing for 2.7.2Junio C Hamano Wed, 17 Feb 2016 18:05:44 +0000 (10:05 -0800)

Start preparing for 2.7.2

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

Merge branch 'js/test-lib-windows-emulated-yes' into... Junio C Hamano Wed, 17 Feb 2016 18:03:41 +0000 (10:03 -0800)

Merge branch 'js/test-lib-windows-emulated-yes' into maint

The emulated "yes" command used in our test scripts has been
tweaked not to spend too much time generating unnecessary output
that is not used, to help those who test on Windows where it would
not stop until it fills the pipe buffer due to lack of SIGPIPE.

* js/test-lib-windows-emulated-yes:
test-lib: limit the output of the yes utility

Merge branch 'aw/push-force-with-lease-reporting' into... Junio C Hamano Wed, 17 Feb 2016 18:03:40 +0000 (10:03 -0800)

Merge branch 'aw/push-force-with-lease-reporting' into maint

"git push --force-with-lease" has been taught to report if the push
needed to force (or fast-forwarded).

* aw/push-force-with-lease-reporting:
push: fix ref status reporting for --force-with-lease

Merge branch 'nd/do-not-move-worktree-manually' into... Junio C Hamano Wed, 17 Feb 2016 18:03:40 +0000 (10:03 -0800)

Merge branch 'nd/do-not-move-worktree-manually' into maint

"git worktree" had a broken code that attempted to auto-fix
possible inconsistency that results from end-users moving a
worktree to different places without telling Git (the original
repository needs to maintain backpointers to its worktrees, but
"mv" run by end-users who are not familiar with that fact will
obviously not adjust them), which actually made things worse
when triggered.

* nd/do-not-move-worktree-manually:
worktree: stop supporting moving worktrees manually
worktree.c: fix indentation

Merge branch 'js/xmerge-marker-eol' into maintJunio C Hamano Wed, 17 Feb 2016 18:03:39 +0000 (10:03 -0800)

Merge branch 'js/xmerge-marker-eol' into maint

The low-level merge machinery has been taught to use CRLF line
termination when inserting conflict markers to merged contents that
are themselves CRLF line-terminated.

* js/xmerge-marker-eol:
merge-file: ensure that conflict sections match eol style
merge-file: let conflict markers match end-of-line style of the context

git-cvsserver.perl: fix typoGyuYong Jung Wed, 17 Feb 2016 02:14:58 +0000 (11:14 +0900)

git-cvsserver.perl: fix typo

Signed-off-by: GyuYong Jung <obliviscence@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

t5505: 'remote add x y' should work when url.y.insteadO... Johannes Schindelin Wed, 17 Feb 2016 16:20:47 +0000 (17:20 +0100)

t5505: 'remote add x y' should work when url.y.insteadOf = x

This is the test missing from fb86e32 (git remote: allow adding
remotes agreeing with url.<...>.insteadOf, 2014-12-23): we should
allow adding a remote with the URL when it agrees with the
url.<...>.insteadOf setting.

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

t5570: add tests for "git {clone,fetch,pull} -v"Eric Wong Sun, 14 Feb 2016 09:26:29 +0000 (09:26 +0000)

t5570: add tests for "git {clone,fetch,pull} -v"

Now that git_connect is more information about connectivity
progress after: ("pass transport verbosity down to git_connect")
we should ensure it remains so for future users who need to
to diagnose networking problems.

Signed-off-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

git-config: better document default behavior for `... Jeff King Mon, 19 Jan 2015 19:58:47 +0000 (14:58 -0500)

git-config: better document default behavior for `--include`

As described in the commit message of 9b25a0b (config: add
include directive, 2012-02-06), the `--include` option is
only on by default in some cases. But our documentation
described it as just "defaults to on", which doesn't tell
the whole story.

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

mergetool: reorder vim/gvim buffers in three-way diffsDickson Wong Fri, 29 Jan 2016 02:18:14 +0000 (18:18 -0800)

mergetool: reorder vim/gvim buffers in three-way diffs

When invoking default (g)vimdiff three-way merge, the merged file is
loaded as the first buffer but moved to the bottom as the fourth window.
This causes a disconnect between vim commands that operate on window
positions (e.g. CTRL-W_w) and those that operate on buffer index (e.g.
do/dp).

This change reorders the buffers to have the same index as windows while
keeping the cursor default to the merged result as the bottom window.

Signed-off-by: Dickson Wong <dicksonwong@gmail.com>
Tested-by: Michael J Gruber <git@drmicha.warpmail.net>
Acked-by: David Aguilar <davvid@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Sixth batch for the 2.8 cycleJunio C Hamano Wed, 10 Feb 2016 22:24:14 +0000 (14:24 -0800)

Sixth batch for the 2.8 cycle

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

Merge branch 'js/test-lib-windows-emulated-yes'Junio C Hamano Wed, 10 Feb 2016 22:20:10 +0000 (14:20 -0800)

Merge branch 'js/test-lib-windows-emulated-yes'

The emulated "yes" command used in our test scripts has been
tweaked not to spend too much time generating unnecessary output
that is not used, to help those who test on Windows where it would
not stop until it fills the pipe buffer due to lack of SIGPIPE.

* js/test-lib-windows-emulated-yes:
test-lib: limit the output of the yes utility

Merge branch 'wp/sha1-name-negative-match'Junio C Hamano Wed, 10 Feb 2016 22:20:10 +0000 (14:20 -0800)

Merge branch 'wp/sha1-name-negative-match'

A new "<branch>^{/!-<pattern>}" notation can be used to name a
commit that is reachable from <branch> that does not match the
given <pattern>.

* wp/sha1-name-negative-match:
object name: introduce '^{/!-<negative pattern>}' notation
test for '!' handling in rev-parse's named commits

Merge branch 'jk/options-cleanup'Junio C Hamano Wed, 10 Feb 2016 22:20:08 +0000 (14:20 -0800)

Merge branch 'jk/options-cleanup'

Various clean-ups to the command line option parsing.

* jk/options-cleanup:
apply, ls-files: simplify "-z" parsing
checkout-index: disallow "--no-stage" option
checkout-index: handle "--no-index" option
checkout-index: handle "--no-prefix" option
checkout-index: simplify "-z" option parsing
give "nbuf" strbuf a more meaningful name

Merge branch 'aw/push-force-with-lease-reporting'Junio C Hamano Wed, 10 Feb 2016 22:20:08 +0000 (14:20 -0800)

Merge branch 'aw/push-force-with-lease-reporting'

"git push --force-with-lease" has been taught to report if the push
needed to force (or fast-forwarded).

* aw/push-force-with-lease-reporting:
push: fix ref status reporting for --force-with-lease

Merge branch 'ls/clean-smudge-override-in-config'Junio C Hamano Wed, 10 Feb 2016 22:20:07 +0000 (14:20 -0800)

Merge branch 'ls/clean-smudge-override-in-config'

Clean/smudge filters defined in a configuration file of lower
precedence can now be overridden to be a pass-through no-op by
setting the variable to an empty string.

* ls/clean-smudge-override-in-config:
convert: treat an empty string for clean/smudge filters as "cat"

Merge branch 'ew/connect-verbose'Junio C Hamano Wed, 10 Feb 2016 22:20:07 +0000 (14:20 -0800)

Merge branch 'ew/connect-verbose'

There were a few "now I am doing this thing" progress messages in
the TCP connection code that can be triggered by setting a verbose
option internally in the code, but "git fetch -v" and friends never
passed the verbose option down to that codepath.

There was a brief discussion about the impact on the end-user
experience by not limiting this to "fetch -v -v", but I think the
conclusion is that this is OK to enable with a single "-v" as it is
not too noisy.

* ew/connect-verbose:
pass transport verbosity down to git_connect

Merge branch 'cc/untracked'Junio C Hamano Wed, 10 Feb 2016 22:20:06 +0000 (14:20 -0800)

Merge branch 'cc/untracked'

Update the untracked cache subsystem and change its primary UI from
"git update-index" to "git config".

* cc/untracked:
t7063: add tests for core.untrackedCache
test-dump-untracked-cache: don't modify the untracked cache
config: add core.untrackedCache
dir: simplify untracked cache "ident" field
dir: add remove_untracked_cache()
dir: add {new,add}_untracked_cache()
update-index: move 'uc' var declaration
update-index: add untracked cache notifications
update-index: add --test-untracked-cache
update-index: use enum for untracked cache options
dir: free untracked cache when removing it

Merge branch 'js/xmerge-marker-eol'Junio C Hamano Wed, 10 Feb 2016 22:20:06 +0000 (14:20 -0800)

Merge branch 'js/xmerge-marker-eol'

The low-level merge machinery has been taught to use CRLF line
termination when inserting conflict markers to merged contents that
are themselves CRLF line-terminated.

* js/xmerge-marker-eol:
merge-file: ensure that conflict sections match eol style
merge-file: let conflict markers match end-of-line style of the context

Merge branch 'nd/do-not-move-worktree-manually'Junio C Hamano Wed, 10 Feb 2016 22:20:05 +0000 (14:20 -0800)

Merge branch 'nd/do-not-move-worktree-manually'

"git worktree" had a broken code that attempted to auto-fix
possible inconsistency that results from end-users moving a
worktree to different places without telling Git (the original
repository needs to maintain backpointers to its worktrees, but
"mv" run by end-users who are not familiar with that fact will
obviously not adjust them), which actually made things worse
when triggered.

* nd/do-not-move-worktree-manually:
worktree: stop supporting moving worktrees manually
worktree.c: fix indentation

Documentation/git-clean.txt: don't mention deletion... Matt McCutchen Sat, 6 Feb 2016 20:25:41 +0000 (15:25 -0500)

Documentation/git-clean.txt: don't mention deletion of .git/modules/*

The latter half of this sentence, the removal of the submodules, was
never done with (or without) double -f back when it was written, and
we still do not do so.

Signed-off-by: Matt McCutchen <matt@mattmccutchen.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

rerere: replace strcpy with xsnprintfJeff King Mon, 8 Feb 2016 22:25:01 +0000 (17:25 -0500)

rerere: replace strcpy with xsnprintf

This shouldn't overflow, as we are copying a sha1 hex into a
41-byte buffer. But it does not hurt to use a bound-checking
function, which protects us and makes auditing for overflows
easier.

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

t9100: fix breakage when SHELL_PATH is not /bin/shMichael J Gruber Sun, 7 Feb 2016 19:11:37 +0000 (20:11 +0100)

t9100: fix breakage when SHELL_PATH is not /bin/sh

bcb11f1 (mingw: mark t9100's test cases with appropriate prereqs, 2016-01-27)
replaced "/bin/sh" in exec.sh by the shell specified in SHELL_PATH, but
that breaks the subtest which checks for a specific checksum of a tree
containing.

Revert that change that was not explained in the commit message anyways
(exec.sh is never executed).

Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

test-path-utils: use xsnprintf in favor of strcpyJeff King Mon, 8 Feb 2016 22:21:55 +0000 (17:21 -0500)

test-path-utils: use xsnprintf in favor of strcpy

This strcpy will never overflow because it's copying from
baked-in test data. But we would prefer to avoid strcpy
entirely, as it makes it harder to audit for real security
bugs.

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

gitignore: ignore generated test-fake-ssh executableJohannes Schindelin Sat, 6 Feb 2016 14:42:49 +0000 (15:42 +0100)

gitignore: ignore generated test-fake-ssh executable

In "mingw: fix t5601-clone.sh", this developer introduced a new test
executable, test-fake-ssh but forgot to update the .gitignore file
accordingly. Fix that.

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

ident: add user.useConfigOnly boolean for when ident... Dan Aloni Sat, 6 Feb 2016 06:23:36 +0000 (08:23 +0200)

ident: add user.useConfigOnly boolean for when ident shouldn't be guessed

It used to be that:

git config --global user.email "(none)"

was a viable way for people to force themselves to set user.email in
each repository. This was helpful for people with more than one
email address, targeting different email addresses for different
clones, as it barred git from creating a commit unless the user.email
config was set in the per-repo config to the correct email address.

A recent change, 19ce497c (ident: keep a flag for bogus
default_email, 2015-12-10), however, declared that an explicitly
configured user.email is not bogus, no matter what its value is, so
this hack no longer works.

Provide the same functionality by adding a new configuration
variable user.useConfigOnly; when this variable is set, the
user must explicitly set user.email configuration.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
Helped-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Dan Aloni <alonid@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Sync with 2.7.1Junio C Hamano Fri, 5 Feb 2016 23:24:02 +0000 (15:24 -0800)

Sync with 2.7.1

Git 2.7.1 v2.7.1Junio C Hamano Fri, 5 Feb 2016 22:53:52 +0000 (14:53 -0800)

Git 2.7.1

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

Merge branch 'lv/add-doc-working-tree' into maintJunio C Hamano Fri, 5 Feb 2016 22:54:22 +0000 (14:54 -0800)

Merge branch 'lv/add-doc-working-tree' into maint

* lv/add-doc-working-tree:
git-add doc: do not say working directory when you mean working tree

Merge branch 'ss/clone-depth-single-doc' into maintJunio C Hamano Fri, 5 Feb 2016 22:54:21 +0000 (14:54 -0800)

Merge branch 'ss/clone-depth-single-doc' into maint

Documentation for "git fetch --depth" has been updated for clarity.

* ss/clone-depth-single-doc:
docs: clarify that --depth for git-fetch works with newly initialized repos
docs: say "commits" in the --depth option wording for git-clone
docs: clarify that passing --depth to git-clone implies --single-branch

Merge branch 'sg/t6050-failing-editor-test-fix' into... Junio C Hamano Fri, 5 Feb 2016 22:54:20 +0000 (14:54 -0800)

Merge branch 'sg/t6050-failing-editor-test-fix' into maint

* sg/t6050-failing-editor-test-fix:
t6050-replace: make failing editor test more robust

Merge branch 'ew/for-each-ref-doc' into maintJunio C Hamano Fri, 5 Feb 2016 22:54:19 +0000 (14:54 -0800)

Merge branch 'ew/for-each-ref-doc' into maint

* ew/for-each-ref-doc:
for-each-ref: document `creatordate` and `creator` fields

Merge branch 'ss/user-manual' into maintJunio C Hamano Fri, 5 Feb 2016 22:54:18 +0000 (14:54 -0800)

Merge branch 'ss/user-manual' into maint

Drop a few old "todo" items by deciding that the change one of them
suggests is not such a good idea, and doing the change the other
one suggested to do.

* ss/user-manual:
user-manual: add addition gitweb information
user-manual: add section documenting shallow clones
glossary: define the term shallow clone
user-manual: remove temporary branch entry from todo list

Merge branch 'jk/ref-cache-non-repository-optim' into... Junio C Hamano Fri, 5 Feb 2016 22:54:17 +0000 (14:54 -0800)

Merge branch 'jk/ref-cache-non-repository-optim' into maint

The underlying machinery used by "ls-files -o" and other commands
have been taught not to create empty submodule ref cache for a
directory that is not a submodule. This removes a ton of wasted
CPU cycles.

* jk/ref-cache-non-repository-optim:
resolve_gitlink_ref: ignore non-repository paths
clean: make is_git_repository a public function

Merge branch 'js/dirname-basename' into maintJunio C Hamano Fri, 5 Feb 2016 22:54:17 +0000 (14:54 -0800)

Merge branch 'js/dirname-basename' into maint

dirname() emulation has been added, as Msys2 lacks it.

* js/dirname-basename:
mingw: avoid linking to the C library's isalpha()
t0060: loosen overly strict expectations
t0060: verify that basename() and dirname() work as expected
compat/basename.c: provide a dirname() compatibility function
compat/basename: make basename() conform to POSIX
Refactor skipping DOS drive prefixes

Merge branch 'tb/complete-word-diff-regex' into maintJunio C Hamano Fri, 5 Feb 2016 22:54:17 +0000 (14:54 -0800)

Merge branch 'tb/complete-word-diff-regex' into maint

* tb/complete-word-diff-regex:
completion: complete "diff --word-diff-regex="

Merge branch 'pw/completion-stash' into maintJunio C Hamano Fri, 5 Feb 2016 22:54:16 +0000 (14:54 -0800)

Merge branch 'pw/completion-stash' into maint

* pw/completion-stash:
completion: update completion arguments for stash

Merge branch 'pw/completion-show-branch' into maintJunio C Hamano Fri, 5 Feb 2016 22:54:16 +0000 (14:54 -0800)

Merge branch 'pw/completion-show-branch' into maint

* pw/completion-show-branch:
completion: complete show-branch "--date-order"

Merge branch 'jk/completion-rebase' into maintJunio C Hamano Fri, 5 Feb 2016 22:54:16 +0000 (14:54 -0800)

Merge branch 'jk/completion-rebase' into maint

* jk/completion-rebase:
completion: add missing git-rebase options

Merge branch 'nd/diff-with-path-params' into maintJunio C Hamano Fri, 5 Feb 2016 22:54:15 +0000 (14:54 -0800)

Merge branch 'nd/diff-with-path-params' into maint

A few options of "git diff" did not work well when the command was
run from a subdirectory.

* nd/diff-with-path-params:
diff: make -O and --output work in subdirectory
diff-no-index: do not take a redundant prefix argument

Merge branch 'dw/subtree-split-do-not-drop-merge' into... Junio C Hamano Fri, 5 Feb 2016 22:54:15 +0000 (14:54 -0800)

Merge branch 'dw/subtree-split-do-not-drop-merge' into maint

The "split" subcommand of "git subtree" (in contrib/) incorrectly
skipped merges when it shouldn't, which was corrected.

* dw/subtree-split-do-not-drop-merge:
contrib/subtree: fix "subtree split" skipped-merge bug

Merge branch 'ew/svn-1.9.0-auth' into maintJunio C Hamano Fri, 5 Feb 2016 22:54:15 +0000 (14:54 -0800)

Merge branch 'ew/svn-1.9.0-auth' into maint

* ew/svn-1.9.0-auth:
git-svn: fix auth parameter handling on SVN 1.9.0+

Merge branch 'jk/list-tag-2.7-regression' into maintJunio C Hamano Fri, 5 Feb 2016 22:54:15 +0000 (14:54 -0800)

Merge branch 'jk/list-tag-2.7-regression' into maint

"git tag" started listing a tag "foo" as "tags/foo" when a branch
named "foo" exists in the same repository; remove this unnecessary
disambiguation, which is a regression introduced in v2.7.0.

* jk/list-tag-2.7-regression:
tag: do not show ambiguous tag names as "tags/foo"
t6300: use test_atom for some un-modern tests

Merge branch 'jk/sanity' into maintJunio C Hamano Fri, 5 Feb 2016 22:54:14 +0000 (14:54 -0800)

Merge branch 'jk/sanity' into maint

The description for SANITY prerequisite the test suite uses has
been clarified both in the comment and in the implementation.

* jk/sanity:
test-lib: clarify and tighten SANITY

Merge branch 'jk/filter-branch-no-index' into maintJunio C Hamano Fri, 5 Feb 2016 22:54:13 +0000 (14:54 -0800)

Merge branch 'jk/filter-branch-no-index' into maint

A recent optimization to filter-branch in v2.7.0 introduced a
regression when --prune-empty filter is used, which has been
corrected.

* jk/filter-branch-no-index:
filter-branch: resolve $commit^{tree} in no-index case

Merge branch 'js/close-packs-before-gc' into maintJunio C Hamano Fri, 5 Feb 2016 22:54:13 +0000 (14:54 -0800)

Merge branch 'js/close-packs-before-gc' into maint

Many codepaths that run "gc --auto" before exiting kept packfiles
mapped and left the file descriptors to them open, which was not
friendly to systems that cannot remove files that are open. They
now close the packs before doing so.

* js/close-packs-before-gc:
receive-pack: release pack files before garbage-collecting
merge: release pack files before garbage-collecting
am: release pack files before garbage-collecting
fetch: release pack files before garbage-collecting

Merge branch 'jk/ok-to-fail-gc-auto-in-rebase' into... Junio C Hamano Fri, 5 Feb 2016 22:54:13 +0000 (14:54 -0800)

Merge branch 'jk/ok-to-fail-gc-auto-in-rebase' into maint

"git rebase", unlike all other callers of "gc --auto", did not
ignore the exit code from "gc --auto".

* jk/ok-to-fail-gc-auto-in-rebase:
rebase: ignore failures from "gc --auto"

Merge branch 'ho/gitweb-squelch-undef-warning' into... Junio C Hamano Fri, 5 Feb 2016 22:54:12 +0000 (14:54 -0800)

Merge branch 'ho/gitweb-squelch-undef-warning' into maint

Asking gitweb for a nonexistent commit left a warning in the server
log.

Somebody may want to follow this up with a new test, perhaps?
IIRC, we do test that no Perl warnings are given to the server log,
so this should have been caught if our test coverage were good.

* ho/gitweb-squelch-undef-warning:
gitweb: squelch "uninitialized value" warning

Merge branch 'js/fopen-harder' into maintJunio C Hamano Fri, 5 Feb 2016 22:54:11 +0000 (14:54 -0800)

Merge branch 'js/fopen-harder' into maint

Some codepaths used fopen(3) when opening a fixed path in $GIT_DIR
(e.g. COMMIT_EDITMSG) that is meant to be left after the command is
done. This however did not work well if the repository is set to
be shared with core.sharedRepository and the umask of the previous
user is tighter. They have been made to work better by calling
unlink(2) and retrying after fopen(3) fails with EPERM.

* js/fopen-harder:
Handle more file writes correctly in shared repos
commit: allow editing the commit message even in shared repos

Merge branch 'nd/exclusion-regression-fix' into maintJunio C Hamano Fri, 5 Feb 2016 22:54:11 +0000 (14:54 -0800)

Merge branch 'nd/exclusion-regression-fix' into maint

The ignore mechanism saw a few regressions around untracked file
listing and sparse checkout selection areas in 2.7.0; the change
that is responsible for the regression has been reverted.

* nd/exclusion-regression-fix:
Revert "dir.c: don't exclude whole dir prematurely if neg pattern may match"

Merge branch 'dk/reflog-walk-with-non-commit' into... Junio C Hamano Fri, 5 Feb 2016 22:54:10 +0000 (14:54 -0800)

Merge branch 'dk/reflog-walk-with-non-commit' into maint

"git reflog" incorrectly assumed that all objects that used to be
at the tip of a ref must be commits, which caused it to segfault.

* dk/reflog-walk-with-non-commit:
reflog-walk: don't segfault on non-commit sha1's in the reflog

Merge branch 'dw/signoff-doc' into maintJunio C Hamano Fri, 5 Feb 2016 22:54:09 +0000 (14:54 -0800)

Merge branch 'dw/signoff-doc' into maint

The documentation has been updated to hint the connection between
the '--signoff' option and DCO.

* dw/signoff-doc:
Expand documentation describing --signoff

Merge branch 'jk/clang-pedantic' into maintJunio C Hamano Fri, 5 Feb 2016 22:54:09 +0000 (14:54 -0800)

Merge branch 'jk/clang-pedantic' into maint

A few unportable C construct have been spotted by clang compiler
and have been fixed.

* jk/clang-pedantic:
bswap: add NO_UNALIGNED_LOADS define
avoid shifting signed integers 31 bits

Merge branch 'ew/send-email-mutt-alias-fix' into maintJunio C Hamano Fri, 5 Feb 2016 22:54:09 +0000 (14:54 -0800)

Merge branch 'ew/send-email-mutt-alias-fix' into maint

"git send-email" was confused by escaped quotes stored in the alias
files saved by "mutt", which has been corrected.

* ew/send-email-mutt-alias-fix:
git-send-email: do not double-escape quotes from mutt

Merge branch 'nd/dir-exclude-cleanup' into maintJunio C Hamano Fri, 5 Feb 2016 22:54:08 +0000 (14:54 -0800)

Merge branch 'nd/dir-exclude-cleanup' into maint

The "exclude_list" structure has the usual "alloc, nr" pair of
fields to be used by ALLOC_GROW(), but clear_exclude_list() forgot
to reset 'alloc' to 0 when it cleared 'nr' to discard the managed
array.

* nd/dir-exclude-cleanup:
dir.c: clean the entire struct in clear_exclude_list()

Merge branch 'nd/stop-setenv-work-tree' into maintJunio C Hamano Fri, 5 Feb 2016 22:54:07 +0000 (14:54 -0800)

Merge branch 'nd/stop-setenv-work-tree' into maint

An earlier change in 2.5.x-era broke users' hooks and aliases by
exporting GIT_WORK_TREE to point at the root of the working tree,
interfering when they tried to use a different working tree without
setting GIT_WORK_TREE environment themselves.

* nd/stop-setenv-work-tree:
Revert "setup: set env $GIT_WORK_TREE when work tree is set, like $GIT_DIR"

fmt_ident: refactor strictness checksJeff King Thu, 4 Feb 2016 09:12:38 +0000 (11:12 +0200)

fmt_ident: refactor strictness checks

This function has evolved quite a bit over time, and as a
result, the logic for "is this an OK ident" has been
sprinkled throughout. This ends up with a lot of redundant
conditionals, like checking want_name repeatedly. Worse,
we want to know in many cases whether we are using the
"default" ident, and we do so by comparing directly to the
global strbuf, which violates the abstraction of the
ident_default_* functions.

Let's reorganize the function into a hierarchy of
conditionals to handle similar cases together. The only
case that doesn't just work naturally for this is that of an
empty name, where our advice is different based on whether
we came from ident_default_name() or not. We can use a
simple flag to cover this case.

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

Fifth batch for 2.8 cycleJunio C Hamano Wed, 3 Feb 2016 22:31:13 +0000 (14:31 -0800)

Fifth batch for 2.8 cycle

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

Merge branch 'kf/http-proxy-auth-methods'Junio C Hamano Wed, 3 Feb 2016 22:16:08 +0000 (14:16 -0800)

Merge branch 'kf/http-proxy-auth-methods'

New http.proxyAuthMethod configuration variable can be used to
specify what authentication method to use, as a way to work around
proxies that do not give error response expected by libcurl when
CURLAUTH_ANY is used. Also, the codepath for proxy authentication
has been taught to use credential API to store the authentication
material in user's keyrings.

* kf/http-proxy-auth-methods:
http: use credential API to handle proxy authentication
http: allow selection of proxy authentication method

Merge branch 'jk/ref-cache-non-repository-optim'Junio C Hamano Wed, 3 Feb 2016 22:16:07 +0000 (14:16 -0800)

Merge branch 'jk/ref-cache-non-repository-optim'

The underlying machinery used by "ls-files -o" and other commands
have been taught not to create empty submodule ref cache for a
directory that is not a submodule. This removes a ton of wasted
CPU cycles.

* jk/ref-cache-non-repository-optim:
resolve_gitlink_ref: ignore non-repository paths
clean: make is_git_repository a public function

Merge branch 'ls/travis-prove-order'Junio C Hamano Wed, 3 Feb 2016 22:16:07 +0000 (14:16 -0800)

Merge branch 'ls/travis-prove-order'

Automated tests in Travis CI environment has been optimized by
persisting runtime statistics of previous "prove" run, executing
tests that take longer before other ones; this reduces the total
wallclock time.

* ls/travis-prove-order:
travis-ci: explicity use container-based infrastructure
travis-ci: run previously failed tests first, then slowest to fastest

Merge branch 'js/dirname-basename'Junio C Hamano Wed, 3 Feb 2016 22:16:06 +0000 (14:16 -0800)

Merge branch 'js/dirname-basename'

dirname() emulation has been added, as Msys2 lacks it.

* js/dirname-basename:
mingw: avoid linking to the C library's isalpha()
t0060: loosen overly strict expectations
t0060: verify that basename() and dirname() work as expected
compat/basename.c: provide a dirname() compatibility function
compat/basename: make basename() conform to POSIX
Refactor skipping DOS drive prefixes

Merge branch 'dt/unpack-compare-entry-optim'Junio C Hamano Wed, 3 Feb 2016 22:16:06 +0000 (14:16 -0800)

Merge branch 'dt/unpack-compare-entry-optim'

"git checkout $branch" (and other operations that share the same
underlying machinery) has been optimized.

* dt/unpack-compare-entry-optim:
unpack-trees: fix accidentally quadratic behavior
do_compare_entry: use already-computed path

Merge branch 'pw/completion-stash'Junio C Hamano Wed, 3 Feb 2016 22:16:06 +0000 (14:16 -0800)

Merge branch 'pw/completion-stash'

* pw/completion-stash:
completion: update completion arguments for stash

Merge branch 'pw/completion-show-branch'Junio C Hamano Wed, 3 Feb 2016 22:16:05 +0000 (14:16 -0800)

Merge branch 'pw/completion-show-branch'

* pw/completion-show-branch:
completion: complete show-branch "--date-order"

Merge branch 'jk/completion-rebase'Junio C Hamano Wed, 3 Feb 2016 22:16:05 +0000 (14:16 -0800)

Merge branch 'jk/completion-rebase'

* jk/completion-rebase:
completion: add missing git-rebase options

Merge branch 'nd/diff-with-path-params'Junio C Hamano Wed, 3 Feb 2016 22:16:04 +0000 (14:16 -0800)

Merge branch 'nd/diff-with-path-params'

A few options of "git diff" did not work well when the command was
run from a subdirectory.

* nd/diff-with-path-params:
diff: make -O and --output work in subdirectory
diff-no-index: do not take a redundant prefix argument

Merge branch 'lv/add-doc-working-tree'Junio C Hamano Wed, 3 Feb 2016 22:16:04 +0000 (14:16 -0800)

Merge branch 'lv/add-doc-working-tree'

* lv/add-doc-working-tree:
git-add doc: do not say working directory when you mean working tree

Merge branch 'dw/subtree-split-do-not-drop-merge'Junio C Hamano Wed, 3 Feb 2016 22:16:03 +0000 (14:16 -0800)

Merge branch 'dw/subtree-split-do-not-drop-merge'

The "split" subcommand of "git subtree" (in contrib/) incorrectly
skipped merges when it shouldn't, which was corrected.

* dw/subtree-split-do-not-drop-merge:
contrib/subtree: fix "subtree split" skipped-merge bug