OSDN Git Service

git-core/git.git
7 years agoMerge branch 'sb/in-core-index-doc'
Junio C Hamano [Tue, 31 Jan 2017 21:14:59 +0000 (13:14 -0800)]
Merge branch 'sb/in-core-index-doc'

Documentation and in-code comments updates.

* sb/in-core-index-doc:
  documentation: retire unfinished documentation
  cache.h: document add_[file_]to_index
  cache.h: document remove_index_entry_at
  cache.h: document index_name_pos

7 years agoMerge branch 'js/remote-rename-with-half-configured-remote'
Junio C Hamano [Tue, 31 Jan 2017 21:14:59 +0000 (13:14 -0800)]
Merge branch 'js/remote-rename-with-half-configured-remote'

With anticipatory tweaking for remotes defined in ~/.gitconfig
(e.g. "remote.origin.prune" set to true, even though there may or
may not actually be "origin" remote defined in a particular Git
repository), "git remote rename" and other commands misinterpreted
and behaved as if such a non-existing remote actually existed.

* js/remote-rename-with-half-configured-remote:
  remote rename: more carefully determine whether a remote is configured
  remote rename: demonstrate a bogus "remote exists" bug

7 years agoMerge branch 'jk/clear-delta-base-cache-fix'
Junio C Hamano [Tue, 31 Jan 2017 21:14:58 +0000 (13:14 -0800)]
Merge branch 'jk/clear-delta-base-cache-fix'

A crashing bug introduced in v2.11 timeframe has been found (it is
triggerable only in fast-import) and fixed.

* jk/clear-delta-base-cache-fix:
  clear_delta_base_cache(): don't modify hashmap while iterating

7 years agoMerge branch 'st/verify-tag'
Junio C Hamano [Tue, 31 Jan 2017 21:14:58 +0000 (13:14 -0800)]
Merge branch 'st/verify-tag'

"git tag" and "git verify-tag" learned to put GPG verification
status in their "--format=<placeholders>" output format.

* st/verify-tag:
  t/t7004-tag: Add --format specifier tests
  t/t7030-verify-tag: Add --format specifier tests
  builtin/tag: add --format argument for tag -v
  builtin/verify-tag: add --format to verify-tag
  ref-filter: add function to print single ref_array_item
  gpg-interface, tag: add GPG_VERIFY_OMIT_STATUS flag

7 years agoMerge branch 'js/mingw-isatty'
Junio C Hamano [Tue, 31 Jan 2017 21:14:58 +0000 (13:14 -0800)]
Merge branch 'js/mingw-isatty'

An update to a topic that is already in 'master'.

* js/mingw-isatty:
  mingw: follow-up to "replace isatty() hack"

7 years agoMerge branch 'js/sequencer-i-countdown-3'
Junio C Hamano [Tue, 31 Jan 2017 21:14:58 +0000 (13:14 -0800)]
Merge branch 'js/sequencer-i-countdown-3'

The sequencer machinery has been further enhanced so that a later
set of patches can start using it to reimplement "rebase -i".

* js/sequencer-i-countdown-3: (38 commits)
  sequencer (rebase -i): write out the final message
  sequencer (rebase -i): write the progress into files
  sequencer (rebase -i): show the progress
  sequencer (rebase -i): suggest --edit-todo upon unknown command
  sequencer (rebase -i): show only failed cherry-picks' output
  sequencer (rebase -i): show only failed `git commit`'s output
  sequencer: use run_command() directly
  sequencer: update reading author-script
  sequencer (rebase -i): differentiate between comments and 'noop'
  sequencer (rebase -i): implement the 'drop' command
  sequencer (rebase -i): allow rescheduling commands
  sequencer (rebase -i): respect strategy/strategy_opts settings
  sequencer (rebase -i): respect the rebase.autostash setting
  sequencer (rebase -i): run the post-rewrite hook, if needed
  sequencer (rebase -i): record interrupted commits in rewritten, too
  sequencer (rebase -i): copy commit notes at end
  sequencer (rebase -i): set the reflog message consistently
  sequencer (rebase -i): refactor setting the reflog message
  sequencer (rebase -i): allow fast-forwarding for edit/reword
  sequencer (rebase -i): implement the 'reword' command
  ...

7 years agoMerge branch 'jk/coding-guidelines-update'
Junio C Hamano [Tue, 31 Jan 2017 21:14:57 +0000 (13:14 -0800)]
Merge branch 'jk/coding-guidelines-update'

Developer doc update.

* jk/coding-guidelines-update:
  CodingGuidelines: clarify multi-line brace style

7 years agoMerge branch 'jk/loose-object-fsck'
Junio C Hamano [Tue, 31 Jan 2017 21:14:57 +0000 (13:14 -0800)]
Merge branch 'jk/loose-object-fsck'

"git fsck" inspects loose objects more carefully now.

* jk/loose-object-fsck:
  fsck: detect trailing garbage in all object types
  fsck: parse loose object paths directly
  sha1_file: add read_loose_object() function
  t1450: test fsck of packed objects
  sha1_file: fix error message for alternate objects
  t1450: refactor loose-object removal

7 years agoMerge branch 'js/exec-path-coverity-workaround'
Junio C Hamano [Tue, 31 Jan 2017 21:14:57 +0000 (13:14 -0800)]
Merge branch 'js/exec-path-coverity-workaround'

Code cleanup.

* js/exec-path-coverity-workaround:
  git_exec_path: do not return the result of getenv()
  git_exec_path: avoid Coverity warning about unfree()d result

7 years agoMerge branch 'bw/push-submodule-only'
Junio C Hamano [Tue, 31 Jan 2017 21:14:56 +0000 (13:14 -0800)]
Merge branch 'bw/push-submodule-only'

"git submodule push" learned "--recurse-submodules=only option to
push submodules out without pushing the top-level superproject.

* bw/push-submodule-only:
  push: add option to push only submodules
  submodules: add RECURSE_SUBMODULES_ONLY value
  transport: reformat flag #defines to be more readable

7 years agoMerge branch 'jk/vreport-sanitize'
Junio C Hamano [Tue, 31 Jan 2017 21:14:56 +0000 (13:14 -0800)]
Merge branch 'jk/vreport-sanitize'

An error message with an ASCII control character like '\r' in it
can alter the message to hide its early part, which is problematic
when a remote side gives such an error message that the local side
will relay with a "remote: " prefix.

* jk/vreport-sanitize:
  vreport: sanitize ASCII control chars
  Revert "vreportf: avoid intermediate buffer"

7 years agoSeventh batch for 2.12
Junio C Hamano [Tue, 24 Jan 2017 00:00:40 +0000 (16:00 -0800)]
Seventh batch for 2.12

Signed-off-by: Junio C Hamano <gitster@pobox.com>
7 years agoMerge branch 'ws/request-pull-code-cleanup'
Junio C Hamano [Mon, 23 Jan 2017 23:59:23 +0000 (15:59 -0800)]
Merge branch 'ws/request-pull-code-cleanup'

Code clean-up.

* ws/request-pull-code-cleanup:
  request-pull: drop old USAGE stuff

7 years agoMerge branch 'rh/diff-orderfile-doc'
Junio C Hamano [Mon, 23 Jan 2017 23:59:23 +0000 (15:59 -0800)]
Merge branch 'rh/diff-orderfile-doc'

Documentation fix.

* rh/diff-orderfile-doc:
  diff: document the format of the -O (diff.orderFile) file
  diff: document behavior of relative diff.orderFile

7 years agoMerge branch 'sb/cd-then-git-can-be-written-as-git-c'
Junio C Hamano [Mon, 23 Jan 2017 23:59:22 +0000 (15:59 -0800)]
Merge branch 'sb/cd-then-git-can-be-written-as-git-c'

Test clean-up.

* sb/cd-then-git-can-be-written-as-git-c:
  lib-submodule-update.sh: reduce use of subshell by using "git -C"

7 years agoMerge branch 'ad/bisect-terms'
Junio C Hamano [Mon, 23 Jan 2017 23:59:22 +0000 (15:59 -0800)]
Merge branch 'ad/bisect-terms'

Documentation fix.

* ad/bisect-terms:
  Documentation/bisect: improve on (bad|new) and (good|bad)

7 years agoMerge branch 'sg/fix-versioncmp-with-common-suffix'
Junio C Hamano [Mon, 23 Jan 2017 23:59:21 +0000 (15:59 -0800)]
Merge branch 'sg/fix-versioncmp-with-common-suffix'

The prereleaseSuffix feature of version comparison that is used in
"git tag -l" did not correctly when two or more prereleases for the
same release were present (e.g. when 2.0, 2.0-beta1, and 2.0-beta2
are there and the code needs to compare 2.0-beta1 and 2.0-beta2).

* sg/fix-versioncmp-with-common-suffix:
  versioncmp: generalize version sort suffix reordering
  versioncmp: factor out helper for suffix matching
  versioncmp: use earliest-longest contained suffix to determine sorting order
  versioncmp: cope with common part overlapping with prerelease suffix
  versioncmp: pass full tagnames to swap_prereleases()
  t7004-tag: add version sort tests to show prerelease reordering issues
  t7004-tag: use test_config helper
  t7004-tag: delete unnecessary tags with test_when_finished

7 years agoMerge branch 'vn/diff-ihc-config'
Junio C Hamano [Mon, 23 Jan 2017 23:59:21 +0000 (15:59 -0800)]
Merge branch 'vn/diff-ihc-config'

"git diff" learned diff.interHunkContext configuration variable
that gives the default value for its --inter-hunk-context option.

* vn/diff-ihc-config:
  diff: add interhunk context config option

7 years agoMerge branch 'sb/submodule-init'
Junio C Hamano [Mon, 23 Jan 2017 23:59:21 +0000 (15:59 -0800)]
Merge branch 'sb/submodule-init'

Error message fix.

* sb/submodule-init:
  submodule update --init: display correct path from submodule

7 years agoMerge branch 'sb/submodule-embed-gitdir'
Junio C Hamano [Mon, 23 Jan 2017 23:59:20 +0000 (15:59 -0800)]
Merge branch 'sb/submodule-embed-gitdir'

Help-text fix.

* sb/submodule-embed-gitdir:
  submodule absorbgitdirs: mention in docstring help

7 years agoMerge branch 'sb/submodule-config-tests'
Junio C Hamano [Mon, 23 Jan 2017 23:59:20 +0000 (15:59 -0800)]
Merge branch 'sb/submodule-config-tests'

Test updates.

* sb/submodule-config-tests:
  t7411: test lookup of uninitialized submodules
  t7411: quote URLs

7 years agoMerge branch 'jk/grep-e-could-be-extended-beyond-posix'
Junio C Hamano [Mon, 23 Jan 2017 23:59:20 +0000 (15:59 -0800)]
Merge branch 'jk/grep-e-could-be-extended-beyond-posix'

Tighten a test to avoid mistaking an extended ERE regexp engine as
a PRE regexp engine.

* jk/grep-e-could-be-extended-beyond-posix:
  t7810: avoid assumption about invalid regex syntax

7 years agoMerge branch 'bw/read-blob-data-does-not-modify-index-state'
Junio C Hamano [Mon, 23 Jan 2017 23:59:19 +0000 (15:59 -0800)]
Merge branch 'bw/read-blob-data-does-not-modify-index-state'

Code clean-up.

* bw/read-blob-data-does-not-modify-index-state:
  index: improve constness for reading blob data

7 years agoremote rename: more carefully determine whether a remote is configured
Johannes Schindelin [Thu, 19 Jan 2017 21:20:02 +0000 (22:20 +0100)]
remote rename: more carefully determine whether a remote is configured

One of the really nice features of the ~/.gitconfig file is that users
can override defaults by their own preferred settings for all of their
repositories.

One such default that some users like to override is whether the
"origin" remote gets auto-pruned or not. The user would simply call

git config --global remote.origin.prune true

and from now on all "origin" remotes would be pruned automatically when
fetching into the local repository.

There is just one catch: now Git thinks that the "origin" remote is
configured, even if the repository config has no [remote "origin"]
section at all, as it does not realize that the "prune" setting was
configured globally and that there really is no "origin" remote
configured in this repository.

That is a problem e.g. when renaming a remote to a new name, when Git
may be fooled into thinking that there is already a remote of that new
name.

Let's fix this by paying more attention to *where* the remote settings
came from: if they are configured in the local repository config, we
must not overwrite them. If they were configured elsewhere, we cannot
overwrite them to begin with, as we only write the repository config.

There is only one caller of remote_is_configured() (in `git fetch`) that
may want to take remotes into account even if they were configured
outside the repository config; all other callers essentially try to
prevent the Git command from overwriting settings in the repository
config.

To accommodate that fact, the remote_is_configured() function now
requires a parameter that states whether the caller is interested in all
remotes, or only in those that were configured in the repository config.

Many thanks to Jeff King whose tireless review helped with settling for
nothing less than the current strategy.

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

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
7 years agoremote rename: demonstrate a bogus "remote exists" bug
Johannes Schindelin [Thu, 19 Jan 2017 21:19:58 +0000 (22:19 +0100)]
remote rename: demonstrate a bogus "remote exists" bug

Some users like to set `remote.origin.prune = true` in their ~/.gitconfig
so that all of their repositories use that default.

However, our code is ill-prepared for this, mistaking that single entry to
mean that there is already a remote of the name "origin", even if there is
not.

This patch adds a test case demonstrating this issue.

Reported by Andrew Arnott.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
7 years agodocumentation: retire unfinished documentation
Stefan Beller [Thu, 19 Jan 2017 03:18:54 +0000 (19:18 -0800)]
documentation: retire unfinished documentation

When looking for documentation for a specific function, you may be tempted
to run

  git -C Documentation grep index_name_pos

only to find the file technical/api-in-core-index.txt, which doesn't
help for understanding the given function. It would be better to not find
these functions in the documentation, such that people directly dive into
the code instead.

In the previous patches we have documented
* index_name_pos()
* remove_index_entry_at()
* add_[file_]to_index()
in cache.h

We already have documentation for:
* add_index_entry()
* read_index()

Which leaves us with a TODO for:
* cache -> the_index macros
* refresh_index()
* discard_index()
* ie_match_stat() and ie_modified(); how they are different and when to
  use which.
* write_index() that was renamed to write_locked_index
* cache_tree_invalidate_path()
* cache_tree_update()

Signed-off-by: Stefan Beller <sbeller@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
7 years agocache.h: document add_[file_]to_index
Stefan Beller [Thu, 19 Jan 2017 03:18:53 +0000 (19:18 -0800)]
cache.h: document add_[file_]to_index

Helped-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Stefan Beller <sbeller@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
7 years agocache.h: document remove_index_entry_at
Stefan Beller [Thu, 19 Jan 2017 03:18:52 +0000 (19:18 -0800)]
cache.h: document remove_index_entry_at

Do this by moving the existing documentation from
read-cache.c to cache.h.

Signed-off-by: Stefan Beller <sbeller@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
7 years agocache.h: document index_name_pos
Stefan Beller [Thu, 19 Jan 2017 03:18:51 +0000 (19:18 -0800)]
cache.h: document index_name_pos

Signed-off-by: Stefan Beller <sbeller@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
7 years agoclear_delta_base_cache(): don't modify hashmap while iterating
Jeff King [Thu, 19 Jan 2017 16:33:50 +0000 (11:33 -0500)]
clear_delta_base_cache(): don't modify hashmap while iterating

On Thu, Jan 19, 2017 at 03:03:46PM +0100, Ulrich Spörlein wrote:

> > I suspect the patch below may fix things for you. It works around it by
> > walking over the lru list (either is fine, as they both contain all
> > entries, and since we're clearing everything, we don't care about the
> > order).
>
> Confirmed. With the patch applied, I can import the whole 55G in one go
> without any crashes or aborts. Thanks much!

Thanks. Here it is rolled up with a commit message.

-- >8 --
Subject: clear_delta_base_cache(): don't modify hashmap while iterating

Removing entries while iterating causes fast-import to
access an already-freed `struct packed_git`, leading to
various confusing errors.

What happens is that clear_delta_base_cache() drops the
whole contents of the cache by iterating over the hashmap,
calling release_delta_base_cache() on each entry. That
function removes the item from the hashmap. The hashmap code
may then shrink the table, but the hashmap_iter struct
retains an offset from the old table.

As a result, the next call to hashmap_iter_next() may claim
that the iteration is done, even though some items haven't
been visited.

The only caller of clear_delta_base_cache() is fast-import,
which wants to clear the cache because it is discarding the
packed_git struct for its temporary pack. So by failing to
remove all of the entries, we still have references to the
freed packed_git.

To make things even more confusing, this doesn't seem to
trigger with the test suite, because it depends on
complexities like the size of the hash table, which entries
got cleared, whether we try to access them before they're
evicted from the cache, etc.

So I've been able to identify the problem with large
imports like freebsd's svn import, or a fast-export of
linux.git. But nothing that would be reasonable to run as
part of the normal test suite.

We can fix this easily by iterating over the lru linked list
instead of the hashmap. They both contain the same entries,
and we can use the "safe" variant of the list iterator,
which exists for exactly this case.

Let's also add a warning to the hashmap API documentation to
reduce the chances of getting bit by this again.

Reported-by: Ulrich Spörlein <uqs@freebsd.org>
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
7 years agoSixth batch for 2.12
Junio C Hamano [Wed, 18 Jan 2017 23:15:36 +0000 (15:15 -0800)]
Sixth batch for 2.12

7 years agoMerge branch 'sb/remove-gitview'
Junio C Hamano [Wed, 18 Jan 2017 23:12:18 +0000 (15:12 -0800)]
Merge branch 'sb/remove-gitview'

Retire long unused/unmaintained gitview from the contrib/ area.

* sb/remove-gitview:
  doc: git-gui browser does not default to HEAD
  doc: gitk: add the upstream repo location
  doc: gitk: remove gitview reference
  contrib: remove gitview

7 years agoMerge branch 'js/asciidoctor-tweaks'
Junio C Hamano [Wed, 18 Jan 2017 23:12:17 +0000 (15:12 -0800)]
Merge branch 'js/asciidoctor-tweaks'

Adjust documentation to help AsciiDoctor render better while not
breaking the rendering done by AsciiDoc.

* js/asciidoctor-tweaks:
  asciidoctor: fix user-manual to be built by `asciidoctor`
  giteveryday: unbreak rendering with AsciiDoctor

7 years agoMerge branch 'sb/unpack-trees-cleanup'
Junio C Hamano [Wed, 18 Jan 2017 23:12:17 +0000 (15:12 -0800)]
Merge branch 'sb/unpack-trees-cleanup'

Code cleanup.

* sb/unpack-trees-cleanup:
  unpack-trees: factor progress setup out of check_updates
  unpack-trees: remove unneeded continue
  unpack-trees: move checkout state into check_updates

7 years agoMerge branch 'rh/mergetool-regression-fix'
Junio C Hamano [Wed, 18 Jan 2017 23:12:16 +0000 (15:12 -0800)]
Merge branch 'rh/mergetool-regression-fix'

"git mergetool" without any pathspec on the command line that is
run from a subdirectory became no-op in Git v2.11 by mistake, which
has been fixed.

* rh/mergetool-regression-fix:
  mergetool: fix running in subdir when rerere enabled
  mergetool: take the "-O" out of $orderfile
  t7610: add test case for rerere+mergetool+subdir bug
  t7610: spell 'git reset --hard' consistently
  t7610: don't assume the checked-out commit
  t7610: always work on a test-specific branch
  t7610: delete some now-unnecessary 'git reset --hard' lines
  t7610: run 'git reset --hard' after each test to clean up
  t7610: don't rely on state from previous test
  t7610: use test_when_finished for cleanup tasks
  t7610: move setup code to the 'setup' test case
  t7610: update branch names to match test number
  rev-parse doc: pass "--" to rev-parse in the --prefix example
  .mailmap: record canonical email for Richard Hansen

7 years agoMerge branch 'bw/realpath-wo-chdir'
Junio C Hamano [Wed, 18 Jan 2017 23:12:16 +0000 (15:12 -0800)]
Merge branch 'bw/realpath-wo-chdir'

The implementation of "real_path()" was to go there with chdir(2)
and call getcwd(3), but this obviously wouldn't be usable in a
threaded environment.  Rewrite it to manually resolve relative
paths including symbolic links in path components.

* bw/realpath-wo-chdir:
  real_path: set errno when max number of symlinks is exceeded
  real_path: prevent redefinition of MAXSYMLINKS

7 years agoMerge branch 'jk/execv-dashed-external'
Junio C Hamano [Wed, 18 Jan 2017 23:12:16 +0000 (15:12 -0800)]
Merge branch 'jk/execv-dashed-external'

Typing ^C to pager, which usually does not kill it, killed Git and
took the pager down as a collateral damage in certain process-tree
structure.  This has been fixed.

* jk/execv-dashed-external:
  execv_dashed_external: wait for child on signal death
  execv_dashed_external: stop exiting with negative code
  execv_dashed_external: use child_process struct

7 years agoMerge branch 'sp/cygwin-build-fixes'
Junio C Hamano [Wed, 18 Jan 2017 23:12:15 +0000 (15:12 -0800)]
Merge branch 'sp/cygwin-build-fixes'

Build updates for Cygwin.

* sp/cygwin-build-fixes:
  Makefile: put LIBS after LDFLAGS for imap-send
  Makefile: POSIX windres

7 years agoMerge branch 'sb/pathspec-errors'
Junio C Hamano [Wed, 18 Jan 2017 23:12:15 +0000 (15:12 -0800)]
Merge branch 'sb/pathspec-errors'

Running "git add a/b" when "a" is a submodule correctly errored
out, but without a meaningful error message.

* sb/pathspec-errors:
  pathspec: give better message for submodule related pathspec error

7 years agoMerge branch 'pb/test-must-fail-is-for-git'
Junio C Hamano [Wed, 18 Jan 2017 23:12:15 +0000 (15:12 -0800)]
Merge branch 'pb/test-must-fail-is-for-git'

Test cleanup.

* pb/test-must-fail-is-for-git:
  t9813: avoid using pipes
  don't use test_must_fail with grep

7 years agoMerge branch 'bw/pathspec-cleanup'
Junio C Hamano [Wed, 18 Jan 2017 23:12:14 +0000 (15:12 -0800)]
Merge branch 'bw/pathspec-cleanup'

Code clean-up in the pathspec API.

* bw/pathspec-cleanup:
  pathspec: rename prefix_pathspec to init_pathspec_item
  pathspec: small readability changes
  pathspec: create strip submodule slash helpers
  pathspec: create parse_element_magic helper
  pathspec: create parse_long_magic function
  pathspec: create parse_short_magic function
  pathspec: factor global magic into its own function
  pathspec: simpler logic to prefix original pathspec elements
  pathspec: always show mnemonic and name in unsupported_magic
  pathspec: remove unused variable from unsupported_magic
  pathspec: copy and free owned memory
  pathspec: remove the deprecated get_pathspec function
  ls-tree: convert show_recursive to use the pathspec struct interface
  dir: convert fill_directory to use the pathspec struct interface
  dir: remove struct path_simplify
  mv: remove use of deprecated 'get_pathspec()'

7 years agoMerge branch 'js/mingw-test-push-unc-path'
Junio C Hamano [Wed, 18 Jan 2017 23:12:14 +0000 (15:12 -0800)]
Merge branch 'js/mingw-test-push-unc-path'

"git push \\server\share\dir" has recently regressed and then
fixed.  A test has retroactively been added for this breakage.

* js/mingw-test-push-unc-path:
  mingw: add a regression test for pushing to UNC paths

7 years agoMerge branch 'sb/submodule-cleanup-export-git-dir-env'
Junio C Hamano [Wed, 18 Jan 2017 23:12:14 +0000 (15:12 -0800)]
Merge branch 'sb/submodule-cleanup-export-git-dir-env'

Code cleanup.

* sb/submodule-cleanup-export-git-dir-env:
  submodule.c: use GIT_DIR_ENVIRONMENT consistently

7 years agoMerge branch 'km/branch-get-push-while-detached'
Junio C Hamano [Wed, 18 Jan 2017 23:12:14 +0000 (15:12 -0800)]
Merge branch 'km/branch-get-push-while-detached'

"git <cmd> @{push}" on a detached HEAD used to segfault; it has
been corrected to error out with a message.

* km/branch-get-push-while-detached:
  branch_get_push: do not segfault when HEAD is detached

7 years agoMerge branch 'jk/rebase-i-squash-count-fix'
Junio C Hamano [Wed, 18 Jan 2017 23:12:13 +0000 (15:12 -0800)]
Merge branch 'jk/rebase-i-squash-count-fix'

"git rebase -i" with a recent update started showing an incorrect
count when squashing more than 10 commits.

* jk/rebase-i-squash-count-fix:
  rebase--interactive: count squash commits above 10 correctly

7 years agoMerge branch 'jk/blame-fixes'
Junio C Hamano [Wed, 18 Jan 2017 23:12:13 +0000 (15:12 -0800)]
Merge branch 'jk/blame-fixes'

"git blame --porcelain" misidentified the "previous" <commit, path>
pair (aka "source") when contents came from two or more files.

* jk/blame-fixes:
  blame: output porcelain "previous" header for each file
  blame: handle --no-abbrev
  blame: fix alignment with --abbrev=40

7 years agoMerge branch 'jk/archive-zip-userdiff-config'
Junio C Hamano [Wed, 18 Jan 2017 23:12:12 +0000 (15:12 -0800)]
Merge branch 'jk/archive-zip-userdiff-config'

"git archive" did not read the standard configuration files, and
failed to notice a file that is marked as binary via the userdiff
driver configuration.

* jk/archive-zip-userdiff-config:
  archive-zip: load userdiff config

7 years agoMerge branch 'dt/disable-bitmap-in-auto-gc'
Junio C Hamano [Wed, 18 Jan 2017 23:12:12 +0000 (15:12 -0800)]
Merge branch 'dt/disable-bitmap-in-auto-gc'

It is natural that "git gc --auto" may not attempt to pack
everything into a single pack, and there is no point in warning
when the user has configured the system to use the pack bitmap,
leading to disabling further "gc".

* dt/disable-bitmap-in-auto-gc:
  repack: die on incremental + write-bitmap-index
  auto gc: don't write bitmaps for incremental repacks

7 years agoMerge branch 'ls/p4-retry-thrice'
Junio C Hamano [Wed, 18 Jan 2017 23:12:12 +0000 (15:12 -0800)]
Merge branch 'ls/p4-retry-thrice'

A recent updates to "git p4" was not usable for older p4 but it
could be made to work with minimum changes.  Do so.

* ls/p4-retry-thrice:
  git-p4: do not pass '-r 0' to p4 commands

7 years agoMerge branch 'sb/submodule-rm-absorb'
Junio C Hamano [Wed, 18 Jan 2017 23:12:11 +0000 (15:12 -0800)]
Merge branch 'sb/submodule-rm-absorb'

"git rm" used to refuse to remove a submodule when it has its own
git repository embedded in its working tree.  It learned to move
the repository away to $GIT_DIR/modules/ of the superproject
instead, and allow the submodule to be deleted (as long as there
will be no loss of local modifications, that is).

* sb/submodule-rm-absorb:
  rm: absorb a submodules git dir before deletion
  submodule: rename and add flags to ok_to_remove_submodule
  submodule: modernize ok_to_remove_submodule to use argv_array
  submodule.h: add extern keyword to functions

7 years agoMerge branch 'bw/grep-recurse-submodules'
Junio C Hamano [Wed, 18 Jan 2017 23:12:11 +0000 (15:12 -0800)]
Merge branch 'bw/grep-recurse-submodules'

"git grep" has been taught to optionally recurse into submodules.

* bw/grep-recurse-submodules:
  grep: search history of moved submodules
  grep: enable recurse-submodules to work on <tree> objects
  grep: optionally recurse into submodules
  grep: add submodules as a grep source type
  submodules: load gitmodules file from commit sha1
  submodules: add helper to determine if a submodule is initialized
  submodules: add helper to determine if a submodule is populated
  real_path: canonicalize directory separators in root parts
  real_path: have callers use real_pathdup and strbuf_realpath
  real_path: create real_pathdup
  real_path: convert real_path_internal to strbuf_realpath
  real_path: resolve symlinks by hand

7 years agomingw: follow-up to "replace isatty() hack"
Johannes Schindelin [Wed, 18 Jan 2017 12:14:35 +0000 (13:14 +0100)]
mingw: follow-up to "replace isatty() hack"

The version of the "replace isatty() hack" that got merged a few
weeks ago did not actually reflect the latest iteration of the patch
series: v3 was sent out with these changes, as requested by the
reviewer Johannes Sixt:

- reworded the comment about "recycling handles"

- moved the reassignment of the `console` variable before the dup2()
  call so that it is valid at all times

- removed the "handle = INVALID_HANDLE_VALUE" assignment, as the local
  variable `handle` is not used afterwards anyway

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Reviewed-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
7 years agot/t7004-tag: Add --format specifier tests
Santiago Torres [Tue, 17 Jan 2017 23:37:23 +0000 (18:37 -0500)]
t/t7004-tag: Add --format specifier tests

tag -v now supports --format specifiers to inspect the contents of a tag
upon verification. Add two tests to ensure this behavior is respected in
future changes.

Signed-off-by: Santiago Torres <santiago@nyu.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
7 years agot/t7030-verify-tag: Add --format specifier tests
Santiago Torres [Tue, 17 Jan 2017 23:37:22 +0000 (18:37 -0500)]
t/t7030-verify-tag: Add --format specifier tests

Verify-tag now provides --format specifiers to inspect and ensure the
contents of the tag are proper. We add two tests to ensure this
functionality works as expected: the return value should indicate if
verification passed, and the format specifiers must be respected.

Signed-off-by: Santiago Torres <santiago@nyu.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
7 years agobuiltin/tag: add --format argument for tag -v
Lukas Puehringer [Tue, 17 Jan 2017 23:37:21 +0000 (18:37 -0500)]
builtin/tag: add --format argument for tag -v

Adding --format to git tag -v mutes the default output of the GPG
verification and instead prints the formatted tag object.
This allows callers to cross-check the tagname from refs/tags with
the tagname from the tag object header upon GPG verification.

The callback function for for_each_tag_name() didn't allow callers to
pass custom data to their callback functions. Add a new opaque pointer
to each_tag_name_fn's parameter to allow this.

Signed-off-by: Lukas Puehringer <luk.puehringer@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
7 years agoMerge git://ozlabs.org/~paulus/gitk
Junio C Hamano [Wed, 18 Jan 2017 18:27:59 +0000 (10:27 -0800)]
Merge git://ozlabs.org/~paulus/gitk

* 'master' of git://ozlabs.org/~paulus/gitk:
  gitk: Remove translated message from comments
  gitk: ru.po: Update Russian translation
  gitk: Update copyright notice to 2016
  gitk: Clear array 'commitinfo' on reload
  gitk: Remove closed file descriptors from $blobdifffd
  gitk: Turn off undo manager in the text widget
  gitk: Fix Japanese translation for "marked commit"
  gitk: Fix missing commits when using -S or -G
  gitk: Use explicit RGB green instead of "lime"
  gitk: Add Portuguese translation
  gitk: Makefile: create install bin directory
  gitk: Include commit title in branch dialog
  gitk: Allow checking out a remote branch
  gitk: Add a 'rename' option to the branch context menu

7 years agogitk: Remove translated message from comments
David Aguilar [Wed, 18 Jan 2017 03:52:45 +0000 (19:52 -0800)]
gitk: Remove translated message from comments

"make update-po" fails because a previously untranslated string
has now been translated:

Updating po/sv.po
po/sv.po:1388: duplicate message definition...
po/sv.po:380: ...this is the location of the first definition

Remove the duplicate message definition.

Reported-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: David Aguilar <davvid@gmail.com>
Signed-off-by: Paul Mackerras <paulus@ozlabs.org>
7 years agobuiltin/verify-tag: add --format to verify-tag
Santiago Torres [Tue, 17 Jan 2017 23:37:20 +0000 (18:37 -0500)]
builtin/verify-tag: add --format to verify-tag

Callers of verify-tag may want to cross-check the tagname from refs/tags
with the tagname from the tag object header upon GPG verification. This
is to avoid tag refs that point to an incorrect object.

Add a --format parameter to git verify-tag to print the formatted tag
object header in addition to or instead of the --verbose or --raw GPG
verification output.

Signed-off-by: Santiago Torres <santiago@nyu.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
7 years agoref-filter: add function to print single ref_array_item
Lukas Puehringer [Tue, 17 Jan 2017 23:37:19 +0000 (18:37 -0500)]
ref-filter: add function to print single ref_array_item

ref-filter functions are useful for printing git object information
using a format specifier. However, some other modules may not want to use
this functionality on a ref-array but only print a single item.

Expose a pretty_print_ref function to create, pretty print and free
individual ref-items.

Signed-off-by: Lukas Puehringer <luk.puehringer@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
7 years agogpg-interface, tag: add GPG_VERIFY_OMIT_STATUS flag
Lukas Puehringer [Tue, 17 Jan 2017 23:37:18 +0000 (18:37 -0500)]
gpg-interface, tag: add GPG_VERIFY_OMIT_STATUS flag

Functions that print git object information may require that the
gpg-interface functions be silent. Add GPG_VERIFY_OMIT_STATUS flag and
prevent print_signature_buffer from being called if flag is set.

Signed-off-by: Lukas Puehringer <luk.puehringer@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
7 years agoRelNotes: drop merge-later comments for maint
Junio C Hamano [Tue, 17 Jan 2017 23:27:13 +0000 (15:27 -0800)]
RelNotes: drop merge-later comments for maint

Signed-off-by: Junio C Hamano <gitster@pobox.com>
7 years agoMerge branch 'maint'
Junio C Hamano [Tue, 17 Jan 2017 23:20:01 +0000 (15:20 -0800)]
Merge branch 'maint'

7 years agoAlmost ready for 2.11.1
Junio C Hamano [Tue, 17 Jan 2017 22:48:44 +0000 (14:48 -0800)]
Almost ready for 2.11.1

Signed-off-by: Junio C Hamano <gitster@pobox.com>
7 years agoMerge branch 'mm/gc-safety-doc' into maint
Junio C Hamano [Tue, 17 Jan 2017 23:19:11 +0000 (15:19 -0800)]
Merge branch 'mm/gc-safety-doc' into maint

Doc update.

* mm/gc-safety-doc:
  git-gc.txt: expand discussion of races with other processes

7 years agoMerge branch 'mm/push-social-engineering-attack-doc' into maint
Junio C Hamano [Tue, 17 Jan 2017 23:19:10 +0000 (15:19 -0800)]
Merge branch 'mm/push-social-engineering-attack-doc' into maint

Doc update on fetching and pushing.

* mm/push-social-engineering-attack-doc:
  doc: mention transfer data leaks in more places

7 years agoMerge branch 'jt/fetch-no-redundant-tag-fetch-map' into maint
Junio C Hamano [Tue, 17 Jan 2017 23:19:09 +0000 (15:19 -0800)]
Merge branch 'jt/fetch-no-redundant-tag-fetch-map' into maint

Code cleanup to avoid using redundant refspecs while fetching with
the --tags option.

* jt/fetch-no-redundant-tag-fetch-map:
  fetch: do not redundantly calculate tag refmap

7 years agoMerge branch 'ls/filter-process' into maint
Junio C Hamano [Tue, 17 Jan 2017 23:19:08 +0000 (15:19 -0800)]
Merge branch 'ls/filter-process' into maint

Doc update.

* ls/filter-process:
  t0021: fix flaky test
  docs: warn about possible '=' in clean/smudge filter process values

7 years agoMerge branch 'kh/tutorial-grammofix' into maint
Junio C Hamano [Tue, 17 Jan 2017 23:19:08 +0000 (15:19 -0800)]
Merge branch 'kh/tutorial-grammofix' into maint

* kh/tutorial-grammofix:
  doc: omit needless "for"
  doc: make the intent of sentence clearer
  doc: add verb in front of command to run
  doc: add articles (grammar)

7 years agoMerge branch 'lr/doc-fix-cet' into maint
Junio C Hamano [Tue, 17 Jan 2017 23:19:07 +0000 (15:19 -0800)]
Merge branch 'lr/doc-fix-cet' into maint

* lr/doc-fix-cet:
  date-formats.txt: Typo fix

7 years agoMerge branch 'sb/t3600-cleanup' into maint
Junio C Hamano [Tue, 17 Jan 2017 23:19:06 +0000 (15:19 -0800)]
Merge branch 'sb/t3600-cleanup' into maint

Code cleanup.

* sb/t3600-cleanup:
  t3600: slightly modernize style
  t3600: remove useless redirect

7 years agoMerge branch 'jk/readme-gmane-is-no-more' into maint
Junio C Hamano [Tue, 17 Jan 2017 23:19:05 +0000 (15:19 -0800)]
Merge branch 'jk/readme-gmane-is-no-more' into maint

* jk/readme-gmane-is-no-more:
  README: replace gmane link with public-inbox

7 years agoMerge branch 'sb/unpack-trees-grammofix' into maint
Junio C Hamano [Tue, 17 Jan 2017 23:19:05 +0000 (15:19 -0800)]
Merge branch 'sb/unpack-trees-grammofix' into maint

* sb/unpack-trees-grammofix:
  unpack-trees: fix grammar for untracked files in directories

7 years agoMerge branch 'ls/t0021-fixup' into maint
Junio C Hamano [Tue, 17 Jan 2017 23:19:04 +0000 (15:19 -0800)]
Merge branch 'ls/t0021-fixup' into maint

* ls/t0021-fixup:
  t0021: minor filter process test cleanup

7 years agoMerge branch 'ak/lazy-prereq-mktemp' into maint
Junio C Hamano [Tue, 17 Jan 2017 23:19:04 +0000 (15:19 -0800)]
Merge branch 'ak/lazy-prereq-mktemp' into maint

Test code clean-up.

* ak/lazy-prereq-mktemp:
  t7610: clean up foo.XXXXXX tmpdir

7 years agoMerge branch 'nd/qsort-in-merge-recursive' into maint
Junio C Hamano [Tue, 17 Jan 2017 23:19:03 +0000 (15:19 -0800)]
Merge branch 'nd/qsort-in-merge-recursive' into maint

Code simplification.

* nd/qsort-in-merge-recursive:
  merge-recursive.c: use string_list_sort instead of qsort

7 years agoMerge branch 'dt/smart-http-detect-server-going-away' into maint
Junio C Hamano [Tue, 17 Jan 2017 23:19:03 +0000 (15:19 -0800)]
Merge branch 'dt/smart-http-detect-server-going-away' into maint

When the http server gives an incomplete response to a smart-http
rpc call, it could lead to client waiting for a full response that
will never come.  Teach the client side to notice this condition
and abort the transfer.

An improvement counterproposal has failed.
cf. <20161114194049.mktpsvgdhex2f4zv@sigill.intra.peff.net>

* dt/smart-http-detect-server-going-away:
  upload-pack: optionally allow fetching any sha1
  remote-curl: don't hang when a server dies before any output

7 years agoMerge branch 'mk/mingw-winansi-ttyname-termination-fix' into maint
Junio C Hamano [Tue, 17 Jan 2017 23:19:03 +0000 (15:19 -0800)]
Merge branch 'mk/mingw-winansi-ttyname-termination-fix' into maint

A potential but unlikely buffer overflow in Windows port has been
fixed.

* mk/mingw-winansi-ttyname-termination-fix:
  mingw: consider that UNICODE_STRING::Length counts bytes

7 years agoMerge branch 'gv/p4-multi-path-commit-fix' into maint
Junio C Hamano [Tue, 17 Jan 2017 23:19:02 +0000 (15:19 -0800)]
Merge branch 'gv/p4-multi-path-commit-fix' into maint

"git p4" that tracks multile p4 paths imported a single changelist
that touches files in these multiple paths as one commit, followed
by many empty commits.  This has been fixed.

* gv/p4-multi-path-commit-fix:
  git-p4: fix multi-path changelist empty commits

7 years agoMerge branch 'jk/difftool-in-subdir' into maint
Junio C Hamano [Tue, 17 Jan 2017 23:11:08 +0000 (15:11 -0800)]
Merge branch 'jk/difftool-in-subdir' into maint

Even though an fix was attempted in Git 2.9.3 days, but running
"git difftool --dir-diff" from a subdirectory never worked. This
has been fixed.

* jk/difftool-in-subdir:
  difftool: rename variables for consistency
  difftool: chdir as early as possible
  difftool: sanitize $workdir as early as possible
  difftool: fix dir-diff index creation when in a subdirectory

7 years agoMerge branch 'ld/p4-compare-dir-vs-symlink' into maint
Junio C Hamano [Tue, 17 Jan 2017 23:11:07 +0000 (15:11 -0800)]
Merge branch 'ld/p4-compare-dir-vs-symlink' into maint

"git p4" misbehaved when swapping a directory and a symbolic link.

* ld/p4-compare-dir-vs-symlink:
  git-p4: avoid crash adding symlinked directory

7 years agoMerge branch 'jc/push-default-explicit' into maint
Junio C Hamano [Tue, 17 Jan 2017 23:11:07 +0000 (15:11 -0800)]
Merge branch 'jc/push-default-explicit' into maint

A lazy "git push" without refspec did not internally use a fully
specified refspec to perform 'current', 'simple', or 'upstream'
push, causing unnecessary "ambiguous ref" errors.

* jc/push-default-explicit:
  push: test pushing ambiguously named branches
  push: do not use potentially ambiguous default refspec

7 years agoMerge branch 'jt/mailinfo-fold-in-body-headers' into maint
Junio C Hamano [Tue, 17 Jan 2017 23:11:06 +0000 (15:11 -0800)]
Merge branch 'jt/mailinfo-fold-in-body-headers' into maint

Fix for NDEBUG builds.

* jt/mailinfo-fold-in-body-headers:
  mailinfo.c: move side-effects outside of assert

7 years agoMerge branch 'jk/index-pack-wo-repo-from-stdin' into maint
Junio C Hamano [Tue, 17 Jan 2017 23:11:06 +0000 (15:11 -0800)]
Merge branch 'jk/index-pack-wo-repo-from-stdin' into maint

"git index-pack --stdin" needs an access to an existing repository,
but "git index-pack file.pack" to generate an .idx file that
corresponds to a packfile does not.

* jk/index-pack-wo-repo-from-stdin:
  index-pack: skip collision check when not in repository
  t: use nongit() function where applicable
  index-pack: complain when --stdin is used outside of a repo
  t5000: extract nongit function to test-lib-functions.sh

7 years agoMerge branch 'jk/parseopt-usage-msg-opt' into maint
Junio C Hamano [Tue, 17 Jan 2017 23:11:06 +0000 (15:11 -0800)]
Merge branch 'jk/parseopt-usage-msg-opt' into maint

The function usage_msg_opt() has been updated to say "fatal:"
before the custom message programs give, when they want to die
with a message about wrong command line options followed by the
standard usage string.

* jk/parseopt-usage-msg-opt:
  parse-options: print "fatal:" before usage_msg_opt()

7 years agoMerge branch 'jk/quote-env-path-list-component' into maint
Junio C Hamano [Tue, 17 Jan 2017 23:11:06 +0000 (15:11 -0800)]
Merge branch 'jk/quote-env-path-list-component' into maint

A recent update to receive-pack to make it easier to drop garbage
objects made it clear that GIT_ALTERNATE_OBJECT_DIRECTORIES cannot
have a pathname with a colon in it (no surprise!), and this in turn
made it impossible to push into a repository at such a path.  This
has been fixed by introducing a quoting mechanism used when
appending such a path to the colon-separated list.

* jk/quote-env-path-list-component:
  t5615-alternate-env: double-quotes in file names do not work on Windows
  t5547-push-quarantine: run the path separator test on Windows, too
  tmp-objdir: quote paths we add to alternates
  alternates: accept double-quoted paths

7 years agoMerge branch 'nd/shallow-fixup' into maint
Junio C Hamano [Tue, 17 Jan 2017 23:11:05 +0000 (15:11 -0800)]
Merge branch 'nd/shallow-fixup' into maint

Code cleanup in shallow boundary computation.

* nd/shallow-fixup:
  shallow.c: remove useless code
  shallow.c: bit manipulation tweaks
  shallow.c: avoid theoretical pointer wrap-around
  shallow.c: make paint_alloc slightly more robust
  shallow.c: stop abusing COMMIT_SLAB_SIZE for paint_info's memory pools
  shallow.c: rename fields in paint_info to better express their purposes

7 years agoMerge branch 'sb/sequencer-abort-safety' into maint
Junio C Hamano [Tue, 17 Jan 2017 23:11:05 +0000 (15:11 -0800)]
Merge branch 'sb/sequencer-abort-safety' into maint

Unlike "git am --abort", "git cherry-pick --abort" moved HEAD back
to where cherry-pick started while picking multiple changes, when
the cherry-pick stopped to ask for help from the user, and the user
did "git reset --hard" to a different commit in order to re-attempt
the operation.

* sb/sequencer-abort-safety:
  Revert "sequencer: remove useless get_dir() function"
  sequencer: remove useless get_dir() function
  sequencer: make sequencer abort safer
  t3510: test that cherry-pick --abort does not unsafely change HEAD
  am: change safe_to_abort()'s not rewinding error into a warning
  am: fix filename in safe_to_abort() error message

7 years agoMerge branch 'da/mergetool-xxdiff-hotkey' into maint
Junio C Hamano [Tue, 17 Jan 2017 23:11:05 +0000 (15:11 -0800)]
Merge branch 'da/mergetool-xxdiff-hotkey' into maint

The way to specify hotkeys to "xxdiff" that is used by "git
mergetool" has been modernized to match recent versions of xxdiff.

* da/mergetool-xxdiff-hotkey:
  mergetools: fix xxdiff hotkeys

7 years agoMerge branch 'jc/pull-rebase-ff' into maint
Junio C Hamano [Tue, 17 Jan 2017 23:11:04 +0000 (15:11 -0800)]
Merge branch 'jc/pull-rebase-ff' into maint

"git pull --rebase", when there is no new commits on our side since
we forked from the upstream, should be able to fast-forward without
invoking "git rebase", but it didn't.

* jc/pull-rebase-ff:
  pull: fast-forward "pull --rebase=true"

7 years agoMerge branch 'js/normalize-path-copy-ceil' into maint
Junio C Hamano [Tue, 17 Jan 2017 23:11:03 +0000 (15:11 -0800)]
Merge branch 'js/normalize-path-copy-ceil' into maint

A pathname that begins with "//" or "\\" on Windows is special but
path normalization logic was unaware of it.

* js/normalize-path-copy-ceil:
  normalize_path_copy(): fix pushing to //server/share/dir on Windows

7 years agoMerge branch 'ak/commit-only-allow-empty' into maint
Junio C Hamano [Tue, 17 Jan 2017 23:11:03 +0000 (15:11 -0800)]
Merge branch 'ak/commit-only-allow-empty' into maint

"git commit --allow-empty --only" (no pathspec) with dirty index
ought to be an acceptable way to create a new commit that does not
change any paths, but it was forbidden, perhaps because nobody
needed it so far.

* ak/commit-only-allow-empty:
  commit: remove 'Clever' message for --only --amend
  commit: make --only --allow-empty work without paths

7 years agoMerge branch 'da/difftool-dir-diff-fix' into maint
Junio C Hamano [Tue, 17 Jan 2017 22:49:30 +0000 (14:49 -0800)]
Merge branch 'da/difftool-dir-diff-fix' into maint

"git difftool --dir-diff" had a minor regression when started from
a subdirectory, which has been fixed.

* da/difftool-dir-diff-fix:
  difftool: fix dir-diff index creation when in a subdirectory

7 years agoMerge branch 'jb/diff-no-index-no-abbrev' into maint
Junio C Hamano [Tue, 17 Jan 2017 22:49:30 +0000 (14:49 -0800)]
Merge branch 'jb/diff-no-index-no-abbrev' into maint

"git diff --no-index" did not take "--no-abbrev" option.

* jb/diff-no-index-no-abbrev:
  diff: handle --no-abbrev in no-index case

7 years agoMerge branch 'jk/stash-disable-renames-internally' into maint
Junio C Hamano [Tue, 17 Jan 2017 22:49:30 +0000 (14:49 -0800)]
Merge branch 'jk/stash-disable-renames-internally' into maint

When diff.renames configuration is on (and with Git 2.9 and later,
it is enabled by default, which made it worse), "git stash"
misbehaved if a file is removed and another file with a very
similar content is added.

* jk/stash-disable-renames-internally:
  stash: prefer plumbing over git-diff

7 years agoMerge branch 'jk/http-walker-limit-redirect' into maint
Junio C Hamano [Tue, 17 Jan 2017 22:49:29 +0000 (14:49 -0800)]
Merge branch 'jk/http-walker-limit-redirect' into maint

Update the error messages from the dumb-http client when it fails
to obtain loose objects; we used to give sensible error message
only upon 404 but we now forbid unexpected redirects that needs to
be reported with something sensible.

* jk/http-walker-limit-redirect:
  http-walker: complain about non-404 loose object errors
  http: treat http-alternates like redirects
  http: make redirects more obvious
  remote-curl: rename shadowed options variable
  http: always update the base URL for redirects
  http: simplify update_url_from_redirect

7 years agoMerge branch 'jc/renormalize-merge-kill-safer-crlf' into maint
Junio C Hamano [Tue, 17 Jan 2017 22:49:28 +0000 (14:49 -0800)]
Merge branch 'jc/renormalize-merge-kill-safer-crlf' into maint

Fix a corner case in merge-recursive regression that crept in
during 2.10 development cycle.

* jc/renormalize-merge-kill-safer-crlf:
  convert: git cherry-pick -Xrenormalize did not work
  merge-recursive: handle NULL in add_cacheinfo() correctly
  cherry-pick: demonstrate a segmentation fault

7 years agoMerge branch 'ls/p4-empty-file-on-lfs' into maint
Junio C Hamano [Tue, 17 Jan 2017 22:49:27 +0000 (14:49 -0800)]
Merge branch 'ls/p4-empty-file-on-lfs' into maint

"git p4" LFS support was broken when LFS stores an empty blob.

* ls/p4-empty-file-on-lfs:
  git-p4: fix empty file processing for large file system backend GitLFS

7 years agoMerge branch 'da/mergetool-trust-exit-code' into maint
Junio C Hamano [Tue, 17 Jan 2017 22:49:27 +0000 (14:49 -0800)]
Merge branch 'da/mergetool-trust-exit-code' into maint

mergetool.<tool>.trustExitCode configuration variable did not apply
to built-in tools, but now it does.

* da/mergetool-trust-exit-code:
  mergetools/vimdiff: trust Vim's exit code
  mergetool: honor mergetool.$tool.trustExitCode for built-in tools

7 years agoMerge branch 'nd/worktree-list-fixup' into maint
Junio C Hamano [Tue, 17 Jan 2017 22:49:27 +0000 (14:49 -0800)]
Merge branch 'nd/worktree-list-fixup' into maint

The output from "git worktree list" was made in readdir() order,
and was unstable.

* nd/worktree-list-fixup:
  worktree list: keep the list sorted
  worktree.c: get_worktrees() takes a new flag argument
  get_worktrees() must return main worktree as first item even on error
  worktree: reorder an if statement
  worktree.c: zero new 'struct worktree' on allocation

7 years agoMerge branch 'bw/push-dry-run' into maint
Junio C Hamano [Tue, 17 Jan 2017 22:49:27 +0000 (14:49 -0800)]
Merge branch 'bw/push-dry-run' into maint

"git push --dry-run --recurse-submodule=on-demand" wasn't
"--dry-run" in the submodules.

* bw/push-dry-run:
  push: fix --dry-run to not push submodules
  push: --dry-run updates submodules when --recurse-submodules=on-demand