gitweb.git
Merge branch 'dk/gc-idx-wo-pack'Jeff King Fri, 20 Nov 2015 11:55:34 +0000 (06:55 -0500)

Merge branch 'dk/gc-idx-wo-pack'

Having a leftover .idx file without corresponding .pack file in
the repository hurts performance; "git gc" learned to prune them.

* dk/gc-idx-wo-pack:
gc: remove garbage .idx files from pack dir
t5304: test cleaning pack garbage
prepare_packed_git(): refactor garbage reporting in pack directory

t5813: avoid creating urls that break on cygwinDennis Kaarsemaker Mon, 9 Nov 2015 17:49:35 +0000 (18:49 +0100)

t5813: avoid creating urls that break on cygwin

When passed an ssh:// url, git strips ssh://host from the url but does
not remove leading slashes from the path. So when this test used
ssh://remote//path/to/pwd, the path accessed by our fake SSH is
//path/to/pwd, which cygwin interprets as a UNC path, causing the test
to fail.

We may want to actually fix this in git itself, making it remove extra
slashes from urls before feeding them to transports or helpers, but
that's for another topic as it could cause regressions.

Signed-off-by: Dennis Kaarsemaker <dennis@kaarsemaker.net>
Signed-off-by: Jeff King <peff@peff.net>

Escape Git's exec path in contrib/rerere-train.sh scriptDaniel Knittl-Frank Sun, 8 Nov 2015 11:27:55 +0000 (12:27 +0100)

Escape Git's exec path in contrib/rerere-train.sh script

Whitespace can cause the source command to fail. This is usually not a
problem on Unix systems, but on Windows Git is likely to be installed
under "C:/Program Files/", thus rendering the script broken.

Signed-off-by: Daniel Knittl-Frank <knittl89+git@googlemail.com>
Signed-off-by: Jeff King <peff@peff.net>

refs: break out ref conflict checksDavid Turner Tue, 10 Nov 2015 11:42:40 +0000 (12:42 +0100)

refs: break out ref conflict checks

Create new function find_descendant_ref, to hold one of the ref
conflict checks used in verify_refname_available. Multiple backends
will need this function, so move it to the common code.

Also move rename_ref_available to the common code, because alternate
backends might need it and it has no files-backend-specific code.

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

files_log_ref_write: new functionDavid Turner Tue, 10 Nov 2015 11:42:39 +0000 (12:42 +0100)

files_log_ref_write: new function

Because HEAD and stash are per-worktree, every refs backend needs to
go through the files backend to write these refs.

So create a new function, files_log_ref_write, and add it to
refs/refs-internal.h. Later, we will use this to handle reflog updates
for per-worktree symbolic refs (HEAD).

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

initdb: make safe_create_dir publicDavid Turner Tue, 10 Nov 2015 11:42:38 +0000 (12:42 +0100)

initdb: make safe_create_dir public

Soon we will want to create initdb functions for ref backends, and
code from initdb that calls this function needs to move into the files
backend. So this function needs to be public.

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

refs: split filesystem-based refs code into a new fileMichael Haggerty Mon, 9 Nov 2015 13:34:01 +0000 (14:34 +0100)

refs: split filesystem-based refs code into a new file

As another step in the move to pluggable reference backends, move the
code that is specific to the filesystem-based reference backend (i.e.,
the current system of storing references as loose and packed files) into
a separate file, refs/files-backend.c.

Aside from a tiny bit of file header boilerplate, this commit only moves
a subset of the code verbatim from refs.c to the new file, as can easily
be verified using patience diff:

git diff --patience $commit^:refs.c $commit:refs.c
git diff --patience $commit^:refs.c $commit:refs/files-backend.c

Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Jeff King <peff@peff.net>

refs/refs-internal.h: new header fileMichael Haggerty Tue, 10 Nov 2015 11:42:36 +0000 (12:42 +0100)

refs/refs-internal.h: new header file

There are a number of constants, structs, and static functions defined
in refs.c and treated as private to the references module. But we want
to support multiple reference backends within the reference module,
and those backends will need access to some heretofore private
declarations.

We don't want those declarations to be visible to non-refs code, so we
don't want to move them to refs.h. Instead, add a new header file,
refs/refs-internal.h, that is intended to be included only from within
the refs module. Make some functions non-static and move some
declarations (and their corresponding docstrings) from refs.c to this
file.

In a moment we will add more content to the "refs" subdirectory.

Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Jeff King <peff@peff.net>

refname_is_safe(): improve docstringMichael Haggerty Tue, 10 Nov 2015 11:42:35 +0000 (12:42 +0100)

refname_is_safe(): improve docstring

Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Jeff King <peff@peff.net>

pack_if_possible_fn(): use ref_type() instead of is_per... Michael Haggerty Tue, 10 Nov 2015 11:42:34 +0000 (12:42 +0100)

pack_if_possible_fn(): use ref_type() instead of is_per_worktree_ref()

is_per_worktree_ref() will soon be made private, so use the public
interface, ref_type(), in its place. And now that we're using
ref_type(), we can make it clear that we won't pack pseudorefs. This was
the case before, but due to the not-so-obvious reason that this function
is applied to references via the loose reference cache, which only
includes references that live inside "refs/".

Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Jeff King <peff@peff.net>

copy_msg(): rename to copy_reflog_msg()David Turner Tue, 10 Nov 2015 11:42:33 +0000 (12:42 +0100)

copy_msg(): rename to copy_reflog_msg()

We will soon increase the visibility of this function, so make its name
more distinctive.

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

verify_refname_available(): new functionRonnie Sahlberg Tue, 10 Nov 2015 11:42:32 +0000 (12:42 +0100)

verify_refname_available(): new function

Add a new verify_refname_available() function, which checks whether the
refname is available for use, taking all references (both packed and
loose) into account. This function, unlike the old
verify_refname_available(), has semantics independent of the choice of
reference storage, and can therefore be implemented by alternative
reference backends.

Use the new function in a couple of places.

Signed-off-by: Ronnie Sahlberg <sahlberg@google.com>
Signed-off-by: David Turner <dturner@twopensource.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Jeff King <peff@peff.net>

verify_refname_available(): rename functionRonnie Sahlberg Tue, 10 Nov 2015 11:42:31 +0000 (12:42 +0100)

verify_refname_available(): rename function

Rename verify_refname_available() to verify_refname_available_dir() to
make the old name available for a more general purpose.

Signed-off-by: Ronnie Sahlberg <sahlberg@google.com>
Signed-off-by: David Turner <dturner@twopensource.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Jeff King <peff@peff.net>

allow hooks to ignore their standard input streamClemens Buchacher Mon, 16 Nov 2015 08:05:58 +0000 (09:05 +0100)

allow hooks to ignore their standard input stream

Since ec7dbd145 (receive-pack: allow hooks to ignore its
standard input stream) the pre-receive and post-receive
hooks ignore SIGPIPE. Do the same for the remaining hooks
pre-push and post-rewrite, which read from standard input.
The same arguments for ignoring SIGPIPE apply.

Include test by Jeff King which checks that SIGPIPE does not
cause pre-push hook failure. With the use of git update-ref
--stdin it is fast enough to be enabled by default.

Signed-off-by: Clemens Buchacher <clemens.buchacher@intel.com>
Signed-off-by: Jeff King <peff@peff.net>

rebase-i-exec: Allow space in SHELL_PATHFredrik Medley Fri, 13 Nov 2015 06:03:19 +0000 (07:03 +0100)

rebase-i-exec: Allow space in SHELL_PATH

On Windows, when Git is installed under "C:\Program Files\Git",
SHELL_PATH will include a space. Fix "git rebase --interactive --exec"
so that it works with spaces in SHELL_PATH.

Signed-off-by: Fredrik Medley <fredrik.medley@gmail.com>
Signed-off-by: Jeff King <peff@peff.net>

contrib/subtree: Handle '--prefix' argument with a... Techlive Zheng Fri, 13 Nov 2015 02:32:36 +0000 (20:32 -0600)

contrib/subtree: Handle '--prefix' argument with a slash appended

'git subtree merge' will fail if the argument of '--prefix' has a slash
appended.

Signed-off-by: Techlive Zheng <techlivezheng@gmail.com>
Signed-off-by: David A. Greene <greened@obbligato.org>
Signed-off-by: Jeff King <peff@peff.net>

contrib/subtree: Make each test self-containedTechlive Zheng Fri, 13 Nov 2015 02:32:35 +0000 (20:32 -0600)

contrib/subtree: Make each test self-contained

Each test runs a full repository creation and any subtree actions
needed to perform the test. Each test starts with a clean slate,
making debugging and post-mortem analysis much easier.

Signed-off-by: Techlive Zheng <techlivezheng@gmail.com>
Signed-off-by: David A. Greene <greened@obbligato.org>
Signed-off-by: Jeff King <peff@peff.net>

contrib/subtree: Add split testsTechlive Zheng Fri, 13 Nov 2015 02:32:34 +0000 (20:32 -0600)

contrib/subtree: Add split tests

Add tests to check various options to split. Check combinations of
--prefix, --message, --annotate, --branch and --rejoin.

Signed-off-by: Techlive Zheng <techlivezheng@gmail.com>
Signed-off-by: David A. Greene <greened@obbligato.org>
Signed-off-by: Jeff King <peff@peff.net>

contrib/subtree: Add merge testsTechlive Zheng Fri, 13 Nov 2015 02:32:33 +0000 (20:32 -0600)

contrib/subtree: Add merge tests

Add some tests for various merge operations. Test combinations of merge
with --message, --prefix and --squash.

Signed-off-by: Techlive Zheng <techlivezheng@gmail.com>
Signed-off-by: David A. Greene <greened@obbligato.org>
Signed-off-by: Jeff King <peff@peff.net>

contrib/subtree: Add tests for subtree addTechlive Zheng Fri, 13 Nov 2015 02:32:32 +0000 (20:32 -0600)

contrib/subtree: Add tests for subtree add

Add some tests to check various options to subtree add. These test
various combinations of --message, --prefix and --squash.

Signed-off-by: Techlive Zheng <techlivezheng@gmail.com>
Signed-off-by: David A. Greene <greened@obbligato.org>
Signed-off-by: Jeff King <peff@peff.net>

contrib/subtree: Add test for missing subtreeTechlive Zheng Fri, 13 Nov 2015 02:32:31 +0000 (20:32 -0600)

contrib/subtree: Add test for missing subtree

Test that a merge from a non-existant subtree fails.

Signed-off-by: Techlive Zheng <techlivezheng@gmail.com>
Signed-off-by: David A. Greene <greened@obbligato.org>
Signed-off-by: Jeff King <peff@peff.net>

contrib/subtree: Clean and refactor test codeTechlive Zheng Fri, 13 Nov 2015 02:32:30 +0000 (20:32 -0600)

contrib/subtree: Clean and refactor test code

Mostly prepare for the later tests refactoring. This moves some
common code to helper functions and generally cleans things up to be
more presentable.

Signed-off-by: Techlive Zheng <techlivezheng@gmail.com>
Signed-off-by: David A. Greene <greened@obbligato.org>
Signed-off-by: Jeff King <peff@peff.net>

gitk: Update revision date in Japanese PO fileYOKOTA Hiroshi Thu, 12 Nov 2015 04:01:44 +0000 (13:01 +0900)

gitk: Update revision date in Japanese PO file

Signed-off-by: YOKOTA Hiroshi <yokota@netlab.cs.tsukuba.ac.jp>

gitk: Update "Language:" headerYOKOTA Hiroshi Sat, 24 Oct 2015 16:34:36 +0000 (01:34 +0900)

gitk: Update "Language:" header

msgfmt(1) wants this header.

Signed-off-by: YOKOTA Hiroshi <yokota@netlab.cs.tsukuba.ac.jp>

gitk: Improve translation messageYOKOTA Hiroshi Sat, 24 Oct 2015 16:32:28 +0000 (01:32 +0900)

gitk: Improve translation message

Signed-off-by: YOKOTA Hiroshi <yokota@netlab.cs.tsukuba.ac.jp>

gitk: Remove unused lineYOKOTA Hiroshi Sat, 24 Oct 2015 14:21:25 +0000 (23:21 +0900)

gitk: Remove unused line

Signed-off-by: YOKOTA Hiroshi <yokota@netlab.cs.tsukuba.ac.jp>

gitk: Update yearYOKOTA Hiroshi Sat, 24 Oct 2015 14:07:55 +0000 (23:07 +0900)

gitk: Update year

Signed-off-by: YOKOTA Hiroshi <yokota@netlab.cs.tsukuba.ac.jp>

gitk: Change last translator lineYOKOTA Hiroshi Sat, 24 Oct 2015 14:04:54 +0000 (23:04 +0900)

gitk: Change last translator line

Signed-off-by: YOKOTA Hiroshi <yokota@netlab.cs.tsukuba.ac.jp>

gitk: Update fuzzy messagesYOKOTA Hiroshi Thu, 12 Nov 2015 06:14:34 +0000 (15:14 +0900)

gitk: Update fuzzy messages

Signed-off-by: YOKOTA Hiroshi <yokota@netlab.cs.tsukuba.ac.jp>

gitk: Update Japanese translationYOKOTA Hiroshi Sat, 24 Oct 2015 12:55:02 +0000 (21:55 +0900)

gitk: Update Japanese translation

Signed-off-by: YOKOTA Hiroshi <yokota@netlab.cs.tsukuba.ac.jp>

gitk: Fix translation around copyright signYOKOTA Hiroshi Sat, 24 Oct 2015 12:35:56 +0000 (21:35 +0900)

gitk: Fix translation around copyright sign

Signed-off-by: YOKOTA Hiroshi <yokota@netlab.cs.tsukuba.ac.jp>

gitk: Update Japanese translationYOKOTA Hiroshi Sat, 24 Oct 2015 12:31:08 +0000 (21:31 +0900)

gitk: Update Japanese translation

Signed-off-by: YOKOTA Hiroshi <yokota@netlab.cs.tsukuba.ac.jp>

gitk: Fix wrong translationYOKOTA Hiroshi Sat, 24 Oct 2015 12:25:42 +0000 (21:25 +0900)

gitk: Fix wrong translation

Signed-off-by: YOKOTA Hiroshi <yokota@netlab.cs.tsukuba.ac.jp>

gitk: Translate Japanese catalogYOKOTA Hiroshi Sat, 24 Oct 2015 12:12:39 +0000 (21:12 +0900)

gitk: Translate Japanese catalog

Signed-off-by: YOKOTA Hiroshi <yokota@netlab.cs.tsukuba.ac.jp>

gitk: Translate more to Japanese catalogYOKOTA Hiroshi Sat, 24 Oct 2015 11:23:00 +0000 (20:23 +0900)

gitk: Translate more to Japanese catalog

Signed-off-by: YOKOTA Hiroshi <yokota@netlab.cs.tsukuba.ac.jp>

gitk: Update Japanese message catalogYOKOTA Hiroshi Sat, 24 Oct 2015 10:53:23 +0000 (19:53 +0900)

gitk: Update Japanese message catalog

Signed-off-by: YOKOTA Hiroshi <yokota@netlab.cs.tsukuba.ac.jp>

gitk: Re-sync line number in Japanese message catalogueYOKOTA Hiroshi Thu, 12 Nov 2015 03:34:43 +0000 (12:34 +0900)

gitk: Re-sync line number in Japanese message catalogue

Signed-off-by: YOKOTA Hiroshi <yokota@netlab.cs.tsukuba.ac.jp>

gitk: Color name updateYOKOTA Hiroshi Sat, 24 Oct 2015 16:58:41 +0000 (01:58 +0900)

gitk: Color name update

Color name "green" was darken since Tcl/Tk 7.6.
Because color name scheme was changed from "X11 colors" to "Web colors".

Use "lime" to keep colors.

See also:
http://www.tcl.tk/cgi-bin/tct/tip/403.html

Signed-off-by: YOKOTA Hiroshi <yokota@netlab.cs.tsukuba.ac.jp>

http: fix some printf format warningsRamsay Jones Thu, 12 Nov 2015 00:07:42 +0000 (00:07 +0000)

http: fix some printf format warnings

Commit f8117f55 ("http: use off_t to store partial file size",
02-11-2015) changed the type of some variables from long to off_t.
Unfortunately, the off_t type is not portable and can be represented
by several different actual types (even multiple types on the same
platform). This makes it difficult to print an off_t variable in
a platform independent way. As a result, this commit causes gcc to
issue some printf format warnings on a couple of different platforms.

In order to suppress the warnings, change the format specifier to use
the PRIuMAX macro and cast the off_t argument to uintmax_t. (See also
the http_opt_request_remainder() function, which uses the same
solution).

Signed-off-by: Ramsay Jones <ramsay@ramsayjones.plus.com>
Signed-off-by: Jeff King <peff@peff.net>

Documentation: make environment variable formatting... Андрей Рыбак Wed, 11 Nov 2015 15:47:25 +0000 (18:47 +0300)

Documentation: make environment variable formatting more consistent

Documentation/git.txt is not consistent in the way it
stylizes mentions of Environment Variables. Most of them are
enclosed in single quotes, some are enclosed in backticks,
some are not enclosed.

Signed-off-by: Andrey Rybak <rybak.a.v@gmail.com>
Signed-off-by: Jeff King <peff@peff.net>

git-svn: improve rebase/mkdirs performanceDair Grant Thu, 5 Nov 2015 10:26:15 +0000 (10:26 +0000)

git-svn: improve rebase/mkdirs performance

Processing empty_dir directives becomes extremely slow for svn
repositories with a large enough history.

This is due to using a single hash to store the list of empty
directories, with the expensive step being purging items from
that hash using grep+delete.

Storing directories in a hash of hashes improves the performance
of this purge step and removes a potentially lengthy delay after
every rebase/mkdirs command.

The svn repository with this behaviour has 110K commits with
unhandled.log containing 170K empty_dir directives.

This takes 10 minutes to process when using a single hash, vs
3 seconds with a hash of hashes.

Signed-off-by: Dair Grant <dair@feralinteractive.com>
Signed-off-by: Eric Wong <normalperson@yhbt.net>

configure.ac: use $LIBS not $CFLAGS when testing -lpthreadRainer M. Canavan Fri, 6 Nov 2015 01:11:37 +0000 (02:11 +0100)

configure.ac: use $LIBS not $CFLAGS when testing -lpthread

Some linkers, namely the one on IRIX are rather strict concerning
the order or arguments for symbol resolution, i.e. no libraries
listed before objects or other libraries on the command line are
considered for symbol resolution. Therefore, -lpthread can't work
if it's put in CFLAGS, because it will not be considered for
resolving pthread_key_create in conftest.o. Use $LIBS instead.

Signed-off-by: Rainer Canavan <git@canavan.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

filter-branch: skip index read/write when possibleJeff King Fri, 6 Nov 2015 06:24:29 +0000 (01:24 -0500)

filter-branch: skip index read/write when possible

If the user specifies an index filter but not a tree filter,
filter-branch cleverly avoids checking out the tree
entirely. But we don't do the next level of optimization: if
you have no index or tree filter, we do not need to read the
index at all.

This can greatly speed up cases where we are only changing
the commit objects (e.g., cementing a graft into place).
Here are numbers from the newly-added perf test:

Test HEAD^ HEAD
---------------------------------------------------------------
7000.2: noop filter 13.81(4.95+0.83) 5.43(0.42+0.43) -60.7%

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

contrib/subtree: remove "push" command from the "todo... Fabio Porcedda Thu, 5 Nov 2015 15:26:57 +0000 (16:26 +0100)

contrib/subtree: remove "push" command from the "todo" file

Because the "push" command is already available, remove it from the
"todo" file.

Signed-off-by: Fabio Porcedda <fabio.porcedda@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Eleventh batch for 2.7Junio C Hamano Thu, 5 Nov 2015 23:26:08 +0000 (15:26 -0800)

Eleventh batch for 2.7

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

Merge branch 'ea/checkout-progress'Junio C Hamano Thu, 5 Nov 2015 23:24:28 +0000 (15:24 -0800)

Merge branch 'ea/checkout-progress'

"git checkout" did not follow the usual "--[no-]progress"
convention and implemented only "--quiet" that is essentially
a superset of "--no-progress". Extend the command to support the
usual "--[no-]progress".

* ea/checkout-progress:
checkout: add --progress option

Merge branch 'dt/http-range'Junio C Hamano Thu, 5 Nov 2015 23:24:27 +0000 (15:24 -0800)

Merge branch 'dt/http-range'

A Range: request can be responded with a full response and when
asked properly libcurl knows how to strip the result down to the
requested range. However, we were hand-crafting a range request
and it did not kick in.

* dt/http-range:
http: use off_t to store partial file size
http.c: use CURLOPT_RANGE for range requests

Sync with 2.6.3Junio C Hamano Thu, 5 Nov 2015 20:22:13 +0000 (12:22 -0800)

Sync with 2.6.3

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

Git 2.6.3 v2.6.3Junio C Hamano Thu, 5 Nov 2015 20:20:34 +0000 (12:20 -0800)

Git 2.6.3

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

Merge branch 'rs/daemon-plug-child-leak' into maintJunio C Hamano Thu, 5 Nov 2015 20:18:16 +0000 (12:18 -0800)

Merge branch 'rs/daemon-plug-child-leak' into maint

"git daemon" uses "run_command()" without "finish_command()", so it
needs to release resources itself, which it forgot to do.

* rs/daemon-plug-child-leak:
daemon: plug memory leak
run-command: factor out child_process_clear()

Merge branch 'rs/wt-status-detached-branch-fix' into... Junio C Hamano Thu, 5 Nov 2015 20:18:15 +0000 (12:18 -0800)

Merge branch 'rs/wt-status-detached-branch-fix' into maint

"git status --branch --short" accessed beyond the constant string
"HEAD", which has been corrected.

* rs/wt-status-detached-branch-fix:
wt-status: use skip_prefix() to get rid of magic string length constants
wt-status: don't skip a magical number of characters blindly
wt-status: avoid building bogus branch name with detached HEAD
wt-status: exit early using goto in wt_shortstatus_print_tracking()
t7060: add test for status --branch on a detached HEAD

Merge branch 'jk/initialization-fix-to-add-submodule... Junio C Hamano Thu, 5 Nov 2015 20:18:14 +0000 (12:18 -0800)

Merge branch 'jk/initialization-fix-to-add-submodule-odb' into maint

We peek objects from submodule's object store by linking it to the
list of alternate object databases, but the code to do so forgot to
correctly initialize the list.

* jk/initialization-fix-to-add-submodule-odb:
add_submodule_odb: initialize alt_odb list earlier

Merge branch 'js/misc-fixes' into maintJunio C Hamano Thu, 5 Nov 2015 20:18:13 +0000 (12:18 -0800)

Merge branch 'js/misc-fixes' into maint

Various compilation fixes and squelching of warnings.

* js/misc-fixes:
Correct fscanf formatting string for I64u values
Silence GCC's "cast of pointer to integer of a different size" warning
Squelch warning about an integer overflow

Merge branch 'jc/add-u-A-default-to-top' into maintJunio C Hamano Thu, 5 Nov 2015 20:18:12 +0000 (12:18 -0800)

Merge branch 'jc/add-u-A-default-to-top' into maint

"git --literal-pathspecs add -u/-A" without any command line
argument misbehaved ever since Git 2.0.

* jc/add-u-A-default-to-top:
add: simplify -u/-A without pathspec

Merge branch 'jk/delete-modechange-conflict' into maintJunio C Hamano Thu, 5 Nov 2015 20:18:11 +0000 (12:18 -0800)

Merge branch 'jk/delete-modechange-conflict' into maint

Merging a branch that removes a path and another that changes the
mode bits on the same path should have conflicted at the path, but
it didn't and silently favoured the removal.

* jk/delete-modechange-conflict:
merge: detect delete/modechange conflict
t6031: generalize for recursive and resolve strategies
t6031: move triple-rename test to t3030

Merge branch 'js/imap-send-curl-compilation-fix' into... Junio C Hamano Thu, 5 Nov 2015 20:18:10 +0000 (12:18 -0800)

Merge branch 'js/imap-send-curl-compilation-fix' into maint

"git imap-send" did not compile well with older version of cURL library.

* js/imap-send-curl-compilation-fix:
imap-send: only use CURLOPT_LOGIN_OPTIONS if it is actually available

Merge branch 'rp/link-curl-before-ssl' into maintJunio C Hamano Thu, 5 Nov 2015 20:18:08 +0000 (12:18 -0800)

Merge branch 'rp/link-curl-before-ssl' into maint

The linkage order of libraries was wrong in places around libcurl.

* rp/link-curl-before-ssl:
configure.ac: detect ssl need with libcurl
Makefile: make curl-config path configurable
Makefile: link libcurl before zlib

Merge branch 'nd/clone-linked-checkout' into maintJunio C Hamano Thu, 5 Nov 2015 20:18:07 +0000 (12:18 -0800)

Merge branch 'nd/clone-linked-checkout' into maint

It was not possible to use a repository-lookalike created by "git
worktree add" as a local source of "git clone".

* nd/clone-linked-checkout:
clone: better error when --reference is a linked checkout
clone: allow --local from a linked checkout
enter_repo: allow .git files in strict mode
enter_repo: avoid duplicating logic, use is_git_directory() instead
t0002: add test for enter_repo(), non-strict mode
path.c: delete an extra space

Merge branch 'sa/send-email-smtp-batch-data-limit'... Junio C Hamano Thu, 5 Nov 2015 20:18:06 +0000 (12:18 -0800)

Merge branch 'sa/send-email-smtp-batch-data-limit' into maint

When "git send-email" wanted to talk over Net::SMTP::SSL,
Net::Cmd::datasend() did not like to be fed too many bytes at the
same time and failed to send messages. Send the payload one line
at a time to work around the problem.

* sa/send-email-smtp-batch-data-limit:
git-send-email.perl: Fixed sending of many/huge changes/patches

t5509: add basic tests for hideRefsLukas Fleischer Thu, 5 Nov 2015 06:07:31 +0000 (07:07 +0100)

t5509: add basic tests for hideRefs

Test whether regular and full hideRefs patterns work as expected when
namespaces are used.

Helped-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Lukas Fleischer <lfleischer@lfos.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

hideRefs: add support for matching full refsLukas Fleischer Tue, 3 Nov 2015 07:58:16 +0000 (08:58 +0100)

hideRefs: add support for matching full refs

In addition to matching stripped refs, one can now add hideRefs
patterns that the full (unstripped) ref is matched against. To
distinguish between stripped and full matches, those new patterns
must be prefixed with a circumflex (^).

This commit also removes support for the undocumented and unintended
hideRefs settings ".have" (suppressing all "have" lines) and
"capabilities^{}" (suppressing the capabilities line).

Signed-off-by: Lukas Fleischer <lfleischer@lfos.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

upload-pack: strip refs before calling ref_is_hidden()Lukas Fleischer Thu, 5 Nov 2015 06:07:29 +0000 (07:07 +0100)

upload-pack: strip refs before calling ref_is_hidden()

Make hideRefs handling in upload-pack consistent with the behavior
described in the documentation by stripping refs before comparing them
with prefixes in hideRefs.

Signed-off-by: Lukas Fleischer <lfleischer@lfos.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

config.txt: document the semantics of hideRefs with... Lukas Fleischer Tue, 3 Nov 2015 07:58:14 +0000 (08:58 +0100)

config.txt: document the semantics of hideRefs with namespaces

Right now, there is no clear definition of how transfer.hideRefs should
behave when a namespace is set. Explain that hideRefs prefixes match
stripped names in that case. This is how hideRefs patterns are currently
handled in receive-pack.

Signed-off-by: Lukas Fleischer <lfleischer@lfos.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

sha1: allow limiting the size of the data passed to... Atousa Pahlevan Duprat Thu, 5 Nov 2015 06:38:42 +0000 (22:38 -0800)

sha1: allow limiting the size of the data passed to SHA1_Update()

Using the previous commit's inredirection mechanism for SHA1,
support a chunked implementation of SHA1_Update() that limits the
amount of data in the chunk passed to SHA1_Update().

This is enabled by using the Makefile variable SHA1_MAX_BLOCK_SIZE
to specify chunk size. When using Apple's CommonCrypto library this
is set to 1GiB (the implementation cannot handle more 4GiB).

Signed-off-by: Atousa Pahlevan Duprat <apahlevan@ieee.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

sha1: provide another level of indirection for the... Atousa Pahlevan Duprat Thu, 5 Nov 2015 06:38:41 +0000 (22:38 -0800)

sha1: provide another level of indirection for the SHA-1 functions

The git source uses git_SHA1_Update() and friends to call into the
code that computes the hashes. Traditionally, we used to map these
directly to underlying implementation of the SHA-1 hash (e.g.
SHA1_Update() from OpenSSL or blk_SHA1_Update() from block-sha1/).

This arrangement however makes it hard to tweak behaviour of the
underlying implementation without fully replacing. If we want to
introduce a tweaked_SHA1_Update() wrapper to implement the "Update"
in a slightly different way, for example, the implementation of the
wrapper still would want to call into the underlying implementation,
but tweaked_SHA1_Update() cannot call git_SHA1_Update() to get to
the underlying implementation (often but not always SHA1_Update()).

Add another level of indirection that maps platform_SHA1_Update()
and friends to their underlying implementations, and by default make
git_SHA1_Update() and friends map to platform_SHA1_* functions.

Doing it this way will later allow us to map git_SHA1_Update() to
tweaked_SHA1_Update(), and the latter can use platform_SHA1_Update()
in its implementation.

Signed-off-by: Atousa Pahlevan Duprat <apahlevan@ieee.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Sync with maintJunio C Hamano Wed, 4 Nov 2015 22:21:41 +0000 (14:21 -0800)

Sync with maint

* maint:

Merge branch 'xf/user-manual-ff' into maintJunio C Hamano Wed, 4 Nov 2015 22:20:49 +0000 (14:20 -0800)

Merge branch 'xf/user-manual-ff' into maint

* xf/user-manual-ff:
user-manual: fix the description of fast-forward

Merge branch 'xf/user-manual-markup' into maintJunio C Hamano Wed, 4 Nov 2015 22:20:47 +0000 (14:20 -0800)

Merge branch 'xf/user-manual-markup' into maint

AsciiDoc markup fixes.

* xf/user-manual-markup:
Documentation: match undefline with the text in old release notes
Documentation: match underline with the text
Documentation: fix header markup

Merge branch 'jc/everyday-markup' into maintJunio C Hamano Wed, 4 Nov 2015 22:20:46 +0000 (14:20 -0800)

Merge branch 'jc/everyday-markup' into maint

AsciiDoc markup fixes.

* jc/everyday-markup:
Documentation/everyday: match undefline with the text

Merge branch 'jc/em-dash-in-doc' into maintJunio C Hamano Wed, 4 Nov 2015 22:20:45 +0000 (14:20 -0800)

Merge branch 'jc/em-dash-in-doc' into maint

AsciiDoc markup fixes.

* jc/em-dash-in-doc:
Documentation: AsciiDoc spells em-dash as double-dashes, not triple

Merge branch 'es/worktree-add' into maintJunio C Hamano Wed, 4 Nov 2015 22:20:44 +0000 (14:20 -0800)

Merge branch 'es/worktree-add' into maint

* es/worktree-add:
worktree: usage: denote <branch> as optional with 'add'

gc: remove garbage .idx files from pack dirDoug Kelly Wed, 4 Nov 2015 03:05:08 +0000 (21:05 -0600)

gc: remove garbage .idx files from pack dir

Add a custom report_garbage handler to collect and remove
garbage .idx files from the pack directory.

Signed-off-by: Doug Kelly <dougk.ff7@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

t5304: test cleaning pack garbageDoug Kelly Wed, 4 Nov 2015 03:05:07 +0000 (21:05 -0600)

t5304: test cleaning pack garbage

Pack garbage, noticeably stale .idx files, can be cleaned up during
a garbage collection. This tests to ensure such garbage is properly
cleaned up.

Note that the prior test for checking pack garbage with count-objects
left some stale garbage after the test exited. This has also been
corrected.

Signed-off-by: Doug Kelly <dougk.ff7@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Sync with maintJunio C Hamano Tue, 3 Nov 2015 23:41:50 +0000 (15:41 -0800)

Sync with maint

Merge branch 'mk/blame-error-message' into maintJunio C Hamano Tue, 3 Nov 2015 23:32:42 +0000 (15:32 -0800)

Merge branch 'mk/blame-error-message' into maint

The error message from "git blame --contents --reverse" incorrectly
talked about "--contents --children".

* mk/blame-error-message:
blame: fix option name in error message

Merge branch 'jk/merge-file-exit-code' into maintJunio C Hamano Tue, 3 Nov 2015 23:32:41 +0000 (15:32 -0800)

Merge branch 'jk/merge-file-exit-code' into maint

"git merge-file" tried to signal how many conflicts it found, which
obviously would not work well when there are too many of them.

* jk/merge-file-exit-code:
merge-file: clamp exit code to maximum 127

Merge branch 'dt/name-hash-dir-entry-fix' into maintJunio C Hamano Tue, 3 Nov 2015 23:32:40 +0000 (15:32 -0800)

Merge branch 'dt/name-hash-dir-entry-fix' into maint

The name-hash subsystem that is used to cope with case insensitive
filesystems keeps track of directories and their on-filesystem
cases for all the paths in the index by holding a pointer to a
randomly chosen cache entry that is inside the directory (for its
ce->ce_name component). This pointer was not updated even when the
cache entry was removed from the index, leading to use after free.
This was fixed by recording the path for each directory instead of
borrowing cache entries and restructuring the API somewhat.

* dt/name-hash-dir-entry-fix:
name-hash: don't reuse cache_entry in dir_entry

Merge branch 'jc/am-3-fallback-regression-fix' into... Junio C Hamano Tue, 3 Nov 2015 23:32:39 +0000 (15:32 -0800)

Merge branch 'jc/am-3-fallback-regression-fix' into maint

"git am -3" had a small regression where it is aborted in its error
handling codepath when underlying merge-recursive failed in certain
ways, as it assumed that the internal call to merge-recursive will
never die, which is not the case (yet).

* jc/am-3-fallback-regression-fix:
am -3: do not let failed merge from completing the error codepath

Merge branch 'jc/usage-stdin' into maintJunio C Hamano Tue, 3 Nov 2015 23:32:38 +0000 (15:32 -0800)

Merge branch 'jc/usage-stdin' into maint

The synopsis text and the usage string of subcommands that read
list of things from the standard input are often shown as if they
only take input from a file on a filesystem, which was misleading.

* jc/usage-stdin:
usage: do not insist that standard input must come from a file

Merge branch 'rt/placeholder-in-usage' into maintJunio C Hamano Tue, 3 Nov 2015 23:32:37 +0000 (15:32 -0800)

Merge branch 'rt/placeholder-in-usage' into maint

A couple of commands still showed "[options]" in their usage string
to note where options should come on their command line, but we
spell that "[<options>]" in most places these days.

* rt/placeholder-in-usage:
am, credential-cache: add angle brackets to usage string

Merge branch 'dt/t7063-fix-flaky-test' into maintJunio C Hamano Tue, 3 Nov 2015 23:32:36 +0000 (15:32 -0800)

Merge branch 'dt/t7063-fix-flaky-test' into maint

* dt/t7063-fix-flaky-test:
t7063: fix flaky untracked-cache test

Merge branch 'mk/submodule-gitdir-path' into maintJunio C Hamano Tue, 3 Nov 2015 23:32:34 +0000 (15:32 -0800)

Merge branch 'mk/submodule-gitdir-path' into maint

The submodule code has been taught to work better with separate
work trees created via "git worktree add".

* mk/submodule-gitdir-path:
path: implement common_dir handling in git_pathdup_submodule()
submodule refactor: use strbuf_git_path_submodule() in add_submodule_odb()

Merge branch 'nd/gc-auto-background-fix' into maintJunio C Hamano Tue, 3 Nov 2015 23:32:33 +0000 (15:32 -0800)

Merge branch 'nd/gc-auto-background-fix' into maint

When "git gc --auto" is backgrounded, its diagnosis message is
lost. Save it to a file in $GIT_DIR and show it next time the "gc
--auto" is run.

* nd/gc-auto-background-fix:
gc: save log from daemonized gc --auto and print it next time

Merge branch 'ls/p4-translation-failure' into maintJunio C Hamano Tue, 3 Nov 2015 23:32:31 +0000 (15:32 -0800)

Merge branch 'ls/p4-translation-failure' into maint

Work around "git p4" failing when the P4 depot records the contents
in UTF-16 without UTF-16 BOM.

* ls/p4-translation-failure:
git-p4: handle "Translation of file content failed"
git-p4: add test case for "Translation of file content failed" error

Merge branch 'gr/rebase-i-drop-warn' into maintJunio C Hamano Tue, 3 Nov 2015 23:32:30 +0000 (15:32 -0800)

Merge branch 'gr/rebase-i-drop-warn' into maint

Recent update to "rebase -i" that tries to sanity check the edited
insn sheet before it uses it has become too picky on Windows where
CRLF left by the editor is turned into a trailing CR on the line
read via the "read" built-in command.

* gr/rebase-i-drop-warn:
rebase-i: work around Windows CRLF line endings
t3404: "rebase -i" gets broken when insn sheet uses CR/LF line endings

Merge branch 'js/clone-dissociate' into maintJunio C Hamano Tue, 3 Nov 2015 23:32:28 +0000 (15:32 -0800)

Merge branch 'js/clone-dissociate' into maint

"git clone --dissociate" runs a big "git repack" process at the
end, and it helps to close file descriptors that are open on the
packs and their idx files before doing so on filesystems that
cannot remove a file that is still open.

* js/clone-dissociate:
clone --dissociate: avoid locking pack files
sha1_file.c: add a function to release all packs
sha1_file: consolidate code to close a pack's file descriptor
t5700: demonstrate a Windows file locking issue with `git clone --dissociate`

Merge branch 'ld/p4-import-labels' into maintJunio C Hamano Tue, 3 Nov 2015 23:32:27 +0000 (15:32 -0800)

Merge branch 'ld/p4-import-labels' into maint

Correct "git p4 --detect-labels" so that it does not fail to create
a tag that points at a commit that is also being imported.

* ld/p4-import-labels:
git-p4: fix P4 label import for unprocessed commits
git-p4: do not terminate creating tag for unknown commit
git-p4: failing test for ignoring invalid p4 labels

Merge branch 'tk/stripspace' into maintJunio C Hamano Tue, 3 Nov 2015 23:32:26 +0000 (15:32 -0800)

Merge branch 'tk/stripspace' into maint

The internal stripspace() function has been moved to where it
logically belongs to, i.e. strbuf API, and the command line parser
of "git stripspace" has been updated to use the parse_options API.

* tk/stripspace:
stripspace: use parse-options for command-line parsing
strbuf: make stripspace() part of strbuf

Merge branch 'jk/repository-extension' into maintJunio C Hamano Tue, 3 Nov 2015 23:32:25 +0000 (15:32 -0800)

Merge branch 'jk/repository-extension' into maint

Prepare for Git on-disk repository representation to undergo
backward incompatible changes by introducing a new repository
format version "1", with an extension mechanism.

* jk/repository-extension:
introduce "preciousObjects" repository extension
introduce "extensions" form of core.repositoryformatversion

Tenth batch for 2.7Junio C Hamano Tue, 3 Nov 2015 23:18:22 +0000 (15:18 -0800)

Tenth batch for 2.7

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

Merge branch 'rs/daemon-plug-child-leak'Junio C Hamano Tue, 3 Nov 2015 23:13:11 +0000 (15:13 -0800)

Merge branch 'rs/daemon-plug-child-leak'

"git daemon" uses "run_command()" without "finish_command()", so it
needs to release resources itself, which it forgot to do.

* rs/daemon-plug-child-leak:
daemon: plug memory leak
run-command: factor out child_process_clear()

Merge branch 'mk/blame-first-parent'Junio C Hamano Tue, 3 Nov 2015 23:13:09 +0000 (15:13 -0800)

Merge branch 'mk/blame-first-parent'

"git blame" learnt to take "--first-parent" and "--reverse" at the
same time when it makes sense.

* mk/blame-first-parent:
blame: allow blame --reverse --first-parent when it makes sense
blame: extract find_single_final
blame: test to describe use of blame --reverse --first-parent

Merge branch 'rs/wt-status-detached-branch-fix'Junio C Hamano Tue, 3 Nov 2015 23:13:08 +0000 (15:13 -0800)

Merge branch 'rs/wt-status-detached-branch-fix'

"git status --branch --short" accessed beyond the constant string
"HEAD", which has been corrected.

* rs/wt-status-detached-branch-fix:
wt-status: use skip_prefix() to get rid of magic string length constants
wt-status: don't skip a magical number of characters blindly
wt-status: avoid building bogus branch name with detached HEAD
wt-status: exit early using goto in wt_shortstatus_print_tracking()
t7060: add test for status --branch on a detached HEAD

Merge branch 'rs/show-branch-argv-array'Junio C Hamano Tue, 3 Nov 2015 23:13:06 +0000 (15:13 -0800)

Merge branch 'rs/show-branch-argv-array'

Code simplification.

* rs/show-branch-argv-array:
show-branch: use argv_array for default arguments

Merge branch 'js/git-gdb'Junio C Hamano Tue, 3 Nov 2015 23:13:05 +0000 (15:13 -0800)

Merge branch 'js/git-gdb'

Allow easier debugging of a single "git" invocation in our test
scripts.

* js/git-gdb:
test: facilitate debugging Git executables in tests with gdb

Merge branch 'jk/initialization-fix-to-add-submodule... Junio C Hamano Tue, 3 Nov 2015 23:13:04 +0000 (15:13 -0800)

Merge branch 'jk/initialization-fix-to-add-submodule-odb'

We peek objects from submodule's object store by linking it to the
list of alternate object databases, but the code to do so forgot to
correctly initialize the list.

* jk/initialization-fix-to-add-submodule-odb:
add_submodule_odb: initialize alt_odb list earlier

Merge branch 'da/difftool'Junio C Hamano Tue, 3 Nov 2015 23:13:01 +0000 (15:13 -0800)

Merge branch 'da/difftool'

The code to prepare the working tree side of temporary directory
for the "dir-diff" feature forgot that symbolic links need not be
copied (or symlinked) to the temporary area, as the code already
special cases and overwrites them. Besides, it was wrong to try
computing the object name of the target of symbolic link, which may
not even exist or may be a directory.

* da/difftool:
difftool: ignore symbolic links in use_wt_file

Merge branch 'jc/mailinfo-lib'Junio C Hamano Tue, 3 Nov 2015 23:12:59 +0000 (15:12 -0800)

Merge branch 'jc/mailinfo-lib'

Hotfix for a topic already in 'master'.

* jc/mailinfo-lib:
mailinfo: fix passing wrong address to git_mailinfo_config

Merge branch 'kn/for-each-branch'Junio C Hamano Tue, 3 Nov 2015 23:12:55 +0000 (15:12 -0800)

Merge branch 'kn/for-each-branch'

Using the timestamp based criteria in "git branch --sort" did not
tiebreak branches that point at commits with the same timestamp (or
the same commit), making the resulting output unstable.

* kn/for-each-branch:
ref-filter: fallback on alphabetical comparison

daemon: plug memory leakRené Scharfe Sat, 24 Oct 2015 12:23:20 +0000 (14:23 +0200)

daemon: plug memory leak

Call child_process_clear() when a child ends to release the memory
allocated for its environment. This is necessary because unlike all
other users of start_command() we don't call finish_command(), which
would have taken care of that for us.

This leak was introduced by f063d38b (daemon: use cld->env_array
when re-spawning).

Signed-off-by: Rene Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>