gitweb.git
Merge branch 'js/msgfmt-on-windows' of ../git-gui into... Junio C Hamano Tue, 25 Jul 2017 20:42:41 +0000 (13:42 -0700)

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

* 'js/msgfmt-on-windows' of ../git-gui:
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

git-gui (MinGW): make use of MSys2's msgfmtJohannes Schindelin Tue, 25 Jul 2017 08:35:57 +0000 (10:35 +0200)

git-gui (MinGW): make use of MSys2's msgfmt

When Git for Windows was still based on MSys1, we had no gettext, ergo
no msgfmt, either. Therefore, we introduced a small and simple Tcl
script to perform the same task.

However, with MSys2, we no longer need that because we have a proper
msgfmt executable. Plus, the po2msg.sh script somehow manages to hang
when run in parallel in Git for Windows' SDK (symptom: the Continuous
Testing tasks timing out).

Two reasons to use real msgfmt.exe instead.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

fmt-merge-msg: fix coding styleDimitrios Christidis Tue, 25 Jul 2017 13:06:06 +0000 (15:06 +0200)

fmt-merge-msg: fix coding style

Align argument list and place opening brace on its own line.

Signed-off-by: Dimitrios Christidis <dimitrios@christidis.me>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Merge branch 'master' of https://github.com/Softcatala... Jiang Xin Tue, 25 Jul 2017 16:13:54 +0000 (00:13 +0800)

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

* 'master' of https://github.com/Softcatala/git-po:
l10n: Update Catalan translation

Merge branch 'master' of git://github.com/alshopov... Jiang Xin Tue, 25 Jul 2017 16:13:05 +0000 (00:13 +0800)

Merge branch 'master' of git://github.com/alshopov/git-po

* 'master' of git://github.com/alshopov/git-po:
l10n: bg.po: Updated Bulgarian translation (3213t)

l10n: vi.po (3213t): Updated 9 new stringsTran Ngoc Quan Tue, 25 Jul 2017 00:09:13 +0000 (07:09 +0700)

l10n: vi.po (3213t): Updated 9 new strings

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

Git 2.14-rc1 v2.14.0-rc1Junio C Hamano Mon, 24 Jul 2017 21:50:35 +0000 (14:50 -0700)

Git 2.14-rc1

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

refs: use skip_prefix() in ref_is_hidden()Christian Couder Sat, 22 Jul 2017 04:39:12 +0000 (06:39 +0200)

refs: use skip_prefix() in ref_is_hidden()

This is shorter, makes the logic a bit easier to follow, and is
perhaps a bit faster too.

The logic is to make the final decision only when "subject" is there,
its early part matches "match", and the match is at the slash
boundary (or the whole thing).

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

blame: fix memory corruption scrambling revision name... SZEDER Gábor Mon, 24 Jul 2017 21:15:50 +0000 (23:15 +0200)

blame: fix memory corruption scrambling revision name in error message

When attempting to blame a non-existing path, git should show an error
message like this:

$ git blame e83c51633 -- nonexisting-file
fatal: no such path nonexisting-file in e83c51633

Since the recent commit 835c49f7d (blame: rework methods that
determine 'final' commit, 2017-05-24) the revision name is either
missing or some scrambled characters are shown instead. The reason is
that the revision name must be duplicated, because it is invalidated
when the pending objects array is cleared in the meantime, but this
commit dropped the duplication.

Restore the duplication of the revision name in the affected functions
(find_single_final() and find_single_initial()).

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

Merge https://github.com/git-l10n/git-poJunio C Hamano Mon, 24 Jul 2017 21:01:08 +0000 (14:01 -0700)

Merge https://github.com/git-l10n/git-po

* https://github.com/git-l10n/git-po:
l10n: git.pot: v2.14.0 round 2 (9 new, 2 removed)
l10n: sv.po: Update Swedish translation (3206t0f0u)
l10n: ko.po: Update Korean translation
l10n: Update Catalan translation
l10n: bg.po: Updated Bulgarian translation (3206t)
l10n: vi.po(3206t): Update Vietnamese translation
l10n: git.pot: v2.14.0 round 1 (34 new, 23 removed)
l10n: ru.po: update Russian translation
l10n: Fixes to Catalan translation

l10n: Update Catalan translationJordi Mas Mon, 24 Jul 2017 16:29:29 +0000 (18:29 +0200)

l10n: Update Catalan translation

Signed-off-by: Jordi Mas <jmas@softcatala.org>

l10n: bg.po: Updated Bulgarian translation (3213t)Alexander Shopov Mon, 24 Jul 2017 15:27:43 +0000 (17:27 +0200)

l10n: bg.po: Updated Bulgarian translation (3213t)

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

l10n: git.pot: v2.14.0 round 2 (9 new, 2 removed)Jiang Xin Mon, 24 Jul 2017 14:00:44 +0000 (22:00 +0800)

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

Generate po/git.pot from v2.14.0-rc0-40-g5eada8987e for git v2.14.0 l10n round 2.

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

Merge branch 'master' of git://github.com/git-l10n... Jiang Xin Mon, 24 Jul 2017 13:53:47 +0000 (21:53 +0800)

Merge branch 'master' of git://github.com/git-l10n/git-po

* 'master' of git://github.com/git-l10n/git-po:
l10n: sv.po: Update Swedish translation (3206t0f0u)
l10n: ko.po: Update Korean translation
l10n: Update Catalan translation
l10n: bg.po: Updated Bulgarian translation (3206t)
l10n: vi.po(3206t): Update Vietnamese translation
l10n: git.pot: v2.14.0 round 1 (34 new, 23 removed)
l10n: ru.po: update Russian translation
l10n: Fixes to Catalan translation

Merge branch 'master' of git://github.com/nafmo/git... Jiang Xin Fri, 21 Jul 2017 22:19:21 +0000 (06:19 +0800)

Merge branch 'master' of git://github.com/nafmo/git-l10n-sv

* 'master' of git://github.com/nafmo/git-l10n-sv:
l10n: sv.po: Update Swedish translation (3206t0f0u)

Sync with maintJunio C Hamano Fri, 21 Jul 2017 22:13:25 +0000 (15:13 -0700)

Sync with maint

* maint:
fixes from 'master' for 2.13.4

fixes from 'master' for 2.13.4Junio C Hamano Fri, 21 Jul 2017 22:06:09 +0000 (15:06 -0700)

fixes from 'master' for 2.13.4

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

Merge branch 'ew/fd-cloexec-fix' into maintJunio C Hamano Fri, 21 Jul 2017 22:03:40 +0000 (15:03 -0700)

Merge branch 'ew/fd-cloexec-fix' into maint

Portability/fallback fix.

* ew/fd-cloexec-fix:
set FD_CLOEXEC properly when O_CLOEXEC is not supported

Merge branch 'ks/fix-rebase-doc-picture' into maintJunio C Hamano Fri, 21 Jul 2017 22:03:39 +0000 (15:03 -0700)

Merge branch 'ks/fix-rebase-doc-picture' into maint

Doc update.

* ks/fix-rebase-doc-picture:
doc: correct a mistake in an illustration

Merge branch 'js/alias-case-sensitivity' into maintJunio C Hamano Fri, 21 Jul 2017 22:03:38 +0000 (15:03 -0700)

Merge branch 'js/alias-case-sensitivity' into maint

A recent update broke an alias that contained an uppercase letter.

* js/alias-case-sensitivity:
alias: compare alias name *case-insensitively*
t1300: demonstrate that CamelCased aliases regressed

Merge branch 'bb/unicode-10.0' into maintJunio C Hamano Fri, 21 Jul 2017 22:03:38 +0000 (15:03 -0700)

Merge branch 'bb/unicode-10.0' into maint

Update the character width tables.

* bb/unicode-10.0:
unicode: update the width tables to Unicode 10

Hopefully the final last-minute fix before -rc1Junio C Hamano Fri, 21 Jul 2017 22:02:51 +0000 (15:02 -0700)

Hopefully the final last-minute fix before -rc1

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

Merge branch 'ks/doc-fixes'Junio C Hamano Fri, 21 Jul 2017 21:57:37 +0000 (14:57 -0700)

Merge branch 'ks/doc-fixes'

Doc clean-up.

* ks/doc-fixes:
doc: reformat the paragraph containing the 'cut-line'
doc: camelCase the i18n config variables to improve readability

Merge branch 'rj/cygwin-fread-reads-directories'Junio C Hamano Fri, 21 Jul 2017 21:57:37 +0000 (14:57 -0700)

Merge branch 'rj/cygwin-fread-reads-directories'

It turns out that Cygwin also needs the fopen() wrapper that
returns failure when a directory is opened for reading.

* rj/cygwin-fread-reads-directories:
config.mak.uname: set FREAD_READS_DIRECTORIES for cygwin

Merge branch 'jc/po-pritime-fix'Junio C Hamano Fri, 21 Jul 2017 21:57:36 +0000 (14:57 -0700)

Merge branch 'jc/po-pritime-fix'

We started using "%" PRItime, imitating "%" PRIuMAX and friends, as
a way to format the internal timestamp value, but this does not
play well with gettext(1) i18n framework, and causes "make pot"
that is run by the l10n coordinator to create a broken po/git.pot
file. This is a possible workaround for that problem.

* jc/po-pritime-fix:
Makefile: help gettext tools to cope with our custom PRItime format

run_processes_parallel: change confusing task_cb conventionJohannes Schindelin Wed, 19 Jul 2017 14:56:19 +0000 (16:56 +0200)

run_processes_parallel: change confusing task_cb convention

By declaring the task_cb parameter of type `void **`, the signature of
the get_next_task method suggests that the "task-specific cookie" can be
defined in that method, and the signatures of the start_failure and of
the task_finished methods declare that parameter of type `void *`,
suggesting that those methods are mere users of said cookie.

That convention makes a total lot of sense, because the tasks are pretty
much dead when one of the latter two methods is called: there would be
little use to reset that cookie at that point because nobody would be
able to see the change afterwards.

However, this is not what the code actually does. For all three methods,
it passes the *address* of pp->children[i].data.

As reasoned above, this behavior makes no sense. So let's change the
implementation to adhere to the convention suggested by the signatures.

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

config.mak.uname: set FREAD_READS_DIRECTORIES for cygwinRamsay Jones Fri, 21 Jul 2017 18:43:17 +0000 (19:43 +0100)

config.mak.uname: set FREAD_READS_DIRECTORIES for cygwin

Signed-off-by: Ramsay Jones <ramsay@ramsayjones.plus.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

A few more topics while waiting for the po/PRItime... Junio C Hamano Thu, 20 Jul 2017 23:31:56 +0000 (16:31 -0700)

A few more topics while waiting for the po/PRItime resolution

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

Merge branch 'mt/p4-parse-G-output'Junio C Hamano Thu, 20 Jul 2017 23:30:00 +0000 (16:30 -0700)

Merge branch 'mt/p4-parse-G-output'

Use "p4 -G" to make "p4 changes" output more Python-friendly
to parse.

* mt/p4-parse-G-output:
git-p4: filter for {'code':'info'} in p4CmdList
git-p4: parse marshal output "p4 -G" in p4 changes
git-p4: git-p4 tests with p4 triggers

Merge branch 'ew/fd-cloexec-fix'Junio C Hamano Thu, 20 Jul 2017 23:30:00 +0000 (16:30 -0700)

Merge branch 'ew/fd-cloexec-fix'

Portability/fallback fix.

* ew/fd-cloexec-fix:
set FD_CLOEXEC properly when O_CLOEXEC is not supported

Merge branch 'jk/build-with-asan'Junio C Hamano Thu, 20 Jul 2017 23:29:59 +0000 (16:29 -0700)

Merge branch 'jk/build-with-asan'

A recent update made it easier to use "-fsanitize=" option while
compiling but supported only one sanitize option. Allow more than
one to be combined, joined with a comma, like "make SANITIZE=foo,bar".

* jk/build-with-asan:
Makefile: allow combining UBSan with other sanitizers

Merge branch 'jk/test-copy-bytes-fix'Junio C Hamano Thu, 20 Jul 2017 23:29:59 +0000 (16:29 -0700)

Merge branch 'jk/test-copy-bytes-fix'

A test fix.

* jk/test-copy-bytes-fix:
t: handle EOF in test_copy_bytes()

Merge branch 'js/alias-case-sensitivity'Junio C Hamano Thu, 20 Jul 2017 23:29:59 +0000 (16:29 -0700)

Merge branch 'js/alias-case-sensitivity'

A recent update broke an alias that contained an uppercase letter.

* js/alias-case-sensitivity:
alias: compare alias name *case-insensitively*
t1300: demonstrate that CamelCased aliases regressed

object: remove "used" field from struct objectJonathan Tan Thu, 20 Jul 2017 00:21:44 +0000 (17:21 -0700)

object: remove "used" field from struct object

The "used" field in struct object is only used by builtin/fsck. Remove
that field and modify builtin/fsck to use a flag instead.

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

fsck: remove redundant parse_tree() invocationJonathan Tan Tue, 18 Jul 2017 22:28:48 +0000 (15:28 -0700)

fsck: remove redundant parse_tree() invocation

If obj->type == OBJ_TREE, an invocation of fsck_walk() will invoke
parse_tree() and return quickly if that returns nonzero, so it is of no
use for traverse_one_object() to invoke parse_tree() in this situation
before invoking fsck_walk(). Remove that code.

The behavior of traverse_one_object() is changed slightly in that it now
returns -1 instead of 1 in the case that parse_tree() fails, but this is
not an issue because its only caller (traverse_reachable) does not care
about the value as long as it is nonzero.

This code was introduced in commit 271b8d2 ("builtin-fsck: move away
from object-refs to fsck_walk", 2008-02-25). The same issue existed in
that commit.

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

pack-objects: remove unnecessary NULL checkRené Scharfe Thu, 20 Jul 2017 20:32:56 +0000 (22:32 +0200)

pack-objects: remove unnecessary NULL check

If done_pbase_paths is NULL then done_pbase_paths_num must be zero and
done_pbase_path_pos() returns -1 without accessing the array, so the
check is not necessary.

If the invariant was violated then the check would make sure we keep
on going and allocate the necessary amount of memory in the next
ALLOC_GROW call. That sounds nice, but all array entries except for
one would contain garbage data.

If the invariant was violated without the check we'd get a segfault in
done_pbase_path_pos(), i.e. an observable crash, alerting us of the
presence of a bug.

Currently there is no such bug: Only the functions check_pbase_path()
and cleanup_preferred_base() change pointer and counter, and both make
sure to keep them in sync. Get rid of the check anyway to allow us to
see if later changes introduce such a defect, and to simplify the code.

Detected by Coverity Scan.

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

l10n: sv.po: Update Swedish translation (3206t0f0u)Peter Krefting Thu, 20 Jul 2017 21:00:16 +0000 (23:00 +0200)

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

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

http.c: http.sslcert and http.sslkey are both pathnamesJunio C Hamano Thu, 20 Jul 2017 20:30:52 +0000 (13:30 -0700)

http.c: http.sslcert and http.sslkey are both pathnames

Back when the modern http_options() codepath was created to parse
various http.* options at 29508e1e ("Isolate shared HTTP request
functionality", 2005-11-18), and then later was corrected for
interation between the multiple configuration files in 7059cd99
("http_init(): Fix config file parsing", 2009-03-09), we parsed
configuration variables like http.sslkey, http.sslcert as plain
vanilla strings, because git_config_pathname() that understands
"~[username]/" prefix did not exist. Later, we converted some of
them (namely, http.sslCAPath and http.sslCAInfo) to use the
function, and added variables like http.cookeyFile http.pinnedpubkey
to use the function from the beginning. Because of that, these
variables all understand "~[username]/" prefix.

Make the remaining two variables, http.sslcert and http.sslkey, also
aware of the convention, as they are both clearly pathnames to
files.

Noticed-by: Victor Toni <victor.toni@gmail.com>
Helped-by: Charles Bailey <cbailey32@bloomberg.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

RelNotes: mention "sha1dc: optionally use sha1collision... Ævar Arnfjörð Bjarmason Thu, 20 Jul 2017 14:19:24 +0000 (14:19 +0000)

RelNotes: mention "sha1dc: optionally use sha1collisiondetection as a submodule"

To note that merely cloning git.git without --recurse-submodules
doesn't get you a full copy of the code anymore. See
5f6482d642 ("RelNotes: mention "log: make --regexp-ignore-case work
with --perl-regexp"", 2017-07-20).

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

RelNotes: mention "log: make --regexp-ignore-case work... Ævar Arnfjörð Bjarmason Thu, 20 Jul 2017 14:19:23 +0000 (14:19 +0000)

RelNotes: mention "log: make --regexp-ignore-case work with --perl-regexp"

To inform users that they can use --regexp-ignore-case now, and that
existing scripts which relied on that + PCRE may be buggy. See
9e3cbc59d5 ("log: make --regexp-ignore-case work with --perl-regexp",
2017-05-20).

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

RelNotes: mention "log: add -P as a synonym for --perl... Ævar Arnfjörð Bjarmason Thu, 20 Jul 2017 14:19:22 +0000 (14:19 +0000)

RelNotes: mention "log: add -P as a synonym for --perl-regexp"

To inform users that they can use the short form now. See
7531a2dd87 ("log: add -P as a synonym for --perl-regexp", 2017-05-25).

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Makefile: help gettext tools to cope with our custom... Junio C Hamano Thu, 20 Jul 2017 18:57:01 +0000 (11:57 -0700)

Makefile: help gettext tools to cope with our custom PRItime format

We started using our own timestamp_t type and PRItime format
specifier to go along with it, so that we can later change the
underlying type and output format more easily, but this does not
play well with gettext tools.

Because gettext tools need to keep the *.po file portable across
platforms, they have to special-case the format specifiers like
PRIuMAX that are known types in inttypes.h, instead of letting CPP
handle strings like

"%" PRIuMAX " seconds ago"

as an ordinary string concatenation. They fundamentally cannot do
the same for our own custom type/format.

Given that po/git.pot needs to be generated only once every release
and by only one person, i.e. the l10n coordinator, let's update the
Makefile rule to generate po/git.pot so that gettext tools are run
on a munged set of sources in which all mentions of PRItime are
replaced with PRIuMAX, which is what we happen to use right now.

This way, developers do not have to care that PRItime does not play
well with gettext, and translators do not have to care that we use
our own PRItime.

The credit for the idea to munge the source files goes to Dscho.
Possible bugs are mine.

Helped-by: Jiang Xin <worldhello.net@gmail.com>
Helped-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

l10n: ko.po: Update Korean translationChangwoo Ryu Wed, 19 Jul 2017 08:15:28 +0000 (17:15 +0900)

l10n: ko.po: Update Korean translation

Signed-off-by: Changwoo Ryu <cwryu@debian.org>

doc: reformat the paragraph containing the 'cut-line'Kaartic Sivaraam Tue, 18 Jul 2017 14:34:27 +0000 (20:04 +0530)

doc: reformat the paragraph containing the 'cut-line'

The paragraph that describes the 'scissors' cleanup mode of
'commit' had the 'cut-line' in the middle of a sentence. This
made it possible for the line to get wrapped on smaler windows.
This shouldn't be the case as it makes it hard for the user to
understand the structure of the cut-line.

Reformat the pragraph to make the 'cut-line' stand on a line of
it's own thus distinguishing it from the rest of the paragraph.
This further prevents it from getting wrapped to some extent.

Signed-off-by: Kaartic Sivaraam <kaarticsivaraam91196@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

A few more topics before 2.14-rc1Junio C Hamano Tue, 18 Jul 2017 19:52:49 +0000 (12:52 -0700)

A few more topics before 2.14-rc1

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

Merge branch 'jk/gc-pre-detach-under-hook'Junio C Hamano Tue, 18 Jul 2017 19:48:10 +0000 (12:48 -0700)

Merge branch 'jk/gc-pre-detach-under-hook'

We run an early part of "git gc" that deals with refs before
daemonising (and not under lock) even when running a background
auto-gc, which caused multiple gc processes attempting to run the
early part at the same time. This is now prevented by running the
early part also under the GC lock.

* jk/gc-pre-detach-under-hook:
gc: run pre-detach operations under lock

Merge branch 'jn/hooks-pre-rebase-sample-fix'Junio C Hamano Tue, 18 Jul 2017 19:48:10 +0000 (12:48 -0700)

Merge branch 'jn/hooks-pre-rebase-sample-fix'

Code clean-up, that makes us in sync with Debian by one patch.

* jn/hooks-pre-rebase-sample-fix:
pre-rebase hook: capture documentation in a <<here document

Merge branch 'rs/progress-overall-throughput-at-the... Junio C Hamano Tue, 18 Jul 2017 19:48:09 +0000 (12:48 -0700)

Merge branch 'rs/progress-overall-throughput-at-the-end'

The progress meter did not give a useful output when we haven't had
0.5 seconds to measure the throughput during the interval. Instead
show the overall throughput rate at the end, which is a much more
useful number.

* rs/progress-overall-throughput-at-the-end:
progress: show overall rate in last update

Merge branch 'tb/push-to-cygwin-unc-path'Junio C Hamano Tue, 18 Jul 2017 19:48:09 +0000 (12:48 -0700)

Merge branch 'tb/push-to-cygwin-unc-path'

On Cygwin, similar to Windows, "git push //server/share/repository"
ought to mean a repository on a network share that can be accessed
locally, but this did not work correctly due to stripping the double
slashes at the beginning.

This may need to be heavily tested before it gets unleashed to the
wild, as the change is at a fairly low-level code and would affect
not just the code to decide if the push destination is local. There
may be unexpected fallouts in the path normalization.

* tb/push-to-cygwin-unc-path:
cygwin: allow pushing to UNC paths

gitweb: skip unreadable subdirectoriesHielke Christian Braun Tue, 18 Jul 2017 08:41:54 +0000 (10:41 +0200)

gitweb: skip unreadable subdirectories

gitweb terminates and shows no project list, if it can not access a
sub-directory in the project root directory while looking for projects
to show.

Work it around by skipping unreadable directories.

Signed-off-by: Hielke Christian Braun <hcb@unco.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

l10n: Update Catalan translationJordi Mas Tue, 18 Jul 2017 19:06:06 +0000 (21:06 +0200)

l10n: Update Catalan translation

Signed-off-by: Jordi Mas <jmas@softcatala.org>

doc: camelCase the i18n config variables to improve... Kaartic Sivaraam Mon, 17 Jul 2017 15:39:00 +0000 (21:09 +0530)

doc: camelCase the i18n config variables to improve readability

The i18n config variable used weren't readable as they were in
the crude form of how git stores/uses it's config variables.

Improve it's readability by replacing them with camelCased versions
of config variables as it doesn't have any impact on it's usage.

Signed-off-by: Kaartic Sivaraam <kaarticsivaraam91196@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

commit: check for empty message before the check for... Kaartic Sivaraam Mon, 17 Jul 2017 15:36:15 +0000 (21:06 +0530)

commit: check for empty message before the check for untouched template

The check for whether the template given to 'git commit' is untouched
is done before the empty message check. This results in a wrong error
message being displayed in the following case. When the user removes
everything in template completely to abort the commit he is shown the
"template untouched" error which is wrong. He should be shown the
"empty message" error.

Do the empty message check before checking for an untouched template
thus fixing this issue.

Signed-off-by: Kaartic Sivaraam <kaarticsivaraam91196@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

dir: support platforms that require aligned readsRené Scharfe Sun, 16 Jul 2017 12:17:37 +0000 (14:17 +0200)

dir: support platforms that require aligned reads

The untracked cache is stored on disk by concatenating its memory
structures without any padding. Consequently some of the structs are
not aligned at a particular boundary when the whole extension is read
back in one go. That's only OK on platforms without strict alignment
requirements, or for byte-aligned data like strings or hash values.

Decode struct ondisk_untracked_cache carefully from the extension
blob by using explicit pointer arithmetic with offsets, avoiding
alignment issues. Use char pointers for passing stat_data objects to
stat_data_from_disk(), and use memcpy(3) in that function to get the
contents into a properly aligned struct, then perform the byte-order
adjustment in place there.

Found with Clang's UBSan.

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

t: handle EOF in test_copy_bytes()Jeff King Sun, 16 Jul 2017 10:45:32 +0000 (06:45 -0400)

t: handle EOF in test_copy_bytes()

The test_copy_bytes() function claims to read up to N bytes,
or until it gets EOF. But we never handle EOF in our loop,
and a short input will cause perl to go into an infinite
loop of read() getting zero bytes.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

ls-files: don't try to prune an empty indexRené Scharfe Sun, 16 Jul 2017 11:16:01 +0000 (13:16 +0200)

ls-files: don't try to prune an empty index

Exit early when asked to prune an index that contains no entries to
begin with. This avoids pointer arithmetic on istate->cache, which is
possibly NULL in that case.

Found with Clang's UBSan.

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

apply: use COPY_ARRAY and MOVE_ARRAY in update_image()René Scharfe Sat, 15 Jul 2017 20:20:54 +0000 (22:20 +0200)

apply: use COPY_ARRAY and MOVE_ARRAY in update_image()

Simplify the code by using the helper macros COPY_ARRAY and MOVE_ARRAY,
which also makes them more robust in the case we copy or move no lines,
as they allow using NULL points in that case, while memcpy(3) and
memmove(3) don't.

Found with Clang's UBSan.

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

use MOVE_ARRAYRené Scharfe Sat, 15 Jul 2017 20:00:45 +0000 (22:00 +0200)

use MOVE_ARRAY

Simplify the code for moving members inside of an array and make it more
robust by using the helper macro MOVE_ARRAY. It calculates the size
based on the specified number of elements for us and supports NULL
pointers when that number is zero. Raw memmove(3) calls with NULL can
cause the compiler to (over-eagerly) optimize out later NULL checks.

This patch was generated with contrib/coccinelle/array.cocci and spatch
(Coccinelle).

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

add MOVE_ARRAYRené Scharfe Sat, 15 Jul 2017 19:36:20 +0000 (21:36 +0200)

add MOVE_ARRAY

Similar to COPY_ARRAY (introduced in 60566cbb58), add a safe and
convenient helper for moving potentially overlapping ranges of array
entries. It infers the element size, multiplies automatically and
safely to get the size in bytes, does a basic type safety check by
comparing element sizes and unlike memmove(3) it supports NULL
pointers iff 0 elements are to be moved.

Also add a semantic patch to demonstrate the helper's intended usage.

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

bswap: convert get_be16, get_be32 and put_be32 to inlin... René Scharfe Sat, 15 Jul 2017 19:22:50 +0000 (21:22 +0200)

bswap: convert get_be16, get_be32 and put_be32 to inline functions

Simplify the implementation and allow callers to use expressions with
side-effects by turning the macros get_be16, get_be32 and put_be32 into
inline functions.

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

bswap: convert to unsigned before shifting in get_be32René Scharfe Sat, 15 Jul 2017 19:11:14 +0000 (21:11 +0200)

bswap: convert to unsigned before shifting in get_be32

The pointer p is dereferenced and we get an unsigned char. Before
shifting it's automatically promoted to int. Left-shifting a signed
32-bit value bigger than 127 by 24 places is undefined. Explicitly
convert to a 32-bit unsigned type to avoid undefined behaviour if
the highest bit is set.

Found with Clang's UBSan.

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

set FD_CLOEXEC properly when O_CLOEXEC is not supportedEric Wong Sat, 15 Jul 2017 18:55:40 +0000 (18:55 +0000)

set FD_CLOEXEC properly when O_CLOEXEC is not supported

FD_CLOEXEC only applies to the file descriptor, so it needs to be
manipuluated via F_GETFD/F_SETFD. F_GETFL/F_SETFL are for file
description flags.

Verified via strace with o_cloexec set to zero.

Signed-off-by: Eric Wong <e@80x24.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Makefile: allow combining UBSan with other sanitizersRené Scharfe Sat, 15 Jul 2017 17:18:56 +0000 (19:18 +0200)

Makefile: allow combining UBSan with other sanitizers

Multiple sanitizers can be specified as a comma-separated list. Set
the flag NO_UNALIGNED_LOADS even if UndefinedBehaviorSanitizer is not
the only sanitizer to build with.

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

alias: compare alias name *case-insensitively*Johannes Schindelin Fri, 14 Jul 2017 08:39:38 +0000 (10:39 +0200)

alias: compare alias name *case-insensitively*

It is totally legitimate to add CamelCased aliases, but due to the way
config keys are compared, the case does not matter.

Therefore, we must compare the alias name insensitively to the config
keys.

This fixes a regression introduced by a9bcf6586d1 (alias: use
the early config machinery to expand aliases, 2017-06-14).

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

t1300: demonstrate that CamelCased aliases regressedJohannes Schindelin Fri, 14 Jul 2017 08:39:29 +0000 (10:39 +0200)

t1300: demonstrate that CamelCased aliases regressed

It is totally legitimate to add CamelCased aliases, but due to the way
config keys are compared, the case does not matter.

Except that now it does: the alias name is expected to be all
lower-case. This is a regression introduced by a9bcf6586d1 (alias: use
the early config machinery to expand aliases, 2017-06-14).

Noticed by Alejandro Pauly, diagnosed by Kevin Willford.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

l10n: bg.po: Updated Bulgarian translation (3206t)Alexander Shopov Wed, 5 Jul 2017 08:17:59 +0000 (11:17 +0300)

l10n: bg.po: Updated Bulgarian translation (3206t)

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

l10n: vi.po(3206t): Update Vietnamese translationTran Ngoc Quan Sat, 15 Jul 2017 06:53:33 +0000 (13:53 +0700)

l10n: vi.po(3206t): Update Vietnamese translation

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

l10n: git.pot: v2.14.0 round 1 (34 new, 23 removed)Jiang Xin Sat, 15 Jul 2017 03:58:14 +0000 (11:58 +0800)

l10n: git.pot: v2.14.0 round 1 (34 new, 23 removed)

Generate po/git.pot from v2.14.0-rc0 for git v2.14.0 l10n round 1.

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

Merge branch 'maint' of git://github.com/git-l10n/git-poJiang Xin Sat, 15 Jul 2017 01:26:40 +0000 (09:26 +0800)

Merge branch 'maint' of git://github.com/git-l10n/git-po

* 'maint' of git://github.com/git-l10n/git-po:
l10n: ru.po: update Russian translation
l10n: Fixes to Catalan translation

Git 2.14-rc0 v2.14.0-rc0Junio C Hamano Thu, 13 Jul 2017 23:22:29 +0000 (16:22 -0700)

Git 2.14-rc0

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

Merge branch 'jk/build-with-asan'Junio C Hamano Thu, 13 Jul 2017 23:14:54 +0000 (16:14 -0700)

Merge branch 'jk/build-with-asan'

The build procedure has been improved to allow building and testing
Git with address sanitizer more easily.

* jk/build-with-asan:
Makefile: disable unaligned loads with UBSan
Makefile: turn off -fomit-frame-pointer with sanitizers
Makefile: add helper for compiling with -fsanitize
test-lib: turn on ASan abort_on_error by default
test-lib: set ASAN_OPTIONS variable before we run git

Merge branch 'sb/pull-rebase-submodule'Junio C Hamano Thu, 13 Jul 2017 23:14:54 +0000 (16:14 -0700)

Merge branch 'sb/pull-rebase-submodule'

"git pull --rebase --recurse-submodules" learns to rebase the
branch in the submodules to an updated base.

* sb/pull-rebase-submodule:
builtin/fetch cleanup: always set default value for submodule recursing
pull: optionally rebase submodules (remote submodule changes only)
builtin/fetch: parse recurse-submodules-default at default options parsing
builtin/fetch: factor submodule recurse parsing out to submodule config

Merge branch 'sb/hashmap-customize-comparison'Junio C Hamano Thu, 13 Jul 2017 23:14:54 +0000 (16:14 -0700)

Merge branch 'sb/hashmap-customize-comparison'

Update the hashmap API so that data to customize the behaviour of
the comparison function can be specified at the time a hashmap is
initialized.

* sb/hashmap-customize-comparison:
hashmap: migrate documentation from Documentation/technical into header
patch-ids.c: use hashmap correctly
hashmap.h: compare function has access to a data field

Merge branch 'ab/grep-lose-opt-regflags'Junio C Hamano Thu, 13 Jul 2017 23:14:54 +0000 (16:14 -0700)

Merge branch 'ab/grep-lose-opt-regflags'

Code cleanup.

* ab/grep-lose-opt-regflags:
grep: remove redundant REG_NEWLINE when compiling fixed regex
grep: remove regflags from the public grep_opt API
grep: remove redundant and verbose re-assignments to 0
grep: remove redundant "fixed" field re-assignment to 0
grep: adjust a redundant grep pattern type assignment
grep: remove redundant double assignment to 0

ref-filter: consult want_color() before emitting colorsJeff King Thu, 13 Jul 2017 15:09:32 +0000 (11:09 -0400)

ref-filter: consult want_color() before emitting colors

When color placeholders like %(color:red) are used in a
ref-filter format, we unconditionally output the colors,
even if the user has asked us for no colors. This usually
isn't a problem when the user is constructing a --format on
the command line, but it means we may do the wrong thing
when the format is fed from a script or alias. For example:

$ git config alias.b 'branch --format=%(color:green)%(refname)'
$ git b --no-color

should probably omit the green color. Likewise, running:

$ git b >branches

should probably also omit the color, just as we would for
all baked-in coloring (and as we recently started to do for
user-specified colors in --pretty formats).

This commit makes both of those cases work by teaching
the ref-filter code to consult want_color() before
outputting any color. The color flag in ref_format defaults
to "-1", which means we'll consult color.ui, which in turn
defaults to the usual isatty() check on stdout. However,
callers like git-branch which support their own color config
(and command-line options) can override that.

The new tests independently cover all three of the callers
of ref-filter (for-each-ref, tag, and branch). Even though
these seem redundant, it confirms that we've correctly
plumbed through all of the necessary config to make colors
work by default.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

pretty: respect color settings for %C placeholdersJeff King Thu, 13 Jul 2017 15:08:46 +0000 (11:08 -0400)

pretty: respect color settings for %C placeholders

The color placeholders have traditionally been
unconditional, showing colors even when git is not otherwise
configured to do so. This was not so bad for their original
use, which was on the command-line (and the user could
decide at that moment whether to add colors or not). But
these days we have configured formats via pretty.*, and
those should operate correctly in multiple contexts.

In 3082517 (log --format: teach %C(auto,black) to respect
color config, 2012-12-17), we gave an extended placeholder
that could be used to accomplish this. But it's rather
clunky to use, because you have to specify it individually
for each color (and their matching resets) in the format.
We shied away from just switching the default to auto,
because it is technically breaking backwards compatibility.

However, there's not really a use case for unconditional
colors. The most plausible reason you would want them is to
redirect "git log" output to a file. But there, the right
answer is --color=always, as it does the right thing both
with custom user-format colors and git-generated colors.

So let's switch to the more useful default. In the
off-chance that somebody really does find a use for
unconditional colors without wanting to enable the rest of
git's colors, we provide a new %C(always,...) to enable the
old behavior. And we can remind them of --color=always in
the documentation.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

rev-list: pass diffopt->use_colors through to pretty... Jeff King Thu, 13 Jul 2017 15:07:30 +0000 (11:07 -0400)

rev-list: pass diffopt->use_colors through to pretty-print

When rev-list pretty-prints a commit, it creates a new
pretty_print_context and copies items from the rev_info
struct. We don't currently copy the "use_color" field,
though. Nobody seems to have noticed because the only part
of pretty.c that cares is the %C(auto,...) placeholder, and
presumably not many people use that with the rev-list
plumbing (as opposed to with git-log).

It will become more noticeable in a future patch, though,
when we start treating all user-format colors as auto-colors
(in which case it would become impossible to format colors
with rev-list, even with --color=always).

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

for-each-ref: load config earlierJeff King Thu, 13 Jul 2017 15:07:14 +0000 (11:07 -0400)

for-each-ref: load config earlier

In most commands we load config before parsing command line
options, since it lets the latter override the former with a
simple variable assignment. In the case of for-each-ref,
though, we do it in the reverse order. This is OK with
the current code, since there's no interaction between the
config and command-line options.

However, as the ref-filter code starts to care about config
during verify_ref_format(), we'll want to make sure the
config is loaded. Let's bump the config to the usual spot
near the top of the function.

We can drop the comment there; it's impossible to keep a
"why we load the config" comment like this up to date with
every config option we might be interested in. And indeed,
it's already stale; we'd care about core.abbrev, for
instance, when %(objectname:short) is used.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

color: check color.ui in git_default_config()Jeff King Thu, 13 Jul 2017 15:07:03 +0000 (11:07 -0400)

color: check color.ui in git_default_config()

Back in prehistoric times, our decision on whether or not to
show color by default relied on using a config callback that
either did or didn't load color config like color.diff.
When we introduced color.ui, we put it in the same boat:
commands had to manually respect it by using git_color_config()
or its git_color_default_config() convenience wrapper.

But in 4c7f1819b (make color.ui default to 'auto',
2013-06-10), that changed. Since then, we default color.ui
to auto in all programs, meaning that even plumbing commands
like "git diff-tree --pretty" might colorize the output.
Nobody seems to have complained in the intervening years,
presumably because the "is stdout a tty" check does a good
job of catching the right cases.

But that leaves an interesting curiosity: color.ui defaults
to auto even in plumbing, but you can't actually _disable_
the color via config. So if you really hate color and set
"color.ui" to false, diff-tree will still show color (but
porcelain like git-diff won't). Nobody noticed that either,
probably because very few people disable color.

One could argue that the plumbing should _always_ disable
color unless an explicit --color option is given on the
command line. But in practice, this creates a lot of
complications for scripts which do want plumbing to show
user-visible output. They can't just pass "--color" blindly;
they need to check the user's config and decide what to
send.

Given that nobody has complained about the current behavior,
let's assume it's a good path, and follow it to its
conclusion: supporting color.ui everywhere.

Note that you can create havoc by setting color.ui=always in
your config, but that's more or less already the case. We
could disallow it entirely, but it is handy for one-offs
like:

git -c color.ui=always foo >not-a-tty

when "foo" does not take a --color option itself.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

ref-filter: pass ref_format struct to atom parsersJeff King Thu, 13 Jul 2017 15:06:40 +0000 (11:06 -0400)

ref-filter: pass ref_format struct to atom parsers

The callback for parsing each formatting atom gets to see
only the atom struct (which it's filling in) and the text to
be parsed. This doesn't leave any room for it to behave
differently based on context known only to the ref_format.

We can solve this by passing in the surrounding ref_format
to each parser. Note that this makes things slightly awkward
for sort strings, which parse atoms without having a
ref_format. We'll solve that by using a dummy ref_format
with default parameters.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

ref-filter: factor out the parsing of sorting atomsJeff King Thu, 13 Jul 2017 15:02:58 +0000 (11:02 -0400)

ref-filter: factor out the parsing of sorting atoms

We parse sort strings as single formatting atoms, and just
build on parse_ref_filter_atom(). Let's pull this idea into
its own function, since it's about to get a little more
complex. As a bonus, we can give the function a slightly
more natural interface, since our single atoms are in their
own strings.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

ref-filter: make parse_ref_filter_atom a private functionJeff King Thu, 13 Jul 2017 15:02:52 +0000 (11:02 -0400)

ref-filter: make parse_ref_filter_atom a private function

The parse_ref_filter_atom() function really shouldn't be
exposed outside of ref-filter.c; its return value is an
integer index into an array that is private in that file.

Since the previous commit removed the sole external caller
(and replaced it with a public function at a more
appropriately level), we can just make this static.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

ref-filter: provide a function for parsing sort optionsJeff King Thu, 13 Jul 2017 15:02:44 +0000 (11:02 -0400)

ref-filter: provide a function for parsing sort options

The ref-filter module currently provides a callback suitable
for parsing command-line --sort options. But since git-tag
also supports the tag.sort config option, it needs a
function whose implementation is quite similar, but with a
slightly different interface. The end result is that
builtin/tag.c has a copy-paste of parse_opt_ref_sorting().

Instead, let's provide a function to parse an arbitrary
sort string, which we can then trivially wrap to make the
parse_opt variant.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

ref-filter: move need_color_reset_at_eol into ref_formatJeff King Thu, 13 Jul 2017 15:02:30 +0000 (11:02 -0400)

ref-filter: move need_color_reset_at_eol into ref_format

Calling verify_ref_format() doesn't just confirm that the
format is sane; it actually sets some global variables that
will be used later when formatting the refs. These logically
should belong to the ref_format, which would make it
possible to use multiple formats within a single program
invocation.

Let's move one such flag into the ref_format struct. There
are still others that would need to be moved before it would
be safe to use multiple formats, but this commit gives a
blueprint for how that should look.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

ref-filter: abstract ref format into its own structJeff King Thu, 13 Jul 2017 15:01:18 +0000 (11:01 -0400)

ref-filter: abstract ref format into its own struct

The ref-filter module provides routines for formatting a ref
for output. The fundamental interface for the format is a
"const char *" containing the format, and any additional
options need to be passed to each invocation of
show_ref_array_item.

Instead, let's make a ref_format struct that holds the
format, along with any associated format options. That will
make some enhancements easier in the future:

1. new formatting options can be added without disrupting
existing callers

2. some state can be carried in the struct rather than as
global variables

For now this just has the text format itself along with the
quote_style option, but we'll add more fields in future patches.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

ref-filter: simplify automatic color resetJeff King Thu, 13 Jul 2017 14:58:56 +0000 (10:58 -0400)

ref-filter: simplify automatic color reset

When the user-format doesn't add the closing color reset, we
add one automatically. But we do so by parsing the "reset"
string. We can just use the baked-in string literal, which
is simpler.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

t: use test_decode_color rather than literal ANSI codesJeff King Thu, 13 Jul 2017 14:58:41 +0000 (10:58 -0400)

t: use test_decode_color rather than literal ANSI codes

When we put literal ANSI terminal codes into our test
scripts, it makes diffs on those scripts hard to read (the
colors may be indistinguishable from diff coloring, or in
the case of a reset, may not be visible at all).

Some scripts get around this by including human-readable
names and converting to literal codes with a git-config
hack. This makes the actual code diffs look OK, but test_cmp
output suffers from the same problem.

Let's use test_decode_color instead, which turns the codes
into obvious text tags.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

docs/for-each-ref: update pointer to color syntaxJeff King Thu, 13 Jul 2017 14:56:21 +0000 (10:56 -0400)

docs/for-each-ref: update pointer to color syntax

The documentation for the %(color) placeholder refers to the
color.branch.* config for more details. But those details
moved to their own section in b92c1a28f
(Documentation/config.txt: describe 'color' value type in
the "Values" section, 2015-03-03). Let's update our
pointer. We can steal the text from 30cfe72d3 (pretty: fix
document link for color specification, 2016-10-11), which
fixed the same problem in a different place.

While we're at it, let's give an example, which makes the
syntax much more clear than just the text.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

check return value of verify_ref_format()Jeff King Thu, 13 Jul 2017 14:56:10 +0000 (10:56 -0400)

check return value of verify_ref_format()

Users of the ref-filter code must call verify_ref_format()
before formatting any refs, but most ignore its return
value. This means we may print an error on a syntactically
bogus pattern, but keep going anyway.

In most cases this results in a fatal error when we actually
try to format a ref. But if you have no refs to show at all,
then the behavior is confusing: git prints the error from
verify_ref_format(), then exits with code 0 without showing
any output. Let's instead abort immediately if we know we
have a bogus format.

We'll output the usage information if we have it handy (just
like the existing call in cmd_for_each_ref() does), and
otherwise just die().

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

git-p4: filter for {'code':'info'} in p4CmdListMiguel Torroja Thu, 13 Jul 2017 07:00:35 +0000 (09:00 +0200)

git-p4: filter for {'code':'info'} in p4CmdList

The function p4CmdList accepts a new argument: skip_info. When set to
True it ignores any 'code':'info' entry (skip_info=False by default).

That allows us to fix some of the tests in t9831-git-p4-triggers.sh
known to be broken with verobse p4 triggers

Signed-off-by: Miguel Torroja <miguel.torroja@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

git-p4: parse marshal output "p4 -G" in p4 changesMiguel Torroja Thu, 13 Jul 2017 07:00:34 +0000 (09:00 +0200)

git-p4: parse marshal output "p4 -G" in p4 changes

The option -G of p4 (python marshal output) gives more context about the
data being output. That's useful when using the command "change -o" as
we can distinguish between warning/error line and real change description.

This fixes the case where a p4 trigger for "p4 change" is set and the command git-p4 submit is run.

Signed-off-by: Miguel Torroja <miguel.torroja@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

git-p4: git-p4 tests with p4 triggersMiguel Torroja Thu, 13 Jul 2017 07:00:33 +0000 (09:00 +0200)

git-p4: git-p4 tests with p4 triggers

Some p4 triggers in the server side generate some warnings when
executed. Unfortunately those messages are mixed with the output of
p4 commands. A few git-p4 commands don't expect extra messages or output
lines and may fail with verbose triggers.
New tests added are known to be broken.

Signed-off-by: Miguel Torroja <miguel.torroja@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Sync with v2.13.3Junio C Hamano Wed, 12 Jul 2017 22:25:14 +0000 (15:25 -0700)

Sync with v2.13.3

Git 2.13.3 v2.13.3Junio C Hamano Wed, 12 Jul 2017 22:24:15 +0000 (15:24 -0700)

Git 2.13.3

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

Merge branch 'kn/ref-filter-branch-list' into maintJunio C Hamano Wed, 12 Jul 2017 22:23:09 +0000 (15:23 -0700)

Merge branch 'kn/ref-filter-branch-list' into maint

The rewrite of "git branch --list" using for-each-ref's internals
that happened in v2.13 regressed its handling of color.branch.local;
this has been fixed.

* kn/ref-filter-branch-list:
ref-filter.c: drop return from void function
branch: set remote color in ref-filter branch immediately
branch: use BRANCH_COLOR_LOCAL in ref-filter format
branch: only perform HEAD check for local branches

Merge branch 'ks/typofix-commit-c-comment' into maintJunio C Hamano Wed, 12 Jul 2017 22:20:48 +0000 (15:20 -0700)

Merge branch 'ks/typofix-commit-c-comment' into maint

Typofix.

* ks/typofix-commit-c-comment:
builtin/commit.c: fix a typo in the comment

Merge branch 'jk/reflog-walk-maint' into maintJunio C Hamano Wed, 12 Jul 2017 22:20:35 +0000 (15:20 -0700)

Merge branch 'jk/reflog-walk-maint' into maint

After "git branch --move" of the currently checked out branch, the
code to walk the reflog of HEAD via "log -g" and friends
incorrectly stopped at the reflog entry that records the renaming
of the branch.

* jk/reflog-walk-maint:
reflog-walk: include all fields when freeing complete_reflogs
reflog-walk: don't free reflogs added to cache
reflog-walk: duplicate strings in complete_reflogs list
reflog-walk: skip over double-null oid due to HEAD rename

Hopefully the last batch before -rc0Junio C Hamano Wed, 12 Jul 2017 22:19:27 +0000 (15:19 -0700)

Hopefully the last batch before -rc0

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

Merge branch 'ks/fix-rebase-doc-picture'Junio C Hamano Wed, 12 Jul 2017 22:18:24 +0000 (15:18 -0700)

Merge branch 'ks/fix-rebase-doc-picture'

Doc update.

* ks/fix-rebase-doc-picture:
doc: correct a mistake in an illustration

Merge branch 'rs/wt-status-cleanup'Junio C Hamano Wed, 12 Jul 2017 22:18:23 +0000 (15:18 -0700)

Merge branch 'rs/wt-status-cleanup'

Code cleanup.

* rs/wt-status-cleanup:
wt-status: use separate variable for result of shorten_unambiguous_ref