gitweb.git
git-worktree.txt: fix typo "to"/"two", and add commaBen North Sat, 12 Nov 2016 08:55:16 +0000 (08:55 +0000)

git-worktree.txt: fix typo "to"/"two", and add comma

Signed-off-by: Ben North <ben@redfrontdoor.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

worktree.c: find_worktree() search by path suffixNguyễn Thái Ngọc Duy Mon, 13 Jun 2016 12:18:26 +0000 (19:18 +0700)

worktree.c: find_worktree() search by path suffix

This allows the user to do something like "worktree lock foo" or
"worktree lock to/foo" instead of "worktree lock /long/path/to/foo" if
it's unambiguous.

With completion support it could be quite convenient. While this base
name search can be done in the same worktree iteration loop, the code is
split into a separate function for clarity.

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

worktree: add "unlock" commandNguyễn Thái Ngọc Duy Mon, 13 Jun 2016 12:18:25 +0000 (19:18 +0700)

worktree: add "unlock" command

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

worktree: add "lock" commandNguyễn Thái Ngọc Duy Mon, 13 Jun 2016 12:18:24 +0000 (19:18 +0700)

worktree: add "lock" command

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

worktree.c: add is_worktree_locked()Nguyễn Thái Ngọc Duy Mon, 13 Jun 2016 12:18:23 +0000 (19:18 +0700)

worktree.c: add is_worktree_locked()

We need this later to avoid double locking a worktree, or unlocking one
when it's not even locked.

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

worktree.c: add is_main_worktree()Nguyễn Thái Ngọc Duy Fri, 3 Jun 2016 12:19:40 +0000 (19:19 +0700)

worktree.c: add is_main_worktree()

Main worktree _is_ different. You can lock (*) a linked worktree but not
the main one, for example. Provide an API for checking that.

(*) Add the file $GIT_DIR/worktrees/xxx/locked to avoid worktree xxx
from being removed or moved.

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

worktree.c: add find_worktree()Nguyễn Thái Ngọc Duy Fri, 3 Jun 2016 12:19:39 +0000 (19:19 +0700)

worktree.c: add find_worktree()

So far we haven't needed to identify an existing worktree from command
line. Future commands such as lock or move will need it. The current
implementation identifies worktrees by path (*). In future, the function
could learn to identify by $(basename $path) or tags...

(*) We could probably go cheaper with comparing inode number (and
probably more reliable than paths when unicode enters the game). But not
all systems have good inode that so let's stick to something simple for
now.

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

worktree: simplify prefixing pathsNguyễn Thái Ngọc Duy Sun, 22 May 2016 09:33:56 +0000 (16:33 +0700)

worktree: simplify prefixing paths

This also makes slash conversion always happen on Windows (a side effect
of prefix_filename). Which is a good thing.

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

worktree: avoid 0{40}, too many zeroes, hard to readNguyễn Thái Ngọc Duy Sun, 22 May 2016 09:33:55 +0000 (16:33 +0700)

worktree: avoid 0{40}, too many zeroes, hard to read

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

worktree.c: use is_dot_or_dotdot()Nguyễn Thái Ngọc Duy Sun, 22 May 2016 09:33:54 +0000 (16:33 +0700)

worktree.c: use is_dot_or_dotdot()

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

git-worktree.txt: keep subcommand listing in alphabetic... Nguyễn Thái Ngọc Duy Sun, 22 May 2016 09:33:53 +0000 (16:33 +0700)

git-worktree.txt: keep subcommand listing in alphabetical order

This is probably not the best order. But it makes it no-brainer to know
where to insert new commands. At some point we might want to reorder at
least the synopsis part again, grouping commonly use subcommands together.

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

worktree.c: rewrite mark_current_worktree() to avoid... Nguyễn Thái Ngọc Duy Sun, 22 May 2016 09:33:52 +0000 (16:33 +0700)

worktree.c: rewrite mark_current_worktree() to avoid strbuf

strbuf is a bit overkill for this function. What we need is to call
absolute_path() twice and make sure the second call does not destroy the
result of the first. One buffer allocation is enough.

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

completion: support git-worktreeNguyễn Thái Ngọc Duy Sun, 22 May 2016 09:33:51 +0000 (16:33 +0700)

completion: support git-worktree

This adds bare-bone completion support for git-worktree. More advanced
completion (e.g. ref completion in git-worktree-add) can be added later.

--force completion in "worktree add" is left out because that option
should be handled with care.

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

branch: do not rename a branch under bisect or rebaseNguyễn Thái Ngọc Duy Fri, 22 Apr 2016 13:01:36 +0000 (20:01 +0700)

branch: do not rename a branch under bisect or rebase

The branch name in that case could be saved in rebase's head_name or
bisect's BISECT_START files. Ideally we should try to update them as
well. But it's trickier (*). Let's play safe and see if the user
complains about inconveniences before doing that.

(*) If we do it, bisect and rebase need to provide an API to rename
branches. We can't do it in worktree.c or builtin/branch.c because
when other people change rebase/bisect code, they may not be aware of
this code and accidentally break it (e.g. rename the branch file, or
refer to the branch in new files). It's a lot more work.

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

worktree.c: check whether branch is bisected in another... Nguyễn Thái Ngọc Duy Fri, 22 Apr 2016 13:01:35 +0000 (20:01 +0700)

worktree.c: check whether branch is bisected in another worktree

Similar to the rebase case, we want to detect if "HEAD" in some worktree
is being bisected because

1) we do not want to checkout this branch in another worktree, after
bisect is done it will want to go back to this branch

2) we do not want to delete the branch is either or git bisect will
fail to return to the (long gone) branch

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

wt-status.c: split bisect detection out of wt_status_ge... Nguyễn Thái Ngọc Duy Fri, 22 Apr 2016 13:01:34 +0000 (20:01 +0700)

wt-status.c: split bisect detection out of wt_status_get_state()

And make it work with any given worktree, in preparation for (again)
find_shared_symref(). read_and_strip_branch() is deleted because it's
no longer used.

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

worktree.c: check whether branch is rebased in another... Nguyễn Thái Ngọc Duy Fri, 22 Apr 2016 13:01:33 +0000 (20:01 +0700)

worktree.c: check whether branch is rebased in another worktree

This function find_shared_symref() is used in a couple places:

1) in builtin/branch.c: it's used to detect if a branch is checked out
elsewhere and refuse to delete the branch.

2) in builtin/notes.c: it's used to detect if a note is being merged in
another worktree

3) in branch.c, the function die_if_checked_out() is actually used by
"git checkout" and "git worktree add" to see if a branch is already
checked out elsewhere and refuse the operation.

In cases 1 and 3, if a rebase is ongoing, "HEAD" will be in detached
mode, find_shared_symref() fails to detect it and declares "no branch is
checked out here", which is not really what we want.

This patch tightens the test. If the given symref is "HEAD", we try to
detect if rebase is ongoing. If so return the branch being rebased. This
makes checkout and branch delete operations safer because you can't
checkout a branch being rebased in another place, or delete it.

Special case for checkout. If the current branch is being rebased,
git-rebase.sh may use "git checkout" to abort and return back to the
original branch. The updated test in find_shared_symref() will prevent
that and "git rebase --abort" will fail as a result.
find_shared_symref() and die_if_checked_out() have to learn a new
option ignore_current_worktree to loosen the test a bit.

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

worktree.c: avoid referencing to worktrees[i] multiple... Nguyễn Thái Ngọc Duy Fri, 22 Apr 2016 13:01:32 +0000 (20:01 +0700)

worktree.c: avoid referencing to worktrees[i] multiple times

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

wt-status.c: make wt_status_check_rebase() work on... Nguyễn Thái Ngọc Duy Fri, 22 Apr 2016 13:01:31 +0000 (20:01 +0700)

wt-status.c: make wt_status_check_rebase() work on any worktree

This is a preparation step for find_shared_symref() to detect if any
worktree is being rebased.

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

wt-status.c: split rebase detection out of wt_status_ge... Nguyễn Thái Ngọc Duy Fri, 22 Apr 2016 13:01:30 +0000 (20:01 +0700)

wt-status.c: split rebase detection out of wt_status_get_state()

worktree.c:find_shared_symref() later needs to know if a branch is being
rebased, and only rebase, no cherry-pick, do detached branch... Split
this code so it can be used independently from other in-progress tests.

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

path.c: refactor and add worktree_git_path()Nguyễn Thái Ngọc Duy Fri, 22 Apr 2016 13:01:29 +0000 (20:01 +0700)

path.c: refactor and add worktree_git_path()

do_git_path(), which is the common code for all git_path* functions, is
modified to take a worktree struct and can produce paths for any
worktree.

worktree_git_path() is the first function that makes use of this. It can
be used to write code that can examine any worktree. For example,
wt_status_get_state() will be converted using this to take
am/rebase/... state of any worktree.

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

worktree.c: mark current worktreeNguyễn Thái Ngọc Duy Fri, 22 Apr 2016 13:01:28 +0000 (20:01 +0700)

worktree.c: mark current worktree

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

worktree.c: make find_shared_symref() return struct... Nguyễn Thái Ngọc Duy Fri, 22 Apr 2016 13:01:27 +0000 (20:01 +0700)

worktree.c: make find_shared_symref() return struct worktree *

This gives the caller more information and they can answer things like,
"is it the main worktree" or "is it the current worktree". The latter
question is needed for the "checkout a rebase branch" case later.

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

worktree.c: store "id" instead of "git_dir"Nguyễn Thái Ngọc Duy Fri, 22 Apr 2016 13:01:26 +0000 (20:01 +0700)

worktree.c: store "id" instead of "git_dir"

We can reconstruct git_dir from id quite easily. It's a bit hackier to
do the reverse.

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

path.c: add git_common_path() and strbuf_git_common_path()Nguyễn Thái Ngọc Duy Fri, 22 Apr 2016 13:01:25 +0000 (20:01 +0700)

path.c: add git_common_path() and strbuf_git_common_path()

These are mostly convenient functions to reduce code duplication. Most
of the time, we should be able to get by with git_path() which handles
$GIT_COMMON_DIR internally. However there are a few cases where we need
to construct paths manually, for example some paths from a specific
worktree. These functions will enable that.

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

dir.c: rename str(n)cmp_icase to fspath(n)cmpNguyễn Thái Ngọc Duy Fri, 22 Apr 2016 13:01:24 +0000 (20:01 +0700)

dir.c: rename str(n)cmp_icase to fspath(n)cmp

These functions compare two paths that are taken from file system.
Depending on the running file system, paths may need to be compared
case-sensitively or not, and maybe even something else in future. The
current names do not convey that well.

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

Fifth batch for post 2.8 cycleJunio C Hamano Mon, 18 Apr 2016 17:51:09 +0000 (10:51 -0700)

Fifth batch for post 2.8 cycle

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

Merge branch 'jk/branch-shortening-funny-symrefs'Junio C Hamano Mon, 18 Apr 2016 17:49:14 +0000 (10:49 -0700)

Merge branch 'jk/branch-shortening-funny-symrefs'

A change back in version 2.7 to "git branch" broke display of a
symbolic ref in a non-standard place in the refs/ hierarchy (we
expect symbolic refs to appear in refs/remotes/*/HEAD to point at
the primary branch the remote has, and as .git/HEAD to point at the
branch we locally checked out).

* jk/branch-shortening-funny-symrefs:
branch: fix shortening of non-remote symrefs

Merge branch 'ky/branch-m-worktree'Junio C Hamano Mon, 18 Apr 2016 17:48:11 +0000 (10:48 -0700)

Merge branch 'ky/branch-m-worktree'

When "git worktree" feature is in use, "git branch -m" renamed a
branch that is checked out in another worktree without adjusting
the HEAD symbolic ref for the worktree.

* ky/branch-m-worktree:
set_worktree_head_symref(): fix error message
branch -m: update all per-worktree HEADs
refs: add a new function set_worktree_head_symref

Merge branch 'maint'Junio C Hamano Fri, 15 Apr 2016 01:59:09 +0000 (18:59 -0700)

Merge branch 'maint'

* maint:
Prepare for 2.8.2
Start preparing for 2.8.2

Prepare for 2.8.2Junio C Hamano Fri, 15 Apr 2016 01:58:11 +0000 (18:58 -0700)

Prepare for 2.8.2

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

Merge branch 'jv/merge-nothing-into-void' into maintJunio C Hamano Fri, 15 Apr 2016 01:57:49 +0000 (18:57 -0700)

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

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

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

Merge branch 'ss/commit-squash-msg' into maintJunio C Hamano Fri, 15 Apr 2016 01:57:48 +0000 (18:57 -0700)

Merge branch 'ss/commit-squash-msg' into maint

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

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

Merge branch 'jk/send-email-rtrim-mailrc-alias' into... Junio C Hamano Fri, 15 Apr 2016 01:57:47 +0000 (18:57 -0700)

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

"git send-email" had trouble parsing alias file in mailrc format
when lines in it had trailing whitespaces on them.

* jk/send-email-rtrim-mailrc-alias:
send-email: ignore trailing whitespace in mailrc alias file

Merge branch 'da/mergetool-delete-delete-conflict'... Junio C Hamano Fri, 15 Apr 2016 01:57:47 +0000 (18:57 -0700)

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

"git mergetool" did not work well with conflicts that both sides
deleted.

* da/mergetool-delete-delete-conflict:
mergetool: honor tempfile configuration when resolving delete conflicts
mergetool: support delete/delete conflicts

Merge branch 'jk/startup-info' into maintJunio C Hamano Fri, 15 Apr 2016 01:57:46 +0000 (18:57 -0700)

Merge branch 'jk/startup-info' into maint

The startup_info data, which records if we are working inside a
repository (among other things), are now uniformly available to Git
subcommand implementations, and Git avoids attempting to touch
references when we are not in a repository.

* jk/startup-info:
use setup_git_directory() in test-* programs
grep: turn off gitlink detection for --no-index
mailmap: do not resolve blobs in a non-repository
remote: don't resolve HEAD in non-repository
setup: set startup_info->have_repository more reliably
setup: make startup_info available everywhere

Merge branch 'jk/getwholeline-getdelim-empty' into... Junio C Hamano Fri, 15 Apr 2016 01:57:46 +0000 (18:57 -0700)

Merge branch 'jk/getwholeline-getdelim-empty' into maint

strbuf_getwholeline() did not NUL-terminate the buffer on certain
corner cases in its error codepath.

* jk/getwholeline-getdelim-empty:
strbuf_getwholeline: NUL-terminate getdelim buffer on error

Merge branch 'rj/xdiff-prepare-plug-leak-on-error-codep... Junio C Hamano Fri, 15 Apr 2016 01:57:45 +0000 (18:57 -0700)

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

A small memory leak in an error codepath has been plugged in xdiff
code.

* rj/xdiff-prepare-plug-leak-on-error-codepath:
xdiff/xprepare: fix a memory leak
xdiff/xprepare: use the XDF_DIFF_ALG() macro to access flag bits

Merge branch 'gf/fetch-pack-direct-object-fetch' into... Junio C Hamano Fri, 15 Apr 2016 01:57:44 +0000 (18:57 -0700)

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

Fetching of history by naming a commit object name directly didn't
work across remote-curl transport.

* gf/fetch-pack-direct-object-fetch:
fetch-pack: update the documentation for "<refs>..." arguments
fetch-pack: fix object_id of exact sha1

Merge branch 'jk/rev-parse-local-env-vars' into maintJunio C Hamano Fri, 15 Apr 2016 01:57:44 +0000 (18:57 -0700)

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

The "--local-env-vars" and "--resolve-git-dir" options of "git
rev-parse" failed to work outside a repository when the command's
option parsing was rewritten in 1.8.5 era.

* jk/rev-parse-local-env-vars:
rev-parse: let some options run outside repository
t1515: add tests for rev-parse out-of-repo helpers

Merge branch 'jk/config-get-urlmatch' into maintJunio C Hamano Fri, 15 Apr 2016 01:57:43 +0000 (18:57 -0700)

Merge branch 'jk/config-get-urlmatch' into maint

"git config --get-urlmatch", unlike other variants of the "git
config --get" family, did not signal error with its exit status
when there was no matching configuration.

* jk/config-get-urlmatch:
Documentation/git-config: fix --get-all description
Documentation/git-config: use bulleted list for exit codes
config: fail if --get-urlmatch finds no value

Merge branch 'pb/t7502-drop-dup' into maintJunio C Hamano Fri, 15 Apr 2016 01:37:18 +0000 (18:37 -0700)

Merge branch 'pb/t7502-drop-dup' into maint

Code clean-up.

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

Merge branch 'jk/test-httpd-config-nosystem' into maintJunio C Hamano Fri, 15 Apr 2016 01:37:17 +0000 (18:37 -0700)

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

The tests that involve running httpd leaked the system-wide
configuration in /etc/gitconfig to the tested environment.

* jk/test-httpd-config-nosystem:
t/lib-httpd: pass through GIT_CONFIG_NOSYSTEM env

Merge branch 'sb/clone-t57-t56' into maintJunio C Hamano Fri, 15 Apr 2016 01:37:16 +0000 (18:37 -0700)

Merge branch 'sb/clone-t57-t56' into maint

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

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

Merge branch 'jk/credential-cache-comment-exit' into... Junio C Hamano Fri, 15 Apr 2016 01:37:16 +0000 (18:37 -0700)

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

A code clarification.

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

Merge branch 'jc/index-pack' into maintJunio C Hamano Fri, 15 Apr 2016 01:37:15 +0000 (18:37 -0700)

Merge branch 'jc/index-pack' into maint

Code clean-up.

* jc/index-pack:
index-pack: add a helper function to derive .idx/.keep filename
index-pack: correct --keep[=<msg>]

Merge branch 'ss/exc-flag-is-a-collection-of-bits'... Junio C Hamano Fri, 15 Apr 2016 01:37:15 +0000 (18:37 -0700)

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

Code clean-up.

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

Merge branch 'mp/upload-pack-use-embedded-args' into... Junio C Hamano Fri, 15 Apr 2016 01:37:14 +0000 (18:37 -0700)

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

The embedded args argv-array in the child process is used to build
the command line to run pack-objects instead of using a separate
array of strings.

* mp/upload-pack-use-embedded-args:
upload-pack: use argv_array for pack_objects

Merge branch 'oa/doc-diff-check' into maintJunio C Hamano Fri, 15 Apr 2016 01:37:14 +0000 (18:37 -0700)

Merge branch 'oa/doc-diff-check' into maint

A minor documentation update.

* oa/doc-diff-check:
Documentation: git diff --check detects conflict markers

Merge branch 'pb/opt-cmdmode-doc' into maintJunio C Hamano Fri, 15 Apr 2016 01:37:13 +0000 (18:37 -0700)

Merge branch 'pb/opt-cmdmode-doc' into maint

Minor API documentation update.

* pb/opt-cmdmode-doc:
api-parse-options.txt: document OPT_CMDMODE()

Merge branch 'nd/apply-doc' into maintJunio C Hamano Fri, 15 Apr 2016 01:37:13 +0000 (18:37 -0700)

Merge branch 'nd/apply-doc' into maint

A minor documentation update.

* nd/apply-doc:
git-apply.txt: mention the behavior inside a subdir
git-apply.txt: remove a space

Merge branch 'cc/doc-recommend-performance-trace-to... Junio C Hamano Fri, 15 Apr 2016 01:37:12 +0000 (18:37 -0700)

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

A minor documentation update.

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

Merge branch 'mm/lockfile-error-message' into maintJunio C Hamano Fri, 15 Apr 2016 01:37:12 +0000 (18:37 -0700)

Merge branch 'mm/lockfile-error-message' into maint

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

Start preparing for 2.8.2Junio C Hamano Wed, 13 Apr 2016 23:30:00 +0000 (16:30 -0700)

Start preparing for 2.8.2

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

Fourth batch for post 2.8 cycleJunio C Hamano Wed, 13 Apr 2016 21:19:29 +0000 (14:19 -0700)

Fourth batch for post 2.8 cycle

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

Merge branch 'tb/blame-force-read-cache-to-workaround... Junio C Hamano Wed, 13 Apr 2016 21:12:40 +0000 (14:12 -0700)

Merge branch 'tb/blame-force-read-cache-to-workaround-safe-crlf'

When running "git blame $path" with unnormalized data in the index
for the path, the data in the working tree was blamed, even though
"git add" would not have changed what is already in the index, due
to "safe crlf" that disables the line-end conversion. It has been
corrected.

* tb/blame-force-read-cache-to-workaround-safe-crlf:
correct blame for files commited with CRLF

Merge branch 'mg/complete-cherry-mark-to-log'Junio C Hamano Wed, 13 Apr 2016 21:12:39 +0000 (14:12 -0700)

Merge branch 'mg/complete-cherry-mark-to-log'

The completion scripts (in contrib/) did not include the
"--cherry-mark" option when completing "git log <HT>".

* mg/complete-cherry-mark-to-log:
completion: complete --cherry-mark for git log

Merge branch 'ep/trace-doc-sample-fix'Junio C Hamano Wed, 13 Apr 2016 21:12:38 +0000 (14:12 -0700)

Merge branch 'ep/trace-doc-sample-fix'

Fix a typo in an example in the trace API documentation.

* ep/trace-doc-sample-fix:
api-trace.txt: fix typo

Merge branch 'jc/makefile-redirection-stderr'Junio C Hamano Wed, 13 Apr 2016 21:12:37 +0000 (14:12 -0700)

Merge branch 'jc/makefile-redirection-stderr'

A minor fix in the Makefile.

* jc/makefile-redirection-stderr:
Makefile: fix misdirected redirections

Merge branch 'lt/pretty-expand-tabs'Junio C Hamano Wed, 13 Apr 2016 21:12:36 +0000 (14:12 -0700)

Merge branch 'lt/pretty-expand-tabs'

When "git log" shows the log message indented by 4-spaces, the
remainder of a line after a HT does not align in the way the author
originally intended. The command now expands tabs by default in
such a case, and allows the users to override it with a new option,
'--no-expand-tabs'.

* lt/pretty-expand-tabs:
pretty: test --expand-tabs
pretty: allow tweaking tabwidth in --expand-tabs
pretty: enable --expand-tabs by default for selected pretty formats
pretty: expand tabs in indented logs to make things line up properly

Merge branch 'mj/pull-rebase-autostash'Junio C Hamano Wed, 13 Apr 2016 21:12:36 +0000 (14:12 -0700)

Merge branch 'mj/pull-rebase-autostash'

"git pull --rebase" learned "--[no-]autostash" option, so that
the rebase.autostash configuration variable set to true can be
overridden from the command line.

* mj/pull-rebase-autostash:
t5520: test --[no-]autostash with pull.rebase=true
t5520: reduce commom lines of code
t5520: factor out common "failing autostash" code
t5520: factor out common "successful autostash" code
t5520: use better test to check stderr output
t5520: ensure consistent test conditions
t5520: use consistent capitalization in test titles
pull --rebase: add --[no-]autostash flag
git-pull.c: introduce git_pull_config()

Merge branch 'jn/mergetools-examdiff'Junio C Hamano Wed, 13 Apr 2016 21:12:36 +0000 (14:12 -0700)

Merge branch 'jn/mergetools-examdiff'

"git mergetools" learned to drive ExamDiff.

* jn/mergetools-examdiff:
mergetools: add support for ExamDiff
mergetools: create mergetool_find_win32_cmd() helper function for winmerge

Merge branch 'es/format-patch-doc-hide-no-patch'Junio C Hamano Wed, 13 Apr 2016 21:12:35 +0000 (14:12 -0700)

Merge branch 'es/format-patch-doc-hide-no-patch'

"git format-patch --help" showed `-s` and `--no-patch` as if these
are valid options to the command. We already hide `--patch` option
from the documentation, because format-patch is about showing the
diff, and the documentation now hides these options as well.

* es/format-patch-doc-hide-no-patch:
git-format-patch.txt: don't show -s as shorthand for multiple options

Merge branch 'js/mingw-tests-2.8'Junio C Hamano Wed, 13 Apr 2016 21:12:34 +0000 (14:12 -0700)

Merge branch 'js/mingw-tests-2.8'

Code clean-up.

* js/mingw-tests-2.8:
Windows: shorten code by re-using convert_slashes()

Merge branch 'cc/apply'Junio C Hamano Wed, 13 Apr 2016 21:12:34 +0000 (14:12 -0700)

Merge branch 'cc/apply'

Minor code clean-up.

* cc/apply:
builtin/apply: free patch when parse_chunk() fails
builtin/apply: handle parse_binary() failure
apply: remove unused call to free() in gitdiff_{old,new}name()
builtin/apply: get rid of useless 'name' variable

Merge branch 'sb/misc-cleanups'Junio C Hamano Wed, 13 Apr 2016 21:12:34 +0000 (14:12 -0700)

Merge branch 'sb/misc-cleanups'

Assorted minor clean-ups.

* sb/misc-cleanups:
credential-cache, send_request: close fd when done
bundle: don't leak an fd in case of early return
abbrev_sha1_in_line: don't leak memory
notes: don't leak memory in git_config_get_notes_strategy

Merge branch 'sk/send-pack-all-fix'Junio C Hamano Wed, 13 Apr 2016 21:12:33 +0000 (14:12 -0700)

Merge branch 'sk/send-pack-all-fix'

"git send-pack --all <there>" was broken when its command line
option parsing was written in the 2.6 timeframe.

* sk/send-pack-all-fix:
git-send-pack: fix --all option when used with directory

Merge branch 'sg/diff-multiple-identical-renames'Junio C Hamano Wed, 13 Apr 2016 21:12:32 +0000 (14:12 -0700)

Merge branch 'sg/diff-multiple-identical-renames'

"git diff -M" used to work better when two originally identical
files A and B got renamed to X/A and X/B by pairing A to X/A and B
to X/B, but this was broken in the 2.0 timeframe.

* sg/diff-multiple-identical-renames:
diffcore: fix iteration order of identical files during rename detection

Merge branch 'kn/for-each-tag-branch'Junio C Hamano Wed, 13 Apr 2016 21:12:31 +0000 (14:12 -0700)

Merge branch 'kn/for-each-tag-branch'

A minor documentation update.

* kn/for-each-tag-branch:
for-each-ref: fix description of '--contains' in manpage

Merge branch 'ky/branch-d-worktree'Junio C Hamano Wed, 13 Apr 2016 21:12:30 +0000 (14:12 -0700)

Merge branch 'ky/branch-d-worktree'

When "git worktree" feature is in use, "git branch -d" allowed
deletion of a branch that is checked out in another worktree

* ky/branch-d-worktree:
branch -d: refuse deleting a branch which is currently checked out

Merge branch 'rz/worktree-no-checkout'Junio C Hamano Wed, 13 Apr 2016 21:12:30 +0000 (14:12 -0700)

Merge branch 'rz/worktree-no-checkout'

"git worktree add" can be given "--no-checkout" option to only
create an empty worktree without checking out the files.

* rz/worktree-no-checkout:
worktree: add: introduce --checkout option

Merge branch 'rt/rebase-i-shorten-stop-report'Junio C Hamano Wed, 13 Apr 2016 21:12:30 +0000 (14:12 -0700)

Merge branch 'rt/rebase-i-shorten-stop-report'

The commit object name reported when "rebase -i" stops has been
shortened.

* rt/rebase-i-shorten-stop-report:
rebase-i: print an abbreviated hash when stop for editing

Merge branch 'rt/completion-help'Junio C Hamano Wed, 13 Apr 2016 21:12:29 +0000 (14:12 -0700)

Merge branch 'rt/completion-help'

Shell completion (in contrib/) updates.

* rt/completion-help:
completion: add 'revisions' and 'everyday' to 'git help'
completion: add option '--guides' to 'git help'

Merge branch 'ak/use-hashmap-iter-first-in-submodule... Junio C Hamano Wed, 13 Apr 2016 21:12:29 +0000 (14:12 -0700)

Merge branch 'ak/use-hashmap-iter-first-in-submodule-config'

Minor code cleanup.

* ak/use-hashmap-iter-first-in-submodule-config:
submodule-config: use hashmap_iter_first()

Merge branch 'jk/check-repository-format'Junio C Hamano Wed, 13 Apr 2016 21:12:28 +0000 (14:12 -0700)

Merge branch 'jk/check-repository-format'

The repository set-up sequence has been streamlined (the biggest
change is that there is no longer git_config_early()), so that we
do not attempt to look into refs/* when we know we do not have a
Git repository.

* jk/check-repository-format:
verify_repository_format: mark messages for translation
setup: drop repository_format_version global
setup: unify repository version callbacks
init: use setup.c's repo version verification
setup: refactor repo format reading and verification
config: drop git_config_early
check_repository_format_gently: stop using git_config_early
lazily load core.sharedrepository
wrap shared_repository global in get/set accessors
setup: document check_repository_format()

Third batch for post 2.8 cycleJunio C Hamano Fri, 8 Apr 2016 21:34:11 +0000 (14:34 -0700)

Third batch for post 2.8 cycle

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

Merge branch 'ss/msvc'Junio C Hamano Fri, 8 Apr 2016 21:29:13 +0000 (14:29 -0700)

Merge branch 'ss/msvc'

Build updates for MSVC.

* ss/msvc:
MSVC: use shipped headers instead of fallback definitions
MSVC: vsnprintf in Visual Studio 2015 doesn't need SNPRINTF_SIZE_CORR any more

Merge branch 'oa/doc-diff-check'Junio C Hamano Fri, 8 Apr 2016 21:29:13 +0000 (14:29 -0700)

Merge branch 'oa/doc-diff-check'

A minor documentation update.

* oa/doc-diff-check:
Documentation: git diff --check detects conflict markers

Merge branch 'pb/opt-cmdmode-doc'Junio C Hamano Fri, 8 Apr 2016 21:29:12 +0000 (14:29 -0700)

Merge branch 'pb/opt-cmdmode-doc'

Minor API documentation update.

* pb/opt-cmdmode-doc:
api-parse-options.txt: document OPT_CMDMODE()

Merge branch 'nd/apply-report-skip'Junio C Hamano Fri, 8 Apr 2016 21:29:12 +0000 (14:29 -0700)

Merge branch 'nd/apply-report-skip'

"git apply -v" learned to report paths in the patch that were
skipped via --include/--exclude mechanism or being outside the
current working directory.

* nd/apply-report-skip:
apply: report patch skipping in verbose mode

Merge branch 'nd/apply-doc'Junio C Hamano Fri, 8 Apr 2016 21:29:12 +0000 (14:29 -0700)

Merge branch 'nd/apply-doc'

A minor documentation update.

* nd/apply-doc:
git-apply.txt: mention the behavior inside a subdir
git-apply.txt: remove a space

Merge branch 'jc/merge-refuse-new-root'Junio C Hamano Fri, 8 Apr 2016 21:29:11 +0000 (14:29 -0700)

Merge branch 'jc/merge-refuse-new-root'

"git merge" used to allow merging two branches that have no common
base by default, which led to a brand new history of an existing
project created and then get pulled by an unsuspecting maintainer,
which allowed an unnecessary parallel history merged into the
existing project. The command has been taught not to allow this by
default, with an escape hatch "--allow-unrelated-histories" option
to be used in a rare event that merges histories of two projects
that started their lives independently.

* jc/merge-refuse-new-root:
merge: refuse to create too cool a merge by default

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

set_worktree_head_symref(): fix error message

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

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

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

Thanks to Eric Sunshine for pointing this out.

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

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

Second batch for post 2.8 cycle

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

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

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

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

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

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

Merge branch 'jk/submodule-c-credential'

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

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

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

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

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

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

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

Merge branch 'ss/commit-squash-msg'

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

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

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

Merge branch 'sb/rebase-x'

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

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

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

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

The tests that involve running httpd leaked the system-wide
configuration in /etc/gitconfig to the tested environment.

* jk/test-httpd-config-nosystem:
t/lib-httpd: pass through GIT_CONFIG_NOSYSTEM env

Merge branch 'jk/send-email-rtrim-mailrc-alias'Junio C Hamano Wed, 6 Apr 2016 18:39:07 +0000 (11:39 -0700)

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

"git send-email" had trouble parsing alias file in mailrc format
when lines in it had trailing whitespaces on them.

* jk/send-email-rtrim-mailrc-alias:
send-email: ignore trailing whitespace in mailrc alias file

Merge branch 'jk/credential-cache-comment-exit'Junio C Hamano Wed, 6 Apr 2016 18:39:06 +0000 (11:39 -0700)

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

A code clarification.

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

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

Merge branch 'sb/clone-t57-t56'

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

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

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

Merge branch 'ls/p4-map-user'

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

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

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

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

A minor documentation update.

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

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

Merge branch 'pb/t7502-drop-dup'

Code clean-up.

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

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

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

"git mergetool" did not work well with conflicts that both sides
deleted.

* da/mergetool-delete-delete-conflict:
mergetool: honor tempfile configuration when resolving delete conflicts
mergetool: support delete/delete conflicts

Merge branch 'sb/submodule-parallel-update'Junio C Hamano Wed, 6 Apr 2016 18:39:01 +0000 (11:39 -0700)

Merge branch 'sb/submodule-parallel-update'

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

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

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

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

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

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

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

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

Code clean-up.

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