gitweb.git
Merge branch 'tb/checkout-doc' into maintJunio C Hamano Mon, 27 Jul 2015 19:21:47 +0000 (12:21 -0700)

Merge branch 'tb/checkout-doc' into maint

Doc update.

* tb/checkout-doc:
git-checkout.txt: document "git checkout <pathspec>" better

Merge branch 'ls/hint-rev-list-count' into maintJunio C Hamano Mon, 27 Jul 2015 19:21:47 +0000 (12:21 -0700)

Merge branch 'ls/hint-rev-list-count' into maint

* ls/hint-rev-list-count:
rev-list: add --count to usage guide

Merge branch 'mm/branch-doc-updates' into maintJunio C Hamano Mon, 27 Jul 2015 19:21:46 +0000 (12:21 -0700)

Merge branch 'mm/branch-doc-updates' into maint

* mm/branch-doc-updates:
Documentation/branch: document -M and -D in terms of --force
Documentation/branch: document -d --force and -m --force

Merge branch 'jc/fsck-retire-require-eoh' into maintJunio C Hamano Mon, 27 Jul 2015 19:21:45 +0000 (12:21 -0700)

Merge branch 'jc/fsck-retire-require-eoh' into maint

A fix to a minor regression to "git fsck" in v2.2 era that started
complaining about a body-less tag object when it lacks a separator
empty line after its header to separate it with a non-existent body.

* jc/fsck-retire-require-eoh:
fsck: it is OK for a tag and a commit to lack the body

Merge branch 'et/http-proxyauth' into maintJunio C Hamano Mon, 27 Jul 2015 19:21:44 +0000 (12:21 -0700)

Merge branch 'et/http-proxyauth' into maint

We used to ask libCURL to use the most secure authentication method
available when talking to an HTTP proxy only when we were told to
talk to one via configuration variables. We now ask libCURL to
always use the most secure authentication method, because the user
can tell libCURL to use an HTTP proxy via an environment variable
without using configuration variables.

* et/http-proxyauth:
http: always use any proxy auth method available

Merge branch 'jc/unexport-git-pager-in-use-in-pager... Junio C Hamano Mon, 27 Jul 2015 19:21:43 +0000 (12:21 -0700)

Merge branch 'jc/unexport-git-pager-in-use-in-pager' into maint

When you say "!<ENTER>" while running say "git log", you'd confuse
yourself in the resulting shell, that may look as if you took
control back to the original shell you spawned "git log" from but
that isn't what is happening. To that new shell, we leaked
GIT_PAGER_IN_USE environment variable that was meant as a local
communication between the original "Git" and subprocesses that was
spawned by it after we launched the pager, which caused many
"interesting" things to happen, e.g. "git diff | cat" still paints
its output in color by default.

Stop leaking that environment variable to the pager's half of the
fork; we only need it on "Git" side when we spawn the pager.

* jc/unexport-git-pager-in-use-in-pager:
pager: do not leak "GIT_PAGER_IN_USE" to the pager

Merge branch 'mh/strbuf-read-file-returns-ssize-t'... Junio C Hamano Mon, 27 Jul 2015 19:21:43 +0000 (12:21 -0700)

Merge branch 'mh/strbuf-read-file-returns-ssize-t' into maint

Avoid possible ssize_t to int truncation.

* mh/strbuf-read-file-returns-ssize-t:
strbuf: strbuf_read_file() should return ssize_t

Merge branch 'kb/config-unmap-before-renaming' into... Junio C Hamano Mon, 27 Jul 2015 19:21:42 +0000 (12:21 -0700)

Merge branch 'kb/config-unmap-before-renaming' into maint

"git config" failed to update the configuration file when the
underlying filesystem is incapable of renaming a file that is still
open.

* kb/config-unmap-before-renaming:
config.c: fix writing config files on Windows network shares

Merge branch 'jk/rev-list-no-bitmap-while-pruning'... Junio C Hamano Mon, 27 Jul 2015 19:21:42 +0000 (12:21 -0700)

Merge branch 'jk/rev-list-no-bitmap-while-pruning' into maint

A minor bugfix when pack bitmap is used with "rev-list --count".

* jk/rev-list-no-bitmap-while-pruning:
rev-list: disable --use-bitmap-index when pruning commits

Merge branch 'rh/test-color-avoid-terminfo-in-original... Junio C Hamano Mon, 27 Jul 2015 19:21:41 +0000 (12:21 -0700)

Merge branch 'rh/test-color-avoid-terminfo-in-original-home' into maint

An ancient test framework enhancement to allow color was not
entirely correct; this makes it work even when tput needs to read
from the ~/.terminfo under the user's real HOME directory.

* rh/test-color-avoid-terminfo-in-original-home:
test-lib.sh: fix color support when tput needs ~/.terminfo
Revert "test-lib.sh: do tests for color support after changing HOME"

Merge branch 'jk/fix-refresh-utime' into maintJunio C Hamano Mon, 27 Jul 2015 19:21:40 +0000 (12:21 -0700)

Merge branch 'jk/fix-refresh-utime' into maint

Fix a small bug in our use of umask() return value.

* jk/fix-refresh-utime:
check_and_freshen_file: fix reversed success-check

Merge branch 'cb/rebase-am-exit-code' into maintJunio C Hamano Mon, 27 Jul 2015 19:21:39 +0000 (12:21 -0700)

Merge branch 'cb/rebase-am-exit-code' into maint

"git rebase" did not exit with failure when format-patch it invoked
failed for whatever reason.

* cb/rebase-am-exit-code:
rebase: return non-zero error code if format-patch fails

Merge branch 'jk/index-pack-reduce-recheck' into maintJunio C Hamano Mon, 27 Jul 2015 19:21:38 +0000 (12:21 -0700)

Merge branch 'jk/index-pack-reduce-recheck' into maint

Disable "have we lost a race with competing repack?" check while
receiving a huge object transfer that runs index-pack.

* jk/index-pack-reduce-recheck:
index-pack: avoid excessive re-reading of pack directory

refs: loosen restriction on wildcard "*" refspecsJacob Keller Wed, 22 Jul 2015 21:05:33 +0000 (14:05 -0700)

refs: loosen restriction on wildcard "*" refspecs

Loosen restrictions on refspecs by allowing patterns that have a "*"
within a component instead of only as the whole component.

Remove the logic to accept a single "*" as a whole component from
check_refname_format(), and implement an extended form of that logic
in check_refname_component(). Pass the pointer to the flags argument
to the latter, as it has to clear REFNAME_REFSPEC_PATTERN bit when
it sees "*".

Teach check_refname_component() function to allow an asterisk "*"
only when REFNAME_REFSPEC_PATTERN is set in the flags, and drop the
bit after seeing a "*", to ensure that one side of a refspec
contains at most one asterisk.

This will allow us to accept refspecs such as `for/bar*:foo/baz*`.
Any refspec which functioned before shall continue functioning with
the new logic.

Signed-off-by: Jacob Keller <jacob.keller@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

refs: cleanup comments regarding check_refname_component()Jacob Keller Wed, 22 Jul 2015 21:05:32 +0000 (14:05 -0700)

refs: cleanup comments regarding check_refname_component()

Correctly specify all characters which are rejected under the '4: a
bad character' disposition, which did not list all characters that
are treated as such.

Cleanup comment style for rejected refs by inserting a ", or" at the
end of each statement.

Signed-off-by: Jacob Keller <jacob.keller@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Documentation/git: drop outdated Cogito referenceEric Sunshine Fri, 24 Jul 2015 04:00:54 +0000 (00:00 -0400)

Documentation/git: drop outdated Cogito reference

Cogito hasn't been maintained since late 2006, so drop the reference
to it. The warning that SCMS front-ends might override listed
environment variables, however, may still be valuable, so keep it but
generalize the wording.

Suggested-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

RelNotes: am.threeWay does not exist (yet)Junio C Hamano Fri, 24 Jul 2015 21:31:23 +0000 (14:31 -0700)

RelNotes: am.threeWay does not exist (yet)

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

Revert "git-am: add am.threeWay config variable"Junio C Hamano Fri, 24 Jul 2015 17:55:24 +0000 (10:55 -0700)

Revert "git-am: add am.threeWay config variable"

This reverts commit d96a275b91bae1800cd43be0651e886e7e042a17.

It used to be possible to apply a patch series with "git am mbox"
and then only after seeing a failure, switch to three-way mode via
"git am -3" (no other options or arguments). The commit being
reverted broke this workflow.

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

contrib/subtree: ignore log.date configurationDavid Aguilar Wed, 22 Jul 2015 00:01:02 +0000 (17:01 -0700)

contrib/subtree: ignore log.date configuration

git-subtree's log format string uses "%ad" and "%cd", which
respect the user's configured log.date value.

This is problematic for git-subtree because it needs to use real
dates so that copied commits come through unchanged.

Add a test and tweak the format strings to use %aD and %cD
so that the default date format is used instead.

Reported-by: Bryan Jacobs <b@q3q.us>
Signed-off-by: David Aguilar <davvid@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

userdiff: add support for Fountain documentsZoë Blade Tue, 21 Jul 2015 13:22:46 +0000 (14:22 +0100)

userdiff: add support for Fountain documents

Add support for Fountain, a plain text screenplay format. Git
facilitates not just programming specifically, but creative writing
in general, so it makes sense to also support other plain text
documents besides source code.

In the structure of a screenplay specifically, scenes are roughly
analogous to functions, in the sense that it makes your job easier
if you can see which ones were changed in a given range of patches.

More information about the Fountain format can be found on its
official website, at http://fountain.io .

Signed-off-by: Zoë Blade <zoe@bytenoise.co.uk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

receive-pack: crash when checking with non-exist HEADJiang Xin Wed, 22 Jul 2015 01:49:40 +0000 (09:49 +0800)

receive-pack: crash when checking with non-exist HEAD

If HEAD of a repository points to a conflict reference, such as:

* There exist a reference named 'refs/heads/jx/feature1', but HEAD
points to 'refs/heads/jx', or

* There exist a reference named 'refs/heads/feature', but HEAD points
to 'refs/heads/feature/bad'.

When we push to delete a reference for this repo, such as:

git push /path/to/bad-head-repo.git :some/good/reference

The git-receive-pack process will crash.

This is because if HEAD points to a conflict reference, the function
`resolve_refdup("HEAD", ...)` does not return a valid reference name,
but a null buffer. Later matching the delete reference against the null
buffer will cause git-receive-pack crash.

Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

builtin/send-pack.c: respect user.signingkeyJunio C Hamano Tue, 21 Jul 2015 22:06:43 +0000 (15:06 -0700)

builtin/send-pack.c: respect user.signingkey

When git-send-pack is exec'ed, as is done by git-remote-http, it
does not read the config, and configured value of user.signingkey is
ignored. Thus it was impossible to specify a signing key over HTTP,
other than the default key in the keyring having a User ID matching
the "Name <email>" format.

This patch at least partially fixes the problem by reading in the GPG
config from within send-pack. It does not address the related problem
of plumbing a value for this configuration option using
`git -c user.signingkey push ...`.

Signed-off-by: Dave Borowitz <dborowitz@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Git 2.5.0-rc3 v2.5.0-rc3Junio C Hamano Tue, 21 Jul 2015 21:11:54 +0000 (14:11 -0700)

Git 2.5.0-rc3

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

git-stash: use update-ref --create-reflog instead of... David Turner Tue, 21 Jul 2015 21:04:56 +0000 (17:04 -0400)

git-stash: use update-ref --create-reflog instead of creating files

This is in support of alternate ref backends which don't necessarily
store reflogs as files.

Signed-off-by: David Turner <dturner@twopensource.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

update-ref and tag: add --create-reflog argDavid Turner Tue, 21 Jul 2015 21:04:55 +0000 (17:04 -0400)

update-ref and tag: add --create-reflog arg

Allow the creation of a ref (e.g. stash) with a reflog already in
place. For most refs (e.g. those under refs/heads), this happens
automatically, but for others, we need this option.

Currently, git does this by pre-creating the reflog, but alternate ref
backends might store reflogs somewhere other than .git/logs. Code
that now directly manipulates .git/logs should instead use git
plumbing commands.

I also added --create-reflog to git tag, just for completeness.

In a moment, we will use this argument to make git stash work with
alternate ref backends.

Signed-off-by: David Turner <dturner@twopensource.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

refs: add REF_FORCE_CREATE_REFLOG flagDavid Turner Tue, 21 Jul 2015 21:04:54 +0000 (17:04 -0400)

refs: add REF_FORCE_CREATE_REFLOG flag

Add a flag to allow forcing the creation of a reflog even if the ref
name and core.logAllRefUpdates setting would not ordinarily cause ref
creation.

In a moment, we will use this to add options to git tag and git
update-ref to force reflog creation.

Signed-off-by: David Turner <dturner@twopensource.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

git-reflog: add exists commandDavid Turner Tue, 21 Jul 2015 21:04:53 +0000 (17:04 -0400)

git-reflog: add exists command

This is necessary because alternate ref backends might store reflogs
somewhere other than .git/logs. Code that now directly manipulates
.git/logs should instead go through git-reflog.

Signed-off-by: David Turner <dturner@twopensource.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

refs: new public ref function: safe_create_reflogDavid Turner Tue, 21 Jul 2015 21:04:52 +0000 (17:04 -0400)

refs: new public ref function: safe_create_reflog

The safe_create_reflog function creates a reflog, if it does not
already exist.

The log_ref_setup function becomes private and gains a force_create
parameter to force the creation of a reflog even if log_all_ref_updates
is false or the refname is not one of the special refnames.

The new parameter also reduces the need to store, modify, and restore
the log_all_ref_updates global before reflog creation.

In a moment, we will use this to add reflog creation commands to
git-reflog.

Signed-off-by: David Turner <dturner@twopensource.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

refs: break out check for reflog autocreationDavid Turner Tue, 21 Jul 2015 21:04:51 +0000 (17:04 -0400)

refs: break out check for reflog autocreation

This is just for clarity.

Signed-off-by: David Turner <dturner@twopensource.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

refs.c: add err arguments to reflog functionsDavid Turner Tue, 21 Jul 2015 21:04:50 +0000 (17:04 -0400)

refs.c: add err arguments to reflog functions

Add an err argument to log_ref_setup that can explain the reason
for a failure. This then eliminates the need to manage errno through
this function since we can just add strerror(errno) to the err string
when meaningful. No callers relied on errno from this function for
anything else than the error message.

Also add err arguments to private functions write_ref_to_lockfile,
log_ref_write_1, commit_ref_update. This again eliminates the need to
manage errno in these functions.

Some error messages are slightly reordered.

Update of a patch by Ronnie Sahlberg.

Signed-off-by: Ronnie Sahlberg <sahlberg@google.com>
Signed-off-by: David Turner <dturner@twopensource.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

unpack-trees: don't update files with CE_WT_REMOVE setDavid Turner Fri, 17 Jul 2015 21:19:27 +0000 (17:19 -0400)

unpack-trees: don't update files with CE_WT_REMOVE set

Don't update files in the worktree from cache entries which are
flagged with CE_WT_REMOVE.

When a user does a sparse checkout, git removes files that are
marked with CE_WT_REMOVE (because they are out-of-scope for the
sparse checkout). If those files are also marked CE_UPDATE (for
instance, because they differ in the branch that is being checked
out and the outgoing branch), git would previously recreate them.
This patch prevents them from being recreated.

These erroneously-created files would also interfere with merges,
causing pre-merge revisions of out-of-scope files to appear in the
worktree.

apply_sparse_checkout() is the function where all "action"
manipulation (add, delete, update files..) for sparse checkout
occurs; it should not ask to delete and update both at the same
time.

Signed-off-by: Anatole Shaw <git-devel@omni.poc.net>
Signed-off-by: David Turner <dturner@twopensource.com>
Helped-by: Duy Nguyen <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Merge branch 'tf/gitweb-typofix'Junio C Hamano Tue, 21 Jul 2015 19:45:27 +0000 (12:45 -0700)

Merge branch 'tf/gitweb-typofix'

* tf/gitweb-typofix:
gitweb: fix typo in man page

Merge tag 'l10n-2.5.0-rnd2' of git://github.com/git... Junio C Hamano Tue, 21 Jul 2015 17:27:33 +0000 (10:27 -0700)

Merge tag 'l10n-2.5.0-rnd2' of git://github.com/git-l10n/git-po

l10n-2.5.0-rnd2

* tag 'l10n-2.5.0-rnd2' of git://github.com/git-l10n/git-po:
l10n: ca.po: update translation
l10n: de.po: translate 9 new messages
l10n: Updated Bulgarian translation of git (2359t,0f,0u)
l10n: zh_CN: for git v2.5.0 l10n round 2
l10n: sv.po: Update Swedish translation (2359t0f0u)
l10n: fr v2.5.0 round 2 (2359t)
l10n: ru.po: update Russian translation
l10n: Updated Vietnamese translation (2359t)
l10n: git.pot: v2.5.0 round 2 (9 new, 5 removed)

strbuf: make strbuf_addftime more robustJeff King Tue, 30 Jun 2015 13:26:53 +0000 (09:26 -0400)

strbuf: make strbuf_addftime more robust

The return value of strftime is poorly designed; when it
returns 0, the caller cannot tell if the buffer was not
large enough, or if the output was actually 0 bytes. In the
original implementation of strbuf_addftime, we simply punted
and guessed that our 128-byte hint would be large enough.

We can do better, though, if we're willing to treat strftime
like less of a black box. We can munge the incoming format
to make sure that it never produces 0-length output, and
then "fix" the resulting output. That lets us reliably grow
the buffer based on strftime's return value.

Clever-idea-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

bash prompt: faster untracked status indicator with... SZEDER Gábor Sun, 19 Jul 2015 11:28:06 +0000 (13:28 +0200)

bash prompt: faster untracked status indicator with untracked directories

If the untracked status indicator is enabled, __git_ps1() looks for
untracked files by running 'git ls-files'. This can be perceptibly slow
in case of an untracked directory containing lot of files, because it
lists all files found in the untracked directory only to be redirected
into /dev/null right away (this is the actual command run by __git_ps1()):

$ ls untracked-dir/ |wc -l
100000
$ time git ls-files --others --exclude-standard --error-unmatch \
-- ':/*' >/dev/null 2>/dev/null

real 0m0.955s
user 0m0.936s
sys 0m0.016s

Eliminate this delay by additionally passing the '--directory
--no-empty-directory' options to 'git ls-files' to show only the name of
non-empty untracked directories instead of all their content:

$ time git ls-files --others --exclude-standard --directory \
--no-empty-directory --error-unmatch -- ':/*' >/dev/null 2>/dev/null

real 0m0.010s
user 0m0.008s
sys 0m0.000s

This follows suit of ea95c7b8f5 (completion: improve untracked directory
filtering for filename completion, 2013-09-18).

Signed-off-by: SZEDER Gábor <szeder@ira.uka.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

bash prompt: test untracked files status indicator... SZEDER Gábor Sun, 19 Jul 2015 11:28:05 +0000 (13:28 +0200)

bash prompt: test untracked files status indicator with untracked dirs

The next commit will tweak the way __git_ps1() decides whether to display
the untracked files status indicator in the presence of untracked
directories. Add tests to make sure it doesn't change current behavior,
in particular that an empty untracked directory doesn't trigger the
untracked files status indicator.

Signed-off-by: SZEDER Gábor <szeder@ira.uka.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

l10n: ca.po: update translationAlex Henrie Mon, 20 Jul 2015 17:54:40 +0000 (11:54 -0600)

l10n: ca.po: update translation

Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>

t3901: test git-am encoding conversionPaul Tan Sun, 19 Jul 2015 15:49:18 +0000 (23:49 +0800)

t3901: test git-am encoding conversion

Since d1c5f2a (Add git-am, applymbox replacement., 2005-10-07), git-am
supported the --utf8 and --no-utf8 options, and if set, would pass the
-u flag and the -k flag respectively.

git mailinfo -u will re-code the commit log message and authorship info
in the charset specified by i18n.commitencoding setting, while
git mailinfo -n will disable the re-coding.

Since d84029b (--utf8 is now default for 'git-am', 2007-01-08), --utf8
is set by default in git-am.

Add various encoding conversion tests to t3901 to test git-mailinfo's
encoding conversion. In addition, add a test for --no-utf8 to check that
no encoding conversion will occur if that option is set.

Helped-by: Johannes Sixt <j6t@kdbg.org>
Reviewed-by: Stefan Beller <sbeller@google.com>
Reviewed-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Paul Tan <pyokagan@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

t3418: non-interactive rebase --continue with rerere... Paul Tan Sun, 19 Jul 2015 15:49:17 +0000 (23:49 +0800)

t3418: non-interactive rebase --continue with rerere enabled

Since 8389b52 (git-rerere: reuse recorded resolve., 2006-01-28), git-am
will call git-rerere to re-use recorded merge conflict resolutions if
any occur in a threeway merge.

Add a test to ensure that git-rerere is called by git-am (which handles
the non-interactive rebase).

Reviewed-by: Stefan Beller <sbeller@google.com>
Reviewed-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Paul Tan <pyokagan@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

t4150: tests for am --[no-]scissorsPaul Tan Sun, 19 Jul 2015 15:49:16 +0000 (23:49 +0800)

t4150: tests for am --[no-]scissors

Since 017678b (am/mailinfo: Disable scissors processing by default,
2009-08-26), git-am supported the --[no-]scissors option, passing it to
git-mailinfo.

Add tests to ensure that git-am will pass the --scissors option to
git-mailinfo, and that --no-scissors will override the configuration
setting of mailinfo.scissors.

Reviewed-by: Stefan Beller <sbeller@google.com>
Reviewed-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Paul Tan <pyokagan@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

t4150: am with post-applypatch hookPaul Tan Sun, 19 Jul 2015 15:49:15 +0000 (23:49 +0800)

t4150: am with post-applypatch hook

Since d1c5f2a (Add git-am, applymbox replacement., 2005-10-07),
git-am.sh will invoke the post-applypatch hook after the patch is
applied and a commit is made. The exit code of the hook is ignored.

Add tests for this hook.

Helped-by: Junio C Hamano <gitster@pobox.com>
Reviewed-by: Stefan Beller <sbeller@google.com>
Reviewed-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Paul Tan <pyokagan@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

t4150: am with pre-applypatch hookPaul Tan Sun, 19 Jul 2015 15:49:14 +0000 (23:49 +0800)

t4150: am with pre-applypatch hook

Since d1c5f2a (Add git-am, applymbox replacement., 2005-10-07),
git-am.sg will invoke the pre-applypatch hook after applying the patch
to the index, but before a commit is made. Should the hook exit with a
non-zero status, git am will exit.

Add tests for this hook.

Helped-by: Junio C Hamano <gitster@pobox.com>
Reviewed-by: Stefan Beller <sbeller@google.com>
Reviewed-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Paul Tan <pyokagan@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

t4150: am with applypatch-msg hookPaul Tan Sun, 19 Jul 2015 15:49:13 +0000 (23:49 +0800)

t4150: am with applypatch-msg hook

Since d1c5f2a (Add git-am, applymbox replacement., 2005-10-07), git-am
will invoke the applypatch-msg hooks just after extracting the patch
message. If the applypatch-msg hook exits with a non-zero status, git-am
abort before even applying the patch to the index.

Add tests for this hook.

Helped-by: Junio C Hamano <gitster@pobox.com>
Reviewed-by: Stefan Beller <sbeller@google.com>
Reviewed-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Paul Tan <pyokagan@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

t4150: am --resolved fails if index has unmerged entriesPaul Tan Sun, 19 Jul 2015 15:49:12 +0000 (23:49 +0800)

t4150: am --resolved fails if index has unmerged entries

Since c1d1128 (git-am --resolved: more usable error message.,
2006-04-28), git-am --resolved will check to see if there are any
unmerged entries, and will error out with a user-friendly error message
if there are.

Add a test for this.

Reviewed-by: Stefan Beller <sbeller@google.com>
Reviewed-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Paul Tan <pyokagan@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

t4150: am --resolved fails if index has no changesPaul Tan Sun, 19 Jul 2015 15:49:11 +0000 (23:49 +0800)

t4150: am --resolved fails if index has no changes

Since 6d28644 (git-am: do not allow empty commits by mistake.,
2006-02-23), git-am --resolved will check to see if the index has any
changes to prevent the user from creating an empty commit by mistake.

Add a test for this.

Reviewed-by: Stefan Beller <sbeller@google.com>
Reviewed-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Paul Tan <pyokagan@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

t4150: am refuses patches when pausedPaul Tan Sun, 19 Jul 2015 15:49:10 +0000 (23:49 +0800)

t4150: am refuses patches when paused

Since c95b138 (Fix git-am safety checks, 2006-09-15), when there is a
session in progress, git-am will check the command-line arguments and
standard input to ensure that the user does not pass it any patches.

Add a test for this.

Reviewed-by: Stefan Beller <sbeller@google.com>
Reviewed-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Paul Tan <pyokagan@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

t4151: am --abort will keep dirty index intactPaul Tan Sun, 19 Jul 2015 15:49:09 +0000 (23:49 +0800)

t4151: am --abort will keep dirty index intact

Since 7b3b7e3 (am --abort: keep unrelated commits since the last failure
and warn, 2010-12-21), git-am --abort will not touch the index if on the
previous invocation, git-am failed because the index is dirty. This is
to ensure that the user's modifications to the index are not discarded.

Add a test for this.

Reviewed-by: Stefan Beller <sbeller@google.com>
Reviewed-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Paul Tan <pyokagan@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

t4150: am fails if index is dirtyPaul Tan Sun, 19 Jul 2015 15:49:08 +0000 (23:49 +0800)

t4150: am fails if index is dirty

Since d1c5f2a (Add git-am, applymbox replacement., 2005-10-07), git-am
will ensure that the index is clean before applying the patch. This is
to prevent changes unrelated to the patch from being committed.

Add a test for this check.

Reviewed-by: Stefan Beller <sbeller@google.com>
Reviewed-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Paul Tan <pyokagan@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

untracked: fix detection of uname(2) failureCharles Bailey Fri, 17 Jul 2015 17:09:41 +0000 (18:09 +0100)

untracked: fix detection of uname(2) failure

According to POSIX specification uname(2) must return -1 on failure
and a non-negative value on success. Although many implementations
do return 0 on success it is valid to return any positive value for
success. In particular, Solaris returns 1.

Signed-off-by: Charles Bailey <cbailey32@bloomberg.net>
Reviewed-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Merge branch 'jk/still-interesting'Junio C Hamano Fri, 17 Jul 2015 17:44:56 +0000 (10:44 -0700)

Merge branch 'jk/still-interesting'

Code clean-up.

* jk/still-interesting:
revision.c: remove unneeded check for NULL

Merge branch 'es/worktree-add'Junio C Hamano Fri, 17 Jul 2015 17:44:54 +0000 (10:44 -0700)

Merge branch 'es/worktree-add'

Update to the "linked checkout" in 2.5.0-rc1.

Instead of "checkout --to" that does not do what "checkout"
normally does, move the functionality to "git worktree add".

As this makes the end-user experience of the "worktree add" more or
less complete, I am tempted to say we should cook the other topic
that removes the internal "new-worktree-mode" hack from "checkout"
a bit longer in 'next', and release 2.5 final without that one.

* es/worktree-add:
Documentation/git: fix stale "MULTIPLE CHECKOUT MODE" reference
worktree: caution that this is still experimental
Documentation/git-worktree: fix stale "git checkout --to" references

Documentation/git: fix stale "MULTIPLE CHECKOUT MODE... Eric Sunshine Fri, 17 Jul 2015 00:17:02 +0000 (20:17 -0400)

Documentation/git: fix stale "MULTIPLE CHECKOUT MODE" reference

This should have been changed by 93a3649 (Documentation: move linked
worktree description from checkout to worktree, 2015-07-06).

Signed-off-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

worktree: caution that this is still experimentalJunio C Hamano Thu, 16 Jul 2015 22:59:48 +0000 (15:59 -0700)

worktree: caution that this is still experimental

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

Documentation/git-worktree: fix stale "git checkout... Eric Sunshine Thu, 16 Jul 2015 22:09:43 +0000 (18:09 -0400)

Documentation/git-worktree: fix stale "git checkout --to" references

These should have been changed to "git worktree add" by fc56361
(worktree: introduce "add" command, 2015-07-06.

Signed-off-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Merge branch 'master' of https://github.com/ralfth... Jiang Xin Wed, 15 Jul 2015 23:44:43 +0000 (07:44 +0800)

Merge branch 'master' of https://github.com/ralfth/git-po-de

* 'master' of https://github.com/ralfth/git-po-de:
l10n: de.po: translate 9 new messages

Sync with 2.4.6Junio C Hamano Wed, 15 Jul 2015 19:32:37 +0000 (12:32 -0700)

Sync with 2.4.6

Git 2.4.6 v2.4.6Junio C Hamano Wed, 15 Jul 2015 18:45:42 +0000 (11:45 -0700)

Git 2.4.6

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

Merge branch 'jc/diff-ws-error-highlight'Junio C Hamano Wed, 15 Jul 2015 19:30:14 +0000 (12:30 -0700)

Merge branch 'jc/diff-ws-error-highlight'

A hotfix to a new feature in 2.5.0-rc.

* jc/diff-ws-error-highlight:
diff: parse ws-error-highlight option more strictly

Merge branch 'mm/describe-doc' into maintJunio C Hamano Wed, 15 Jul 2015 18:41:26 +0000 (11:41 -0700)

Merge branch 'mm/describe-doc' into maint

Docfix.

* mm/describe-doc:
Documentation/describe: improve one-line summary

Merge branch 'jc/prompt-document-ps1-state-separator... Junio C Hamano Wed, 15 Jul 2015 18:41:26 +0000 (11:41 -0700)

Merge branch 'jc/prompt-document-ps1-state-separator' into maint

Docfix.

* jc/prompt-document-ps1-state-separator:
git-prompt.sh: document GIT_PS1_STATESEPARATOR

Merge branch 'es/osx-header-pollutes-mask-macro' into... Junio C Hamano Wed, 15 Jul 2015 18:41:24 +0000 (11:41 -0700)

Merge branch 'es/osx-header-pollutes-mask-macro' into maint

* es/osx-header-pollutes-mask-macro:
ewah: use less generic macro name
ewah/bitmap: silence warning about MASK macro redefinition

Merge branch 'es/utf8-stupid-compiler-workaround' into... Junio C Hamano Wed, 15 Jul 2015 18:41:23 +0000 (11:41 -0700)

Merge branch 'es/utf8-stupid-compiler-workaround' into maint

A compilation workaround.

* es/utf8-stupid-compiler-workaround:
utf8: NO_ICONV: silence uninitialized variable warning

Merge branch 'fk/doc-format-patch-vn' into maintJunio C Hamano Wed, 15 Jul 2015 18:41:22 +0000 (11:41 -0700)

Merge branch 'fk/doc-format-patch-vn' into maint

Docfix.

* fk/doc-format-patch-vn:
doc: format-patch: fix typo

Merge branch 'pt/t0302-needs-sanity' into maintJunio C Hamano Wed, 15 Jul 2015 18:41:21 +0000 (11:41 -0700)

Merge branch 'pt/t0302-needs-sanity' into maint

* pt/t0302-needs-sanity:
t0302: "unreadable" test needs SANITY prereq

Merge branch 'me/fetch-into-shallow-safety' into maintJunio C Hamano Wed, 15 Jul 2015 18:41:20 +0000 (11:41 -0700)

Merge branch 'me/fetch-into-shallow-safety' into maint

"git fetch --depth=<depth>" and "git clone --depth=<depth>" issued
a shallow transfer request even to an upload-pack that does not
support the capability.

* me/fetch-into-shallow-safety:
fetch-pack: check for shallow if depth given

Merge branch 'mh/fsck-reflog-entries' into maintJunio C Hamano Wed, 15 Jul 2015 18:41:19 +0000 (11:41 -0700)

Merge branch 'mh/fsck-reflog-entries' into maint

"git fsck" used to ignore missing or invalid objects recorded in reflog.

* mh/fsck-reflog-entries:
fsck: report errors if reflog entries point at invalid objects
fsck_handle_reflog_sha1(): new function

Merge branch 'af/tcsh-completion-noclobber' into maintJunio C Hamano Wed, 15 Jul 2015 18:41:18 +0000 (11:41 -0700)

Merge branch 'af/tcsh-completion-noclobber' into maint

The tcsh completion writes a bash scriptlet but that would have
failed for users with noclobber set.

* af/tcsh-completion-noclobber:
git-completion.tcsh: fix redirect with noclobber

Merge branch 'pa/auto-gc-mac-osx' into maintJunio C Hamano Wed, 15 Jul 2015 18:41:17 +0000 (11:41 -0700)

Merge branch 'pa/auto-gc-mac-osx' into maint

Recent Mac OS X updates breaks the logic to detect that the machine
is on the AC power in the sample pre-auto-gc script.

* pa/auto-gc-mac-osx:
hooks/pre-auto-gc: adjust power checking for newer OS X

Merge branch 'jc/do-not-feed-tags-to-clear-commit-marks... Junio C Hamano Wed, 15 Jul 2015 18:41:16 +0000 (11:41 -0700)

Merge branch 'jc/do-not-feed-tags-to-clear-commit-marks' into maint

"git format-patch --ignore-if-upstream A..B" did not like to be fed
tags as boundary commits.

* jc/do-not-feed-tags-to-clear-commit-marks:
format-patch: do not feed tags to clear_commit_marks()

l10n: de.po: translate 9 new messagesRalf Thielow Tue, 14 Jul 2015 17:41:07 +0000 (19:41 +0200)

l10n: de.po: translate 9 new messages

Translate 9 new messages came from git.pot update in a4156d2
(l10n: git.pot: v2.5.0 round 2 (9 new, 5 removed)).

Signed-off-by: Ralf Thielow <ralf.thielow@gmail.com>
Acked-by: Phillip Sz <phillip.szelat@gmail.com>

l10n: Updated Bulgarian translation of git (2359t,0f,0u)Alexander Shopov Tue, 14 Jul 2015 16:09:55 +0000 (19:09 +0300)

l10n: Updated Bulgarian translation of git (2359t,0f,0u)

Signed-off-by: Alexander Shopov <ash@kambanaria.org>

rev-parse --parseopt: allow [*=?!] in argument hintsIlya Bobyr Tue, 14 Jul 2015 08:17:44 +0000 (01:17 -0700)

rev-parse --parseopt: allow [*=?!] in argument hints

A line in the input to "rev-parse --parseopt" describes an option by
listing a short and/or long name, optional flags [*=?!], argument hint,
and then whitespace and help string.

We did not allow any of the [*=?!] characters in the argument hints.
The following input

pair=key=value equals sign in the hint

used to generate a help line like this:

--pair=key <value> equals sign in the hint

and used to expect "pair=key" as the argument name.

That is not very helpful as we generally do not want any of the [*=?!]
characters in the argument names. But we do want to use at least the
equals sign in the argument hints.

Update the parser to make long argument names stop at the first [*=?!]
character.

Add test case with equals sign in the argument hint and update the test
to perform all the operations in test_expect_success matching the
t/README requirements and allowing commands like

./t1502-rev-parse-parseopt.sh --run=1-2

to stop at the test case 2 without any further modification of the test
state area.

Signed-off-by: Ilya Bobyr <ilya.bobyr@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

l10n: zh_CN: for git v2.5.0 l10n round 2Jiang Xin Mon, 13 Jul 2015 23:33:09 +0000 (07:33 +0800)

l10n: zh_CN: for git v2.5.0 l10n round 2

Update 9 translations (2359t0f0u) for git v2.5.0-rc2.

Signed-off-by: Jiang Xin <worldhello.net@gmail.com>

l10n: sv.po: Update Swedish translation (2359t0f0u)Peter Krefting Wed, 15 Jul 2015 11:54:11 +0000 (12:54 +0100)

l10n: sv.po: Update Swedish translation (2359t0f0u)

Signed-off-by: Peter Krefting <peter@softwolves.pp.se>

Merge branch 'fr_v2.5.0-round2' of git://github.com... Jiang Xin Tue, 14 Jul 2015 23:06:49 +0000 (07:06 +0800)

Merge branch 'fr_v2.5.0-round2' of git://github.com/jnavila/git

* 'fr_v2.5.0-round2' of git://github.com/jnavila/git:
l10n: fr v2.5.0 round 2 (2359t)

l10n: fr v2.5.0 round 2 (2359t)Jean-Noel Avila Tue, 14 Jul 2015 10:25:06 +0000 (12:25 +0200)

l10n: fr v2.5.0 round 2 (2359t)

Signed-off-by: Jean-Noel Avila <jn.avila@free.fr>

Merge branch 'russian-l10n' of https://github.com/DJm00... Jiang Xin Tue, 14 Jul 2015 14:30:12 +0000 (22:30 +0800)

Merge branch 'russian-l10n' of https://github.com/DJm00n/git-po-ru

* 'russian-l10n' of https://github.com/DJm00n/git-po-ru:
l10n: ru.po: update Russian translation

l10n: ru.po: update Russian translationDimitriy Ryazantcev Tue, 14 Jul 2015 13:34:00 +0000 (16:34 +0300)

l10n: ru.po: update Russian translation

Signed-off-by: Dimitriy Ryazantcev <dimitriy.ryazantcev@gmail.com>

l10n: Updated Vietnamese translation (2359t)Tran Ngoc Quan Tue, 14 Jul 2015 00:30:51 +0000 (07:30 +0700)

l10n: Updated Vietnamese translation (2359t)

Signed-off-by: Tran Ngoc Quan <vnwildman@gmail.com>

l10n: git.pot: v2.5.0 round 2 (9 new, 5 removed)Jiang Xin Mon, 13 Jul 2015 23:20:08 +0000 (07:20 +0800)

l10n: git.pot: v2.5.0 round 2 (9 new, 5 removed)

Generate po/git.pot from v2.5.0-rc2 for git v2.5.0 l10n round 2.

Signed-off-by: Jiang Xin <worldhello.net@gmail.com>

Merge tag 'l10n-2.5.0-rnd1' of git://github.com/git... Junio C Hamano Mon, 13 Jul 2015 22:37:24 +0000 (15:37 -0700)

Merge tag 'l10n-2.5.0-rnd1' of git://github.com/git-l10n/git-po

l10n-2.5.0-rnd1

* tag 'l10n-2.5.0-rnd1' of git://github.com/git-l10n/git-po:
l10n: de.po: translate 65 new messages
l10n: de.po: translate "index" as "Index"
l10n: de.po: fix translation of "head nodes"
l10n: zh_CN: for git v2.5.0 l10n round 1
l10n: ca.po: update translation
l10n: fr.po v2.5.0-rc0 (2355t)
l10n: Updated Bulgarian translation of git (2355t,0f,0u)
l10n: sv.po: Update Swedish translation (2355t0f0u)
l10n: Updated Vietnamese translation (2355t)
l10n: git.pot: v2.5.0 round 1 (65 new, 15 removed)

Git 2.5.0-rc2 v2.5.0-rc2Junio C Hamano Mon, 13 Jul 2015 21:03:44 +0000 (14:03 -0700)

Git 2.5.0-rc2

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

Merge branch 'es/worktree-add'Junio C Hamano Mon, 13 Jul 2015 21:02:18 +0000 (14:02 -0700)

Merge branch 'es/worktree-add'

Update to the "linked checkout" in 2.5.0-rc1.

Instead of "checkout --to" that does not do what "checkout"
normally does, move the functionality to "git worktree add".

* es/worktree-add: (24 commits)
Revert "checkout: retire --ignore-other-worktrees in favor of --force"
checkout: retire --ignore-other-worktrees in favor of --force
worktree: add: auto-vivify new branch when <branch> is omitted
worktree: add: make -b/-B default to HEAD when <branch> is omitted
worktree: extract basename computation to new function
checkout: require worktree unconditionally
checkout: retire --to option
tests: worktree: retrofit "checkout --to" tests for "worktree add"
worktree: add -b/-B options
worktree: add --detach option
worktree: add --force option
worktree: introduce "add" command
checkout: drop 'checkout_opts' dependency from prepare_linked_checkout
checkout: make --to unconditionally verbose
checkout: prepare_linked_checkout: drop now-unused 'new' argument
checkout: relocate --to's "no branch specified" check
checkout: fix bug with --to and relative HEAD
Documentation/git-worktree: add EXAMPLES section
Documentation/git-worktree: add high-level 'lock' overview
Documentation/git-worktree: split technical info from general description
...

Merge branch 'nd/multiple-work-trees'Junio C Hamano Mon, 13 Jul 2015 21:02:02 +0000 (14:02 -0700)

Merge branch 'nd/multiple-work-trees'

"git checkout [<tree-ish>] <paths>" spent unnecessary cycles
checking if the current branch was checked out elsewhere, when we
know we are not switching the branches ourselves.

* nd/multiple-work-trees:
worktree: new place for "git prune --worktrees"
checkout: don't check worktrees when not necessary

Merge branch 'ss/clone-guess-dir-name-simplify'Junio C Hamano Mon, 13 Jul 2015 21:00:28 +0000 (14:00 -0700)

Merge branch 'ss/clone-guess-dir-name-simplify'

Code simplification.

* ss/clone-guess-dir-name-simplify:
clone: simplify string handling in guess_dir_name()

Merge branch 'kb/config-unmap-before-renaming'Junio C Hamano Mon, 13 Jul 2015 21:00:27 +0000 (14:00 -0700)

Merge branch 'kb/config-unmap-before-renaming'

"git config" failed to update the configuration file when the
underlying filesystem is incapable of renaming a file that is still
open.

* kb/config-unmap-before-renaming:
config.c: fix writing config files on Windows network shares

Merge branch 'mh/strbuf-read-file-returns-ssize-t'Junio C Hamano Mon, 13 Jul 2015 21:00:27 +0000 (14:00 -0700)

Merge branch 'mh/strbuf-read-file-returns-ssize-t'

Avoid possible ssize_t to int truncation.

* mh/strbuf-read-file-returns-ssize-t:
strbuf: strbuf_read_file() should return ssize_t

Merge branch 'jc/unexport-git-pager-in-use-in-pager'Junio C Hamano Mon, 13 Jul 2015 21:00:26 +0000 (14:00 -0700)

Merge branch 'jc/unexport-git-pager-in-use-in-pager'

When you say "!<ENTER>" while running say "git log", you'd confuse
yourself in the resulting shell, that may look as if you took
control back to the original shell you spawned "git log" from but
that isn't what is happening. To that new shell, we leaked
GIT_PAGER_IN_USE environment variable that was meant as a local
communication between the original "Git" and subprocesses that was
spawned by it after we launched the pager, which caused many
"interesting" things to happen, e.g. "git diff | cat" still paints
its output in color by default.

Stop leaking that environment variable to the pager's half of the
fork; we only need it on "Git" side when we spawn the pager.

* jc/unexport-git-pager-in-use-in-pager:
pager: do not leak "GIT_PAGER_IN_USE" to the pager

Merge branch 'kb/use-nsec-doc'Junio C Hamano Mon, 13 Jul 2015 21:00:26 +0000 (14:00 -0700)

Merge branch 'kb/use-nsec-doc'

Clarify in the Makefile a guideline to decide use of USE_NSEC.

* kb/use-nsec-doc:
Makefile / racy-git.txt: clarify USE_NSEC prerequisites

Merge branch 'js/rebase-i-clean-up-upon-continue-to... Junio C Hamano Mon, 13 Jul 2015 21:00:25 +0000 (14:00 -0700)

Merge branch 'js/rebase-i-clean-up-upon-continue-to-skip'

Abandoning an already applied change in "git rebase -i" with
"--continue" left CHERRY_PICK_HEAD and confused later steps.

* js/rebase-i-clean-up-upon-continue-to-skip:
rebase -i: do not leave a CHERRY_PICK_HEAD file behind
t3404: demonstrate CHERRY_PICK_HEAD bug

Merge branch 'et/http-proxyauth'Junio C Hamano Mon, 13 Jul 2015 21:00:24 +0000 (14:00 -0700)

Merge branch 'et/http-proxyauth'

We used to ask libCURL to use the most secure authentication method
available when talking to an HTTP proxy only when we were told to
talk to one via configuration variables. We now ask libCURL to
always use the most secure authentication method, because the user
can tell libCURL to use an HTTP proxy via an environment variable
without using configuration variables.

* et/http-proxyauth:
http: always use any proxy auth method available

Merge branch 'jc/fsck-retire-require-eoh'Junio C Hamano Mon, 13 Jul 2015 21:00:23 +0000 (14:00 -0700)

Merge branch 'jc/fsck-retire-require-eoh'

A fix to a minor regression to "git fsck" in v2.2 era that started
complaining about a body-less tag object when it lacks a separator
empty line after its header to separate it with a non-existent body.

* jc/fsck-retire-require-eoh:
fsck: it is OK for a tag and a commit to lack the body

fast-import: do less work when given "from" matches... Mike Hommey Thu, 9 Jul 2015 06:50:09 +0000 (15:50 +0900)

fast-import: do less work when given "from" matches current branch head

When building a fast-import stream, it's easy to forget the fact
that for non-merge commits happening on top of the current branch
head, there is no need for a "from" command. That is corroborated by
the fact that at least git-p4, hg-fast-export and felipec's
git-remote-hg all unconditionally use a "from" command.

Unfortunately, giving a "from" command always resets the branch
tree, forcing it to be re-read, and in many cases, the pack is also
closed and reopened through gfi_unpack_entry. Both are unnecessary
overhead, and the latter is particularly slow at least on OSX.

Avoid resetting the tree when it's unmodified, and avoid calling
gfi_unpack_entry when the given mark points to the same commit as
the current branch head.

Signed-off-by: Mike Hommey <mh@glandium.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

diff: parse ws-error-highlight option more strictlyRené Scharfe Sat, 11 Jul 2015 12:58:21 +0000 (14:58 +0200)

diff: parse ws-error-highlight option more strictly

Check if a matched token is followed by a delimiter before advancing the
pointer arg. This avoids accepting composite words like "allnew" or
"defaultcontext" and misparsing them as "new" or "context".

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

Revert "checkout: retire --ignore-other-worktrees in... Junio C Hamano Sun, 12 Jul 2015 16:38:21 +0000 (09:38 -0700)

Revert "checkout: retire --ignore-other-worktrees in favor of --force"

This reverts commit 0d1a1517835a10818f2d40d8780a268dbb5e20ce.

When trying to switch to a different branch, that happens to be
checked out in another working tree, the user shouldn't have to
give up the other safety measures (like protecting the local changes
that overlap the difference between the branches) while defeating
the "no two checkouts of the same branch" safety.

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

checkout: document subtlety around --ours/--theirsSimon A. Eugster Fri, 10 Jul 2015 20:07:11 +0000 (13:07 -0700)

checkout: document subtlety around --ours/--theirs

During a 'rebase' (hence 'pull --rebase'), --ours/--theirs may
appear to be swapped to those who are not aware of the fact that
they are temporarily playing the role of the keeper of the more
authoritative history.

Add a note to clarify.

Helped-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Simon A. Eugster <simon.eugster@eps.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

The last minute bits of fixesJunio C Hamano Fri, 10 Jul 2015 21:29:00 +0000 (14:29 -0700)

The last minute bits of fixes

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

Merge branch 'cb/rebase-am-exit-code'Junio C Hamano Fri, 10 Jul 2015 21:26:16 +0000 (14:26 -0700)

Merge branch 'cb/rebase-am-exit-code'

"git rebase" did not exit with failure when format-patch it invoked
failed for whatever reason.

* cb/rebase-am-exit-code:
rebase: return non-zero error code if format-patch fails

Merge branch 'jk/fix-refresh-utime'Junio C Hamano Fri, 10 Jul 2015 21:26:14 +0000 (14:26 -0700)

Merge branch 'jk/fix-refresh-utime'

Fix a small bug in our use of umask() return value.

* jk/fix-refresh-utime:
check_and_freshen_file: fix reversed success-check

Merge branch 'mm/branch-doc-updates'Junio C Hamano Fri, 10 Jul 2015 21:26:13 +0000 (14:26 -0700)

Merge branch 'mm/branch-doc-updates'

* mm/branch-doc-updates:
Documentation/branch: document -M and -D in terms of --force
Documentation/branch: document -d --force and -m --force