gitweb.git
Merge branch 'sb/diff-color-move'Junio C Hamano Sun, 27 Aug 2017 05:55:03 +0000 (22:55 -0700)

Merge branch 'sb/diff-color-move'

"git diff" has been taught to optionally paint new lines that are
the same as deleted lines elsewhere differently from genuinely new
lines.

* sb/diff-color-move: (25 commits)
diff: document the new --color-moved setting
diff.c: add dimming to moved line detection
diff.c: color moved lines differently, plain mode
diff.c: color moved lines differently
diff.c: buffer all output if asked to
diff.c: emit_diff_symbol learns about DIFF_SYMBOL_SUMMARY
diff.c: emit_diff_symbol learns about DIFF_SYMBOL_STAT_SEP
diff.c: convert word diffing to use emit_diff_symbol
diff.c: convert show_stats to use emit_diff_symbol
diff.c: convert emit_binary_diff_body to use emit_diff_symbol
submodule.c: migrate diff output to use emit_diff_symbol
diff.c: emit_diff_symbol learns DIFF_SYMBOL_REWRITE_DIFF
diff.c: emit_diff_symbol learns about DIFF_SYMBOL_BINARY_FILES
diff.c: emit_diff_symbol learns DIFF_SYMBOL_HEADER
diff.c: emit_diff_symbol learns DIFF_SYMBOL_FILEPAIR_{PLUS, MINUS}
diff.c: emit_diff_symbol learns DIFF_SYMBOL_CONTEXT_INCOMPLETE
diff.c: emit_diff_symbol learns DIFF_SYMBOL_WORDS[_PORCELAIN]
diff.c: migrate emit_line_checked to use emit_diff_symbol
diff.c: emit_diff_symbol learns DIFF_SYMBOL_NO_LF_EOF
diff.c: emit_diff_symbol learns DIFF_SYMBOL_CONTEXT_FRAGINFO
...

load_subtree(): declare some variables to be `size_t`Michael Haggerty Sat, 26 Aug 2017 08:28:12 +0000 (10:28 +0200)

load_subtree(): declare some variables to be `size_t`

* `prefix_len`
* `path_len`
* `i`

It's good hygiene.

Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

hex_to_bytes(): simpler replacement for `get_oid_hex_se... Michael Haggerty Sat, 26 Aug 2017 08:28:11 +0000 (10:28 +0200)

hex_to_bytes(): simpler replacement for `get_oid_hex_segment()`

Now that `get_oid_hex_segment()` does less, it makes sense to rename
it and simplify its semantics:

* Instead of a `hex_len` parameter, which was the number of hex
characters (and had to be even), use a `len` parameter, which is the
number of resulting bytes. This removes then need for the check that
`hex_len` is even and to divide it by two to determine the number of
bytes. For good hygiene, declare the `len` parameter to be `size_t`
instead of `unsigned int`.

* Change the order of the arguments to the more traditional (dst,
src, len).

* Rename the function to `hex_to_bytes()`.

* Remove a loop variable: just count `len` down instead.

Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

get_oid_hex_segment(): don't pad the rest of `oid`Michael Haggerty Sat, 26 Aug 2017 08:28:10 +0000 (10:28 +0200)

get_oid_hex_segment(): don't pad the rest of `oid`

Remove the feature of `get_oid_hex_segment()` that it pads the rest of
the `oid` argument with zeros. Instead, do this at the caller who
needs it.

This makes the functionality of this function more coherent and
removes the need for its `oid_len` argument.

Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

load_subtree(): combine some common codeMichael Haggerty Sat, 26 Aug 2017 08:28:09 +0000 (10:28 +0200)

load_subtree(): combine some common code

Write the length into `object_oid` (before copying) rather than
`l->key_oid` (after copying). Then combine some code from the two `if`
blocks.

Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

get_oid_hex_segment(): return 0 on successMichael Haggerty Sat, 26 Aug 2017 08:28:08 +0000 (10:28 +0200)

get_oid_hex_segment(): return 0 on success

Nobody cares about the return value of get_oid_hex_segment() except to
check whether it failed. So just return 0 on success.

And while we're updating its docstring, update it for some argument
renaming that happened a while ago.

Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

load_subtree(): only consider blobs to be potential... Michael Haggerty Sat, 26 Aug 2017 08:28:07 +0000 (10:28 +0200)

load_subtree(): only consider blobs to be potential notes

The old code converted any entry whose path constituted a full SHA-1
as a leaf node, without regard for the type of the entry. But only
blobs can be notes. So treat entries whose paths *look like* notes
paths but that are not blobs as non-notes.

Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

load_subtree(): check earlier whether an internal node... Michael Haggerty Sat, 26 Aug 2017 08:28:06 +0000 (10:28 +0200)

load_subtree(): check earlier whether an internal node is a tree entry

If an entry is not a tree entry, then it cannot possibly be an
internal node. But the old code checked this condition only after
allocating a leaf_node object and therefore leaked that memory.
Instead, check before even entering this branch of the code.

Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

load_subtree(): separate logic for internal vs. termina... Michael Haggerty Sat, 26 Aug 2017 08:28:05 +0000 (10:28 +0200)

load_subtree(): separate logic for internal vs. terminal entries

There are only two legitimate notes path components:

* A hexadecimal string that fills the rest of the SHA-1

* A two-digit hexadecimal string that constitutes another internal
node.

So handle those two cases at the top level, and reject others as
non-notes without trying to parse them. The logic separation also
simplifies upcoming changes.

This prevents us from leaking memory for a leaf_node in the case of
wrong-sized paths. There are still memory leaks in this code; they will
be fixed in upcoming commits.

Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

load_subtree(): fix incorrect commentMichael Haggerty Sat, 26 Aug 2017 08:28:04 +0000 (10:28 +0200)

load_subtree(): fix incorrect comment

This comment was added in 851c2b3791 (Teach notes code to properly
preserve non-notes in the notes tree, 2010-02-13) when the
corresponding code was added. But I believe it was incorrect even
then. The condition `path_len != 2` a dozen lines up prevents a path
like "dead/beef" from being converted to "de/ad/beef", and indeed the
test added in commit 851c2b3 verifies that this case works correctly.

Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

load_subtree(): reduce the scope of some local variablesMichael Haggerty Sat, 26 Aug 2017 08:28:03 +0000 (10:28 +0200)

load_subtree(): reduce the scope of some local variables

Declare the variables inside the loop, to make it more obvious that
their values are not carried across loop iterations.

Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

load_subtree(): remove unnecessary conditionalMichael Haggerty Sat, 26 Aug 2017 08:28:02 +0000 (10:28 +0200)

load_subtree(): remove unnecessary conditional

At this point in the code, len is *always* <= 20.

Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

notes: make GET_NIBBLE macro more robustMichael Haggerty Sat, 26 Aug 2017 08:28:01 +0000 (10:28 +0200)

notes: make GET_NIBBLE macro more robust

Put parentheses around sha1. Otherwise it could fail for something
like

GET_NIBBLE(n, (unsigned char *)data);

Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

apply: remove epoch date from regexRené Scharfe Fri, 25 Aug 2017 19:06:28 +0000 (21:06 +0200)

apply: remove epoch date from regex

We check the date of epoch timestamp candidates already with
starts_with(). Move beyond that part using skip_prefix() instead of
checking it again using a regular expression. Also group the minutes
part, so that we can access them using a substring match instead of
using a magic number.

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

apply: check date of potential epoch timestamps firstRené Scharfe Fri, 25 Aug 2017 19:04:54 +0000 (21:04 +0200)

apply: check date of potential epoch timestamps first

has_epoch_timestamp() looks for time stamps that amount to either
1969-12-31 24:00 or 1970-01-01 00:00 after applying the time zone
offset. Move the check for these two dates up, set the expected hour
based on which one is found, or exit early if none of them are present,
thus avoiding to engage the regex machinery for newer dates.

This also gets rid of two magic string length constants.

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

sha1-lookup: remove sha1_entry_pos() from header fileChristian Couder Fri, 25 Aug 2017 07:36:13 +0000 (09:36 +0200)

sha1-lookup: remove sha1_entry_pos() from header file

Since f1068efefe (sha1_file: drop experimental GIT_USE_LOOKUP search, 2017-08-09)
the definition of sha1_entry_pos() has been removed from "sha1-lookup.c", so
there is no need anymore for its declaration in "sha1-lookup.h".

Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Acked-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

refs.c: reindent get_submodule_ref_store()Nguyễn Thái Ngọc Duy Wed, 23 Aug 2017 12:37:04 +0000 (19:37 +0700)

refs.c: reindent get_submodule_ref_store()

With the new "if (!submodule) return NULL;" code added in the previous
commit, we don't need to check if submodule is not NULL anymore.

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

refs.c: remove fallback-to-main-store code get_submodul... Nguyễn Thái Ngọc Duy Wed, 23 Aug 2017 12:37:03 +0000 (19:37 +0700)

refs.c: remove fallback-to-main-store code get_submodule_ref_store()

At this state, there are three get_submodule_ref_store() callers:

- for_each_remote_ref_submodule()
- handle_revision_pseudo_opt()
- resolve_gitlink_ref()

The first two deal explicitly with submodules (and we should never fall
back to the main ref store as a result). They are only called from
submodule.c:

- find_first_merges()
- submodule_needs_pushing()
- push_submodule()

The last one, as its name implies, deals only with submodules too, and
the "submodule" (path) argument must be a non-NULL, non-empty string.

So, this "if NULL or empty string" code block should never ever
trigger. And it's wrong to fall back to the main ref store
anyway. Delete it.

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

rev-list: expose and document --single-worktreeNguyễn Thái Ngọc Duy Wed, 23 Aug 2017 12:37:02 +0000 (19:37 +0700)

rev-list: expose and document --single-worktree

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

revision.c: --reflog add HEAD reflog from all worktreesNguyễn Thái Ngọc Duy Wed, 23 Aug 2017 12:37:01 +0000 (19:37 +0700)

revision.c: --reflog add HEAD reflog from all worktrees

Note that add_other_reflogs_to_pending() is a bit inefficient, since
it scans reflog for all refs of each worktree, including shared refs,
so the shared ref's reflog is scanned over and over again.

We could update refs API to pass "per-worktree only" flag to avoid
that. But long term we should be able to obtain a "per-worktree only"
ref store and would need to revert the changes in reflog iteration
API. So let's just wait until then.

add_reflogs_to_pending() is called by reachable.c so by default "git
prune" will examine reflog from all worktrees.

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

files-backend: make reflog iterator go through per... Nguyễn Thái Ngọc Duy Wed, 23 Aug 2017 12:37:00 +0000 (19:37 +0700)

files-backend: make reflog iterator go through per-worktree reflog

refs/bisect is unfortunately per-worktree, so we need to look in
per-worktree logs/refs/bisect in addition to per-repo logs/refs. The
current iterator only goes through per-repo logs/refs.

Use merge iterator to walk two ref stores at the same time and pick
per-worktree refs from the right iterator.

PS. Note the unsorted order of for_each_reflog in the test. This is
supposed to be OK, for now. If we enforce order on for_each_reflog()
then some more work will be required.

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

revision.c: --all adds HEAD from all worktreesNguyễn Thái Ngọc Duy Wed, 23 Aug 2017 12:36:59 +0000 (19:36 +0700)

revision.c: --all adds HEAD from all worktrees

Unless single_worktree is set, --all now adds HEAD from all worktrees.

Since reachable.c code does not use setup_revisions(), we need to call
other_head_refs_submodule() explicitly there to have the same effect on
"git prune", so that we won't accidentally delete objects needed by some
other HEADs.

A new FIXME is added because we would need something like

int refs_other_head_refs(struct ref_store *, each_ref_fn, cb_data);

in addition to other_head_refs() to handle it, which might require

int get_submodule_worktrees(const char *submodule, int flags);

It could be a separate topic to reduce the scope of this one.

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

refs: remove dead for_each_*_submodule()Nguyễn Thái Ngọc Duy Wed, 23 Aug 2017 12:36:58 +0000 (19:36 +0700)

refs: remove dead for_each_*_submodule()

These are used in revision.c. After the last patch they are replaced
with the refs_ version. Delete them.

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

refs.c: move for_each_remote_ref_submodule() to submodule.cNguyễn Thái Ngọc Duy Wed, 23 Aug 2017 12:36:57 +0000 (19:36 +0700)

refs.c: move for_each_remote_ref_submodule() to submodule.c

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

revision.c: use refs_for_each*() instead of for_each_... Nguyễn Thái Ngọc Duy Wed, 23 Aug 2017 12:36:56 +0000 (19:36 +0700)

revision.c: use refs_for_each*() instead of for_each_*_submodule()

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

refs: add refs_head_ref()Nguyễn Thái Ngọc Duy Wed, 23 Aug 2017 12:36:55 +0000 (19:36 +0700)

refs: add refs_head_ref()

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

refs: move submodule slash stripping code to get_submod... Nguyễn Thái Ngọc Duy Wed, 23 Aug 2017 12:36:54 +0000 (19:36 +0700)

refs: move submodule slash stripping code to get_submodule_ref_store

This is a better place that will benefit all submodule callers instead
of just resolve_gitlink_ref()

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

refs.c: refactor get_submodule_ref_store(), share commo... Nguyễn Thái Ngọc Duy Wed, 23 Aug 2017 12:36:53 +0000 (19:36 +0700)

refs.c: refactor get_submodule_ref_store(), share common free block

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

revision.c: --indexed-objects add objects from all... Nguyễn Thái Ngọc Duy Wed, 23 Aug 2017 12:36:52 +0000 (19:36 +0700)

revision.c: --indexed-objects add objects from all worktrees

This is the result of single_worktree flag never being set (no way to up
until now). To get objects from current index only, set single_worktree.

The other add_index_objects_to_pending's caller is mark_reachable_objects()
(e.g. "git prune") which also mark objects from all indexes.

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

revision.c: refactor add_index_objects_to_pending()Nguyễn Thái Ngọc Duy Wed, 23 Aug 2017 12:36:51 +0000 (19:36 +0700)

revision.c: refactor add_index_objects_to_pending()

The core code is factored out and take 'struct index_state *' instead so
that we can reuse it to add objects from index files other than .git/index
in the next patch.

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

refs.c: use is_dir_sep() in resolve_gitlink_ref()Nguyễn Thái Ngọc Duy Wed, 23 Aug 2017 12:36:50 +0000 (19:36 +0700)

refs.c: use is_dir_sep() in resolve_gitlink_ref()

The "submodule" argument in this function is a path, which can have
either '/' or '\\' as a separator. Use is_dir_sep() to support both.

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

revision.h: new flag in struct rev_info wrt. worktree... Nguyễn Thái Ngọc Duy Wed, 23 Aug 2017 12:36:49 +0000 (19:36 +0700)

revision.h: new flag in struct rev_info wrt. worktree-related refs

The revision walker can walk through per-worktree refs like HEAD or
SHA-1 references in the index. These currently are from the current
worktree only. This new flag is added to change rev-list behavior in
this regard:

When single_worktree is set, only current worktree is considered. When
it is not set (which is the default), all worktrees are considered.

The default is chosen so because the two big components that rev-list
works with are object database (entirely shared between worktrees) and
refs (mostly shared). It makes sense that default behavior goes per-repo
too instead of per-worktree.

The flag will eventually be exposed as a rev-list argument with
documents. For now it stays internal until the new behavior is fully
implemented.

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

send-email: don't use Mail::Address, even if availableMatthieu Moy Wed, 23 Aug 2017 10:21:02 +0000 (12:21 +0200)

send-email: don't use Mail::Address, even if available

Using Mail::Address made sense when we didn't have a proper parser. We
now have a reasonable address parser, and using Mail::Address
_if available_ causes much more trouble than it gives benefits:

* Developers typically test one version, not both.

* Users may not be aware that installing Mail::Address will change the
behavior. They may complain about the behavior in one case without
knowing that Mail::Address is involved.

* Having this optional Mail::Address makes it tempting to anwser "please
install Mail::Address" to users instead of fixing our own code. We've
reached the stage where bugs in our parser should be fixed, not worked
around.

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

send-email: fix garbage removal after addressMatthieu Moy Wed, 23 Aug 2017 10:21:01 +0000 (12:21 +0200)

send-email: fix garbage removal after address

This is a followup over 9d33439 (send-email: only allow one address
per body tag, 2017-02-20). The first iteration did allow writting

Cc: <foo@example.com> # garbage
but did so by matching the regex ([^>]*>?), i.e. stop after the first
instance of '>'. However, it did not properly deal with

Cc: foo@example.com # garbage
Fix this using a new function strip_garbage_one_address, which does
essentially what the old ([^>]*>?) was doing, but dealing with more
corner-cases. Since we've allowed

Cc: "Foo # Bar" <foobar@example.com>
in previous versions, it makes sense to continue allowing it (but we
still remove any garbage after it). OTOH, when an address is given
without quoting, we just take the first word and ignore everything
after.

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

branch: fix branch renaming not updating HEADs correctlyNguyễn Thái Ngọc Duy Thu, 24 Aug 2017 10:41:24 +0000 (17:41 +0700)

branch: fix branch renaming not updating HEADs correctly

There are two bugs that sort of work together and cause
problems. Let's start with one in replace_each_worktree_head_symref.

Before fa099d2322 (worktree.c: kill parse_ref() in favor of
refs_resolve_ref_unsafe() - 2017-04-24), this code looks like this:

if (strcmp(oldref, worktrees[i]->head_ref))
continue;
set_worktree_head_symref(...);

After fa099d2322, it is possible that head_ref can be NULL. However,
the updated code takes the wrong exit. In the error case (NULL
head_ref), we should "continue;" to the next worktree. The updated
code makes us _skip_ "continue;" and update HEAD anyway.

The NULL head_ref is triggered by the second bug in add_head_info (in
the same commit). With the flag RESOLVE_REF_READING, resolve_ref_unsafe()
will abort if it cannot resolve the target ref. For orphan checkouts,
HEAD always points to an unborned branch, resolving target ref will
always fail. Now we have NULL head_ref. Now we always update HEAD.

Correct the logic in replace_ function so that we don't accidentally
update HEAD on error. As it turns out, correcting the logic bug above
breaks branch renaming completely, thanks to the second bug.

"git branch -[Mm]" does two steps (on a normal checkout, no orphan!):

- rename the branch on disk (e.g. refs/heads/abc to refs/heads/def)
- update HEAD if it points to the branch being renamed.

At the second step, since the branch pointed to by HEAD (e.g. "abc") no
longer exists on disk, we run into a temporary orphan checkout situation
that has been just corrected to _not_ update HEAD. But we need to update
HEAD since it's not actually an orphan checkout. We need to update HEAD
to move out of that orphan state.

Correct add_head_info(), remove RESOLVE_REF_READING flag. With the flag
gone, we should always return good "head_ref" in orphan checkouts (either
temporary or permanent). With good head_ref, things start to work again.

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

convert: display progress for filtered objects that... Lars Schneider Sun, 20 Aug 2017 15:47:20 +0000 (17:47 +0200)

convert: display progress for filtered objects that have been delayed

In 2841e8f ("convert: add "status=delayed" to filter process protocol",
2017-06-30) we taught the filter process protocol to delayed responses.
These responses are processed after the "Checking out files" phase.
If the processing takes noticeable time, then the user might think Git
is stuck.

Display the progress of the delayed responses to let the user know that
Git is still processing objects. This works very well for objects that
can be filtered quickly. If filtering of an individual object takes
noticeable time, then the user might still think that Git is stuck.
However, in that case the user would at least know what Git is doing.

It would be technical more correct to display "Checking out files whose
content filtering has been delayed". For brevity we only print
"Filtering content".

The finish_delayed_checkout() call was moved below the stop_progress()
call in unpack-trees.c to ensure that the "Checking out files" progress
is properly stopped before the "Filtering content" progress starts in
finish_delayed_checkout().

Signed-off-by: Lars Schneider <larsxschneider@gmail.com>
Suggested-by: Taylor Blau <me@ttaylorr.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

The fourth batch post 2.14Junio C Hamano Thu, 24 Aug 2017 17:37:44 +0000 (10:37 -0700)

The fourth batch post 2.14

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

Merge branch 'jk/doc-the-this'Junio C Hamano Thu, 24 Aug 2017 17:20:03 +0000 (10:20 -0700)

Merge branch 'jk/doc-the-this'

Doc clean-up.

* jk/doc-the-this:
doc: fix typo in sendemail.identity

Merge branch 'rs/commit-h-single-parent-cleanup'Junio C Hamano Thu, 24 Aug 2017 17:20:03 +0000 (10:20 -0700)

Merge branch 'rs/commit-h-single-parent-cleanup'

Code clean-up.

* rs/commit-h-single-parent-cleanup:
commit: remove unused inline function single_parent()

Merge branch 'jc/simplify-progress'Junio C Hamano Thu, 24 Aug 2017 17:20:02 +0000 (10:20 -0700)

Merge branch 'jc/simplify-progress'

The API to start showing progress meter after a short delay has
been simplified.

* jc/simplify-progress:
progress: simplify "delayed" progress API

Merge branch 'tc/curl-with-backports'Junio C Hamano Thu, 24 Aug 2017 17:20:02 +0000 (10:20 -0700)

Merge branch 'tc/curl-with-backports'

Updates to the HTTP layer we made recently unconditionally used
features of libCurl without checking the existence of them, causing
compilation errors, which has been fixed. Also migrate the code to
check feature macros, not version numbers, to cope better with
libCurl that vendor ships with backported features.

* tc/curl-with-backports:
http: use a feature check to enable GSSAPI delegation control
http: fix handling of missing CURLPROTO_*

Merge branch 'cc/subprocess-handshake-missing-capabilities'Junio C Hamano Thu, 24 Aug 2017 17:20:02 +0000 (10:20 -0700)

Merge branch 'cc/subprocess-handshake-missing-capabilities'

When handshake with a subprocess filter notices that the process
asked for an unknown capability, Git did not report what program
the offending subprocess was running. This has been corrected.

* cc/subprocess-handshake-missing-capabilities:
sub-process: print the cmd when a capability is unsupported

Merge branch 'rs/object-id'Junio C Hamano Thu, 24 Aug 2017 17:20:02 +0000 (10:20 -0700)

Merge branch 'rs/object-id'

Conversion from uchar[20] to struct object_id continues.

* rs/object-id:
tree-walk: convert fill_tree_descriptor() to object_id

Merge branch 'lg/merge-signoff'Junio C Hamano Thu, 24 Aug 2017 17:20:01 +0000 (10:20 -0700)

Merge branch 'lg/merge-signoff'

"git merge" learned a "--signoff" option to add the Signed-off-by:
trailer with the committer's name.

* lg/merge-signoff:
merge: add a --signoff flag

pack: move for_each_packed_object()Jonathan Tan Fri, 18 Aug 2017 22:20:38 +0000 (15:20 -0700)

pack: move for_each_packed_object()

Signed-off-by: Jonathan Tan <jonathantanmy@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

pack: move has_pack_index()Jonathan Tan Fri, 18 Aug 2017 22:20:37 +0000 (15:20 -0700)

pack: move has_pack_index()

Signed-off-by: Jonathan Tan <jonathantanmy@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

pack: move has_sha1_pack()Jonathan Tan Fri, 18 Aug 2017 22:20:36 +0000 (15:20 -0700)

pack: move has_sha1_pack()

Signed-off-by: Jonathan Tan <jonathantanmy@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

pack: move find_pack_entry() and make it globalJonathan Tan Fri, 18 Aug 2017 22:20:35 +0000 (15:20 -0700)

pack: move find_pack_entry() and make it global

This function needs to be global as it is used by sha1_file.c and will
be used by packfile.c.

Signed-off-by: Jonathan Tan <jonathantanmy@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

pack: move find_sha1_pack()Jonathan Tan Fri, 18 Aug 2017 22:20:34 +0000 (15:20 -0700)

pack: move find_sha1_pack()

Signed-off-by: Jonathan Tan <jonathantanmy@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

pack: move find_pack_entry_one(), is_pack_valid()Jonathan Tan Fri, 18 Aug 2017 22:20:33 +0000 (15:20 -0700)

pack: move find_pack_entry_one(), is_pack_valid()

Signed-off-by: Jonathan Tan <jonathantanmy@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

pack: move check_pack_index_ptr(), nth_packed_object_of... Jonathan Tan Fri, 18 Aug 2017 22:20:32 +0000 (15:20 -0700)

pack: move check_pack_index_ptr(), nth_packed_object_offset()

Signed-off-by: Jonathan Tan <jonathantanmy@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

pack: move nth_packed_object_{sha1,oid}Jonathan Tan Fri, 18 Aug 2017 22:20:31 +0000 (15:20 -0700)

pack: move nth_packed_object_{sha1,oid}

Signed-off-by: Jonathan Tan <jonathantanmy@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

pack: move clear_delta_base_cache(), packed_object_info... Jonathan Tan Fri, 18 Aug 2017 22:20:30 +0000 (15:20 -0700)

pack: move clear_delta_base_cache(), packed_object_info(), unpack_entry()

Both sha1_file.c and packfile.c now need read_object(), so a copy of
read_object() was created in packfile.c.

This patch makes both mark_bad_packed_object() and has_packed_and_bad()
global. Unlike most of the other patches in this series, these 2
functions need to remain global.

Signed-off-by: Jonathan Tan <jonathantanmy@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

pack: move unpack_object_header()Jonathan Tan Fri, 18 Aug 2017 22:20:29 +0000 (15:20 -0700)

pack: move unpack_object_header()

Signed-off-by: Jonathan Tan <jonathantanmy@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

pack: move get_size_from_delta()Jonathan Tan Fri, 18 Aug 2017 22:20:28 +0000 (15:20 -0700)

pack: move get_size_from_delta()

Signed-off-by: Jonathan Tan <jonathantanmy@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

pack: move unpack_object_header_buffer()Jonathan Tan Fri, 18 Aug 2017 22:20:27 +0000 (15:20 -0700)

pack: move unpack_object_header_buffer()

Signed-off-by: Jonathan Tan <jonathantanmy@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

pack: move {,re}prepare_packed_git and approximate_obje... Jonathan Tan Fri, 18 Aug 2017 22:20:26 +0000 (15:20 -0700)

pack: move {,re}prepare_packed_git and approximate_object_count

Signed-off-by: Jonathan Tan <jonathantanmy@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

pack: move install_packed_git()Jonathan Tan Fri, 18 Aug 2017 22:20:25 +0000 (15:20 -0700)

pack: move install_packed_git()

Signed-off-by: Jonathan Tan <jonathantanmy@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

pack: move add_packed_git()Jonathan Tan Fri, 18 Aug 2017 22:20:24 +0000 (15:20 -0700)

pack: move add_packed_git()

Signed-off-by: Jonathan Tan <jonathantanmy@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

pack: move unuse_pack()Jonathan Tan Fri, 18 Aug 2017 22:20:23 +0000 (15:20 -0700)

pack: move unuse_pack()

Signed-off-by: Jonathan Tan <jonathantanmy@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

pack: move use_pack()Jonathan Tan Fri, 18 Aug 2017 22:20:22 +0000 (15:20 -0700)

pack: move use_pack()

The function open_packed_git() needs to be temporarily made global. Its
scope will be restored to static in a subsequent commit.

Signed-off-by: Jonathan Tan <jonathantanmy@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

pack: move pack-closing functionsJonathan Tan Fri, 18 Aug 2017 22:20:21 +0000 (15:20 -0700)

pack: move pack-closing functions

The function close_pack_fd() needs to be temporarily made global. Its
scope will be restored to static in a subsequent commit.

Signed-off-by: Jonathan Tan <jonathantanmy@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

pack: move release_pack_memory()Jonathan Tan Fri, 18 Aug 2017 22:20:20 +0000 (15:20 -0700)

pack: move release_pack_memory()

The function unuse_one_window() needs to be temporarily made global. Its
scope will be restored to static in a subsequent commit.

Signed-off-by: Jonathan Tan <jonathantanmy@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

pack: move open_pack_index(), parse_pack_index()Jonathan Tan Fri, 18 Aug 2017 22:20:19 +0000 (15:20 -0700)

pack: move open_pack_index(), parse_pack_index()

alloc_packed_git() in packfile.c is duplicated from sha1_file.c. In a
subsequent commit, alloc_packed_git() will be removed from sha1_file.c.

Signed-off-by: Jonathan Tan <jonathantanmy@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

pack: move pack_report()Jonathan Tan Fri, 18 Aug 2017 22:20:18 +0000 (15:20 -0700)

pack: move pack_report()

Signed-off-by: Jonathan Tan <jonathantanmy@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

pack: move static state variablesJonathan Tan Fri, 18 Aug 2017 22:20:17 +0000 (15:20 -0700)

pack: move static state variables

sha1_file.c declares some static variables that store packfile-related
state. Move them to packfile.c.

They are temporarily made global, but subsequent commits will restore
their scope back to static.

Signed-off-by: Jonathan Tan <jonathantanmy@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

pack: move pack name-related functionsJonathan Tan Fri, 18 Aug 2017 22:20:16 +0000 (15:20 -0700)

pack: move pack name-related functions

Currently, sha1_file.c and cache.h contain many functions, both related
to and unrelated to packfiles. This makes both files very large and
causes an unclear separation of concerns.

Create a new file, packfile.c, to hold all packfile-related functions
currently in sha1_file.c. It has a corresponding header packfile.h.

In this commit, the pack name-related functions are moved. Subsequent
commits will move the other functions.

Signed-off-by: Jonathan Tan <jonathantanmy@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Sync with maintJunio C Hamano Wed, 23 Aug 2017 21:36:38 +0000 (14:36 -0700)

Sync with maint

* maint:
Prepare for 2.14.2

Prepare for 2.14.2Junio C Hamano Wed, 23 Aug 2017 21:36:03 +0000 (14:36 -0700)

Prepare for 2.14.2

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

Merge branch 'jt/t1450-fsck-corrupt-packfile' into... Junio C Hamano Wed, 23 Aug 2017 21:33:52 +0000 (14:33 -0700)

Merge branch 'jt/t1450-fsck-corrupt-packfile' into maint

A test update.

* jt/t1450-fsck-corrupt-packfile:
tests: ensure fsck fails on corrupt packfiles

Merge branch 'jb/t8008-cleanup' into maintJunio C Hamano Wed, 23 Aug 2017 21:33:52 +0000 (14:33 -0700)

Merge branch 'jb/t8008-cleanup' into maint

Code clean-up.

* jb/t8008-cleanup:
t8008: rely on rev-parse'd HEAD instead of sha1 value

Merge branch 'jt/subprocess-handshake' into maintJunio C Hamano Wed, 23 Aug 2017 21:33:52 +0000 (14:33 -0700)

Merge branch 'jt/subprocess-handshake' into maint

Code cleanup.

* jt/subprocess-handshake:
sub-process: refactor handshake to common function
Documentation: migrate sub-process docs to header
convert: add "status=delayed" to filter process protocol
convert: refactor capabilities negotiation
convert: move multiple file filter error handling to separate function
convert: put the flags field before the flag itself for consistent style
t0021: write "OUT <size>" only on success
t0021: make debug log file name configurable
t0021: keep filter log files on comparison

Merge branch 'dc/fmt-merge-msg-microcleanup' into maintJunio C Hamano Wed, 23 Aug 2017 21:33:52 +0000 (14:33 -0700)

Merge branch 'dc/fmt-merge-msg-microcleanup' into maint

Code cleanup.

* dc/fmt-merge-msg-microcleanup:
fmt-merge-msg: fix coding style

Merge branch 'ah/doc-wserrorhighlight' into maintJunio C Hamano Wed, 23 Aug 2017 21:33:51 +0000 (14:33 -0700)

Merge branch 'ah/doc-wserrorhighlight' into maint

Doc update.

* ah/doc-wserrorhighlight:
doc: add missing values "none" and "default" for diff.wsErrorHighlight

Merge branch 'cc/ref-is-hidden-microcleanup' into maintJunio C Hamano Wed, 23 Aug 2017 21:33:50 +0000 (14:33 -0700)

Merge branch 'cc/ref-is-hidden-microcleanup' into maint

Code cleanup.

* cc/ref-is-hidden-microcleanup:
refs: use skip_prefix() in ref_is_hidden()

Merge branch 'js/run-process-parallel-api-fix' into... Junio C Hamano Wed, 23 Aug 2017 21:33:49 +0000 (14:33 -0700)

Merge branch 'js/run-process-parallel-api-fix' into maint

API fix.

* js/run-process-parallel-api-fix:
run_processes_parallel: change confusing task_cb convention

Merge branch 'rs/pack-objects-pbase-cleanup' into maintJunio C Hamano Wed, 23 Aug 2017 21:33:48 +0000 (14:33 -0700)

Merge branch 'rs/pack-objects-pbase-cleanup' into maint

Code clean-up.

* rs/pack-objects-pbase-cleanup:
pack-objects: remove unnecessary NULL check

Merge branch 'jt/fsck-code-cleanup' into maintJunio C Hamano Wed, 23 Aug 2017 21:33:48 +0000 (14:33 -0700)

Merge branch 'jt/fsck-code-cleanup' into maint

Code clean-up.

* jt/fsck-code-cleanup:
fsck: cleanup unused variable
object: remove "used" field from struct object
fsck: remove redundant parse_tree() invocation

Merge branch 'rs/stat-data-unaligned-reads-fix' into... Junio C Hamano Wed, 23 Aug 2017 21:33:47 +0000 (14:33 -0700)

Merge branch 'rs/stat-data-unaligned-reads-fix' into maint

Code clean-up.

* rs/stat-data-unaligned-reads-fix:
dir: support platforms that require aligned reads

Merge branch 'rs/move-array' into maintJunio C Hamano Wed, 23 Aug 2017 21:33:46 +0000 (14:33 -0700)

Merge branch 'rs/move-array' into maint

Code clean-up.

* rs/move-array:
ls-files: don't try to prune an empty index
apply: use COPY_ARRAY and MOVE_ARRAY in update_image()
use MOVE_ARRAY
add MOVE_ARRAY

Merge branch 'rs/bswap-ubsan-fix' into maintJunio C Hamano Wed, 23 Aug 2017 21:33:46 +0000 (14:33 -0700)

Merge branch 'rs/bswap-ubsan-fix' into maint

Code clean-up.

* rs/bswap-ubsan-fix:
bswap: convert get_be16, get_be32 and put_be32 to inline functions
bswap: convert to unsigned before shifting in get_be32

Merge branch 'dl/credential-cache-socket-in-xdg-cache... Junio C Hamano Wed, 23 Aug 2017 21:33:45 +0000 (14:33 -0700)

Merge branch 'dl/credential-cache-socket-in-xdg-cache' into maint

A recently added test for the "credential-cache" helper revealed
that EOF detection done around the time the connection to the cache
daemon is torn down were flaky. This was fixed by reacting to
ECONNRESET and behaving as if we got an EOF.

* dl/credential-cache-socket-in-xdg-cache:
credential-cache: interpret an ECONNRESET as an EOF

Merge branch 'hb/gitweb-project-list' into maintJunio C Hamano Wed, 23 Aug 2017 21:33:44 +0000 (14:33 -0700)

Merge branch 'hb/gitweb-project-list' into maint

When a directory is not readable, "gitweb" fails to build the
project list. Work this around by skipping such a directory.

It might end up hiding a problem under the rug and a better
solution might be to loudly complain to the administrator pointing
out the problematic directory, but this will at least make it
"work".

* hb/gitweb-project-list:
gitweb: skip unreadable subdirectories

Merge branch 'ks/commit-abort-on-empty-message-fix... Junio C Hamano Wed, 23 Aug 2017 21:33:44 +0000 (14:33 -0700)

Merge branch 'ks/commit-abort-on-empty-message-fix' into maint

"git commit" when seeing an totally empty message said "you did not
edit the message", which is clearly wrong. The message has been
corrected.

* ks/commit-abort-on-empty-message-fix:
commit: check for empty message before the check for untouched template

Merge branch 'jk/reflog-walk' into maintJunio C Hamano Wed, 23 Aug 2017 21:33:43 +0000 (14:33 -0700)

Merge branch 'jk/reflog-walk' into maint

Numerous bugs in walking of reflogs via "log -g" and friends have
been fixed.

* jk/reflog-walk:
reflog-walk: apply --since/--until to reflog dates
reflog-walk: stop using fake parents
rev-list: check reflog_info before showing usage
get_revision_1(): replace do-while with an early return
log: do not free parents when walking reflog
log: clarify comment about reflog cycles
revision: disallow reflog walking with revs->limited
t1414: document some reflog-walk oddities

Merge branch 'jc/http-sslkey-and-ssl-cert-are-paths... Junio C Hamano Wed, 23 Aug 2017 21:33:43 +0000 (14:33 -0700)

Merge branch 'jc/http-sslkey-and-ssl-cert-are-paths' into maint

The http.{sslkey,sslCert} configuration variables are to be
interpreted as a pathname that honors "~[username]/" prefix, but
weren't, which has been fixed.

* jc/http-sslkey-and-ssl-cert-are-paths:
http.c: http.sslcert and http.sslkey are both pathnames

Merge branch 'jk/ref-filter-colors' into maintJunio C Hamano Wed, 23 Aug 2017 21:33:42 +0000 (14:33 -0700)

Merge branch 'jk/ref-filter-colors' into maint

"%C(color name)" in the pretty print format always produced ANSI
color escape codes, which was an early design mistake. They now
honor the configuration (e.g. "color.ui = never") and also tty-ness
of the output medium.

* jk/ref-filter-colors:
ref-filter: consult want_color() before emitting colors
pretty: respect color settings for %C placeholders
rev-list: pass diffopt->use_colors through to pretty-print
for-each-ref: load config earlier
color: check color.ui in git_default_config()
ref-filter: pass ref_format struct to atom parsers
ref-filter: factor out the parsing of sorting atoms
ref-filter: make parse_ref_filter_atom a private function
ref-filter: provide a function for parsing sort options
ref-filter: move need_color_reset_at_eol into ref_format
ref-filter: abstract ref format into its own struct
ref-filter: simplify automatic color reset
t: use test_decode_color rather than literal ANSI codes
docs/for-each-ref: update pointer to color syntax
check return value of verify_ref_format()

Merge branch 'js/git-gui-msgfmt-on-windows' into maintJunio C Hamano Wed, 23 Aug 2017 21:33:42 +0000 (14:33 -0700)

Merge branch 'js/git-gui-msgfmt-on-windows' into maint

Because recent Git for Windows do come with a real msgfmt, the
build procedure for git-gui has been updated to use it instead of a
hand-rolled substitute.

* js/git-gui-msgfmt-on-windows:
git-gui (MinGW): make use of MSys2's msgfmt
git gui: allow for a long recentrepo list
git gui: de-dup selected repo from recentrepo history
git gui: cope with duplicates in _get_recentrepo
git-gui: remove duplicate entries from .gitconfig's gui.recentrepo

The third batch post 2.14Junio C Hamano Wed, 23 Aug 2017 21:16:00 +0000 (14:16 -0700)

The third batch post 2.14

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

Merge branch 'mg/format-ref-doc-fix'Junio C Hamano Wed, 23 Aug 2017 21:13:14 +0000 (14:13 -0700)

Merge branch 'mg/format-ref-doc-fix'

Doc fix.

* mg/format-ref-doc-fix:
Documentation/git-for-each-ref: clarify peeling of tags for --format
Documentation: use proper wording for ref format strings

Merge branch 'sb/submodule-parallel-update'Junio C Hamano Wed, 23 Aug 2017 21:13:14 +0000 (14:13 -0700)

Merge branch 'sb/submodule-parallel-update'

Code clean-up.

* sb/submodule-parallel-update:
submodule.sh: remove unused variable

Merge branch 'jc/diff-sane-truncate-no-more'Junio C Hamano Wed, 23 Aug 2017 21:13:13 +0000 (14:13 -0700)

Merge branch 'jc/diff-sane-truncate-no-more'

Code clean-up.

* jc/diff-sane-truncate-no-more:
diff: retire sane_truncate_fn

Merge branch 'hv/t5526-andand-chain-fix'Junio C Hamano Wed, 23 Aug 2017 21:13:13 +0000 (14:13 -0700)

Merge branch 'hv/t5526-andand-chain-fix'

Test fix.

* hv/t5526-andand-chain-fix:
t5526: fix some broken && chains

Merge branch 'as/grep-quiet-no-match-exit-code-fix'Junio C Hamano Wed, 23 Aug 2017 21:13:12 +0000 (14:13 -0700)

Merge branch 'as/grep-quiet-no-match-exit-code-fix'

"git grep -L" and "git grep --quiet -L" reported different exit
codes; this has been corrected.

* as/grep-quiet-no-match-exit-code-fix:
git-grep: correct exit code with --quiet and -L

Merge branch 'kw/commit-keep-index-when-pre-commit... Junio C Hamano Wed, 23 Aug 2017 21:13:11 +0000 (14:13 -0700)

Merge branch 'kw/commit-keep-index-when-pre-commit-is-not-run'

"git commit" used to discard the index and re-read from the filesystem
just in case the pre-commit hook has updated it in the middle; this
has been optimized out when we know we do not run the pre-commit hook.

* kw/commit-keep-index-when-pre-commit-is-not-run:
commit: skip discarding the index if there is no pre-commit hook

Merge branch 'sb/sha1-file-cleanup'Junio C Hamano Wed, 23 Aug 2017 21:13:10 +0000 (14:13 -0700)

Merge branch 'sb/sha1-file-cleanup'

Code clean-up.

* sb/sha1-file-cleanup:
sha1_file: make read_info_alternates static

Merge branch 'rs/t1002-do-not-use-sum'Junio C Hamano Wed, 23 Aug 2017 21:13:09 +0000 (14:13 -0700)

Merge branch 'rs/t1002-do-not-use-sum'

Test simplification.

* rs/t1002-do-not-use-sum:
t1002: stop using sum(1)

Merge branch 'kd/stash-with-bash-4.4'Junio C Hamano Wed, 23 Aug 2017 21:13:08 +0000 (14:13 -0700)

Merge branch 'kd/stash-with-bash-4.4'

bash 4.4 or newer gave a warning on NUL byte in command
substitution done in "git stash"; this has been squelched.

* kd/stash-with-bash-4.4:
stash: prevent warning about null bytes in input

Merge branch 'ah/doc-empty-string-is-false'Junio C Hamano Wed, 23 Aug 2017 21:13:08 +0000 (14:13 -0700)

Merge branch 'ah/doc-empty-string-is-false'

Doc update.

* ah/doc-empty-string-is-false:
doc: clarify "config --bool" behaviour with empty string

Merge branch 'kw/rebase-progress'Junio C Hamano Wed, 23 Aug 2017 21:13:07 +0000 (14:13 -0700)

Merge branch 'kw/rebase-progress'

"git rebase", especially when it is run by mistake and ends up
trying to replay many changes, spent long time in silence. The
command has been taught to show progress report when it spends
long time preparing these many changes to replay (which would give
the user a chance to abort with ^C).

* kw/rebase-progress:
rebase: turn on progress option by default for format-patch
format-patch: have progress option while generating patches