gitweb.git
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>

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>

imap-send: check NULL return of SSL_CTX_new()Kazuki Yamaguchi Fri, 8 Apr 2016 16:22:14 +0000 (01:22 +0900)

imap-send: check NULL return of SSL_CTX_new()

SSL_CTX_new() may fail with return value NULL.

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

imap-send: use HMAC() function provided by OpenSSLKazuki Yamaguchi Fri, 8 Apr 2016 16:22:13 +0000 (01:22 +0900)

imap-send: use HMAC() function provided by OpenSSL

Fix compile errors with OpenSSL 1.1.0.

HMAC_CTX is made opaque and HMAC_CTX_cleanup is removed in OpenSSL
1.1.0. But since we just want to calculate one HMAC, we can use HMAC()
here, which exists since OpenSSL 0.9.6 at least.

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

set_worktree_head_symref(): fix error messageKazuki Yamaguchi Fri, 8 Apr 2016 08:03:07 +0000 (17:03 +0900)

set_worktree_head_symref(): fix error message

Emit an informative error when failed to hold lock of HEAD.

2233066e (refs: add a new function set_worktree_head_symref,
2016-03-27) added set_worktree_head_symref(), but this is missing a
call to unable_to_lock_message() after hold_lock_file_for_update()
fails, so it emits an empty error message:

% git branch -m oldname newname
error:
error: HEAD of working tree /path/to/wt is not updated
fatal: Branch renamed to newname, but HEAD is not updated!

Thanks to Eric Sunshine for pointing this out.

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

commit: do not ignore an empty message given by -m ''Jeff King Thu, 7 Apr 2016 19:56:26 +0000 (12:56 -0700)

commit: do not ignore an empty message given by -m ''

When f9568530 (builtin-commit: resurrect behavior for multiple -m
options, 2007-11-11) converted a "char *message" to "struct strbuf
message" to hold the messages given with the "-m" option, it
incorrectly changed the checks "did we get a message with the -m
option?" to "is message.len 0?". Later, we noticed one breakage
from this change and corrected it with 25206778 (commit: don't start
editor if empty message is given with -m, 2013-05-25).

However, "we got a message with -m, even though an empty one, so we
shouldn't be launching an editor" was not the only breakage.

* "git commit --amend -m '' --allow-empty", even though it looks
strange, is a valid request to amend the commit to have no
message at all. Due to the misdetection of the presence of -m on
the command line, we ended up keeping the log messsage from the
original commit.

* "git commit -m "$msg" -F file" should be rejected whether $msg is
an empty string or not, but due to the same bug, was not rejected
when $msg is empty.

* "git -c template=file -m "$msg"" should ignore the template even
when $msg is empty, but it didn't and instead used the contents
from the template file.

Correct these by checking have_option_m, which the earlier 25206778
introduced to fix the same bug.

Reported-by: Adam Dinwoodie <adam@dinwoodie.org>
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

commit: --amend -m '' silently fails to wipe messageAdam Dinwoodie Wed, 6 Apr 2016 17:15:03 +0000 (18:15 +0100)

commit: --amend -m '' silently fails to wipe message

`git commit --amend -m ''` seems to be an unambiguous request to blank a
commit message, but it actually leaves the commit message as-is. That's
the case regardless of whether `--allow-empty-message` is specified, and
doesn't so much as drop a non-zero return code.

Add failing tests to show this behaviour.

Signed-off-by: Adam Dinwoodie <adam@dinwoodie.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

setup.c: do not feed NULL to "%.*s" even with precision 0Junio C Hamano Thu, 7 Apr 2016 19:38:18 +0000 (12:38 -0700)

setup.c: do not feed NULL to "%.*s" even with precision 0

A recent update 75faa45a (replace trivial malloc + sprintf / strcpy
calls with xstrfmt, 2015-09-24) rewrote

prepare an empty buffer
if (len)
append the first len bytes of "prefix" to the buffer
append "path" to the buffer

that computed "path", optionally prefixed by "prefix", into

xstrfmt("%.*s%s", len, prefix, path);

However, passing a NULL pointer to the printf(3) family of functions
to format it with %s conversion, even with the precision set to 0,
i.e.

xstrfmt("%.*s", 0, NULL)

yields undefined results, at least on some platforms.

Avoid this problem by substituting prefix with "" when len==0, as
prefix can legally be NULL in that case. This would mimick the
intent of the original code better.

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

rerere: adjust 'forget' to multi-variant world orderJunio C Hamano Mon, 28 Mar 2016 21:48:13 +0000 (14:48 -0700)

rerere: adjust 'forget' to multi-variant world order

Because conflicts with the same contents inside conflict blocks
enclosed by "<<<<<<<" and ">>>>>>>" can now have multiple variants
to help three-way merge to adjust to the differences outside the
conflict blocks, "rerere forget $path" needs to be taught that there
may be multiple recorded resolutions that share the same conflict
hash (which groups the conflicts with "the same contents inside
conflict blocks"), among which there are some that would not be
relevant to the conflict we are looking at. These "other variants"
that happen to share the same conflict hash should not be cleared,
and the variant that would apply to the current conflict may not be
the zero-th one (which is the only one that is cleared by the
current code).

After finding the conflict hash, iterate over the existing variants
and try to resolve the conflict using each of them to find the one
that "cleanly" resolves the current conflict. That is the one we
want to forget and record the preimage for, so that the user can
record the corrected resolution.

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

rerere: split code to call ll_merge() furtherJunio C Hamano Fri, 11 Mar 2016 22:53:05 +0000 (14:53 -0800)

rerere: split code to call ll_merge() further

The merge() helper function is given an existing rerere ID (i.e. the
name of the .git/rr-cache/* subdirectory, and the variant number)
that identifies one <preimage, postimage> pair, try to see if the
conflicted state in the given path can be resolved by using the pair,
and if this succeeds, then update the conflicted path with the
result in the working tree.

To implement rerere_forget() in the multiple variant world, we'd
need a helper to do the "see if a <preimage, postimage> pair cleanly
resolves a conflicted state we have in-core" part, without actually
touching any file in the working tree, in order to identify which
variant(s) to remove. Split the logic to do so into a separate
helper function try_merge() out of merge().

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

rerere: move code related to "forget" togetherJunio C Hamano Mon, 14 Mar 2016 22:10:39 +0000 (15:10 -0700)

rerere: move code related to "forget" together

"rerere forget" is the only user of handle_cache() helper, which in
turn is the only user of rerere_io that reads from an in-core buffer
whose getline method is implemented as rerere_mem_getline(). Gather
them together.

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

rerere: gc and clearJunio C Hamano Tue, 8 Mar 2016 20:11:00 +0000 (12:11 -0800)

rerere: gc and clear

Adjust "git rerere gc" and "git rerere clear" to the new world order
with rerere database with multiple variants for the same shape of
conflicts.

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

send-email: do not load Data::DumperEric Wong Wed, 6 Apr 2016 20:25:38 +0000 (20:25 +0000)

send-email: do not load Data::Dumper

We never used Data::Dumper in this script. The only reference
of it was always commented out and removed over a decade ago in
commit 4bc87a28be020a6bf7387161c65ea3d8e4a0228b
("send-email: Change from Mail::Sendmail to Net::SMTP")

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

send-email: more meaningful Message-IDEric Wong Wed, 6 Apr 2016 20:07:14 +0000 (20:07 +0000)

send-email: more meaningful Message-ID

Using a YYYYmmddHHMMSS date representation is more meaningful to
humans, especially when used for lookups on NNTP servers or linking
to archive sites via Message-ID (e.g. mid.gmane.org or
mid.mail-archive.com). This timestamp format more easily gives a
reader of the URL itself a rough date of a linked message compared
to having them calculate the seconds since the Unix epoch.

Furthermore, having the MUA name in the Message-ID seems to be a
rare oddity I haven't noticed outside of git-send-email. We
already have an optional X-Mailer header field to advertise for
us, so extending the Message-ID by 15 characters can make for
unpleasant Message-ID-based URLs to archive sites.

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

Second batch for post 2.8 cycleJunio C Hamano Wed, 6 Apr 2016 18:44:24 +0000 (11:44 -0700)

Second batch for post 2.8 cycle

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

Merge branch 'la/tag-force-signing-annotated-tags'Junio C Hamano Wed, 6 Apr 2016 18:39:13 +0000 (11:39 -0700)

Merge branch 'la/tag-force-signing-annotated-tags'

"git tag" can create an annotated tag without explicitly given an
"-a" (or "-s") option (i.e. when a tag message is given). A new
configuration variable, tag.forceSignAnnotated, can be used to tell
the command to create signed tag in such a situation.

* la/tag-force-signing-annotated-tags:
tag: add the option to force signing of annotated tags

Merge branch 'jk/submodule-c-credential'Junio C Hamano Wed, 6 Apr 2016 18:39:12 +0000 (11:39 -0700)

Merge branch 'jk/submodule-c-credential'

"git -c credential.<var>=<value> submodule" can now be used to
propagate configuration variables related to credential helper
down to the submodules.

* jk/submodule-c-credential:
git_config_push_parameter: handle empty GIT_CONFIG_PARAMETERS
git: submodule honor -c credential.* from command line
quote: implement sq_quotef()
submodule: fix segmentation fault in submodule--helper clone
submodule: fix submodule--helper clone usage
submodule: check argc count for git submodule--helper clone
submodule: don't pass empty string arguments to submodule--helper clone

Merge branch 'jv/merge-nothing-into-void'Junio C Hamano Wed, 6 Apr 2016 18:39:11 +0000 (11:39 -0700)

Merge branch 'jv/merge-nothing-into-void'

"git merge FETCH_HEAD" dereferenced NULL pointer when merging
nothing into an unborn history (which is arguably unusual usage,
which perhaps was the reason why nobody noticed it).

* jv/merge-nothing-into-void:
merge: fix NULL pointer dereference when merging nothing into void

Merge branch 'ss/commit-squash-msg'Junio C Hamano Wed, 6 Apr 2016 18:39:10 +0000 (11:39 -0700)

Merge branch 'ss/commit-squash-msg'

When "git merge --squash" stopped due to conflict, the concluding
"git commit" failed to read in the SQUASH_MSG that shows the log
messages from all the squashed commits.

* ss/commit-squash-msg:
commit: do not lose SQUASH_MSG contents

Merge branch 'sb/rebase-x'Junio C Hamano Wed, 6 Apr 2016 18:39:09 +0000 (11:39 -0700)

Merge branch 'sb/rebase-x'

"git rebase -x" can be used without passing "-i" option.

* sb/rebase-x:
t3404: cleanup double empty lines between tests
rebase: decouple --exec from --interactive

Merge branch 'jk/test-httpd-config-nosystem'Junio C Hamano Wed, 6 Apr 2016 18:39:08 +0000 (11:39 -0700)

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

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 'jk/send-email-rtrim-mailrc-alias'Junio C Hamano Wed, 6 Apr 2016 18:39:07 +0000 (11:39 -0700)

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

"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 'jk/credential-cache-comment-exit'Junio C Hamano Wed, 6 Apr 2016 18:39:06 +0000 (11:39 -0700)

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

A code clarification.

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

Merge branch 'sb/clone-t57-t56'Junio C Hamano Wed, 6 Apr 2016 18:39:05 +0000 (11:39 -0700)

Merge branch 'sb/clone-t57-t56'

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

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

Merge branch 'ls/p4-map-user'Junio C Hamano Wed, 6 Apr 2016 18:39:05 +0000 (11:39 -0700)

Merge branch 'ls/p4-map-user'

"git p4" now allows P4 author names to be mapped to Git author
names.

* ls/p4-map-user:
git-p4: map a P4 user to Git author name and email address

Merge branch 'cc/doc-recommend-performance-trace-to... Junio C Hamano Wed, 6 Apr 2016 18:39:04 +0000 (11:39 -0700)

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

A minor documentation update.

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

Merge branch 'pb/t7502-drop-dup'Junio C Hamano Wed, 6 Apr 2016 18:39:03 +0000 (11:39 -0700)

Merge branch 'pb/t7502-drop-dup'

Code clean-up.

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

Merge branch 'da/mergetool-delete-delete-conflict'Junio C Hamano Wed, 6 Apr 2016 18:39:02 +0000 (11:39 -0700)

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

"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 'sb/submodule-parallel-update'Junio C Hamano Wed, 6 Apr 2016 18:39:01 +0000 (11:39 -0700)

Merge branch 'sb/submodule-parallel-update'

A major part of "git submodule update" has been ported to C to take
advantage of the recently added framework to run download tasks in
parallel.

* sb/submodule-parallel-update:
clone: allow an explicit argument for parallel submodule clones
submodule update: expose parallelism to the user
submodule helper: remove double 'fatal: ' prefix
git submodule update: have a dedicated helper for cloning
run_processes_parallel: rename parameters for the callbacks
run_processes_parallel: treat output of children as byte array
submodule update: direct error message to stderr
fetching submodules: respect `submodule.fetchJobs` config option
submodule-config: drop check against NULL
submodule-config: keep update strategy around

Merge branch 'ss/receive-pack-parse-options'Junio C Hamano Wed, 6 Apr 2016 18:38:59 +0000 (11:38 -0700)

Merge branch 'ss/receive-pack-parse-options'

The command line argument parser for "receive-pack" has been
rewritten to use parse-options.

* ss/receive-pack-parse-options:
builtin/receive-pack.c: use parse_options API

Merge branch 'ss/exc-flag-is-a-collection-of-bits'Junio C Hamano Wed, 6 Apr 2016 18:38:59 +0000 (11:38 -0700)

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

Code clean-up.

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

correct blame for files commited with CRLFTorsten Bögershausen Tue, 5 Apr 2016 19:23:54 +0000 (21:23 +0200)

correct blame for files commited with CRLF

git blame reports lines as not "Not Committed Yet" when they have
CRLF in the index, CRLF in the worktree and core.autocrlf is true.

Since commit c4805393 (autocrlf: Make it work also for un-normalized
repositories, 2010-05-12), files that have CRLF in the index are not
normalized at commit when core.autocrl is set.

Add a call to read_cache() early in fake_working_tree_commit(),
before calling convert_to_git().

Signed-off-by: Torsten Bögershausen <tboegi@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

completion: complete --cherry-mark for git logMichael J Gruber Tue, 5 Apr 2016 10:45:35 +0000 (12:45 +0200)

completion: complete --cherry-mark for git log

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

api-trace.txt: fix typoElia Pinto Tue, 5 Apr 2016 10:05:23 +0000 (10:05 +0000)

api-trace.txt: fix typo

The correct api is trace_printf_key(), not trace_print_key().

Also do not throw a random string at printf(3)-like function;
instead, feed it as a parameter that is fed to a "%s" conversion
specifier.

Signed-off-by: Elia Pinto <gitter.spiros@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Makefile: fix misdirected redirectionsJunio C Hamano Tue, 5 Apr 2016 07:02:14 +0000 (00:02 -0700)

Makefile: fix misdirected redirections

In general "echo 2>&1 $msg" to redirect a possible error message
that comes from 'echo' itself into the same standard output stream
$msg is getting written to does not make any sense; it is not like
we are expecting to see any errors out of 'echo' in these statements,
and even if it were the case, there is no reason to prevent the
error messages from being sent to the standard error stream.

These are clearly meant to send the argument given to echo to the
standard error stream as error messages. Correctly redirect by
saying "send what is written to the standard output to the standard
error", i.e. "1>&2" aka ">&2".

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

branch: fix shortening of non-remote symrefsJeff King Sun, 3 Apr 2016 04:14:26 +0000 (00:14 -0400)

branch: fix shortening of non-remote symrefs

Commit aedcb7d (branch.c: use 'ref-filter' APIs, 2015-09-23)
adjusted the symref-printing code to look like this:

if (item->symref) {
skip_prefix(item->symref, "refs/remotes/", &desc);
strbuf_addf(&out, " -> %s", desc);
}

This has three bugs in it:

1. It always skips past "refs/remotes/", instead of
skipping past the prefix associated with the branch we
are showing (so commonly we see "refs/remotes/" for the
refs/remotes/origin/HEAD symref, but the previous code
would skip "refs/heads/" when showing a symref it found
in refs/heads/.

2. If skip_prefix() does not match, it leaves "desc"
untouched, and we show whatever happened to be in it
(which is the refname from a call to skip_prefix()
earlier in the function).

3. If we do match with skip_prefix(), we stomp on the
"desc" variable, which is later passed to
add_verbose_info(). We probably want to retain the
original refname there (though it likely doesn't matter
in practice, since after all, one points to the other).

The fix to match the original code is fairly easy: record
the prefix to strip based on item->kind, and use it here.
However, since we already have a local variable named "prefix",
let's give the two prefixes verbose names so we don't
confuse them.

Signed-off-by: Jeff King <peff@peff.net>
Acked-by: Karthik Nayak <karthik.188@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

pretty: test --expand-tabsJunio C Hamano Mon, 4 Apr 2016 23:09:18 +0000 (16:09 -0700)

pretty: test --expand-tabs

The test prepares a simple commit with HT on its log message lines,
and makes sure that

- formats that should or should not expand tabs by default do or do
not expand tabs respectively,

- with explicit --expand-tabs=<N> and short-hands --expand-tabs
(equivalent to --expand-tabs=8) and --no-expand-tabs (equivalent
to --expand-tabs=0) before or after the explicit --pretty=$fmt,
the tabs are expanded (or not expanded) accordingly.

The tests use the second line of the log message for formats other
than --pretty=short, primarily because the first line of the email
format is handled specially to add the [PATCH] prefix, etc. in a
separate codepath (--pretty=short uses the first line because there
is no other line to test).

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

Windows: shorten code by re-using convert_slashes()Johannes Sixt Sat, 2 Apr 2016 19:03:14 +0000 (21:03 +0200)

Windows: shorten code by re-using convert_slashes()

Make a few more spots more readable by using the recently introduced,
Windows-specific helper.

Signed-off-by: Johannes Sixt <j6t@kdbg.org>
Acked-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

git-format-patch.txt: don't show -s as shorthand for... Eric Sunshine Sun, 27 Mar 2016 21:26:07 +0000 (17:26 -0400)

git-format-patch.txt: don't show -s as shorthand for multiple options

git-format-patch recognizes -s as shorthand only for --signoff, however,
its documentation shows -s as shorthand for both --signoff and
--no-patch. Resolve this confusion by suppressing the bogus -s shorthand
for --no-patch.

While here, also avoid showing the --no-patch option in git-format-patch
documentation since it doesn't make sense to ask to suppress the patch
while at the same time explicitly asking to format the patch (which,
after all, is the purpose of git-format-patch).

Reported-by: Kevin Brodsky <corax26@gmail.com>
Signed-off-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

branch -m: update all per-worktree HEADsKazuki Yamaguchi Sun, 27 Mar 2016 14:37:14 +0000 (23:37 +0900)

branch -m: update all per-worktree HEADs

When renaming a branch, currently only the HEAD of current working tree
is updated, but it must update HEADs of all working trees which point at
the old branch.

This is the current behavior, /path/to/wt's HEAD is not updated:

% git worktree list
/path/to 2c3c5f2 [master]
/path/to/wt 2c3c5f2 [oldname]
% git branch -m master master2
% git worktree list
/path/to 2c3c5f2 [master2]
/path/to/wt 2c3c5f2 [oldname]
% git branch -m oldname newname
% git worktree list
/path/to 2c3c5f2 [master2]
/path/to/wt 0000000 [oldname]

This patch fixes this issue by updating all relevant worktree HEADs
when renaming a branch.

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

refs: add a new function set_worktree_head_symrefKazuki Yamaguchi Sun, 27 Mar 2016 14:37:13 +0000 (23:37 +0900)

refs: add a new function set_worktree_head_symref

Add a new function set_worktree_head_symref, to update HEAD symref for
the specified worktree.

To update HEAD of a linked working tree,
create_symref("worktrees/$work_tree/HEAD", "refs/heads/$branch", msg)
could be used. However when it comes to updating HEAD of the main
working tree, it is unusable because it uses $GIT_DIR for
worktree-specific symrefs (HEAD).

The new function takes git_dir (real directory) as an argument, and
updates HEAD of the working tree. This function will be used when
renaming a branch.

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

t5520: test --[no-]autostash with pull.rebase=trueMehul Jain Sat, 2 Apr 2016 17:58:32 +0000 (23:28 +0530)

t5520: test --[no-]autostash with pull.rebase=true

The "--[no-]autostash" options for git-pull are only valid in
rebase mode (i.e. either --rebase is used or pull.rebase=true).
Existing tests already check the cases when --rebase is used but
fail to check for pull.rebase=true case.

Add two new tests to check that the --[no-]autostash options work
with pull.rebase=true.

Signed-off-by: Mehul Jain <mehul.jain2029@gmail.com>
Reviewed-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

t5520: reduce commom lines of codeMehul Jain Sat, 2 Apr 2016 17:58:31 +0000 (23:28 +0530)

t5520: reduce commom lines of code

These two tests are almost similar and thus can be folded in a for-loop.

Helped-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Mehul Jain <mehul.jain2029@gmail.com>
Reviewed-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

t5520: factor out common "failing autostash" codeMehul Jain Sat, 2 Apr 2016 17:58:30 +0000 (23:28 +0530)

t5520: factor out common "failing autostash" code

Three tests contains repetitive lines of code.

Factor out common code into test_pull_autostash_fail() and then call it in
these tests.

Helped-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Mehul Jain <mehul.jain2029@gmail.com>
Reviewed-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

t5520: factor out common "successful autostash" codeMehul Jain Sat, 2 Apr 2016 17:58:29 +0000 (23:28 +0530)

t5520: factor out common "successful autostash" code

Four tests contains repetitive lines of code.

Factor out common code into test_pull_autostash() and then call it in
these tests.

Helped-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Mehul Jain <mehul.jain2029@gmail.com>
Reviewed-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

t5520: use better test to check stderr outputMehul Jain Sat, 2 Apr 2016 17:58:28 +0000 (23:28 +0530)

t5520: use better test to check stderr output

Checking stderr output using test_i18ncmp may lead to test failure as
some shells write trace output to stderr when run under 'set -x'.

Use test_i18ngrep instead of test_i18ncmp.

Signed-off-by: Mehul Jain <mehul.jain2029@gmail.com>
Reviewed-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

t5520: ensure consistent test conditionsMehul Jain Sat, 2 Apr 2016 17:58:27 +0000 (23:28 +0530)

t5520: ensure consistent test conditions

Test title says that tests are done with rebase.autostash unset,
but does not take any action to make sure that it is indeed unset.
This may lead to test failure if future changes somehow pollutes
the configuration globally.

Ensure consistent test conditions by explicitly unsetting
rebase.autostash.

Signed-off-by: Mehul Jain <mehul.jain2029@gmail.com>
Reviewed-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

t5520: use consistent capitalization in test titlesMehul Jain Sat, 2 Apr 2016 17:58:26 +0000 (23:28 +0530)

t5520: use consistent capitalization in test titles

Signed-off-by: Mehul Jain <mehul.jain2029@gmail.com>
Reviewed-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

mergetools: add support for ExamDiffJacob Nisnevich Fri, 25 Mar 2016 23:17:57 +0000 (16:17 -0700)

mergetools: add support for ExamDiff

Signed-off-by: Jacob Nisnevich <jacob.nisnevich@gmail.com>
Acked-by: David Aguilar <davvid@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

mergetools: create mergetool_find_win32_cmd() helper... Jacob Nisnevich Fri, 25 Mar 2016 23:17:56 +0000 (16:17 -0700)

mergetools: create mergetool_find_win32_cmd() helper function for winmerge

Signed-off-by: Jacob Nisnevich <jacob.nisnevich@gmail.com>
Acked-by: David Aguilar <davvid@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

First batch for post 2.8 cycleJunio C Hamano Sun, 3 Apr 2016 17:55:36 +0000 (10:55 -0700)

First batch for post 2.8 cycle

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

Sync with Git 2.8.1Junio C Hamano Sun, 3 Apr 2016 17:54:38 +0000 (10:54 -0700)

Sync with Git 2.8.1

Merge branch 'jk/startup-info'Junio C Hamano Sun, 3 Apr 2016 17:29:35 +0000 (10:29 -0700)

Merge branch 'jk/startup-info'

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 'es/test-gpg-tags'Junio C Hamano Sun, 3 Apr 2016 17:29:35 +0000 (10:29 -0700)

Merge branch 'es/test-gpg-tags'

A test for tags has been restructured so that more parts of it can
easily be run on a platform without a working GnuPG.

* es/test-gpg-tags:
t6302: skip only signed tags rather than all tests when GPG is missing
t6302: also test annotated in addition to signed tags
t6302: normalize names and descriptions of signed tags
lib-gpg: drop unnecessary "missing GPG" warning

Merge branch 'jk/getwholeline-getdelim-empty'Junio C Hamano Sun, 3 Apr 2016 17:29:34 +0000 (10:29 -0700)

Merge branch 'jk/getwholeline-getdelim-empty'

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-codepath'Junio C Hamano Sun, 3 Apr 2016 17:29:33 +0000 (10:29 -0700)

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

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 'jc/index-pack'Junio C Hamano Sun, 3 Apr 2016 17:29:31 +0000 (10:29 -0700)

Merge branch 'jc/index-pack'

Code clean-up.

* jc/index-pack:
index-pack: add a helper function to derive .idx/.keep filename

Merge branch 'gf/fetch-pack-direct-object-fetch'Junio C Hamano Sun, 3 Apr 2016 17:29:29 +0000 (10:29 -0700)

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

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 'jc/maint-index-pack-keep'Junio C Hamano Sun, 3 Apr 2016 17:29:29 +0000 (10:29 -0700)

Merge branch 'jc/maint-index-pack-keep'

"git index-pack --keep[=<msg>] pack-$name.pack" simply did not work.

* jc/maint-index-pack-keep:
index-pack: correct --keep[=<msg>]

Merge branch 'mm/lockfile-error-message'Junio C Hamano Sun, 3 Apr 2016 17:29:27 +0000 (10:29 -0700)

Merge branch 'mm/lockfile-error-message'

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

Merge branch 'jk/rev-parse-local-env-vars'Junio C Hamano Sun, 3 Apr 2016 17:29:26 +0000 (10:29 -0700)

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

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'Junio C Hamano Sun, 3 Apr 2016 17:29:26 +0000 (10:29 -0700)

Merge branch 'jk/config-get-urlmatch'

"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 'jk/add-i-highlight'Junio C Hamano Sun, 3 Apr 2016 17:29:25 +0000 (10:29 -0700)

Merge branch 'jk/add-i-highlight'

* jk/add-i-highlight:
add--interactive: allow custom diff highlighting programs

Merge branch 'jk/credential-clear-config'Junio C Hamano Sun, 3 Apr 2016 17:29:24 +0000 (10:29 -0700)

Merge branch 'jk/credential-clear-config'

The credential.helper configuration variable is cumulative and
there is no good way to override it from the command line. As
a special case, giving an empty string as its value now serves
as the signal to clear the values specified in various files.

* jk/credential-clear-config:
credential: let empty credential specs reset helper list

Merge branch 'mp/upload-pack-use-embedded-args'Junio C Hamano Sun, 3 Apr 2016 17:29:23 +0000 (10:29 -0700)

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

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 'mm/diff-renames-default'Junio C Hamano Sun, 3 Apr 2016 17:29:22 +0000 (10:29 -0700)

Merge branch 'mm/diff-renames-default'

The end-user facing Porcelain level commands like "diff" and "log"
now enables the rename detection by default.

* mm/diff-renames-default:
diff: activate diff.renames by default
log: introduce init_log_defaults()
t: add tests for diff.renames (true/false/unset)
t4001-diff-rename: wrap file creations in a test
Documentation/diff-config: fix description of diff.renames

Merge branch 'mm/readme-markdown'Junio C Hamano Sun, 3 Apr 2016 17:27:22 +0000 (10:27 -0700)

Merge branch 'mm/readme-markdown'

Fix a few broken links in README.md and also teach rpmbuild
that there is no README.

* mm/readme-markdown:
README.md: don't take 'commandname' literally
git.spec.in: use README.md, not README

Git 2.8.1 v2.8.1Junio C Hamano Sun, 3 Apr 2016 17:11:35 +0000 (10:11 -0700)

Git 2.8.1

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

Merge branch 'mm/readme-markdown' into maintJunio C Hamano Sun, 3 Apr 2016 17:13:09 +0000 (10:13 -0700)

Merge branch 'mm/readme-markdown' into maint

* 'mm/readme-markdown':
git.spec.in: use README.md, not README

README.md: don't take 'commandname' literallyMatthieu Moy Sat, 27 Feb 2016 10:46:12 +0000 (11:46 +0100)

README.md: don't take 'commandname' literally

The link to Documentation/git-commandname.txt was obviously broken.
Remove the link and make it clear that it is not a literal path name by
using *italics* in makdown.

Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

git.spec.in: use README.md, not READMEMatthieu Moy Fri, 1 Apr 2016 07:10:51 +0000 (09:10 +0200)

git.spec.in: use README.md, not README

The file was renamed in 4ad21f5 (README: use markdown syntax,
2016-02-25), but that commit forgot to update git.spec.in, which
caused the rpmbuild target in the Makefile to fail.

Reported-by: Ron Isaacson <isaacson.ljits@gmail.com>
Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

submodule--helper, module_clone: catch fprintf failureStefan Beller Fri, 1 Apr 2016 00:17:29 +0000 (17:17 -0700)

submodule--helper, module_clone: catch fprintf failure

The return value of fprintf is unchecked, which may lead to
unreported errors. Use fprintf_or_die to report the error to the user.

Signed-off-by: Stefan Beller <sbeller@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

submodule--helper: do not borrow absolute_path() result... Junio C Hamano Fri, 1 Apr 2016 19:23:16 +0000 (12:23 -0700)

submodule--helper: do not borrow absolute_path() result for too long

absolute_path() is designed to allow its callers to take a brief
peek of the result (typically, to be fed to functions like
strbuf_add() and relative_path() as a parameter) without having to
worry about freeing it, but the other side of the coin of that
memory model is that the caller shouldn't rely too much on the
result living forever--there may be a helper function the caller
subsequently calls that makes its own call to absolute_path(),
invalidating the earlier result.

Use xstrdup() to make our own copy, and free(3) it when we are done.
While at it, remove an unnecessary sm_gitdir_rel variable that was
only used to as a parameter to call absolute_path() and never used
again.

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

submodule--helper, module_clone: always operate on... Stefan Beller Fri, 1 Apr 2016 00:17:28 +0000 (17:17 -0700)

submodule--helper, module_clone: always operate on absolute paths

When giving relative paths to `relative_path` to compute a relative path
from one directory to another, this may fail in `relative_path`.
Make sure both arguments to `relative_path` are always absolute.

Signed-off-by: Stefan Beller <sbeller@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

credential-cache, send_request: close fd when doneStefan Beller Fri, 1 Apr 2016 00:35:46 +0000 (17:35 -0700)

credential-cache, send_request: close fd when done

No need to keep it open any further.

Signed-off-by: Stefan Beller <sbeller@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>