Commit graph

42727 commits

Author SHA1 Message Date
Junio C Hamano d689301043 Merge branch 'jk/push-client-deadlock-fix'
"git push" from a corrupt repository that attempts to push a large
number of refs deadlocked; the thread to relay rejection notices
for these ref updates blocked on writing them to the main thread,
after the main thread at the receiving end notices that the push
failed and decides not to read these notices and return a failure.

* jk/push-client-deadlock-fix:
  t5504: drop sigpipe=ok from push tests
  fetch-pack: isolate sigpipe in demuxer thread
  send-pack: isolate sigpipe in demuxer thread
  run-command: teach async threads to ignore SIGPIPE
  send-pack: close demux pipe before finishing async process
2016-04-29 12:59:08 -07:00
Junio C Hamano 60b3e9b959 Merge branch 'js/replace-edit-use-editor-configuration'
"git replace -e" did not honour "core.editor" configuration.

* js/replace-edit-use-editor-configuration:
  replace --edit: respect core.editor
2016-04-29 12:59:07 -07:00
Junio C Hamano 9cb50a3ca6 Merge branch 'sb/mv-submodule-fix'
"git mv old new" did not adjust the path for a submodule that lives
as a subdirectory inside old/ directory correctly.

* sb/mv-submodule-fix:
  mv: allow moving nested submodules
2016-04-29 12:59:07 -07:00
Junio C Hamano e0b5851907 Merge branch 'nd/test-helpers'
Sources to many test helper binaries (and the generated helpers)
have been moved to t/helper/ subdirectory to reduce clutter at the
top level of the tree.

* nd/test-helpers:
  test helpers: move test-* to t/helper/ subdirectory
  Makefile: clean *.o files we create
2016-04-29 12:59:06 -07:00
Junio C Hamano e7e6826514 Merge branch 'da/user-useconfigonly'
The "user.useConfigOnly" configuration variable makes it an error
if users do not explicitly set user.name and user.email.  However,
its check was not done early enough and allowed another error to
trigger, reporting that the default value we guessed from the
system setting was unusable.  This was a suboptimal end-user
experience as we want the users to set user.name/user.email without
relying on the auto-detection at all.

* da/user-useconfigonly:
  ident: give "please tell me" message upon useConfigOnly error
  ident: check for useConfigOnly before auto-detection of name/email
2016-04-29 12:59:06 -07:00
Junio C Hamano 3ad15fd5e1 Sync with maint
* maint:
  l10n: fr: don't translate "merge" as a parameter
  l10n: fr: change "id de clé" to match "id-clé"
  l10n: fr: fix wrongly translated option name
  l10n: fr: fix transcation of "dir"
2016-04-25 15:18:41 -07:00
Junio C Hamano e1f0df79a8 Seventh batch for post 2.8 cycle
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-04-25 15:18:35 -07:00
Junio C Hamano 6a0f105a21 Merge branch 'sb/submodule-path-misc-bugs'
"git submodule" reports the paths of submodules the command
recurses into, but this was incorrect when the command was not run
from the root level of the superproject.

* sb/submodule-path-misc-bugs:
  t7407: make expectation as clear as possible
  submodule update: test recursive path reporting from subdirectory
  submodule update: align reporting path for custom command execution
  submodule status: correct path handling in recursive submodules
  submodule update --init: correct path handling in recursive submodules
  submodule foreach: correct path display in recursive submodules
2016-04-25 15:17:16 -07:00
Junio C Hamano f276cae187 Merge branch 'en/merge-trivial-fix'
When "git merge" notices that the merge can be resolved purely at
the tree level (without having to merge blobs) and the resulting
tree happens to already exist in the object store, it forgot to
update the index, which lead to an inconsistent state for later
operations.

* en/merge-trivial-fix:
  builtin/merge.c: fix a bug with trivial merges
  t7605: add a testcase demonstrating a bug with trivial merges
2016-04-25 15:17:15 -07:00
Junio C Hamano 9058b8f043 Merge branch 'en/merge-octopus-fix'
"merge-octopus" strategy did not ensure that the index is clean
when merge begins.

* en/merge-octopus-fix:
  merge-octopus: abort if index does not match HEAD
  t6044: new merge testcases for when index doesn't match HEAD
2016-04-25 15:17:15 -07:00
Junio C Hamano edc2f715bd Merge branch 'dt/pre-refs-backend'
Code restructuring around the "refs" area to prepare for pluggable
refs backends.

* dt/pre-refs-backend: (24 commits)
  refs: on symref reflog expire, lock symref not referrent
  refs: move resolve_ref_unsafe into common code
  show_head_ref(): check the result of resolve_ref_namespace()
  check_aliased_update(): check that dst_name is non-NULL
  checkout_paths(): remove unneeded flag variable
  cmd_merge(): remove unneeded flag variable
  fsck_head_link(): remove unneeded flag variable
  read_raw_ref(): change flags parameter to unsigned int
  files-backend: inline resolve_ref_1() into resolve_ref_unsafe()
  read_raw_ref(): manage own scratch space
  files-backend: break out ref reading
  resolve_ref_1(): eliminate local variable "bad_name"
  resolve_ref_1(): reorder code
  resolve_ref_1(): eliminate local variable
  resolve_ref_unsafe(): ensure flags is always set
  resolve_ref_unsafe(): use for loop to count up to MAXDEPTH
  resolve_missing_loose_ref(): simplify semantics
  t1430: improve test coverage of deletion of badly-named refs
  t1430: test for-each-ref in the presence of badly-named refs
  t1430: don't rely on symbolic-ref for creating broken symrefs
  ...
2016-04-25 15:17:15 -07:00
Junio C Hamano 5b715ec48f Merge branch 'jc/rerere-multi'
"git rerere" can encounter two or more files with the same conflict
signature that have to be resolved in different ways, but there was
no way to record these separate resolutions.

* jc/rerere-multi:
  rerere: adjust 'forget' to multi-variant world order
  rerere: split code to call ll_merge() further
  rerere: move code related to "forget" together
  rerere: gc and clear
  rerere: do use multiple variants
  t4200: rerere a merge with two identical conflicts
  rerere: allow multiple variants to exist
  rerere: delay the recording of preimage
  rerere: handle leftover rr-cache/$ID directory and postimage files
  rerere: scan $GIT_DIR/rr-cache/$ID when instantiating a rerere_id
  rerere: split conflict ID further
2016-04-25 15:17:15 -07:00
Junio C Hamano 625efa9dec l10n-2.8.0-rnd3-fr
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJXHL5eAAoJEMek6Rt1RHoou9QP/0GgI8fbrRmSgXv7tVB3mG/Q
 hyboK/lLll2uVioIQjXnkHkp3Q7k9dl/MPVJDaPZ0chogxs078YwumWGFFbB4+DU
 lkuAQAQr4mGVflgzwBhKZ2GwaZvWuBZFlFWPLj1Z2T1s2q8VBy87oajh/Q4G7yv1
 lEdbde0sZk7tvmgm5iHLQkzg/ihtiEikbm/ivnUR5KSngc6OrlkWokYVojSIt2nT
 lAbBx/16XGC4hI9uqnEB/t5hhaf+tzDbW9ZwJkYLj5cXV4gQgWaAnAr1jp9n5IDb
 51AjZKB+bYyjCmpAJb2M1RxElVB+O5R7IBqlN5U3OY8pN4Web4XxMMl21aFwIbeX
 hsRkL3CFxZ/GFAgQ6HH/jS12QRLh9L7EGsxIr+IXtS+6OX7nSTh/d/ofAfBIyw3b
 CfVjBEZ4uCLSwisRvjLrS1WE5izgTQQkmz+n2iiLX2bxsGTnQ8OsdLbqz14Q6uuF
 ut4iJLHxWYHQffWT2dB1i535LpfUkQGW9M5NJL8XhSUY9gCZgRz5hrD6D0ZwC4S9
 A32TfqDIHflrdD1HCNq64Du6aBGEguKVSy7UNO928FNqydR6tI2E1ymqPIpit8rw
 bRVa1Gw4kWdat9SNweyeIXE5DUqtwfwCjptICkGl2UfPFs9l8lpUpw8Um4JlfjSd
 fTDwGhYKqLOFFazZMLcP
 =Ho/5
 -----END PGP SIGNATURE-----

Merge tag 'l10n-2.8.0-rnd3-fr' of git://github.com/git-l10n/git-po into maint

l10n-2.8.0-rnd3-fr

* tag 'l10n-2.8.0-rnd3-fr' of git://github.com/git-l10n/git-po:
  l10n: fr: don't translate "merge" as a parameter
  l10n: fr: change "id de clé" to match "id-clé"
  l10n: fr: fix wrongly translated option name
  l10n: fr: fix transcation of "dir"
2016-04-25 13:36:26 -07:00
Jiang Xin 2ee0fca122 Merge branch 'fr_v2.8.0_r3' of git://github.com/jnavila/git into maint
* 'fr_v2.8.0_r3' of git://github.com/jnavila/git:
  l10n: fr: don't translate "merge" as a parameter
  l10n: fr: change "id de clé" to match "id-clé"
  l10n: fr: fix wrongly translated option name
  l10n: fr: fix transcation of "dir"
2016-04-24 20:36:34 +08:00
Junio C Hamano a0c4ddf677 Sixth batch for post 2.8 cycle
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-04-22 15:48:03 -07:00
Junio C Hamano 66a80c333e Merge branch 'ad/cygwin-wants-rename'
On Cygwin, object creation uses the "create a temporary and then
rename it to the final name" pattern, not "create a temporary,
hardlink it to the final name and then unlink the temporary"
pattern.

This is necessary to use Git on Windows shared directories, and is
already enabled for the MinGW and plain Windows builds.  It also
has been used in Cygwin packaged versions of Git for quite a while.
See http://thread.gmane.org/gmane.comp.version-control.git/291853

($gmane/275680, $gmane/291853).

* ad/cygwin-wants-rename:
  config.mak.uname: Cygwin needs OBJECT_CREATION_USES_RENAMES
2016-04-22 15:45:10 -07:00
Junio C Hamano 2416803b6c Merge branch 'jk/use-write-script-more'
Code clean-up.

* jk/use-write-script-more:
  t3404: use write_script
  t1020: do not overuse printf and use write_script
  t5532: use write_script
2016-04-22 15:45:09 -07:00
Junio C Hamano fd9b37cfde Merge branch 'jk/do-not-printf-NULL'
"git config" had a codepath that tried to pass a NULL to
printf("%s"), which nobody seems to have noticed.

* jk/do-not-printf-NULL:
  git_config_set_multivar_in_file: handle "unset" errors
  git_config_set_multivar_in_file: all non-zero returns are errors
  config: lower-case first word of error strings
2016-04-22 15:45:09 -07:00
Junio C Hamano 1c4f476900 Merge branch 'jc/http-socks5h'
The socks5:// proxy support added back in 2.6.4 days was not aware
that socks5h:// proxies behave differently.

* jc/http-socks5h:
  http: differentiate socks5:// and socks5h://
2016-04-22 15:45:09 -07:00
Junio C Hamano 33e4ec89d9 Merge branch 'ky/imap-send-openssl-1.1.0'
Upcoming OpenSSL 1.1.0 will break compilation b updating a few APIs
we use in imap-send, which has been adjusted for the change.

* ky/imap-send-openssl-1.1.0:
  configure: remove checking for HMAC_CTX_cleanup
  imap-send: avoid deprecated TLSv1_method()
  imap-send: check NULL return of SSL_CTX_new()
  imap-send: use HMAC() function provided by OpenSSL
2016-04-22 15:45:08 -07:00
Junio C Hamano 886c76d021 Merge branch 'ky/imap-send'
Support for CRAM-MD5 authentication method in "git imap-send" did
not work well.

* ky/imap-send:
  imap-send: fix CRAM-MD5 response calculation
  imap-send: check for NOLOGIN capability only when using LOGIN command
2016-04-22 15:45:08 -07:00
Junio C Hamano 3f80d16c1c Merge branch 'jc/xstrfmt-null-with-prec-0'
* jc/xstrfmt-null-with-prec-0:
  setup.c: do not feed NULL to "%.*s" even with precision 0
2016-04-22 15:45:08 -07:00
Junio C Hamano 0709261a83 Merge branch 'ad/commit-have-m-option'
"git commit" misbehaved in a few minor ways when an empty message
is given via -m '', all of which has been corrected.

* ad/commit-have-m-option:
  commit: do not ignore an empty message given by -m ''
  commit: --amend -m '' silently fails to wipe message
2016-04-22 15:45:07 -07:00
Junio C Hamano 56b5a915e9 Merge branch 'ew/send-email-drop-data-dumper'
Code clean-up.

* ew/send-email-drop-data-dumper:
  send-email: do not load Data::Dumper
2016-04-22 15:45:06 -07:00
Junio C Hamano 18dff3dde5 Merge branch 'ew/send-email-readable-message-id'
"git send-email" now uses a more readable timestamps when
formulating a message ID.

* ew/send-email-readable-message-id:
  send-email: more meaningful Message-ID
2016-04-22 15:45:05 -07:00
Junio C Hamano deef3cdc08 Merge branch 'sb/submodule-helper-clone-regression-fix'
A partial rewrite of "git submodule" in the 2.7 timeframe changed
the way the gitdir: pointer in the submodules point at the real
repository location to use absolute paths by accident.  This has
been corrected.

* sb/submodule-helper-clone-regression-fix:
  submodule--helper, module_clone: catch fprintf failure
  submodule--helper: do not borrow absolute_path() result for too long
  submodule--helper, module_clone: always operate on absolute paths
  submodule--helper clone: create the submodule path just once
  submodule--helper: fix potential NULL-dereference
  recursive submodules: test for relative paths
2016-04-22 15:45:04 -07:00
Jeff King c4b27511ab t5504: drop sigpipe=ok from push tests
These were added by 8bf4bec (add "ok=sigpipe" to
test_must_fail and use it to fix flaky tests, 2015-11-27)
because we would racily die via SIGPIPE when the pack was
rejected by the other side.

But since we have recently de-flaked send-pack, we should be
able to tighten up these tests (including re-adding the
expected output checks).

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-04-20 13:33:59 -07:00
Jeff King df85757244 fetch-pack: isolate sigpipe in demuxer thread
In commit 9ff18fa (fetch-pack: ignore SIGPIPE in sideband
demuxer, 2016-02-24), we started using sigchain_push() to
ignore SIGPIPE in the async demuxer thread. However, this is
rather clumsy, as it ignores SIGPIPE for the entire process,
including the main thread. At the time we didn't have any
per-thread signal support, but we now we do. Let's use it.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-04-20 13:33:56 -07:00
Jeff King 3e8b06d09c send-pack: isolate sigpipe in demuxer thread
If we get an error from pack-objects, we may exit
send_pack() early, before reading the server's status
response. In such a case, we may racily see SIGPIPE from our
async demuxer (which is trying to write that status back to
us), and we'd prefer to continue pushing the error up the
call stack, rather than taking down the whole process with
signal death.

This is safe to do because our demuxer just calls
recv_sideband, whose data writes are all done with
write_or_die(), which will notice SIGPIPE.

We do also write sideband 2 to stderr, and we would no
longer die on SIGPIPE there (if it were piped in the first
place, and if the piped program went away). But that's
probably a good thing, as it likewise should not abort the
push process at all (neither immediately by signal, nor
eventually by reporting failure back to the main thread).

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-04-20 13:33:53 -07:00
Jeff King c792d7b6ce run-command: teach async threads to ignore SIGPIPE
Async processes can be implemented as separate forked
processes, or as threads (depending on the NO_PTHREADS
setting). In the latter case, if an async thread gets
SIGPIPE, it takes down the whole process. This is obviously
bad if the main process was not otherwise going to die, but
even if we were going to die, it means the main process does
not have a chance to report a useful error message.

There's also the small matter that forked async processes
will not take the main process down on a signal, meaning git
will behave differently depending on the NO_PTHREADS
setting.

This patch fixes it by adding a new flag to "struct async"
to block SIGPIPE just in the async thread. In theory, this
should always be on (which makes async threads behave more
like async processes), but we would first want to make sure
that each async process we spawn is careful about checking
return codes from write() and would not spew endlessly into
a dead pipe. So let's start with it as optional, and we can
enable it for specific sites in future patches.

The natural name for this option would be "ignore_sigpipe",
since that's what it does for the threaded case. But since
that name might imply that we are ignoring it in all cases
(including the separate-process one), let's call it
"isolate_sigpipe". What we are really asking for is
isolation. I.e., not to have our main process taken down by
signals spawned by the async process. How that is
implemented is up to the run-command code.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-04-20 13:33:53 -07:00
Jeff King 739cf49161 send-pack: close demux pipe before finishing async process
This fixes a deadlock on the client side when pushing a
large number of refs from a corrupted repo.  There's a
reproduction script below, but let's start with a
human-readable explanation.

The client side of a push goes something like this:

  1. Start an async process to demux sideband coming from
     the server.

  2. Run pack-objects to send the actual pack, and wait for
     its status via finish_command().

  3. If pack-objects failed, abort immediately.

  4. If pack-objects succeeded, read the per-ref status from
     the server, which is actually coming over a pipe from
     the demux process started in step 1.

We run finish_async() to wait for and clean up the demux
process in two places. In step 3, if we see an error, we
want it to end early. And after step 4, it should be done
writing any data and we are just cleaning it up.

Let's focus on the error case first. We hand the output
descriptor to the server over to pack-objects. So by the
time it has returned an error to us, it has closed the
descriptor and the server has gotten EOF. The server will
mark all refs as failed with "unpacker error" and send us
back the status for each (followed by EOF).

This status goes to the demuxer thread, which relays it over
a pipe to the main thread. But the main thread never even
tries reading the status. It's trying to bail because of the
pack-objects error, and is waiting for the demuxer thread to
finish. If there are a small number of refs, that's OK; the
demuxer thread writes into the pipe buffer, sees EOF from
the server, and quits. But if there are a large number of
refs, it may block on write() back to the main thread,
leading to a deadlock (the main thread is waiting for the
demuxer to finish, the demuxer is waiting for the main
thread to read).

We can break this deadlock by closing the pipe between the
demuxer and the main thread before calling finish_async().
Then the demuxer gets a write() error and exits.

The non-error case usually just works, because we will have
read all of the data from the other side. We do close
demux.out already, but we only do so _after_ calling
finish_async(). This is OK because there shouldn't be any
more data coming from the server. But technically we've only
read to a flush packet, and a broken or malicious server
could be sending more cruft. In such a case, we would hit
the same deadlock. Closing the pipe first doesn't affect the
normal case, and means that for a cruft-sending server,
we'll notice a write() error rather than deadlocking.

Note that when write() sees this error, we'll actually
deliver SIGPIPE to the thread, which will take down the
whole process (unless we're compiled with NO_PTHREADS). This
isn't ideal, but it's an improvement over the status quo,
which is deadlocking. And SIGPIPE handling in async threads
is a bigger problem that we can deal with separately.

A simple reproduction for the error case is below. It's
technically racy (we could exit the main process and take
down the async thread with us before it even reads the
status), though in practice it seems to fail pretty
consistently.

    git init repo &&
    cd repo &&

    # make some commits; we need two so we can simulate corruption
    # in the history later.
    git commit --allow-empty -m one &&
    one=$(git rev-parse HEAD) &&
    git commit --allow-empty -m two &&
    two=$(git rev-parse HEAD) &&

    # now make a ton of refs; our goal here is to overflow the pipe buffer
    # when reporting the ref status, which will cause the demuxer to block
    # on write()
    for i in $(seq 20000); do
    	echo "create refs/heads/this-is-a-really-long-branch-name-$i $two"
    done |
    git update-ref --stdin &&

    # now make a corruption in the history such that pack-objects will fail
    rm -vf .git/objects/$(echo $one | sed 's}..}&/}') &&

    # and then push the result
    git init --bare dst.git &&
    git push --mirror dst.git

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-04-20 13:33:53 -07:00
Johannes Schindelin 36b14370db replace --edit: respect core.editor
We simply need to read the config, is all.

This fixes https://github.com/git-for-windows/git/issues/733

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-04-20 09:11:36 -07:00
Stefan Beller a127331cd8 mv: allow moving nested submodules
When directories are moved using `git mv` all files in the directory
have been just moved, but no further action was taken on them. This
was done by assigning the mode = WORKING_DIRECTORY to the files
inside a moved directory.

submodules however need to update their link to the git directory as
well as updates to the .gitmodules file. By removing the condition of
`mode != INDEX` (the remaining modes are BOTH and WORKING_DIRECTORY) for
the required submodule actions, we perform these for submodules in a
moved directory.

Signed-off-by: Stefan Beller <sbeller@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-04-19 11:54:50 -07:00
Junio C Hamano e6ac6e1f7d Fifth batch for post 2.8 cycle
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-04-18 10:51:09 -07:00
Junio C Hamano f5cc612916 Merge branch 'jk/branch-shortening-funny-symrefs'
A change back in version 2.7 to "git branch" broke display of a
symbolic ref in a non-standard place in the refs/ hierarchy (we
expect symbolic refs to appear in refs/remotes/*/HEAD to point at
the primary branch the remote has, and as .git/HEAD to point at the
branch we locally checked out).

* jk/branch-shortening-funny-symrefs:
  branch: fix shortening of non-remote symrefs
2016-04-18 10:49:14 -07:00
Junio C Hamano 741a6942eb Merge branch 'ky/branch-m-worktree'
When "git worktree" feature is in use, "git branch -m" renamed a
branch that is checked out in another worktree without adjusting
the HEAD symbolic ref for the worktree.

* ky/branch-m-worktree:
  set_worktree_head_symref(): fix error message
  branch -m: update all per-worktree HEADs
  refs: add a new function set_worktree_head_symref
2016-04-18 10:48:11 -07:00
Nguyễn Thái Ngọc Duy e6e7530d10 test helpers: move test-* to t/helper/ subdirectory
This keeps top dir a bit less crowded. And because these programs are
for testing purposes, it makes sense that they stay somewhere in t/

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-04-15 10:12:19 -07:00
Junio C Hamano 7897d84b82 Makefile: clean *.o files we create
The part that removes object files in the 'clean' target predates
various Makefile macros that list object files we create, and
instead removes the objects with shell glob, perpetually requiring
updates whenever a new location that builds object files is added.

Simplify the target by removing $(OBJECTS), which is supposed to
have all the objects we create during the build.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-04-15 10:07:35 -07:00
Junio C Hamano b8b4d93100 Merge branch 'maint'
* maint:
  Prepare for 2.8.2
  Start preparing for 2.8.2
2016-04-14 18:59:09 -07:00
Junio C Hamano 6a6636270f Prepare for 2.8.2
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-04-14 18:58:11 -07:00
Junio C Hamano a5953f6818 Merge branch 'jv/merge-nothing-into-void' into maint
"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
2016-04-14 18:57:49 -07:00
Junio C Hamano ea7fefbd7b Merge branch 'ss/commit-squash-msg' into maint
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
2016-04-14 18:57:48 -07:00
Junio C Hamano 8cad7fcfbc Merge branch 'jk/send-email-rtrim-mailrc-alias' into maint
"git send-email" had trouble parsing alias file in mailrc format
when lines in it had trailing whitespaces on them.

* jk/send-email-rtrim-mailrc-alias:
  send-email: ignore trailing whitespace in mailrc alias file
2016-04-14 18:57:47 -07:00
Junio C Hamano 517736ffcf Merge branch 'da/mergetool-delete-delete-conflict' into maint
"git mergetool" did not work well with conflicts that both sides
deleted.

* da/mergetool-delete-delete-conflict:
  mergetool: honor tempfile configuration when resolving delete conflicts
  mergetool: support delete/delete conflicts
2016-04-14 18:57:47 -07:00
Junio C Hamano 237e6db5c0 Merge branch 'jk/startup-info' into maint
The startup_info data, which records if we are working inside a
repository (among other things), are now uniformly available to Git
subcommand implementations, and Git avoids attempting to touch
references when we are not in a repository.

* jk/startup-info:
  use setup_git_directory() in test-* programs
  grep: turn off gitlink detection for --no-index
  mailmap: do not resolve blobs in a non-repository
  remote: don't resolve HEAD in non-repository
  setup: set startup_info->have_repository more reliably
  setup: make startup_info available everywhere
2016-04-14 18:57:46 -07:00
Junio C Hamano f55f97cb33 Merge branch 'jk/getwholeline-getdelim-empty' into maint
strbuf_getwholeline() did not NUL-terminate the buffer on certain
corner cases in its error codepath.

* jk/getwholeline-getdelim-empty:
  strbuf_getwholeline: NUL-terminate getdelim buffer on error
2016-04-14 18:57:46 -07:00
Junio C Hamano 183ecc3e49 Merge branch 'rj/xdiff-prepare-plug-leak-on-error-codepath' into maint
A small memory leak in an error codepath has been plugged in xdiff
code.

* rj/xdiff-prepare-plug-leak-on-error-codepath:
  xdiff/xprepare: fix a memory leak
  xdiff/xprepare: use the XDF_DIFF_ALG() macro to access flag bits
2016-04-14 18:57:46 -07:00
Junio C Hamano dc66371cdf Merge branch 'gf/fetch-pack-direct-object-fetch' into maint
Fetching of history by naming a commit object name directly didn't
work across remote-curl transport.

* gf/fetch-pack-direct-object-fetch:
  fetch-pack: update the documentation for "<refs>..." arguments
  fetch-pack: fix object_id of exact sha1
2016-04-14 18:57:44 -07:00
Junio C Hamano 7488c2f65a Merge branch 'jk/rev-parse-local-env-vars' into maint
The "--local-env-vars" and "--resolve-git-dir" options of "git
rev-parse" failed to work outside a repository when the command's
option parsing was rewritten in 1.8.5 era.

* jk/rev-parse-local-env-vars:
  rev-parse: let some options run outside repository
  t1515: add tests for rev-parse out-of-repo helpers
2016-04-14 18:57:44 -07:00
Junio C Hamano 0759dfdd9c Merge branch 'jk/config-get-urlmatch' into maint
"git config --get-urlmatch", unlike other variants of the "git
config --get" family, did not signal error with its exit status
when there was no matching configuration.

* jk/config-get-urlmatch:
  Documentation/git-config: fix --get-all description
  Documentation/git-config: use bulleted list for exit codes
  config: fail if --get-urlmatch finds no value
2016-04-14 18:57:43 -07:00