]> git.ipfire.org Git - thirdparty/git.git/log
thirdparty/git.git
7 years agobuiltin/grep.c: respect 'submodule.recurse' option
Stefan Beller [Thu, 1 Jun 2017 00:30:48 +0000 (17:30 -0700)] 
builtin/grep.c: respect 'submodule.recurse' option

In builtin/grep.c we parse the config before evaluating the command line
options. This makes the task of teaching grep to respect the new config
option 'submodule.recurse' very easy by just parsing that option.

As an alternative I had implemented a similar structure to treat
submodules as the fetch/push command have, including
* aligning the meaning of the 'recurse_submodules' to possible submodule
  values RECURSE_SUBMODULES_* as defined in submodule.h.
* having a callback to parse the value and
* reacting to the RECURSE_SUBMODULES_DEFAULT state that was the initial
  state.

However all this is not needed for a true boolean value, so let's keep
it simple. However this adds another place where "submodule.recurse" is
parsed.

Signed-off-by: Stefan Beller <sbeller@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
7 years agoIntroduce 'submodule.recurse' option for worktree manipulators
Stefan Beller [Thu, 1 Jun 2017 00:30:47 +0000 (17:30 -0700)] 
Introduce 'submodule.recurse' option for worktree manipulators

Any command that understands '--recurse-submodules' can have its
default changed to true, by setting the new 'submodule.recurse'
option.

This patch includes read-tree/checkout/reset for working tree
manipulating commands. Later patches will cover other commands.

Signed-off-by: Stefan Beller <sbeller@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
7 years agosubmodule loading: separate code path for .gitmodules and config overlay
Stefan Beller [Fri, 26 May 2017 19:10:13 +0000 (12:10 -0700)] 
submodule loading: separate code path for .gitmodules and config overlay

The .gitmodules file is not supposed to have all the options available,
that are available in the configuration so separate it out.

A configuration option such as the hypothetical submodule.color.diff
that determines in which color a submodule change is printed,
is a very user specific thing, that the .gitmodules file should
not tamper with.

The .gitmodules file should only be used for settings that required
to setup the project in which the .gitmodules file is tracked. As the
minimum this would only include the name<->path mapping of the
submodule and its URL and branch.

Any further setting (such as 'fetch.recursesubmodules' or
'submodule.<name>.{update, ignore, shallow}') is not specific
to the project setup requirements, but rather is a distribution
of suggested developer configurations.  In other areas of Git
a suggested developer configuration is not transported in-tree
but via other means.  In an organisation this could be done
by deploying an opinionated system wide config (/etc/gitconfig)
or by putting the settings in the users home directory when
they start at the organisation. In open source projects this
is often accomplished via extensive READMEs (cf. our
SubmittingPatches/CodingGuidlines).

As a later patch in this series wants to introduce
a generic submodule recursion option, we want to make
sure that switch is not exposed via the gitmodules file.

Signed-off-by: Stefan Beller <sbeller@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
7 years agoreset/checkout/read-tree: unify config callback for submodule recursion
Stefan Beller [Fri, 26 May 2017 19:10:12 +0000 (12:10 -0700)] 
reset/checkout/read-tree: unify config callback for submodule recursion

The callback function is essentially duplicated 3 times. Remove all
of them and offer a new callback function, that lives in submodule.c

By putting the callback function there, we no longer need the function
'set_config_update_recurse_submodules', nor duplicate the global variable
in each builtin as well as submodule.c

In the three builtins we have different 2 ways how to load the .gitmodules
and config file, which are slightly different. git-checkout has to load
the submodule config all the time due to 23b4c7bcc5 (checkout: Use
submodule.*.ignore settings from .git/config and .gitmodules, 2010-08-28)

git-reset and git-read-tree do not respect these diff settings, so loading
the submodule configuration is optional. Also put that into submodule.c
for code deduplication.

Signed-off-by: Stefan Beller <sbeller@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
7 years agosubmodule test invocation: only pass additional arguments
Stefan Beller [Fri, 26 May 2017 19:10:11 +0000 (12:10 -0700)] 
submodule test invocation: only pass additional arguments

In a later patch we want to introduce a config option to trigger the
submodule recursing by default. As this option should be available and
uniform across all commands that deal with submodules we'd want to test
for this option in the submodule update library.

So instead of calling the whole test set again for
"git -c submodule.recurse foo" instead of "git foo --recurse-submodules",
we'd only want to introduce one basic test that tests if the option is
recognized and respected to not overload the test suite.

Change the test functions by taking only the argument and assemble the
command inside the test function by embedding the arguments into the
command that is "git $arguments --recurse-submodules".

It would be nice to do this for all functions in lib-submodule-update,
but we cannot do that for the non-recursing tests, as there we do not
just pass in a git command but whole functions. (See t3426 for example)

Signed-off-by: Stefan Beller <sbeller@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
7 years agosubmodule recursing: do not write a config variable twice
Stefan Beller [Fri, 26 May 2017 19:10:10 +0000 (12:10 -0700)] 
submodule recursing: do not write a config variable twice

The command line option for '--recurse-submodules' is implemented
using an OPTION_CALLBACK, which takes both the callback (that sets
the file static global variable) as well as passes the same file
static global variable to the option parsing machinery to assign it.
This is fixed in this commit by passing NULL as the variable. The
callback sets it instead

Signed-off-by: Stefan Beller <sbeller@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
7 years agoMerge branch 'ab/grep-preparatory-cleanup' into sb/submodule-blanket-recursive
Junio C Hamano [Tue, 30 May 2017 05:27:37 +0000 (14:27 +0900)] 
Merge branch 'ab/grep-preparatory-cleanup' into sb/submodule-blanket-recursive

* ab/grep-preparatory-cleanup: (31 commits)
  grep: assert that threading is enabled when calling grep_{lock,unlock}
  grep: given --threads with NO_PTHREADS=YesPlease, warn
  pack-objects: fix buggy warning about threads
  pack-objects & index-pack: add test for --threads warning
  test-lib: add a PTHREADS prerequisite
  grep: move is_fixed() earlier to avoid forward declaration
  grep: change internal *pcre* variable & function names to be *pcre1*
  grep: change the internal PCRE macro names to be PCRE1
  grep: factor test for \0 in grep patterns into a function
  grep: remove redundant regflags assignments
  grep: catch a missing enum in switch statement
  perf: add a comparison test of log --grep regex engines with -F
  perf: add a comparison test of log --grep regex engines
  perf: add a comparison test of grep regex engines with -F
  perf: add a comparison test of grep regex engines
  perf: emit progress output when unpacking & building
  perf: add a GIT_PERF_MAKE_COMMAND for when *_MAKE_OPTS won't do
  grep: add tests to fix blind spots with \0 patterns
  grep: prepare for testing binary regexes containing rx metacharacters
  grep: add a test helper function for less verbose -f \0 tests
  ...

7 years agoMerge branch 'jc/repack-threads'
Junio C Hamano [Mon, 29 May 2017 03:34:41 +0000 (12:34 +0900)] 
Merge branch 'jc/repack-threads'

"git repack" learned to accept the --threads=<n> option and pass it
to pack-objects.

* jc/repack-threads:
  repack: accept --threads=<n> and pass it down to pack-objects

7 years agoMerge branch 'sb/reset-recurse-submodules'
Junio C Hamano [Mon, 29 May 2017 03:34:40 +0000 (12:34 +0900)] 
Merge branch 'sb/reset-recurse-submodules'

"git reset" learned "--recurse-submodules" option.

* sb/reset-recurse-submodules:
  builtin/reset: add --recurse-submodules switch
  submodule.c: submodule_move_head works with broken submodules
  submodule.c: uninitialized submodules are ignored in recursive commands
  entry.c: submodule recursing: respect force flag correctly

7 years agogrep: assert that threading is enabled when calling grep_{lock,unlock}
Ævar Arnfjörð Bjarmason [Thu, 25 May 2017 19:45:35 +0000 (19:45 +0000)] 
grep: assert that threading is enabled when calling grep_{lock,unlock}

Change the grep_{lock,unlock} functions to assert that num_threads is
true, instead of only locking & unlocking the pthread mutex lock when
it is.

These functions are never called when num_threads isn't true, this
logic has gone through multiple iterations since the initial
introduction of grep threading in commit 5b594f457a ("Threaded grep",
2010-01-25), but ever since then they'd only be called if num_threads
was true, so this check made the code confusing to read.

Replace the check with an assertion, so that it's clear to the reader
that this code path is never taken unless we're spawning threads.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
7 years agogrep: given --threads with NO_PTHREADS=YesPlease, warn
Ævar Arnfjörð Bjarmason [Thu, 25 May 2017 19:45:34 +0000 (19:45 +0000)] 
grep: given --threads with NO_PTHREADS=YesPlease, warn

Add a warning about missing thread support when grep.threads or
--threads is set to a non 0 (default) or 1 (no parallelism) value
under NO_PTHREADS=YesPlease.

This is for consistency with the index-pack & pack-objects commands,
which also take a --threads option & are configurable via
pack.threads, and have long warned about the same under
NO_PTHREADS=YesPlease.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
7 years agopack-objects: fix buggy warning about threads
Ævar Arnfjörð Bjarmason [Thu, 25 May 2017 19:45:33 +0000 (19:45 +0000)] 
pack-objects: fix buggy warning about threads

Fix a buggy warning about threads under NO_PTHREADS=YesPlease. Due to
re-using the delta_search_threads variable for both the state of the
"pack.threads" config & the --threads option, setting "pack.threads"
but not supplying --threads would trigger the warning for both
"pack.threads" & --threads.

Solve this bug by resetting the delta_search_threads variable in
git_pack_config(), it might then be set by --threads again and be
subsequently warned about, as the test I'm changing here asserts.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
7 years agopack-objects & index-pack: add test for --threads warning
Ævar Arnfjörð Bjarmason [Thu, 25 May 2017 19:45:32 +0000 (19:45 +0000)] 
pack-objects & index-pack: add test for --threads warning

Add a test for the warning that's emitted when --threads or
pack.threads is provided under NO_PTHREADS=YesPlease. This uses the
new PTHREADS prerequisite.

The assertion for C_LOCALE_OUTPUT in the latter test is currently
redundant, since unlike index-pack the pack-objects warnings aren't
i18n'd. However they might be changed to be i18n'd in the future, and
there's no harm in future-proofing the test.

There's an existing bug in the implementation of pack-objects which
this test currently tests for as-is. Details about the bug & the fix
are included in a follow-up change.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
7 years agotest-lib: add a PTHREADS prerequisite
Ævar Arnfjörð Bjarmason [Thu, 25 May 2017 19:45:31 +0000 (19:45 +0000)] 
test-lib: add a PTHREADS prerequisite

Add a PTHREADS prerequisite which is false when git is compiled with
NO_PTHREADS=YesPlease.

There's lots of custom code that runs when threading isn't available,
but before this prerequisite there was no way to test it.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
7 years agogrep: move is_fixed() earlier to avoid forward declaration
Ævar Arnfjörð Bjarmason [Thu, 25 May 2017 19:45:30 +0000 (19:45 +0000)] 
grep: move is_fixed() earlier to avoid forward declaration

Move the is_fixed() function which are currently only used in
compile_regexp() earlier so it can be used in the PCRE family of
functions in a later change.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
7 years agogrep: change internal *pcre* variable & function names to be *pcre1*
Ævar Arnfjörð Bjarmason [Thu, 25 May 2017 19:45:29 +0000 (19:45 +0000)] 
grep: change internal *pcre* variable & function names to be *pcre1*

Change the internal PCRE variable & function names to have a "1"
suffix. This is for preparation for libpcre2 support, where having
non-versioned names would be confusing.

An earlier change in this series ("grep: change the internal PCRE
macro names to be PCRE1", 2017-04-07) elaborates on the motivations
behind this change.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
7 years agogrep: change the internal PCRE macro names to be PCRE1
Ævar Arnfjörð Bjarmason [Thu, 25 May 2017 19:45:28 +0000 (19:45 +0000)] 
grep: change the internal PCRE macro names to be PCRE1

Change the internal USE_LIBPCRE define, & build options flag to use a
naming convention ending in PCRE1, without changing the long-standing
USE_LIBPCRE Makefile flag which enables this code.

This is for preparation for libpcre2 support where having things like
USE_LIBPCRE and USE_LIBPCRE2 in any more places than we absolutely
need to for backwards compatibility with old Makefile arguments would
be confusing.

In some ways it would be better to change everything that now uses
USE_LIBPCRE to use USE_LIBPCRE1, and to make specifying
USE_LIBPCRE (or --with-pcre) an error. This would impose a one-time
burden on packagers of git to s/USE_LIBPCRE/USE_LIBPCRE1/ in their
build scripts.

However I'd like to leave the door open to making
USE_LIBPCRE=YesPlease eventually mean USE_LIBPCRE2=YesPlease,
i.e. once PCRE v2 is ubiquitous enough that it makes sense to make it
the default.

This code and the USE_LIBPCRE Makefile argument was added in commit
63e7e9d8b6 ("git-grep: Learn PCRE", 2011-05-09). At the time there was
no indication that the PCRE project would release an entirely new &
incompatible API around 3 years later.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
7 years agogrep: factor test for \0 in grep patterns into a function
Ævar Arnfjörð Bjarmason [Thu, 25 May 2017 19:45:27 +0000 (19:45 +0000)] 
grep: factor test for \0 in grep patterns into a function

Factor the test for \0 in grep patterns into a function. Since commit
9eceddeec6 ("Use kwset in grep", 2011-08-21) any pattern containing a
\0 is considered fixed as regcomp() can't handle it.

This change makes later changes that make use of either has_null() or
is_fixed() (but not both) smaller.

While I'm at it make the comment conform to the style guide, i.e. add
an opening "/*\n".

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
7 years agogrep: remove redundant regflags assignments
Ævar Arnfjörð Bjarmason [Thu, 25 May 2017 19:45:26 +0000 (19:45 +0000)] 
grep: remove redundant regflags assignments

Remove redundant assignments to the "regflags" variable. This variable
is only used set under GREP_PATTERN_TYPE_ERE, so there's no need to
un-set it under GREP_PATTERN_TYPE_{FIXED,BRE,PCRE}.

Back in 5010cb5fcc[1], we did do "opt.regflags &= ~REG_EXTENDED" upon
seeing "-G" on the command line and flipped the bit on upon seeing
"-E", but I think that was perfectly sensible and it would have been a
bug if we didn't.  They were part of the command line parsing that
could have seen "-E" on the command line earlier.

When cca2c172 ("git-grep: do not die upon -F/-P when
grep.extendedRegexp is set.", 2011-05-09) switched the command line
parsing to "read into a 'tentatively this is what we saw the last'
variable and then finally commit just once", we didn't touch
opt.regflags for PCRE and FIXED, but we still had to flip regflags
between BRE and ERE, because parsing of grep.extendedregexp
configuration variable directly touched opt.regflags back then, which
was done by b22520a3 ("grep: allow -E and -n to be turned on by
default via configuration", 2011-03-30).

When 84befcd0 ("grep: add a grep.patternType configuration setting",
2012-08-03) introduced extended_regexp_option field, we stopped
flipping regflags while reading the configuration, and that was when
we should have noticed and stopped dropping REG_EXTENDED bit in the
"now we can commit what type to use" helper function.

There is no reason to do this anymore, so stop doing it, more to
reduce "wait this is used under fixed/BRE/PCRE how?" confusion when
reading the code, than to to save ourselves trivial CPU cycles by
removing one assignment.

1. "built-in "git grep"", 2006-04-30.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
7 years agogrep: catch a missing enum in switch statement
Ævar Arnfjörð Bjarmason [Thu, 25 May 2017 19:45:25 +0000 (19:45 +0000)] 
grep: catch a missing enum in switch statement

Add a die(...) to a default case for the switch statement selecting
between grep pattern types under --recurse-submodules.

Normally this would be caught by -Wswitch, but the grep_pattern_type
type is converted to int by going through parse_options(). Changing
the argument type passed to compile_submodule_options() won't work,
the value will just get coerced. The -Wswitch-default warning will
warn about it, but that produces a lot of noise across the codebase,
this potential issue would be drowned in that noise.

Thus catching this at runtime is the least bad option. This won't ever
trigger in practice, but if a new pattern type were to be added this
catches an otherwise silent bug during development.

See commit 0281e487fd ("grep: optionally recurse into submodules",
2016-12-16) for the initial addition of this code.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
7 years agoperf: add a comparison test of log --grep regex engines with -F
Ævar Arnfjörð Bjarmason [Thu, 25 May 2017 19:45:24 +0000 (19:45 +0000)] 
perf: add a comparison test of log --grep regex engines with -F

Add a performance comparison test of log --grepgrep regex engines
given fixed strings.

See the preceding fixed-string t/perf change ("perf: add a comparison
test of grep regex engines with -F", 2017-04-21) for notes about this,
in particular this mostly tests exactly the same codepath now, but
might not in the future:

    $ GIT_PERF_REPEAT_COUNT=10 GIT_PERF_LARGE_REPO=~/g/linux ./run p4221-log-grep-engines-fixed.sh
    [...]
    Test                                     this tree
    --------------------------------------------------------
    4221.1: fixed log --grep='int'           5.99(5.55+0.40)
    4221.2: basic log --grep='int'           5.92(5.56+0.31)
    4221.3: extended log --grep='int'        6.01(5.51+0.45)
    4221.4: perl log --grep='int'            5.99(5.56+0.38)
    4221.6: fixed log --grep='uncommon'      5.06(4.76+0.27)
    4221.7: basic log --grep='uncommon'      5.02(4.78+0.21)
    4221.8: extended log --grep='uncommon'   4.99(4.78+0.20)
    4221.9: perl log --grep='uncommon'       5.00(4.72+0.26)
    4221.11: fixed log --grep='æ'            5.35(5.12+0.20)
    4221.12: basic log --grep='æ'            5.34(5.11+0.20)
    4221.13: extended log --grep='æ'         5.39(5.10+0.22)
    4221.14: perl log --grep='æ'             5.44(5.16+0.23)

Only the non-ASCII -i case is different:

    $ GIT_PERF_REPEAT_COUNT=10 GIT_PERF_LARGE_REPO=~/g/linux GIT_PERF_4221_LOG_OPTS=' -i' ./run p4221-log-grep-engines-fixed.sh
    [...]
    Test                                        this tree
    -----------------------------------------------------------
    4221.1: fixed log -i --grep='int'           6.17(5.77+0.35)
    4221.2: basic log -i --grep='int'           6.16(5.59+0.39)
    4221.3: extended log -i --grep='int'        6.15(5.70+0.39)
    4221.4: perl log -i --grep='int'            6.15(5.69+0.38)
    4221.6: fixed log -i --grep='uncommon'      5.10(4.88+0.21)
    4221.7: basic log -i --grep='uncommon'      5.04(4.76+0.25)
    4221.8: extended log -i --grep='uncommon'   5.07(4.82+0.23)
    4221.9: perl log -i --grep='uncommon'       5.03(4.78+0.22)
    4221.11: fixed log -i --grep='æ'            5.93(5.65+0.25)
    4221.12: basic log -i --grep='æ'            5.88(5.62+0.25)
    4221.13: extended log -i --grep='æ'         6.02(5.69+0.29)
    4221.14: perl log -i --grep='æ'             5.36(5.06+0.29)

See commit ("perf: add a comparison test of grep regex engines",
2017-04-19) for details on the machine the above test run was executed
on.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
7 years agoperf: add a comparison test of log --grep regex engines
Ævar Arnfjörð Bjarmason [Thu, 25 May 2017 19:45:23 +0000 (19:45 +0000)] 
perf: add a comparison test of log --grep regex engines

Add a very basic performance comparison test comparing the POSIX
basic, extended and perl engines with patterns matching log messages
via --grep=<pattern>.

    $ GIT_PERF_REPEAT_COUNT=10 GIT_PERF_LARGE_REPO=~/g/linux ./run p4220-log-grep-engines.sh
    [...]
    Test                                                  this tree
    ---------------------------------------------------------------------
    4220.1: basic log --grep='how.to'                     6.22(6.00+0.21)
    4220.2: extended log --grep='how.to'                  6.23(5.98+0.23)
    4220.3: perl log --grep='how.to'                      6.07(5.79+0.25)
    4220.5: basic log --grep='^how to'                    6.19(5.93+0.22)
    4220.6: extended log --grep='^how to'                 6.19(5.93+0.23)
    4220.7: perl log --grep='^how to'                     6.14(5.88+0.24)
    4220.9: basic log --grep='[how] to'                   6.96(6.65+0.28)
    4220.10: extended log --grep='[how] to'               6.96(6.69+0.24)
    4220.11: perl log --grep='[how] to'                   6.95(6.58+0.33)
    4220.13: basic log --grep='\(e.t[^ ]*\|v.ry\) rare'   7.10(6.80+0.27)
    4220.14: extended log --grep='(e.t[^ ]*|v.ry) rare'   7.07(6.80+0.26)
    4220.15: perl log --grep='(e.t[^ ]*|v.ry) rare'       7.70(7.46+0.22)
    4220.17: basic log --grep='m\(ú\|u\)lt.b\(æ\|y\)te'   6.12(5.87+0.24)
    4220.18: extended log --grep='m(ú|u)lt.b(æ|y)te'      6.14(5.84+0.26)
    4220.19: perl log --grep='m(ú|u)lt.b(æ|y)te'          6.16(5.93+0.20)

With -i:

    $ GIT_PERF_REPEAT_COUNT=10 GIT_PERF_LARGE_REPO=~/g/linux GIT_PERF_4220_LOG_OPTS=' -i' ./run p4220-log-grep-engines.sh
    [...]
    Test                                                     this tree
    ------------------------------------------------------------------------
    4220.1: basic log -i --grep='how.to'                     6.74(6.41+0.32)
    4220.2: extended log -i --grep='how.to'                  6.78(6.55+0.22)
    4220.3: perl log -i --grep='how.to'                      6.06(5.77+0.28)
    4220.5: basic log -i --grep='^how to'                    6.80(6.57+0.22)
    4220.6: extended log -i --grep='^how to'                 6.83(6.52+0.29)
    4220.7: perl log -i --grep='^how to'                     6.16(5.94+0.20)
    4220.9: basic log -i --grep='[how] to'                   7.87(7.61+0.24)
    4220.10: extended log -i --grep='[how] to'               7.85(7.57+0.27)
    4220.11: perl log -i --grep='[how] to'                   7.03(6.75+0.25)
    4220.13: basic log -i --grep='\(e.t[^ ]*\|v.ry\) rare'   8.68(8.41+0.25)
    4220.14: extended log -i --grep='(e.t[^ ]*|v.ry) rare'   8.80(8.44+0.28)
    4220.15: perl log -i --grep='(e.t[^ ]*|v.ry) rare'       7.85(7.56+0.26)
    4220.17: basic log -i --grep='m\(ú\|u\)lt.b\(æ\|y\)te'   6.94(6.68+0.24)
    4220.18: extended log -i --grep='m(ú|u)lt.b(æ|y)te'      7.04(6.76+0.24)
    4220.19: perl log -i --grep='m(ú|u)lt.b(æ|y)te'          6.26(5.92+0.29)

See commit ("perf: add a comparison test of grep regex engines",
2017-04-19) for details on the machine the above test run was executed
on.

Before commit ("log: make --regexp-ignore-case work with
--perl-regexp", 2017-05-20) this test will almost definitely
fail (depending on the repo) if passed the -i option, since it wasn't
properly supported under PCRE.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
7 years agoperf: add a comparison test of grep regex engines with -F
Ævar Arnfjörð Bjarmason [Thu, 25 May 2017 19:45:22 +0000 (19:45 +0000)] 
perf: add a comparison test of grep regex engines with -F

Add a performance comparison test of grep regex engines given fixed
strings.

The current logic in compile_regexp() ignores the engine parameter and
uses kwset() to search for these, so this test shows no difference
between engines right now:

    $ GIT_PERF_REPEAT_COUNT=10 GIT_PERF_LARGE_REPO=~/g/linux ./run p7821-grep-engines-fixed.sh
    [...]
    Test                             this tree
    ------------------------------------------------
    7821.1: fixed grep int           0.56(1.67+0.68)
    7821.2: basic grep int           0.57(1.70+0.57)
    7821.3: extended grep int        0.59(1.76+0.51)
    7821.4: perl grep int            1.08(1.71+0.55)
    7821.6: fixed grep uncommon      0.23(0.55+0.50)
    7821.7: basic grep uncommon      0.24(0.55+0.50)
    7821.8: extended grep uncommon   0.26(0.55+0.52)
    7821.9: perl grep uncommon       0.24(0.58+0.47)
    7821.11: fixed grep æ            0.36(1.30+0.42)
    7821.12: basic grep æ            0.36(1.32+0.40)
    7821.13: extended grep æ         0.38(1.30+0.42)
    7821.14: perl grep æ             0.35(1.24+0.48)

Only when run with -i via GIT_PERF_7821_GREP_OPTS=' -i' do we avoid
avoid going through the same kwset.[ch] codepath, see the "Even when
-F..."  comment in grep.c. This only kicks for the non-ASCII case:

    $ GIT_PERF_REPEAT_COUNT=10 GIT_PERF_LARGE_REPO=~/g/linux GIT_PERF_7821_GREP_OPTS=' -i' ./run p7821-grep-engines-fixed.sh
    [...]
    Test                                this tree
    ---------------------------------------------------
    7821.1: fixed grep -i int           0.62(2.10+0.57)
    7821.2: basic grep -i int           0.68(1.90+0.61)
    7821.3: extended grep -i int        0.78(1.94+0.57)
    7821.4: perl grep -i int            0.98(1.78+0.74)
    7821.6: fixed grep -i uncommon      0.24(0.44+0.64)
    7821.7: basic grep -i uncommon      0.25(0.56+0.54)
    7821.8: extended grep -i uncommon   0.27(0.62+0.45)
    7821.9: perl grep -i uncommon       0.24(0.59+0.49)
    7821.11: fixed grep -i æ            0.30(0.96+0.39)
    7821.12: basic grep -i æ            0.27(0.92+0.44)
    7821.13: extended grep -i æ         0.28(0.90+0.46)
    7821.14: perl grep -i æ             0.28(0.74+0.49)

I'm planning to change how fixed-string searching happens. This test
gives a baseline for comparing performance before & after any such
change.

See commit ("perf: add a comparison test of grep regex engines",
2017-04-19) for details on the machine the above test run was executed
on.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
7 years agoperf: add a comparison test of grep regex engines
Ævar Arnfjörð Bjarmason [Thu, 25 May 2017 19:45:21 +0000 (19:45 +0000)] 
perf: add a comparison test of grep regex engines

Add a very basic performance comparison test comparing the POSIX
basic, extended and perl engines.

In theory the "basic" and "extended" engines should be implemented
using the same underlying code with a slightly different pattern
parser, but some implementations may not do this. Jump through some
slight hoops to test both, which is worthwhile since "basic" is the
default.

Running this on an i7 3.4GHz Linux 4.9.0-2 Debian testing against a
checkout of linux.git & latest upstream PCRE, both PCRE and git
compiled with -O3 using gcc 7.1.1:

    $ GIT_PERF_REPEAT_COUNT=10 GIT_PERF_LARGE_REPO=~/g/linux ./run p7820-grep-engines.sh
    [...]
    Test                                            this tree
    ---------------------------------------------------------------
    7820.1: basic grep 'how.to'                     0.34(1.24+0.53)
    7820.2: extended grep 'how.to'                  0.33(1.23+0.45)
    7820.3: perl grep 'how.to'                      0.31(1.05+0.56)
    7820.5: basic grep '^how to'                    0.32(1.24+0.42)
    7820.6: extended grep '^how to'                 0.33(1.20+0.44)
    7820.7: perl grep '^how to'                     0.57(2.67+0.42)
    7820.9: basic grep '[how] to'                   0.51(2.16+0.45)
    7820.10: extended grep '[how] to'               0.49(2.20+0.43)
    7820.11: perl grep '[how] to'                   0.56(2.60+0.43)
    7820.13: basic grep '\(e.t[^ ]*\|v.ry\) rare'   0.66(3.25+0.40)
    7820.14: extended grep '(e.t[^ ]*|v.ry) rare'   0.65(3.19+0.46)
    7820.15: perl grep '(e.t[^ ]*|v.ry) rare'       1.05(5.74+0.34)
    7820.17: basic grep 'm\(ú\|u\)lt.b\(æ\|y\)te'   0.34(1.28+0.47)
    7820.18: extended grep 'm(ú|u)lt.b(æ|y)te'      0.34(1.38+0.38)
    7820.19: perl grep 'm(ú|u)lt.b(æ|y)te'          0.39(1.56+0.44)

Options can also be passed to git-grep via the GIT_PERF_7820_GREP_OPTS
environment variable. There are various modes such as "-v" that have
very different performance profiles, but handling the combinatorial
explosion of testing all those options would make this script much
more complex and harder to maintain. Instead just add the ability to
do one-shot runs with arbitrary options, e.g.:

    $ GIT_PERF_REPEAT_COUNT=10 GIT_PERF_LARGE_REPO=~/g/linux GIT_PERF_7820_GREP_OPTS=" -i" ./run p7820-grep-engines.sh
    [...]
    Test                                               this tree
    ------------------------------------------------------------------
    7820.1: basic grep -i 'how.to'                     0.49(1.72+0.38)
    7820.2: extended grep -i 'how.to'                  0.46(1.64+0.42)
    7820.3: perl grep -i 'how.to'                      0.44(1.45+0.45)
    7820.5: basic grep -i '^how to'                    0.47(1.76+0.38)
    7820.6: extended grep -i '^how to'                 0.47(1.70+0.42)
    7820.7: perl grep -i '^how to'                     0.65(2.72+0.37)
    7820.9: basic grep -i '[how] to'                   0.86(3.64+0.42)
    7820.10: extended grep -i '[how] to'               0.84(3.62+0.46)
    7820.11: perl grep -i '[how] to'                   0.73(3.06+0.39)
    7820.13: basic grep -i '\(e.t[^ ]*\|v.ry\) rare'   1.63(8.13+0.36)
    7820.14: extended grep -i '(e.t[^ ]*|v.ry) rare'   1.64(8.01+0.44)
    7820.15: perl grep -i '(e.t[^ ]*|v.ry) rare'       1.44(6.88+0.44)
    7820.17: basic grep -i 'm\(ú\|u\)lt.b\(æ\|y\)te'   0.66(2.67+0.44)
    7820.18: extended grep -i 'm(ú|u)lt.b(æ|y)te'      0.66(2.67+0.43)
    7820.19: perl grep -i 'm(ú|u)lt.b(æ|y)te'          0.59(2.31+0.37)

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
7 years agoSecond batch for 2.14
Junio C Hamano [Tue, 23 May 2017 04:51:32 +0000 (13:51 +0900)] 
Second batch for 2.14

Signed-off-by: Junio C Hamano <gitster@pobox.com>
7 years agoMerge branch 'ab/fix-poison-tests'
Junio C Hamano [Tue, 23 May 2017 04:46:08 +0000 (13:46 +0900)] 
Merge branch 'ab/fix-poison-tests'

Update tests to pass under GETTEXT_POISON (a mechanism to ensure
that output strings that should not be translated are not
translated by mistake), and tell TravisCI to run them.

* ab/fix-poison-tests:
  travis-ci: add job to run tests with GETTEXT_POISON
  travis-ci: setup "prove cache" in "script" step
  tests: fix tests broken under GETTEXT_POISON=YesPlease

7 years agoMerge branch 'tb/dedup-crlf-tests'
Junio C Hamano [Tue, 23 May 2017 04:46:07 +0000 (13:46 +0900)] 
Merge branch 'tb/dedup-crlf-tests'

* tb/dedup-crlf-tests:
  t0027: tests are not expensive; remove t0025

7 years agoMerge branch 'jt/push-options-doc'
Junio C Hamano [Tue, 23 May 2017 04:46:07 +0000 (13:46 +0900)] 
Merge branch 'jt/push-options-doc'

The receive-pack program now makes sure that the push certificate
records the same set of push options used for pushing.

* jt/push-options-doc:
  receive-pack: verify push options in cert
  docs: correct receive.advertisePushOptions default

7 years agoMerge branch 'ab/doc-replace-gmane-links'
Junio C Hamano [Tue, 23 May 2017 04:46:05 +0000 (13:46 +0900)] 
Merge branch 'ab/doc-replace-gmane-links'

The Web interface to gmane news archive is long gone, even though
the articles are still accessible via NTTP.  Replace the links with
ones to public-inbox.org.  Because their message identification is
based on the actual message-id, it is likely that it will be easier
to migrate away from it if/when necessary.

* ab/doc-replace-gmane-links:
  doc: replace more gmane links
  doc: replace a couple of broken gmane links

7 years agoMerge branch 'rs/checkout-am-fix-unborn'
Junio C Hamano [Tue, 23 May 2017 04:46:05 +0000 (13:46 +0900)] 
Merge branch 'rs/checkout-am-fix-unborn'

A few codepaths in "checkout" and "am" working on an unborn branch
tried to access an uninitialized piece of memory.

* rs/checkout-am-fix-unborn:
  am: check return value of resolve_refdup before using hash
  checkout: check return value of resolve_refdup before using hash

7 years agoMerge branch 'ls/travis-relays-for-windows-ci'
Junio C Hamano [Tue, 23 May 2017 04:46:03 +0000 (13:46 +0900)] 
Merge branch 'ls/travis-relays-for-windows-ci'

* ls/travis-relays-for-windows-ci:
  travis-ci: retry if Git for Windows CI returns HTTP error 502 or 503
  travis-ci: handle Git for Windows CI status "failed" explicitly

7 years agoMerge branch 'ah/log-decorate-default-to-auto'
Junio C Hamano [Tue, 23 May 2017 04:46:02 +0000 (13:46 +0900)] 
Merge branch 'ah/log-decorate-default-to-auto'

Setting "log.decorate=false" in the configuration file did not take
effect in v2.13, which has been corrected.

* ah/log-decorate-default-to-auto:
  builtin/log: honor log.decorate

7 years agoMerge branch 'bw/submodule-with-bs-path'
Junio C Hamano [Tue, 23 May 2017 04:46:01 +0000 (13:46 +0900)] 
Merge branch 'bw/submodule-with-bs-path'

A hotfix to a topic that is already in v2.13.

* bw/submodule-with-bs-path:
  t7400: add !CYGWIN prerequisite to 'add with \\ in path'

7 years agoperf: emit progress output when unpacking & building
Ævar Arnfjörð Bjarmason [Sat, 20 May 2017 21:42:19 +0000 (21:42 +0000)] 
perf: emit progress output when unpacking & building

Amend the t/perf/run output so that in addition to the "Running N
tests" heading currently being emitted, it also emits "Unpacking $rev"
and "Building $rev" when setting up the build/$rev directory & when
building it, respectively.

This makes it easier to see what's going on and what revision is being
tested as the output scrolls by.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
7 years agoperf: add a GIT_PERF_MAKE_COMMAND for when *_MAKE_OPTS won't do
Ævar Arnfjörð Bjarmason [Sat, 20 May 2017 21:42:18 +0000 (21:42 +0000)] 
perf: add a GIT_PERF_MAKE_COMMAND for when *_MAKE_OPTS won't do

Add a git GIT_PERF_MAKE_COMMAND variable to compliment the existing
GIT_PERF_MAKE_OPTS facility. This allows specifying an arbitrary shell
command to execute instead of 'make'.

This is useful e.g. in cases where the name, semantics or defaults of
a Makefile flag have changed over time. It can even be used to change
the contents of the tree, useful for monkeypatching ancient versions
of git to get them to build.

This opens Pandora's box in some ways, it's now possible to
"jailbreak" the perf environment and e.g. modify the source tree via
this arbitrary instead of just issuing a custom "make" command, such a
command has to be re-entrant in the sense that subsequent perf runs
will re-use the possibly modified tree.

It would be pointless to try to mitigate or work around that caveat in
a tool purely aimed at Git developers, so this change makes no attempt
to do so.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
7 years agogrep: add tests to fix blind spots with \0 patterns
Ævar Arnfjörð Bjarmason [Sat, 20 May 2017 21:42:17 +0000 (21:42 +0000)] 
grep: add tests to fix blind spots with \0 patterns

Address a big blind spot in the tests for patterns containing \0. The
is_fixed() function considers any string that contains \0 fixed, even
if it contains regular expression metacharacters, those patterns are
currently matched with kwset.

Before this change removing that memchr(s, 0, len) check from
is_fixed() wouldn't change the result of any of the tests, since
regcomp() will happily match the part before the \0.

The kwset path is dependent on whether the the -i flag is on, and
whether the pattern has any non-ASCII characters, but none of this was
tested for.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
7 years agogrep: prepare for testing binary regexes containing rx metacharacters
Ævar Arnfjörð Bjarmason [Sat, 20 May 2017 21:42:16 +0000 (21:42 +0000)] 
grep: prepare for testing binary regexes containing rx metacharacters

Add setup code needed for testing regexes that contain both binary
data and regex metacharacters.

The POSIX regcomp() function inherently can't support that, because it
takes a \0-delimited char *, but other regex engines APIs like PCRE v2
take a pattern/length pair, and are thus able to handle \0s in
patterns as well as any other character.

When kwset was imported in commit 9eceddeec6 ("Use kwset in grep",
2011-08-21) this limitation was fixed, but at the expense of
introducing the undocumented limitation that any pattern containing \0
implicitly becomes a fixed match (equivalent to -F having been
provided).

That's not something we'd like to keep in the future. The inability to
match patterns containing \0 is a leaky implementation detail.

So add tests as a first step towards changing that. In order to test
that \0-patterns can properly match as regexes the test string needs
to have some regex metacharacters in it.

There were other blind spots in the tests. The code around kwset
specially handles case-insensitive & non-ASCII data, but there were no
tests for this.

Fix all of that by amending the text being matched to contain both
regex metacharacters & non-ASCII data.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
7 years agogrep: add a test helper function for less verbose -f \0 tests
Ævar Arnfjörð Bjarmason [Sat, 20 May 2017 21:42:15 +0000 (21:42 +0000)] 
grep: add a test helper function for less verbose -f \0 tests

Add a helper function to make the tests which check for patterns with
\0 in them more succinct. Right now this isn't a big win, but
subsequent commits will add a lot more of these tests.

The helper is based on the match() function in t3070-wildmatch.sh.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
7 years agogrep: add tests for grep pattern types being passed to submodules
Ævar Arnfjörð Bjarmason [Sat, 20 May 2017 21:42:14 +0000 (21:42 +0000)] 
grep: add tests for grep pattern types being passed to submodules

Add testing for grep pattern types being correctly passed to
submodules. The pattern "(.|.)[\d]" matches differently under
fixed (not at all), and then matches different lines under
basic/extended & perl regular expressions, so this change asserts that
the pattern type is passed along correctly.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
7 years agogrep: amend submodule recursion test for regex engine testing
Ævar Arnfjörð Bjarmason [Sat, 20 May 2017 21:42:13 +0000 (21:42 +0000)] 
grep: amend submodule recursion test for regex engine testing

Amend the submodule recursion test to prepare it for subsequent tests
of whether it passes along the grep.patternType to the submodule
greps.

This is the result of searching & replacing:

    foobar -> (1|2)d(3|4)
    foo    -> (1|2)
    bar    -> (3|4)

Currently there's no tests for whether e.g. -P or -E is correctly
passed along, tests for that will be added in a follow-up change, but
first add content to the tests which will match differently under
different regex engines.

Reuse the pattern established in an earlier commit of mine in this
series ("log: add exhaustive tests for pattern style options &
config", 2017-04-07). The pattern "(.|.)[\d]" will match this content
differently under fixed/basic/extended & perl.

This test code was originally added in commit 0281e487fd ("grep:
optionally recurse into submodules", 2016-12-16).

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
7 years agogrep: add tests for --threads=N and grep.threads
Ævar Arnfjörð Bjarmason [Sat, 20 May 2017 21:42:12 +0000 (21:42 +0000)] 
grep: add tests for --threads=N and grep.threads

Add tests for --threads=N being supplied on the command-line, or when
grep.threads=N being supplied in the configuration.

When the threading support was made run-time configurable in commit
89f09dd34e ("grep: add --threads=<num> option and grep.threads
configuration", 2015-12-15) no tests were added for it.

In developing a change to the grep code I was able to make
'--threads=1 <pat>` segfault, while the test suite still passed. This
change fixes that blind spot in the tests.

In addition to asserting that asking for N threads shouldn't segfault,
test that the grep output given any N is the same.

The choice to test only 1..10 as opposed to 1..8 or 1..16 or whatever
is arbitrary. Testing 1..1024 works locally for me (but gets
noticeably slower as more threads are spawned). Given the structure of
the code there's no reason to test an arbitrary number of threads,
only 0, 1 and >=2 are special modes of operation.

A later patch introduces a PTHREADS test prerequisite which is true
under NO_PTHREADS=UnfortunatelyYes, but even under NO_PTHREADS it's
fine to test --threads=N, we'll just ignore it and not use
threading. So these tests also make sense under that mode to assert
that --threads=N without pthreads still returns expected results.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
7 years agogrep: change non-ASCII -i test to stop using --debug
Ævar Arnfjörð Bjarmason [Sat, 20 May 2017 21:42:11 +0000 (21:42 +0000)] 
grep: change non-ASCII -i test to stop using --debug

Change a non-ASCII case-insensitive test case to stop using --debug,
and instead simply test for the expected results.

The test coverage remains the same with this change, but the test
won't break due to internal refactoring.

This test was added in commit 793dc676e0 ("grep/icase: avoid kwsset
when -F is specified", 2016-06-25). It was asserting that the regex
must be compiled with compile_fixed_regexp(), instead test for the
expected results, allowing the underlying implementation to change.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
7 years agogrep: add a test for backreferences in PCRE patterns
Ævar Arnfjörð Bjarmason [Sat, 20 May 2017 21:42:10 +0000 (21:42 +0000)] 
grep: add a test for backreferences in PCRE patterns

Add a test for backreferences such as (.)\1 in PCRE patterns. This
test ensures that the PCRE_NO_AUTO_CAPTURE option isn't turned
on. Before this change turning it on would break these sort of
patterns, but wouldn't break any tests.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
7 years agogrep: add a test asserting that --perl-regexp dies when !PCRE
Ævar Arnfjörð Bjarmason [Sat, 20 May 2017 21:42:09 +0000 (21:42 +0000)] 
grep: add a test asserting that --perl-regexp dies when !PCRE

Add a test asserting that when --perl-regexp (and -P for grep) is
given to git-grep & git-log that we die with an error.

In developing the PCRE v2 series I introduced a regression where -P
would (through control-flow fall-through) become synonymous with basic
POSIX matching. I.e. 'git grep -P '[\d]' would match "d" instead of
digits.

The entire test suite would still pass with this serious regression,
since everything that tested for --perl-regexp would be guarded by the
PCRE prerequisite, fix that blind-spot by adding tests under !PCRE
asserting that git must die when given --perl-regexp or -P.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
7 years agolog: make --regexp-ignore-case work with --perl-regexp
Ævar Arnfjörð Bjarmason [Sat, 20 May 2017 21:42:08 +0000 (21:42 +0000)] 
log: make --regexp-ignore-case work with --perl-regexp

Make the --regexp-ignore-case option work with --perl-regexp. This
never worked, and there was no test for this. Fix the bug and add a
test.

When PCRE support was added in commit 63e7e9d8b6 ("git-grep: Learn
PCRE", 2011-05-09) compile_pcre_regexp() would only check
opt->ignore_case, but when the --perl-regexp option was added in
commit 727b6fc3ed ("log --grep: accept --basic-regexp and
--perl-regexp", 2012-10-03) the code didn't set the opt->ignore_case.

Change the test suite to test for -i and --invert-regexp with
basic/extended/perl patterns in addition to fixed, which was the only
patternType that was tested for before in combination with those
options.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
7 years agolog: add exhaustive tests for pattern style options & config
Ævar Arnfjörð Bjarmason [Sat, 20 May 2017 21:42:07 +0000 (21:42 +0000)] 
log: add exhaustive tests for pattern style options & config

Add exhaustive tests for how the different grep.patternType options &
the corresponding command-line options affect git-log.

Before this change it was possible to patch revision.c so that the
--basic-regexp option was synonymous with --extended-regexp, and
--perl-regexp wasn't recognized at all, and still have 100% of the
test suite pass.

This was because the first test being modified here, added in commit
34a4ae55b2 ("log --grep: use the same helper to set -E/-F options as
"git grep"", 2012-10-03), didn't actually check whether we'd enabled
extended regular expressions as distinct from re-toggling non-fixed
string support.

Fix that by changing the pattern to a pattern that'll only match if
--extended-regexp option is provided, but won't match under the
default --basic-regexp option.

Other potential regressions were possible since there were no tests
for the rest of the combinations of grep.patternType configuration
toggles & corresponding git-log command-line options. Add exhaustive
tests for those.

The patterns being passed to fixed/basic/extended/PCRE are carefully
crafted to return the wrong thing if the grep engine were to pick any
other matching method than the one it's told to use.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
7 years agotest-lib: rename the LIBPCRE prerequisite to PCRE
Ævar Arnfjörð Bjarmason [Sat, 20 May 2017 21:42:06 +0000 (21:42 +0000)] 
test-lib: rename the LIBPCRE prerequisite to PCRE

Rename the LIBPCRE prerequisite to PCRE. This is for preparation for
libpcre2 support, where having just "LIBPCRE" would be confusing as it
implies v1 of the library.

None of these tests are incompatible between versions 1 & 2 of
libpcre, it's less confusing to give them a more general name to make
it clear that they work on both library versions.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
7 years agogrep & rev-list doc: stop promising libpcre for --perl-regexp
Ævar Arnfjörð Bjarmason [Sat, 20 May 2017 21:42:05 +0000 (21:42 +0000)] 
grep & rev-list doc: stop promising libpcre for --perl-regexp

Stop promising in our grep & rev-list options documentation that we're
always going to be using libpcre when given the --perl-regexp option.

Instead talk about using "Perl-compatible regular expressions" and
using these types of patterns using "a compile-time dependency".

Saying "libpcre" means that we're talking about libpcre.so, which is
always going to be v1. This change is part of an ongoing saga to add
support for libpcre2, which comes with PCRE v2.

In the future we might use some completely unrelated library to
provide perl-compatible regular expression support. By wording the
documentation differently and not promising any specific version of
PCRE or even PCRE at all we have more wiggle room to change the
implementation.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
7 years agoMakefile & configure: reword inaccurate comment about PCRE
Ævar Arnfjörð Bjarmason [Sat, 20 May 2017 21:42:04 +0000 (21:42 +0000)] 
Makefile & configure: reword inaccurate comment about PCRE

Reword an outdated & inaccurate comment which suggests that only
git-grep can use PCRE.

This comment was added back when PCRE support was initially added in
commit 63e7e9d8b6 ("git-grep: Learn PCRE", 2011-05-09), and was true
at the time.

It hasn't been telling the full truth since git-log learned to use
PCRE with --grep in commit 727b6fc3ed ("log --grep: accept
--basic-regexp and --perl-regexp", 2012-10-03), and more importantly
is likely to get more inaccurate over time as more use is made of PCRE
in other areas.

Reword it to be more future-proof, and to more clearly explain that
this enables user-initiated runtime behavior.

Copy/pasting this so much in configure.ac is lame, these Makefile-like
flags aren't even used by autoconf, just the corresponding
--with[out]-* options. But copy/pasting the comments that make sense
for the Makefile to configure.ac where they make less sense is the
pattern everything else follows in that file. I'm not going to war
against that as part of this change, just following the existing
pattern.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
7 years agoStart post 2.13 cycle
Junio C Hamano [Tue, 16 May 2017 02:52:09 +0000 (11:52 +0900)] 
Start post 2.13 cycle

Signed-off-by: Junio C Hamano <gitster@pobox.com>
7 years agoMerge branch 'js/larger-timestamps'
Junio C Hamano [Tue, 16 May 2017 02:51:59 +0000 (11:51 +0900)] 
Merge branch 'js/larger-timestamps'

Some platforms have ulong that is smaller than time_t, and our
historical use of ulong for timestamp would mean they cannot
represent some timestamp that the platform allows.  Invent a
separate and dedicated timestamp_t (so that we can distingiuish
timestamps and a vanilla ulongs, which along is already a good
move), and then declare uintmax_t is the type to be used as the
timestamp_t.

* js/larger-timestamps:
  archive-tar: fix a sparse 'constant too large' warning
  use uintmax_t for timestamps
  date.c: abort if the system time cannot handle one of our timestamps
  timestamp_t: a new data type for timestamps
  PRItime: introduce a new "printf format" for timestamps
  parse_timestamp(): specify explicitly where we parse timestamps
  t0006 & t5000: skip "far in the future" test when time_t is too limited
  t0006 & t5000: prepare for 64-bit timestamps
  ref-filter: avoid using `unsigned long` for catch-all data type

7 years agoMerge branch 'jc/apply-fix-mismerge'
Junio C Hamano [Tue, 16 May 2017 02:51:59 +0000 (11:51 +0900)] 
Merge branch 'jc/apply-fix-mismerge'

* jc/apply-fix-mismerge:
  apply.c: fix whitespace-only mismerge

7 years agoMerge branch 'ab/aix-needs-compat-regex'
Junio C Hamano [Tue, 16 May 2017 02:51:58 +0000 (11:51 +0900)] 
Merge branch 'ab/aix-needs-compat-regex'

Build fix.

* ab/aix-needs-compat-regex:
  config.mak.uname: set NO_REGEX=NeedsStartEnd on AIX

7 years agoMerge branch 'jn/credential-doc-on-clear'
Junio C Hamano [Tue, 16 May 2017 02:51:57 +0000 (11:51 +0900)] 
Merge branch 'jn/credential-doc-on-clear'

Doc update.

* jn/credential-doc-on-clear:
  credential doc: make multiple-helper behavior more prominent

7 years agoMerge branch 'jn/clone-add-empty-config-from-command-line'
Junio C Hamano [Tue, 16 May 2017 02:51:56 +0000 (11:51 +0900)] 
Merge branch 'jn/clone-add-empty-config-from-command-line'

"git clone --config var=val" is a way to populate the
per-repository configuration file of the new repository, but it did
not work well when val is an empty string.  This has been fixed.

* jn/clone-add-empty-config-from-command-line:
  clone: handle empty config values in -c

7 years agoMerge branch 'bw/submodule-has-commits-update'
Junio C Hamano [Tue, 16 May 2017 02:51:56 +0000 (11:51 +0900)] 
Merge branch 'bw/submodule-has-commits-update'

Code clean-up and duplicate removal.

* bw/submodule-has-commits-update:
  submodule: refactor logic to determine changed submodules
  submodule: improve submodule_has_commits()
  submodule: change string_list changed_submodule_paths
  submodule: remove add_oid_to_argv()
  submodule: rename free_submodules_sha1s()
  submodule: rename add_sha1_to_array()

7 years agoMerge branch 'ls/travis-doc-asciidoctor'
Junio C Hamano [Tue, 16 May 2017 02:51:55 +0000 (11:51 +0900)] 
Merge branch 'ls/travis-doc-asciidoctor'

Travis CI gained a task to format the documentation with both
AsciiDoc and AsciiDoctor.

* ls/travis-doc-asciidoctor:
  travis-ci: check AsciiDoc/AsciiDoctor stderr output
  travis-ci: unset compiler for jobs that do not need one
  travis-ci: parallelize documentation build
  travis-ci: build documentation with AsciiDoc and Asciidoctor

7 years agoMerge branch 'rs/large-zip'
Junio C Hamano [Tue, 16 May 2017 02:51:54 +0000 (11:51 +0900)] 
Merge branch 'rs/large-zip'

"git archive --format=zip" learned to use zip64 extension when
necessary to go beyond the 4GB limit.

* rs/large-zip:
  t5004: require 64-bit support for big ZIP tests
  archive-zip: set version field for big files correctly
  archive-zip: support files bigger than 4GB
  archive-zip: support archives bigger than 4GB
  archive-zip: write ZIP dir entry directly to strbuf
  archive-zip: use strbuf for ZIP directory
  archive-zip: add tests for big ZIP archives

7 years agoMerge branch 'ab/clone-no-tags'
Junio C Hamano [Tue, 16 May 2017 02:51:54 +0000 (11:51 +0900)] 
Merge branch 'ab/clone-no-tags'

"git clone" learned the "--no-tags" option not to fetch all tags
initially, and also set up the tagopt not to follow any tags in
subsequent fetches.

* ab/clone-no-tags:
  tests: rename a test having to do with shallow submodules
  clone: add a --no-tags option to clone without tags
  tests: change "cd ... && git fetch" to "cd &&\n\tgit fetch"

7 years agoMerge branch 'sk/status-short-branch-color-config'
Junio C Hamano [Tue, 16 May 2017 02:51:53 +0000 (11:51 +0900)] 
Merge branch 'sk/status-short-branch-color-config'

The colors in which "git status --short --branch" showed the names
of the current branch and its remote-tracking branch are now
configurable.

* sk/status-short-branch-color-config:
  status: add color config slots for branch info in "--short --branch"
  status: fix missing newline when comment chars are disabled

7 years agoMerge branch 'jk/am-leakfix'
Junio C Hamano [Tue, 16 May 2017 02:51:53 +0000 (11:51 +0900)] 
Merge branch 'jk/am-leakfix'

The codepath in "git am" that is used when running "git rebase"
leaked memory held for the log message of the commits being rebased.

* jk/am-leakfix:
  am: shorten ident_split variable name in get_commit_info()
  am: simplify allocations in get_commit_info()
  am: fix commit buffer leak in get_commit_info()

7 years agoMerge branch 'jt/use-trailer-api-in-commands'
Junio C Hamano [Tue, 16 May 2017 02:51:52 +0000 (11:51 +0900)] 
Merge branch 'jt/use-trailer-api-in-commands'

"git cherry-pick" and other uses of the sequencer machinery
mishandled a trailer block whose last line is an incomplete line.
This has been fixed so that an additional sign-off etc. are added
after completing the existing incomplete line.

* jt/use-trailer-api-in-commands:
  sequencer: add newline before adding footers

7 years agoMerge branch 'nd/worktree-kill-parse-ref'
Junio C Hamano [Tue, 16 May 2017 02:51:51 +0000 (11:51 +0900)] 
Merge branch 'nd/worktree-kill-parse-ref'

"git gc" did not interact well with "git worktree"-managed
per-worktree refs.

* nd/worktree-kill-parse-ref:
  refs: kill set_worktree_head_symref()
  worktree.c: kill parse_ref() in favor of refs_resolve_ref_unsafe()
  refs: introduce get_worktree_ref_store()
  refs: add REFS_STORE_ALL_CAPS
  refs.c: make submodule ref store hashmap generic
  environment.c: fix potential segfault by get_git_common_dir()

7 years agoMerge branch 'dt/gc-ignore-old-gc-logs'
Junio C Hamano [Tue, 16 May 2017 02:51:50 +0000 (11:51 +0900)] 
Merge branch 'dt/gc-ignore-old-gc-logs'

Attempt to allow us notice "fishy" situation where we fail to
remove the temporary directory used during the test.

* dt/gc-ignore-old-gc-logs:
  test-lib: retire $remove_trash variable
  test-lib.sh: do not barf under --debug at the end of the test
  test-lib: abort when can't remove trash directory

7 years agoMerge branch 'jk/no-null-sha1-in-cache-tree'
Junio C Hamano [Tue, 16 May 2017 02:51:50 +0000 (11:51 +0900)] 
Merge branch 'jk/no-null-sha1-in-cache-tree'

Code to update the cache-tree has been tightened so that we won't
accidentally write out any 0{40} entry in the tree object.

* jk/no-null-sha1-in-cache-tree:
  cache-tree: reject entries with null sha1

7 years agoMerge branch 'dt/raise-core-packed-git-limit'
Junio C Hamano [Tue, 16 May 2017 02:51:49 +0000 (11:51 +0900)] 
Merge branch 'dt/raise-core-packed-git-limit'

The default packed-git limit value has been raised on larger
platforms to save "git fetch" from a (recoverable) failure while
"gc" is running in parallel.

* dt/raise-core-packed-git-limit:
  Increase core.packedGitLimit

7 years agobuiltin/log: honor log.decorate
brian m. carlson [Sun, 14 May 2017 18:00:58 +0000 (18:00 +0000)] 
builtin/log: honor log.decorate

The recent change that introduced autodecorating of refs accidentally
broke the ability of users to set log.decorate = false to override it.
When the git_log_config was traversed a second time with an option other
than log.decorate, the decoration style would be set to the automatic
style, even if the user had already overridden it.  Instead of setting
the option in config parsing, set it in init_log_defaults instead.

Add a test for this case.  The actual additional config option doesn't
matter, but it needs to be something not already set in the
configuration file.

Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
Acked-by: Alex Henrie <alexhenrie24@gmail.com>
Reviewed-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
7 years agotravis-ci: add job to run tests with GETTEXT_POISON
Lars Schneider [Fri, 5 May 2017 15:40:53 +0000 (17:40 +0200)] 
travis-ci: add job to run tests with GETTEXT_POISON

Add a job to run Git tests with GETTEXT_POISON. In this job we don't run
the git-p4, git-svn, and HTTPD tests to save resources/time (those tests
are already executed in other jobs). Since we don't run these tests, we
can also skip the "before_install" step (which would install the
necessary dependencies) with an empty override.

Signed-off-by: Lars Schneider <larsxschneider@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
7 years agotravis-ci: setup "prove cache" in "script" step
Lars Schneider [Fri, 5 May 2017 15:40:52 +0000 (17:40 +0200)] 
travis-ci: setup "prove cache" in "script" step

The command that made the "prove cache" persistent across builds was
executed in the "before_install" step. Consequently, every job that
wanted to make use of the cache had to run this step.

The "prove cache" is only used in the "script" step for the
"make test" command. Therefore, we should configure the "prove cache"
in this step.

This change is useful for a subsequent patch that adds a job which does
not need the "before_install" step but wants to run the "script" step to
execute the tests.

Signed-off-by: Lars Schneider <larsxschneider@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
7 years agotests: fix tests broken under GETTEXT_POISON=YesPlease
Ævar Arnfjörð Bjarmason [Fri, 5 May 2017 18:19:32 +0000 (18:19 +0000)] 
tests: fix tests broken under GETTEXT_POISON=YesPlease

The GETTEXT_POISON=YesPlease compile-time testing option added in my
bb946bba76 ("i18n: add GETTEXT_POISON to simulate unfriendly
translator", 2011-02-22) has been slowly bitrotting as strings have
been marked for translation, and new tests have been added without
running it.

I brought this up on the list ("[BUG] test suite broken with
GETTEXT_POISON=YesPlease", [1]) asking whether this mode was useful at
all anymore. At least one person occasionally uses it, and Lars
Schneider offered to change one of the the Travis builds to run in
this mode, so fix up the failing ones.

My test setup runs most of the tests, with the notable exception of
skipping all the p4 tests, so it's possible that there's still some
lurking regressions I haven't fixed.

1. <CACBZZX62+acvi1dpkknadTL827mtCm_QesGSZ=6+UnyeMpg8+Q@mail.gmail.com>

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
7 years agot0027: tests are not expensive; remove t0025
Torsten Bögershausen [Wed, 10 May 2017 14:06:19 +0000 (16:06 +0200)] 
t0027: tests are not expensive; remove t0025

The purpose of t0027 is to test all CRLF related conversions at "git
checkout" and "git add".  Running t0027 under Git for Windows takes
3-4 minutes, so the whole script had been marked as "EXPENSIVE".

However, the "Git for Windows" fork overrides this since 2014:
"t0027 is marked expensive, but really, for MinGW we want to run
these tests always."

The test seems not to be expensive on other platforms at all: it
takes less than 14 seconds under Linux, and 63 seconds under Mac Os
X, and this is more or less the same with a SSD or a spinning disk.

So let's drop the "EXPENSIVE" prereq.

While at it, retire t0025; recent "stress" tests show that t0025 is
flaky, reported by Lars Schneider <larsxschneider@gmail.com>, but
all tests in t0025 are covered by t0027 already.

Signed-off-by: Torsten Bögershausen <tboegi@web.de>
Acked-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
7 years agoreceive-pack: verify push options in cert
Jonathan Tan [Tue, 9 May 2017 19:23:53 +0000 (12:23 -0700)] 
receive-pack: verify push options in cert

In commit f6a4e61 ("push: accept push options", 2016-07-14), send-pack
was taught to include push options both within the signed cert (if the
push is a signed push) and outside the signed cert; however,
receive-pack ignores push options within the cert, only handling push
options outside the cert.

Teach receive-pack, in the case that push options are provided for a
signed push, to verify that the push options both within the cert and
outside the cert are consistent.

This sets in stone the requirement that send-pack redundantly send its
push options in 2 places, but I think that this is better than the
alternatives. Sending push options only within the cert is
backwards-incompatible with existing Git servers (which read push
options only from outside the cert), and sending push options only
outside the cert means that the push options are not signed for.

Signed-off-by: Jonathan Tan <jonathantanmy@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
7 years agodoc: replace more gmane links
Junio C Hamano [Mon, 8 May 2017 01:38:59 +0000 (10:38 +0900)] 
doc: replace more gmane links

Signed-off-by: Junio C Hamano <gitster@pobox.com>
7 years agoGit 2.13 v2.13.0
Junio C Hamano [Tue, 9 May 2017 14:26:02 +0000 (23:26 +0900)] 
Git 2.13

Signed-off-by: Junio C Hamano <gitster@pobox.com>
7 years agoMerge tag 'l10n-2.13.0-rnd2.1' of git://github.com/git-l10n/git-po
Junio C Hamano [Tue, 9 May 2017 14:25:26 +0000 (23:25 +0900)] 
Merge tag 'l10n-2.13.0-rnd2.1' of git://github.com/git-l10n/git-po

l10n for Git 2.13.0 round 2.1

* tag 'l10n-2.13.0-rnd2.1' of git://github.com/git-l10n/git-po:
  l10n: zh_CN: for git v2.13.0 l10n round 2
  l10n: sv.po: Update Swedish translation (3195t0f0u)
  l10n: zh_CN: review for git v2.13.0 l10n round 1
  l10n: Update Catalan translation
  l10n: bg.po: Updated Bulgarian translation (3195t)
  l10n: fr.po v2.13 rnd 2
  l10n: de.po: translate 4 new messages
  l10n: de.po: update German translation
  l10n: de.po: lower case after semi-colon
  l10n: vi.po(3195t): Update translation for v2.13.0 round 2
  l10n: git.pot: v2.13.0 round 2 (4 new, 7 removed)
  l10n: zh_CN: for git v2.13.0 l10n round 1
  l10n: fr.po v2.13 round 1
  l10n: pt_PT: update Portuguese translation
  l10n: bg.po: Updated Bulgarian translation (3201t)
  l10n: vi.po(3198t): Updated Vietnamese translation for v2.13.0-rc0
  l10n: sv.po: Update Swedish translation (3199t0f0u)
  l10n: git.pot: v2.13.0 round 1 (96 new, 37 removed)

7 years agoMerge branch 'master' of git://github.com/nafmo/git-l10n-sv
Jiang Xin [Tue, 9 May 2017 14:12:34 +0000 (22:12 +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 (3195t0f0u)

7 years agol10n: zh_CN: for git v2.13.0 l10n round 2
Jiang Xin [Tue, 9 May 2017 13:55:38 +0000 (21:55 +0800)] 
l10n: zh_CN: for git v2.13.0 l10n round 2

Translate 4 messages (3195t0f0u) for git v2.13.0-rc2.

Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
7 years agol10n: sv.po: Update Swedish translation (3195t0f0u)
Peter Krefting [Tue, 9 May 2017 07:05:09 +0000 (08:05 +0100)] 
l10n: sv.po: Update Swedish translation (3195t0f0u)

Signed-off-by: Peter Krefting <peter@softwolves.pp.se>
7 years agoSync with v2.12.3
Junio C Hamano [Tue, 9 May 2017 03:20:21 +0000 (20:20 -0700)] 
Sync with v2.12.3

Signed-off-by: Junio C Hamano <gitster@pobox.com>
7 years agoMerge branch 'jh/verify-index-checksum-only-in-fsck'
Junio C Hamano [Tue, 9 May 2017 03:17:42 +0000 (12:17 +0900)] 
Merge branch 'jh/verify-index-checksum-only-in-fsck'

* jh/verify-index-checksum-only-in-fsck:
  t1450: avoid use of "sed" on the index, which is a binary file

7 years agodocs: correct receive.advertisePushOptions default
Jonathan Tan [Mon, 8 May 2017 21:33:50 +0000 (14:33 -0700)] 
docs: correct receive.advertisePushOptions default

In commit c714e45 ("receive-pack: implement advertising and receiving
push options", 2016-07-14), receive-pack was taught to (among other
things) advertise that it understood push options, depending on
configuration. It was documented that it advertised such ability by
default; however, it actually does not. (In that commit, notice that
advertise_push_options defaults to 0, unlike advertise_atomic_push which
defaults to 1.)

Update the documentation to state that it does not advertise the ability
by default.

Signed-off-by: Jonathan Tan <jonathantanmy@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
7 years agoapply.c: fix whitespace-only mismerge
Junio C Hamano [Tue, 9 May 2017 02:30:24 +0000 (19:30 -0700)] 
apply.c: fix whitespace-only mismerge

4af9a7d3 ("Merge branch 'bc/object-id'", 2016-09-19) involved
merging a lot of changes made to builtin/apply.c on the side branch
manually to apply.c as an intervening commit 13b5af22 ("apply: move
libified code from builtin/apply.c to apply.{c,h}", 2016-04-22)
moved a lot of the lines changed on the side branch to a different
file apply.c at the top-level, requiring manual patching of it.
Apparently, the maintainer screwed up and made the code indent in a
funny way while doing so.

Reported-by: Stefan Beller <sbeller@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
7 years agoarchive-tar: fix a sparse 'constant too large' warning
Ramsay Jones [Mon, 8 May 2017 20:34:58 +0000 (21:34 +0100)] 
archive-tar: fix a sparse 'constant too large' warning

Commit dddbad728c ("timestamp_t: a new data type for timestamps",
26-04-2017) introduced a new typedef 'timestamp_t', as a synonym for an
unsigned long, which was used at the time to represent timestamps in
git. A later commit 28f4aee3fb ("use uintmax_t for timestamps",
26-04-2017) changed the typedef to use an 'uintmax_t' for the timestamp
representation type.

When building on a 32-bit Linux system, sparse complains that a constant
(USTAR_MAX_MTIME) used to detect a 'far-future mtime' timestamp, is too
large; 'warning: constant 077777777777UL is so big it is unsigned long
long' on lines 335 and 338 of archive-tar.c. Note that both gcc and
clang only issue a warning if this constant is used in a context that
requires an 'unsigned long' (rather than an uintmax_t). (Since TIME_MAX
is no longer equal to 0xFFFFFFFF, even on a 32-bit system, the macro
USTAR_MAX_MTIME is set to 077777777777UL, which cannot be represented as
an 'unsigned long' constant).

In order to suppress the warning, change the definition of the macro
constant USTAR_MAX_MTIME to use an 'ULL' type suffix.

In a similar vein, on systems which use a 64-bit representation of the
'unsigned long' type, the USTAR_MAX_SIZE constant macro is defined with
the value 077777777777ULL. Although this does not cause any warning
messages to be issued, it would be more appropriate for this constant
to use an 'UL' type suffix rather than 'ULL'.

Signed-off-by: Ramsay Jones <ramsay@ramsayjones.plus.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
7 years agol10n: zh_CN: review for git v2.13.0 l10n round 1
Ray Chen [Tue, 2 May 2017 15:42:43 +0000 (23:42 +0800)] 
l10n: zh_CN: review for git v2.13.0 l10n round 1

Signed-off-by: Ray Chen <oldsharp@gmail.com>
7 years agoMerge branch 'master' of https://github.com/vnwildman/git
Jiang Xin [Mon, 8 May 2017 22:39:31 +0000 (06:39 +0800)] 
Merge branch 'master' of https://github.com/vnwildman/git

* 'master' of https://github.com/vnwildman/git:
  l10n: vi.po(3195t): Update translation for v2.13.0 round 2

7 years agol10n: Update Catalan translation
Jordi Mas [Sun, 7 May 2017 08:12:01 +0000 (10:12 +0200)] 
l10n: Update Catalan translation

Signed-off-by: Jordi Mas <jmas@softcatala.org>
7 years agol10n: bg.po: Updated Bulgarian translation (3195t)
Alexander Shopov [Sun, 7 May 2017 07:25:19 +0000 (09:25 +0200)] 
l10n: bg.po: Updated Bulgarian translation (3195t)

Signed-off-by: Alexander Shopov <ash@kambanaria.org>
7 years agoMerge branch 'fr_l10n_v2.13_rnd2' of git://github.com/jnavila/git
Jiang Xin [Mon, 8 May 2017 22:18:53 +0000 (06:18 +0800)] 
Merge branch 'fr_l10n_v2.13_rnd2' of git://github.com/jnavila/git

* 'fr_l10n_v2.13_rnd2' of git://github.com/jnavila/git:
  l10n: fr.po v2.13 rnd 2

7 years agoam: check return value of resolve_refdup before using hash
René Scharfe [Sat, 6 May 2017 17:13:56 +0000 (19:13 +0200)] 
am: check return value of resolve_refdup before using hash

If resolve_refdup() fails it returns NULL and possibly leaves its hash
output parameter untouched.  Make sure to use it only if the function
succeeded, in order to avoid accessing uninitialized memory.

Signed-off-by: Rene Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
7 years agocheckout: check return value of resolve_refdup before using hash
René Scharfe [Sat, 6 May 2017 17:13:52 +0000 (19:13 +0200)] 
checkout: check return value of resolve_refdup before using hash

If resolve_refdup() fails it returns NULL and possibly leaves its hash
output parameter untouched.  Make sure to use it only if the function
succeeded, in order to avoid accessing uninitialized memory.

Found with t/t2011-checkout-invalid-head.sh --valgrind.

Signed-off-by: Rene Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
7 years agodoc: replace a couple of broken gmane links
Ævar Arnfjörð Bjarmason [Fri, 5 May 2017 10:08:03 +0000 (10:08 +0000)] 
doc: replace a couple of broken gmane links

Replace a couple of broken links to gmane with links to other
archives. See commit 54471fdcc3 ("README: replace gmane link with
public-inbox", 2016-12-15) for prior art.

With this change there's still 4 references left in the code:

    $ git grep -E '(article|thread)\.gmane.org' -- |grep -v RelNotes|wc -l
    4

I couldn't find alternative links for those.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
7 years agol10n: fr.po v2.13 rnd 2
Jean-Noel Avila [Fri, 5 May 2017 09:55:14 +0000 (11:55 +0200)] 
l10n: fr.po v2.13 rnd 2

Signed-off-by: Jean-Noel Avila <jn.avila@free.fr>
7 years agol10n: de.po: translate 4 new messages
Ralf Thielow [Fri, 5 May 2017 09:23:53 +0000 (11:23 +0200)] 
l10n: de.po: translate 4 new messages

Translate 4 new messages came from git.pot update in 28e1aaa48 (l10n:
git.pot: v2.13.0 round 2 (4 new, 7 removed)).

Signed-off-by: Ralf Thielow <ralf.thielow@gmail.com>
Acked-by: Matthias Rüster <matthias.ruester@gmail.com>
7 years agol10n: de.po: update German translation
Ralf Thielow [Thu, 13 Apr 2017 14:45:29 +0000 (16:45 +0200)] 
l10n: de.po: update German translation

Translate 96 new messages came from git.pot update in dfc182b (l10n:
git.pot: v2.13.0 round 1 (96 new, 37 removed)).

Signed-off-by: Ralf Thielow <ralf.thielow@gmail.com>
Acked-by: Matthias Rüster <matthias.ruester@gmail.com>
7 years agol10n: de.po: lower case after semi-colon
Michael J Gruber [Fri, 17 Mar 2017 15:04:19 +0000 (16:04 +0100)] 
l10n: de.po: lower case after semi-colon

Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
Signed-off-by: Ralf Thielow <ralf.thielow@gmail.com>
7 years agol10n: vi.po(3195t): Update translation for v2.13.0 round 2
Tran Ngoc Quan [Fri, 5 May 2017 06:41:32 +0000 (13:41 +0700)] 
l10n: vi.po(3195t): Update translation for v2.13.0 round 2

Signed-off-by: Tran Ngoc Quan <vnwildman@gmail.com>
7 years agoGit 2.12.3 v2.12.3
Junio C Hamano [Fri, 5 May 2017 04:33:22 +0000 (13:33 +0900)] 
Git 2.12.3

Signed-off-by: Junio C Hamano <gitster@pobox.com>
7 years agoMerge branch 'maint-2.11' into maint
Junio C Hamano [Fri, 5 May 2017 04:31:40 +0000 (13:31 +0900)] 
Merge branch 'maint-2.11' into maint

7 years agoGit 2.11.2 v2.11.2
Junio C Hamano [Fri, 5 May 2017 04:29:43 +0000 (13:29 +0900)] 
Git 2.11.2

Signed-off-by: Junio C Hamano <gitster@pobox.com>
7 years agoMerge branch 'maint-2.10' into maint-2.11
Junio C Hamano [Fri, 5 May 2017 04:26:31 +0000 (13:26 +0900)] 
Merge branch 'maint-2.10' into maint-2.11