]> git.ipfire.org Git - thirdparty/git.git/log
thirdparty/git.git
7 years agoversioncmp: generalize version sort suffix reordering
SZEDER Gábor [Thu, 8 Dec 2016 14:24:01 +0000 (15:24 +0100)] 
versioncmp: generalize version sort suffix reordering

The 'versionsort.prereleaseSuffix' configuration variable, as its name
suggests, is supposed to only deal with tagnames with prerelease
suffixes, and allows sorting those prerelease tags in a user-defined
order before the suffixless main release tag, instead of sorting them
simply lexicographically.

However, the previous changes in this series resulted in an
interesting and useful property of version sort:

  - The empty string as a configured suffix matches all tagnames,
    including tagnames without any suffix, but

  - tagnames containing a "real" configured suffix are still ordered
    according to that real suffix, because any longer suffix takes
    precedence over the empty string.

Exploiting this property we can easily generalize suffix reordering
and specify the order of tags with given suffixes not only before but
even after a main release tag by using the empty suffix to denote the
position of the main release tag, without any algorithm changes:

  $ git -c versionsort.prereleaseSuffix=-alpha \
        -c versionsort.prereleaseSuffix=-beta \
        -c versionsort.prereleaseSuffix="" \
        -c versionsort.prereleaseSuffix=-gamma \
        -c versionsort.prereleaseSuffix=-delta \
        tag -l --sort=version:refname 'v3.0*'
  v3.0-alpha1
  v3.0-beta1
  v3.0
  v3.0-gamma1
  v3.0-delta1

Since 'versionsort.prereleaseSuffix' is not a fitting name for a
configuration variable to control this more general suffix reordering,
introduce the new variable 'versionsort.suffix'.  Still keep the old
configuration variable name as a deprecated alias, though, to avoid
suddenly breaking setups already using it.  Ignore the old variable if
both old and new configuration variables are set, but emit a warning
so users will be aware of it and can fix their configuration.  Extend
the documentation to describe and add a test to check this more
general behavior.

Note: since the empty suffix matches all tagnames, tagnames with
suffixes not included in the configuration are listed together with
the suffixless main release tag, ordered lexicographically right after
that, i.e. before tags with suffixes listed in the configuration
following the empty suffix.

Signed-off-by: SZEDER Gábor <szeder.dev@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
7 years agoversioncmp: factor out helper for suffix matching
SZEDER Gábor [Thu, 8 Dec 2016 14:48:11 +0000 (15:48 +0100)] 
versioncmp: factor out helper for suffix matching

As the number of identical steps to be done for both tagnames grows,
extract them into a helper function, with the additional benefit that
the conditionals near the end of swap_prereleases() will use more
meaningful variable names.

Signed-off-by: SZEDER Gábor <szeder.dev@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
7 years agoversioncmp: use earliest-longest contained suffix to determine sorting order
SZEDER Gábor [Thu, 8 Dec 2016 14:24:00 +0000 (15:24 +0100)] 
versioncmp: use earliest-longest contained suffix to determine sorting order

When comparing tagnames, it is possible that a tagname contains more
than one of the configured prerelease suffixes around the first
different character.  After fixing a bug in the previous commit such a
tagname is sorted according to the contained suffix which comes first
in the configuration.  This is, however, not quite the right thing to
do in the following corner cases:

  1.   $ git -c versionsort.suffix=-bar
             -c versionsort.suffix=-foo-baz
             -c versionsort.suffix=-foo-bar
             tag -l --sort=version:refname 'v1*'
       v1.0-foo-bar
       v1.0-foo-baz

     The suffix of the tagname 'v1.0-foo-bar' is clearly '-foo-bar',
     so it should be listed last.  However, as it also contains '-bar'
     around the first different character, it is listed first instead,
     because that '-bar' suffix comes first the configuration.

  2. One of the configured suffixes starts with the other:

       $ git -c versionsort.prereleasesuffix=-pre \
             -c versionsort.prereleasesuffix=-prerelease \
             tag -l --sort=version:refname 'v2*'
       v2.0-prerelease1
       v2.0-pre1
       v2.0-pre2

     Here the tagname 'v2.0-prerelease1' should be the last.  When
     comparing 'v2.0-pre1' and 'v2.0-prerelease1' the first different
     characters are '1' and 'r', respectively.  Since this first
     different character must be part of the configured suffix, the
     '-pre' suffix is not recognized in the first tagname.  OTOH, the
     '-prerelease' suffix is properly recognized in
     'v2.0-prerelease1', thus it is listed first.

Improve version sort in these corner cases, and

  - look for a configured prerelease suffix containing the first
    different character or ending right before it, so the '-pre'
    suffixes are recognized in case (2).  This also means that
    when comparing tagnames 'v2.0-pre1' and 'v2.0-pre2',
    swap_prereleases() would find the '-pre' suffix in both, but then
    it will return "undecided" and the caller will do the right thing
    by sorting based in '1' and '2'.

  - If the tagname contains more than one suffix, then give precedence
    to the contained suffix that starts at the earliest offset in the
    tagname to address (1).

  - If there are more than one suffixes starting at that earliest
    position, then give precedence to the longest of those suffixes,
    thus ensuring that in (2) the tagname 'v2.0-prerelease1' won't be
    sorted based on the '-pre' suffix.

Add tests for these corner cases and adjust the documentation
accordingly.

Signed-off-by: SZEDER Gábor <szeder.dev@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
7 years agoversioncmp: cope with common part overlapping with prerelease suffix
SZEDER Gábor [Thu, 8 Dec 2016 14:23:59 +0000 (15:23 +0100)] 
versioncmp: cope with common part overlapping with prerelease suffix

Version sort with prerelease reordering sometimes puts tagnames in the
wrong order, when the common part of two compared tagnames overlaps
with the leading character(s) of one or more configured prerelease
suffixes.  Note the position of "v2.1.0-beta-1":

  $ git -c versionsort.prereleaseSuffix=-beta \
        tag -l --sort=version:refname v2.1.*
  v2.1.0-beta-2
  v2.1.0-beta-3
  v2.1.0
  v2.1.0-RC1
  v2.1.0-RC2
  v2.1.0-beta-1
  v2.1.1
  v2.1.2

The reason is that when comparing a pair of tagnames, first
versioncmp() looks for the first different character in a pair of
tagnames, and then the swap_prereleases() helper function looks for a
configured prerelease suffix _starting at_ that character.  Thus, when
in the above example the sorting algorithm happens to compare the
tagnames "v2.1.0-beta-1" and "v2.1.0-RC2", swap_prereleases() tries to
match the suffix "-beta" against "beta-1" to no avail, and the two
tagnames erroneously end up being ordered lexicographically.

To fix this issue change swap_prereleases() to look for configured
prerelease suffixes _containing_ the position of that first different
character.

Care must be taken, when a configured suffix is longer than the
tagnames' common part up to the first different character, to avoid
reading memory before the beginning of the tagnames.  Add a test that
uses an exceptionally long prerelease suffix to check for this, in the
hope that in case of a regression the illegal memory access causes a
segfault in 'git tag' on one of the commonly used platforms (the test
happens to pass successfully on my Linux system with the safety check
removed), or at least makes valgrind complain.

Under some circumstances it's possible that more than one prerelease
suffixes can be found in the same tagname around that first different
character.  With this simple bugfix patch such a tagname is sorted
according to the contained suffix that comes first in the
configuration for now.  This is less than ideal in some cases, and the
following patch will take care of those.

Reported-by: Leho Kraav <leho@conversionready.com>
Signed-off-by: SZEDER Gábor <szeder.dev@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
7 years agoversioncmp: pass full tagnames to swap_prereleases()
SZEDER Gábor [Thu, 8 Dec 2016 14:23:58 +0000 (15:23 +0100)] 
versioncmp: pass full tagnames to swap_prereleases()

The swap_prereleases() helper function is responsible for finding
configured prerelease suffixes in a pair of tagnames to be compared,
but this function currently gets to see only the parts of those two
tagnames starting at the first different character.  To fix some
issues related to the common part of two tagnames overlapping with
leading part of a prerelease suffix, this helper function must see
both full tagnames.

In preparation for the fix in the following patch, refactor
swap_prereleases() and its caller to pass two full tagnames and an
additional offset indicating the position of the first different
character.

While updating the comment describing that function, remove the
sentence about not dealing with both tagnames having the same suffix.
Currently it doesn't add much value (we know that there is a different
character, so it's obvious that it can't possibly be the same suffix
in both), and at the end of this patch series it won't even be true
anymore.

Signed-off-by: SZEDER Gábor <szeder.dev@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
7 years agot7004-tag: add version sort tests to show prerelease reordering issues
SZEDER Gábor [Thu, 8 Dec 2016 14:23:57 +0000 (15:23 +0100)] 
t7004-tag: add version sort tests to show prerelease reordering issues

Version sort with prerelease reordering sometimes puts tagnames in the
wrong order, when the common part of two compared tagnames ends with
the leading character(s) of one or more configured prerelease
suffixes.  Add tests that demonstrate these issues.

The unrelated '--format should list tags as per format given' test
later uses tags matching the same prefix as the version sort tests,
thus was affected by the new tags added for the new tests in this
patch.  Change that test to perform its checks on a different set of
tags.

Signed-off-by: SZEDER Gábor <szeder.dev@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
7 years agot7004-tag: use test_config helper
SZEDER Gábor [Thu, 8 Dec 2016 14:23:56 +0000 (15:23 +0100)] 
t7004-tag: use test_config helper

... instead of setting and then manually unsetting configuration
variables, on one occasion even outside the test_expect_success block.

Signed-off-by: SZEDER Gábor <szeder.dev@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
7 years agot7004-tag: delete unnecessary tags with test_when_finished
SZEDER Gábor [Thu, 8 Dec 2016 14:23:55 +0000 (15:23 +0100)] 
t7004-tag: delete unnecessary tags with test_when_finished

The '--force is moot with a non-existing tag name' test creates two
new tags, which are then deleted right after the test is finished,
outside the test_expect_success block, allowing 'git tag -d's output to
pollute the test output.

Use test_when_finished to delete those tags.

Signed-off-by: SZEDER Gábor <szeder.dev@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
7 years agoStart post 2.11 cycle
Junio C Hamano [Mon, 5 Dec 2016 19:31:47 +0000 (11:31 -0800)] 
Start post 2.11 cycle

For now, let's call it 2.12 tentatively.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
7 years agoSync with maint-2.10
Junio C Hamano [Mon, 5 Dec 2016 19:25:47 +0000 (11:25 -0800)] 
Sync with maint-2.10

* maint-2.10:
  preparing for 2.10.3

7 years agopreparing for 2.10.3
Junio C Hamano [Mon, 5 Dec 2016 19:25:02 +0000 (11:25 -0800)] 
preparing for 2.10.3

Signed-off-by: Junio C Hamano <gitster@pobox.com>
7 years agoMerge branch 'jk/common-main' into maint-2.10
Junio C Hamano [Mon, 5 Dec 2016 19:24:17 +0000 (11:24 -0800)] 
Merge branch 'jk/common-main' into maint-2.10

* jk/common-main:
  common-main: stop munging argv[0] path
  git-compat-util: move content inside ifdef/endif guards

7 years agoMerge branch 'tk/diffcore-delta-remove-unused' into maint
Junio C Hamano [Tue, 29 Nov 2016 21:28:03 +0000 (13:28 -0800)] 
Merge branch 'tk/diffcore-delta-remove-unused' into maint

Code cleanup.

* tk/diffcore-delta-remove-unused:
  diffcore-delta: remove unused parameter to diffcore_count_changes()

7 years agoMerge branch 'jk/create-branch-remove-unused-param' into maint
Junio C Hamano [Tue, 29 Nov 2016 21:28:02 +0000 (13:28 -0800)] 
Merge branch 'jk/create-branch-remove-unused-param' into maint

Code clean-up.

* jk/create-branch-remove-unused-param:
  create_branch: drop unused "head" parameter

7 years agoMerge branch 'nd/worktree-lock' into maint
Junio C Hamano [Tue, 29 Nov 2016 21:28:02 +0000 (13:28 -0800)] 
Merge branch 'nd/worktree-lock' into maint

Typofix.

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

7 years agoMerge branch 'ps/common-info-doc' into maint
Junio C Hamano [Tue, 29 Nov 2016 21:28:01 +0000 (13:28 -0800)] 
Merge branch 'ps/common-info-doc' into maint

Doc fix.

* ps/common-info-doc:
  doc: fix location of 'info/' with $GIT_COMMON_DIR

7 years agoMerge branch 'rs/cocci' into maint
Junio C Hamano [Tue, 29 Nov 2016 21:28:00 +0000 (13:28 -0800)] 
Merge branch 'rs/cocci' into maint

Improve the rule to convert "unsigned char [20]" into "struct
object_id *" in contrib/coccinelle/

* rs/cocci:
  cocci: avoid self-references in object_id transformations

7 years agoMerge branch 'nd/test-helpers' into maint
Junio C Hamano [Tue, 29 Nov 2016 21:28:00 +0000 (13:28 -0800)] 
Merge branch 'nd/test-helpers' into maint

Update to the test framework made in 2.9 timeframe broke running
the tests under valgrind, which has been fixed.

* nd/test-helpers:
  valgrind: support test helpers

7 years agoMerge branch 'sc/fmt-merge-msg-doc-markup-fix' into maint
Junio C Hamano [Tue, 29 Nov 2016 21:27:59 +0000 (13:27 -0800)] 
Merge branch 'sc/fmt-merge-msg-doc-markup-fix' into maint

Documentation fix.

* sc/fmt-merge-msg-doc-markup-fix:
  Documentation/fmt-merge-msg: fix markup in example

7 years agoMerge branch 'rs/commit-pptr-simplify' into maint
Junio C Hamano [Tue, 29 Nov 2016 21:27:59 +0000 (13:27 -0800)] 
Merge branch 'rs/commit-pptr-simplify' into maint

Code simplification.

* rs/commit-pptr-simplify:
  commit: simplify building parents list

7 years agoMerge branch 'jk/rebase-config-insn-fmt-docfix' into maint
Junio C Hamano [Tue, 29 Nov 2016 21:27:58 +0000 (13:27 -0800)] 
Merge branch 'jk/rebase-config-insn-fmt-docfix' into maint

Documentation fix.

* jk/rebase-config-insn-fmt-docfix:
  doc: fix missing "::" in config list

7 years agoMerge branch 'ak/pre-receive-hook-template-modefix' into maint
Junio C Hamano [Tue, 29 Nov 2016 21:27:57 +0000 (13:27 -0800)] 
Merge branch 'ak/pre-receive-hook-template-modefix' into maint

A trivial clean-up to a recently graduated topic.

* ak/pre-receive-hook-template-modefix:
  pre-receive.sample: mark it executable

7 years agoMerge branch 'ls/macos-update' into maint
Junio C Hamano [Tue, 29 Nov 2016 21:27:56 +0000 (13:27 -0800)] 
Merge branch 'ls/macos-update' into maint

Portability update and workaround for builds on recent Mac OS X.

* ls/macos-update:
  travis-ci: disable GIT_TEST_HTTPD for macOS
  Makefile: set NO_OPENSSL on macOS by default

7 years agoMerge branch 'as/merge-attr-sleep' into maint
Junio C Hamano [Tue, 29 Nov 2016 21:27:56 +0000 (13:27 -0800)] 
Merge branch 'as/merge-attr-sleep' into maint

Fix for a racy false-positive test failure.

* as/merge-attr-sleep:
  t6026: clarify the point of "kill $(cat sleep.pid)"
  t6026: ensure that long-running script really is
  Revert "t6026-merge-attr: don't fail if sleep exits early"
  Revert "t6026-merge-attr: ensure that the merge driver was called"
  t6026-merge-attr: ensure that the merge driver was called
  t6026-merge-attr: don't fail if sleep exits early

7 years agoMerge branch 'ak/sh-setup-dot-source-i18n-fix' into maint
Junio C Hamano [Tue, 29 Nov 2016 21:27:56 +0000 (13:27 -0800)] 
Merge branch 'ak/sh-setup-dot-source-i18n-fix' into maint

Recent update to git-sh-setup (a library of shell functions that
are used by our in-tree scripted Porcelain commands) included
another shell library git-sh-i18n without specifying where it is,
relying on the $PATH.  This has been fixed to be more explicit by
prefixing $(git --exec-path) output in front.

* ak/sh-setup-dot-source-i18n-fix:
  git-sh-setup: be explicit where to dot-source git-sh-i18n from.

7 years agoMerge branch 'jk/daemon-path-ok-check-truncation' into maint
Junio C Hamano [Tue, 29 Nov 2016 21:27:55 +0000 (13:27 -0800)] 
Merge branch 'jk/daemon-path-ok-check-truncation' into maint

"git daemon" used fixed-length buffers to turn URL to the
repository the client asked for into the server side directory
path, using snprintf() to avoid overflowing these buffers, but
allowed possibly truncated paths to the directory.  This has been
tightened to reject such a request that causes overlong path to be
required to serve.

* jk/daemon-path-ok-check-truncation:
  daemon: detect and reject too-long paths

7 years agoMerge branch 'rs/ring-buffer-wraparound' into maint
Junio C Hamano [Tue, 29 Nov 2016 21:27:55 +0000 (13:27 -0800)] 
Merge branch 'rs/ring-buffer-wraparound' into maint

The code that we have used for the past 10+ years to cycle
4-element ring buffers turns out to be not quite portable in
theoretical world.

* rs/ring-buffer-wraparound:
  hex: make wraparound of the index into ring-buffer explicit

7 years agoMerge branch 'mm/send-email-cc-cruft-after-address' into maint
Junio C Hamano [Tue, 29 Nov 2016 21:27:54 +0000 (13:27 -0800)] 
Merge branch 'mm/send-email-cc-cruft-after-address' into maint

"git send-email" attempts to pick up valid e-mails from the
trailers, but people in real world write non-addresses there, like
"Cc: Stable <add@re.ss> # 4.8+", which broke the output depending
on the availability and vintage of Mail::Address perl module.

* mm/send-email-cc-cruft-after-address:
  Git.pm: add comment pointing to t9000
  t9000-addresses: update expected results after fix
  parse_mailboxes: accept extra text after <...> address

7 years agoMerge branch 'cp/completion-negative-refs' into maint
Junio C Hamano [Tue, 29 Nov 2016 21:27:53 +0000 (13:27 -0800)] 
Merge branch 'cp/completion-negative-refs' into maint

The command-line completion script (in contrib/) learned to
complete "git cmd ^mas<HT>" to complete the negative end of
reference to "git cmd ^master".

* cp/completion-negative-refs:
  completion: support excluding refs

7 years agoMerge branch 'jc/am-read-author-file' into maint
Junio C Hamano [Tue, 29 Nov 2016 21:27:53 +0000 (13:27 -0800)] 
Merge branch 'jc/am-read-author-file' into maint

Extract a small helper out of the function that reads the authors
script file "git am" internally uses.
This by itself is not useful until a second caller appears in the
future for "rebase -i" helper.

* jc/am-read-author-file:
  am: refactor read_author_script()

7 years agoGit 2.11 v2.11.0
Junio C Hamano [Tue, 29 Nov 2016 20:23:07 +0000 (12:23 -0800)] 
Git 2.11

Signed-off-by: Junio C Hamano <gitster@pobox.com>
7 years agoMerge branch 'jk/common-main'
Junio C Hamano [Tue, 29 Nov 2016 20:22:13 +0000 (12:22 -0800)] 
Merge branch 'jk/common-main'

Fix for a small regression in a topic already in 'master'.

* jk/common-main:
  common-main: stop munging argv[0] path

7 years agoMerge tag 'l10n-2.11.0-rnd3.1' of git://github.com/git-l10n/git-po
Junio C Hamano [Tue, 29 Nov 2016 19:36:11 +0000 (11:36 -0800)] 
Merge tag 'l10n-2.11.0-rnd3.1' of git://github.com/git-l10n/git-po

l10n-2.11.0-rnd3.1: update ru and ca translations

* tag 'l10n-2.11.0-rnd3.1' of git://github.com/git-l10n/git-po:
  l10n: ru.po: update Russian translation
  l10n: ca.po: update translation

7 years agocommon-main: stop munging argv[0] path
Jeff King [Sun, 27 Nov 2016 04:31:13 +0000 (23:31 -0500)] 
common-main: stop munging argv[0] path

Since 650c44925 (common-main: call git_extract_argv0_path(),
2016-07-01), the argv[0] that is seen in cmd_main() of
individual programs is always the basename of the
executable, as common-main strips off the full path. This
can produce confusing results for git-daemon, which wants to
re-exec itself.

For instance, if the program was originally run as
"/usr/lib/git/git-daemon", it will try just re-execing
"git-daemon", which will find the first instance in $PATH.
If git's exec-path has not been prepended to $PATH, we may
find the git-daemon from a different version (or no
git-daemon at all).

Normally this isn't a problem. Git commands are run as "git
daemon", the git wrapper puts the exec-path at the front of
$PATH, and argv[0] is already "daemon" anyway. But running
git-daemon via its full exec-path, while not really a
recommended method, did work prior to 650c44925. Let's make
it work again.

The real goal of 650c44925 was not to munge argv[0], but to
reliably set the argv0_path global. The only reason it
munges at all is that one caller, the git.c wrapper,
piggy-backed on that computation to find the command
basename.  Instead, let's leave argv[0] untouched in
common-main, and have git.c do its own basename computation.

While we're at it, let's drop the return value from
git_extract_argv0_path(). It was only ever used in this one
callsite, and its dual purposes is what led to this
confusion in the first place.

Note that by changing the interface, the compiler can
confirm for us that there are no other callers storing the
return value. But the compiler can't tell us whether any of
the cmd_main() functions (besides git.c) were relying on the
basename munging. However, we can observe that prior to
650c44925, no other cmd_main() functions did that munging,
and no new cmd_main() functions have been introduced since
then. So we can't be regressing any of those cases.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
7 years agoMerge branch 'russian-l10n' of https://github.com/DJm00n/git-po-ru
Jiang Xin [Tue, 29 Nov 2016 13:19:43 +0000 (21:19 +0800)] 
Merge branch 'russian-l10n' of https://github.com/DJm00n/git-po-ru

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

7 years agol10n: ru.po: update Russian translation
Dimitriy Ryazantcev [Tue, 29 Nov 2016 09:33:07 +0000 (11:33 +0200)] 
l10n: ru.po: update Russian translation

Signed-off-by: Dimitriy Ryazantcev <dimitriy.ryazantcev@gmail.com>
7 years agol10n: ca.po: update translation
Alex Henrie [Tue, 29 Nov 2016 03:06:25 +0000 (20:06 -0700)] 
l10n: ca.po: update translation

Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
7 years agoRelNotes: spelling and phrasing fixups
Marc Branchaud [Thu, 24 Nov 2016 16:59:00 +0000 (11:59 -0500)] 
RelNotes: spelling and phrasing fixups

Signed-off-by: Marc Branchaud <marcnarc@xiplink.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
7 years agoMerge tag 'l10n-2.11.0-rnd3' of git://github.com/git-l10n/git-po
Junio C Hamano [Mon, 28 Nov 2016 23:28:04 +0000 (15:28 -0800)] 
Merge tag 'l10n-2.11.0-rnd3' of git://github.com/git-l10n/git-po

l10n-2.11.0-rnd3

* tag 'l10n-2.11.0-rnd3' of git://github.com/git-l10n/git-po:
  l10n: de.po: translate 210 new messages
  l10n: fix unmatched single quote in error message

7 years agol10n: de.po: translate 210 new messages
Ralf Thielow [Wed, 2 Nov 2016 17:51:08 +0000 (18:51 +0100)] 
l10n: de.po: translate 210 new messages

Translate 210 new messages came from git.pot update in fda7b09
(l10n: git.pot: v2.11.0 round 1 (209 new, 53 removed)) and c091ffb
(l10n: git.pot: v2.11.0 round 2 (1 new, 1 removed)).

Signed-off-by: Ralf Thielow <ralf.thielow@gmail.com>
7 years agol10n: fix unmatched single quote in error message
Jiang Xin [Sun, 20 Nov 2016 12:26:17 +0000 (20:26 +0800)] 
l10n: fix unmatched single quote in error message

Translate one message introduced by commit:

 * 358718064b i18n: fix unmatched single quote in error message

Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
7 years agoGit 2.11-rc3 v2.11.0-rc3
Junio C Hamano [Wed, 23 Nov 2016 19:24:59 +0000 (11:24 -0800)] 
Git 2.11-rc3

Signed-off-by: Junio C Hamano <gitster@pobox.com>
7 years agoMerge branch 'jc/setup-cleanup-fix'
Junio C Hamano [Wed, 23 Nov 2016 19:23:17 +0000 (11:23 -0800)] 
Merge branch 'jc/setup-cleanup-fix'

"git archive" and "git mailinfo" stopped reading from local
configuration file with a recent update.

* jc/setup-cleanup-fix:
  archive: read local configuration
  mailinfo: read local configuration

7 years agoMerge branch 'jt/trailer-with-cruft'
Junio C Hamano [Wed, 23 Nov 2016 19:23:17 +0000 (11:23 -0800)] 
Merge branch 'jt/trailer-with-cruft'

Doc update.

* jt/trailer-with-cruft:
  doc: mention user-configured trailers

7 years agoMerge branch 'js/rebase-i-commentchar-fix'
Junio C Hamano [Wed, 23 Nov 2016 19:23:17 +0000 (11:23 -0800)] 
Merge branch 'js/rebase-i-commentchar-fix'

"git rebase -i" did not work well with core.commentchar
configuration variable for two reasons, both of which have been
fixed.

* js/rebase-i-commentchar-fix:
  rebase -i: handle core.commentChar=auto
  stripspace: respect repository config
  rebase -i: highlight problems with core.commentchar

7 years agoMerge branch 'jc/for-each-ref-head-segfault-fix'
Junio C Hamano [Wed, 23 Nov 2016 19:23:16 +0000 (11:23 -0800)] 
Merge branch 'jc/for-each-ref-head-segfault-fix'

Using a %(HEAD) placeholder in "for-each-ref --format=" option
caused the command to segfault when on an unborn branch.

* jc/for-each-ref-head-segfault-fix:
  for-each-ref: do not segv with %(HEAD) on an unborn branch

7 years agoMerge tag 'l10n-2.11.0-rnd2' of git://github.com/git-l10n/git-po
Junio C Hamano [Tue, 22 Nov 2016 22:16:06 +0000 (14:16 -0800)] 
Merge tag 'l10n-2.11.0-rnd2' of git://github.com/git-l10n/git-po

l10n-2.11.0-rnd2

* tag 'l10n-2.11.0-rnd2' of git://github.com/git-l10n/git-po:
  l10n: Fixed typo of git fetch-pack command
  l10n: git.pot: v2.11.0 round 2 (1 new, 1 removed)
  l10n: zh_CN: for git v2.11.0 l10n round 1
  l10n: pt_PT: update Portuguese translation
  l10n: fr.po fix grammar mistakes
  l10n: fr.po v2.11.0_rnd1
  l10n: sv.po: Update Swedish translation (2913t0f0u)
  l10n: vi.po: Updated translation to v2.11.0 (2913t)
  l10n: ko.po: Update Korean translation
  l10n: git.pot: v2.11.0 round 1 (209 new, 53 removed)
  l10n: ru.po: update Russian translation

7 years agoMerge branch 'js/prepare-sequencer'
Junio C Hamano [Tue, 22 Nov 2016 22:15:38 +0000 (14:15 -0800)] 
Merge branch 'js/prepare-sequencer'

Fix for an error message string.

* js/prepare-sequencer:
  i18n: fix unmatched single quote in error message

7 years agoarchive: read local configuration
Junio C Hamano [Tue, 22 Nov 2016 21:37:04 +0000 (13:37 -0800)] 
archive: read local configuration

Since b9605bc4f2 ("config: only read .git/config from configured
repos", 2016-09-12), we do not read from ".git/config" unless we
know we are in a repository.  "git archive" however didn't do the
repository discovery and instead relied on the old behaviour.

Teach the command to run a "gentle" version of repository discovery
so that local configuration variables are honoured.

[jc: stole tests from peff]
Signed-off-by: Junio C Hamano <gitster@pobox.com>
7 years agomailinfo: read local configuration
Junio C Hamano [Tue, 22 Nov 2016 21:13:16 +0000 (13:13 -0800)] 
mailinfo: read local configuration

Since b9605bc4f2 ("config: only read .git/config from configured
repos", 2016-09-12), we do not read from ".git/config" unless we
know we are in a repository.  "git mailinfo" however didn't do the
repository discovery and instead relied on the old behaviour.  This
was mostly OK because it was merely run as a helper program by other
porcelain scripts that first chdir's up to the root of the working
tree.

Teach the command to run a "gentle" version of repository discovery
so that local configuration variables like mailinfo.scissors are
honoured.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
7 years agol10n: Fixed typo of git fetch-pack command
Jiang Xin [Tue, 22 Nov 2016 14:24:59 +0000 (22:24 +0800)] 
l10n: Fixed typo of git fetch-pack command

Git 2.11.0-rc2 introduced one small l10n update, and this commit fixed
the affected translations all in one batch.

Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
7 years agol10n: git.pot: v2.11.0 round 2 (1 new, 1 removed)
Jiang Xin [Tue, 22 Nov 2016 14:22:59 +0000 (22:22 +0800)] 
l10n: git.pot: v2.11.0 round 2 (1 new, 1 removed)

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

Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
7 years agoMerge branch 'master' of git://github.com/git-l10n/git-po
Jiang Xin [Tue, 22 Nov 2016 14:08:47 +0000 (22:08 +0800)] 
Merge branch 'master' of git://github.com/git-l10n/git-po

* 'master' of git://github.com/git-l10n/git-po:
  l10n: zh_CN: for git v2.11.0 l10n round 1
  l10n: pt_PT: update Portuguese translation
  l10n: fr.po fix grammar mistakes
  l10n: fr.po v2.11.0_rnd1
  l10n: sv.po: Update Swedish translation (2913t0f0u)
  l10n: vi.po: Updated translation to v2.11.0 (2913t)
  l10n: ko.po: Update Korean translation
  l10n: git.pot: v2.11.0 round 1 (209 new, 53 removed)
  l10n: ru.po: update Russian translation

7 years agodoc: mention user-configured trailers
Jonathan Tan [Mon, 21 Nov 2016 20:47:21 +0000 (12:47 -0800)] 
doc: mention user-configured trailers

In commit 1462450 ("trailer: allow non-trailers in trailer block",
2016-10-21), functionality was added (and tested [1]) to allow
non-trailer lines in trailer blocks, as long as those blocks contain at
least one Git-generated or user-configured trailer, and consists of at
least 25% trailers. The documentation was updated to mention this new
functionality, but did not mention "user-configured trailer".

Further update the documentation to also mention "user-configured
trailer".

[1] "with non-trailer lines mixed with a configured trailer" in
t/t7513-interpret-trailers.sh

Signed-off-by: Jonathan Tan <jonathantanmy@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
7 years agorebase -i: handle core.commentChar=auto
Johannes Schindelin [Mon, 21 Nov 2016 14:18:29 +0000 (15:18 +0100)] 
rebase -i: handle core.commentChar=auto

When 84c9dc2 (commit: allow core.commentChar=auto for character auto
selection, 2014-05-17) extended the core.commentChar functionality to
allow for the value 'auto', it forgot that rebase -i was already taught to
handle core.commentChar, and in turn forgot to let rebase -i handle that
new value gracefully.

Reported by Taufiq Hoven.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
7 years agostripspace: respect repository config
Johannes Schindelin [Mon, 21 Nov 2016 14:18:24 +0000 (15:18 +0100)] 
stripspace: respect repository config

The way "git stripspace" reads the configuration was not quite
kosher, in that the code forgot to probe for a possibly existing
repository (note: stripspace is designed to be usable outside the
repository as well).  It read .git/config only when it was run from
the top-level of the working tree by accident.  A recent change
b9605bc4f2 ("config: only read .git/config from configured repos",
2016-09-12) stopped reading the repository-local configuration file
".git/config" unless the repository discovery process is done, so
that .git/config is never read even when run from the top-level,
exposing the old bug more.

When rebasing interactively with a commentChar defined in the
current repository's config, the help text at the bottom of the edit
script potentially used an incorrect comment character. This was not
only funny-looking, but also resulted in tons of warnings like this
one:

Warning: the command isn't recognized in the following line
 - #

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
7 years agorebase -i: highlight problems with core.commentchar
Johannes Schindelin [Mon, 21 Nov 2016 14:18:05 +0000 (15:18 +0100)] 
rebase -i: highlight problems with core.commentchar

The interactive rebase does not currently play well with
core.commentchar. Let's add some tests to highlight those problems
that will be fixed in the remainder of the series.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
7 years agoi18n: fix unmatched single quote in error message
Jiang Xin [Sun, 20 Nov 2016 12:26:17 +0000 (20:26 +0800)] 
i18n: fix unmatched single quote in error message

Fixed unmatched single quote introduced by commit:

 * f56fffef9a sequencer: teach write_message() to append an optional LF

Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
Acked-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
7 years agol10n: zh_CN: for git v2.11.0 l10n round 1
Jiang Xin [Thu, 27 Oct 2016 13:53:37 +0000 (21:53 +0800)] 
l10n: zh_CN: for git v2.11.0 l10n round 1

Update 209 translations (2913t0f0u) for git v2.11.0-rc0.

Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
7 years agofor-each-ref: do not segv with %(HEAD) on an unborn branch
Junio C Hamano [Fri, 18 Nov 2016 23:21:12 +0000 (15:21 -0800)] 
for-each-ref: do not segv with %(HEAD) on an unborn branch

The code to flip between "*" and " " prefixes depending on what
branch is checked out used in --format='%(HEAD)' did not consider
that HEAD may resolve to an unborn branch and dereferenced a NULL.

This will become a lot easier to trigger as the codepath will be
used to reimplement "git branch [--list]" in the future.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
7 years agoGit 2.11-rc2 v2.11.0-rc2
Junio C Hamano [Thu, 17 Nov 2016 21:47:36 +0000 (13:47 -0800)] 
Git 2.11-rc2

Signed-off-by: Junio C Hamano <gitster@pobox.com>
7 years agoMerge branch 'tk/diffcore-delta-remove-unused'
Junio C Hamano [Thu, 17 Nov 2016 21:45:22 +0000 (13:45 -0800)] 
Merge branch 'tk/diffcore-delta-remove-unused'

Code cleanup.

* tk/diffcore-delta-remove-unused:
  diffcore-delta: remove unused parameter to diffcore_count_changes()

7 years agoMerge branch 'jk/create-branch-remove-unused-param'
Junio C Hamano [Thu, 17 Nov 2016 21:45:21 +0000 (13:45 -0800)] 
Merge branch 'jk/create-branch-remove-unused-param'

Code clean-up.

* jk/create-branch-remove-unused-param:
  create_branch: drop unused "head" parameter

7 years agoMerge branch 'nd/worktree-lock'
Junio C Hamano [Thu, 17 Nov 2016 21:45:21 +0000 (13:45 -0800)] 
Merge branch 'nd/worktree-lock'

Typofix.

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

7 years agodiffcore-delta: remove unused parameter to diffcore_count_changes()
Tobias Klauser [Mon, 14 Nov 2016 13:39:05 +0000 (14:39 +0100)] 
diffcore-delta: remove unused parameter to diffcore_count_changes()

The delta_limit parameter to diffcore_count_changes() has been unused
since commit ba23bbc8e ("diffcore-delta: make change counter to byte
oriented again.", 2006-03-04).

Remove the parameter and adjust all callers.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
7 years agogit-worktree.txt: fix typo "to"/"two", and add comma
Ben North [Sat, 12 Nov 2016 08:55:16 +0000 (08:55 +0000)] 
git-worktree.txt: fix typo "to"/"two", and add comma

Signed-off-by: Ben North <ben@redfrontdoor.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
7 years agol10n: pt_PT: update Portuguese translation
Vasco Almeida [Sun, 6 Nov 2016 13:04:01 +0000 (12:04 -0100)] 
l10n: pt_PT: update Portuguese translation

Signed-off-by: Vasco Almeida <vascomalmeida@sapo.pt>
7 years agoGit 2.11.0-rc1 v2.11.0-rc1
Junio C Hamano [Fri, 11 Nov 2016 22:04:32 +0000 (14:04 -0800)] 
Git 2.11.0-rc1

Signed-off-by: Junio C Hamano <gitster@pobox.com>
7 years agoMerge branch 'rt/fetch-pack-error-message-fix'
Junio C Hamano [Fri, 11 Nov 2016 21:56:31 +0000 (13:56 -0800)] 
Merge branch 'rt/fetch-pack-error-message-fix'

An error message in fetch-pack executable that was newly marked for
translation was misspelt, which has been fixed.

* rt/fetch-pack-error-message-fix:
  fetch-pack.c: correct command at the beginning of an error message

7 years agoMerge branch 'ps/common-info-doc'
Junio C Hamano [Fri, 11 Nov 2016 21:56:31 +0000 (13:56 -0800)] 
Merge branch 'ps/common-info-doc'

Doc fix.

* ps/common-info-doc:
  doc: fix location of 'info/' with $GIT_COMMON_DIR

7 years agoMerge branch 'js/pwd-var-vs-pwd-cmd-fix'
Junio C Hamano [Fri, 11 Nov 2016 21:56:30 +0000 (13:56 -0800)] 
Merge branch 'js/pwd-var-vs-pwd-cmd-fix'

Last minute fixes to two fixups merged to 'master' recently.

* js/pwd-var-vs-pwd-cmd-fix:
  t0021, t5615: use $PWD instead of $(pwd) in PATH-like shell variables

7 years agoMerge branch 'ls/macos-update'
Junio C Hamano [Fri, 11 Nov 2016 21:56:30 +0000 (13:56 -0800)] 
Merge branch 'ls/macos-update'

Portability update and workaround for builds on recent Mac OS X.

* ls/macos-update:
  travis-ci: disable GIT_TEST_HTTPD for macOS
  Makefile: set NO_OPENSSL on macOS by default

7 years agoMerge branch 'js/prepare-sequencer'
Junio C Hamano [Fri, 11 Nov 2016 21:56:30 +0000 (13:56 -0800)] 
Merge branch 'js/prepare-sequencer'

Silence a clang warning introduced by a recently graduated topic.

* js/prepare-sequencer:
  sequencer: silence -Wtautological-constant-out-of-range-compare

7 years agoMerge branch 'ls/filter-process'
Junio C Hamano [Fri, 11 Nov 2016 21:56:30 +0000 (13:56 -0800)] 
Merge branch 'ls/filter-process'

Test portability improvements and optimization for an
already-graduated topic.

* ls/filter-process:
  t0021: remove debugging cruft

7 years agoMerge branch 'as/merge-attr-sleep'
Junio C Hamano [Fri, 11 Nov 2016 21:56:30 +0000 (13:56 -0800)] 
Merge branch 'as/merge-attr-sleep'

Fix for a racy false-positive test failure.

* as/merge-attr-sleep:
  t6026: clarify the point of "kill $(cat sleep.pid)"
  t6026: ensure that long-running script really is
  Revert "t6026-merge-attr: don't fail if sleep exits early"
  Revert "t6026-merge-attr: ensure that the merge driver was called"
  t6026-merge-attr: ensure that the merge driver was called
  t6026-merge-attr: don't fail if sleep exits early

7 years agofetch-pack.c: correct command at the beginning of an error message
Ralf Thielow [Fri, 11 Nov 2016 17:21:00 +0000 (18:21 +0100)] 
fetch-pack.c: correct command at the beginning of an error message

One error message in fetch-pack.c uses 'git fetch_pack' at the beginning
which is not a git command.  Use 'git fetch-pack' instead.

Signed-off-by: Ralf Thielow <ralf.thielow@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
7 years agot0021: remove debugging cruft
Junio C Hamano [Fri, 11 Nov 2016 21:07:37 +0000 (13:07 -0800)] 
t0021: remove debugging cruft

The redirection of the standard error stream to a temporary file is
a leftover cruft during debugging.  Remove it.

Besides, it is reported by folks on the Windows that the test is
flaky with this redirection; somebody gets confused and this
merely-redirected-to file gets marked as delete-pending by git.exe
and makes it finish with a non-zero exit status when "git checkout"
finishes.  Windows folks may want to figure that one out, but for
the purpose of this test, it shouldn't become a show-stopper.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
7 years agot6026: clarify the point of "kill $(cat sleep.pid)"
Johannes Sixt [Fri, 11 Nov 2016 20:24:44 +0000 (21:24 +0100)] 
t6026: clarify the point of "kill $(cat sleep.pid)"

We lengthened the time the leftover process sleeps in the previous
commit to make sure it will be there while 'git merge' runs and
finishes.  It therefore needs to be killed before leaving the test.
And it needs to be killed even when 'git merge' fails, so it has to
be triggered via test_when_finished mechanism.

Explain all that in a large comment, and move the use site of
test_when_finished to immediately before 'git merge' invocation,
where the process is spawned.

Signed-off-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
7 years agot0021, t5615: use $PWD instead of $(pwd) in PATH-like shell variables
Johannes Sixt [Fri, 11 Nov 2016 17:31:48 +0000 (18:31 +0100)] 
t0021, t5615: use $PWD instead of $(pwd) in PATH-like shell variables

We have to use $PWD instead of $(pwd) because on Windows the latter
would add a C: style path to bash's Unix-style $PATH variable, which
becomes confused by the colon after the drive letter. ($PWD is a
Unix-style path.)

In the case of GIT_ALTERNATE_OBJECT_DIRECTORIES, bash on Windows
assembles a Unix-style path list with the colon as separators. It
converts the value to a Windows-style path list with the semicolon as
path separator when it forwards the variable to git.exe. The same
confusion happens when bash's original value is contaminated with
Windows style paths.

Signed-off-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
7 years agodoc: fix location of 'info/' with $GIT_COMMON_DIR
Patrick Steinhardt [Fri, 11 Nov 2016 11:23:32 +0000 (12:23 +0100)] 
doc: fix location of 'info/' with $GIT_COMMON_DIR

With the introduction of the $GIT_COMMON_DIR variable, the
repository layout manual was changed to reflect the location for
many files in case the variable is set. While adding the new
locations, one typo snuck in regarding the location of the
'info/' folder, which is falsely claimed to reside at
"$GIT_COMMON_DIR/index".

Fix the typo to point to "$GIT_COMMON_DIR/info/" instead.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
7 years agot6026: ensure that long-running script really is
Johannes Schindelin [Wed, 9 Nov 2016 13:51:22 +0000 (14:51 +0100)] 
t6026: ensure that long-running script really is

When making sure that background tasks are cleaned up in 5babb5b
(t6026-merge-attr: clean up background process at end of test case,
2016-09-07), we considered to let the background task sleep longer, just
to be certain that it will still be running when we want to kill it
after the test.

Sadly, the assumption appears not to hold true that the test case passes
quickly enough to kill the background task within a second.

Simply increase it to an hour. No system can be possibly slow enough to
make above-mentioned assumption incorrect.

Reported by Andreas Schwab.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
7 years agoRevert "t6026-merge-attr: don't fail if sleep exits early"
Junio C Hamano [Thu, 10 Nov 2016 23:55:13 +0000 (15:55 -0800)] 
Revert "t6026-merge-attr: don't fail if sleep exits early"

This reverts commit 734fde2d7167e4b20d2ff6062ade3846949b0741.

The point of the test is that the stray process was still running
when 'git merge' did its thing through its completion, so a failure
to "kill" it means we didn't give a condition to the test to trigger
a possible future breakage.  Appending "|| :" to the "kill" is
sweeping a test-bug under the rug.

7 years agoRevert "t6026-merge-attr: ensure that the merge driver was called"
Junio C Hamano [Thu, 10 Nov 2016 23:54:12 +0000 (15:54 -0800)] 
Revert "t6026-merge-attr: ensure that the merge driver was called"

This reverts commit c1e0dc59bddce765761a6f863c66ee0cd4b2ca09.

We are not interested in the stray process in the merge driver
started; we want it to be still around.

7 years agoMerge branch 'jk/alt-odb-cleanup'
Junio C Hamano [Thu, 10 Nov 2016 21:17:30 +0000 (13:17 -0800)] 
Merge branch 'jk/alt-odb-cleanup'

Fix a corner-case regression in a topic that graduated during the
v2.11 cycle.

* jk/alt-odb-cleanup:
  alternates: re-allow relative paths from environment

7 years agoMerge branch 'jk/filter-process-fix'
Junio C Hamano [Thu, 10 Nov 2016 21:17:30 +0000 (13:17 -0800)] 
Merge branch 'jk/filter-process-fix'

Test portability improvements and cleanups for t0021.

* jk/filter-process-fix:
  t0021: fix filehandle usage on older perl
  t0021: use $PERL_PATH for rot13-filter.pl
  t0021: put $TEST_ROOT in $PATH
  t0021: use write_script to create rot13 shell script

7 years agoMerge branch 'ls/filter-process'
Junio C Hamano [Thu, 10 Nov 2016 21:17:30 +0000 (13:17 -0800)] 
Merge branch 'ls/filter-process'

Test portability improvements and optimization for an
already-graduated topic.

* ls/filter-process:
  t0021: compute file size with a single process instead of a pipeline
  t0021: expect more variations in the output of uniq -c

7 years agot6026-merge-attr: ensure that the merge driver was called
Andreas Schwab [Thu, 10 Nov 2016 08:31:18 +0000 (09:31 +0100)] 
t6026-merge-attr: ensure that the merge driver was called

Explicitly check for the existence of the pid file to test that the
merge driver was actually called.

Signed-off-by: Andreas Schwab <schwab@suse.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
7 years agotravis-ci: disable GIT_TEST_HTTPD for macOS
Lars Schneider [Mon, 17 Oct 2016 00:25:50 +0000 (17:25 -0700)] 
travis-ci: disable GIT_TEST_HTTPD for macOS

TravisCI changed their default macOS image from 10.10 to 10.11 [1].
Unfortunately the HTTPD tests do not run out of the box using the
pre-installed Apache web server anymore. Therefore we enable these
tests only for Linux and disable them for macOS.

[1] https://blog.travis-ci.com/2016-10-04-osx-73-default-image-live/

Signed-off-by: Lars Schneider <larsxschneider@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
7 years agoMakefile: set NO_OPENSSL on macOS by default
Lars Schneider [Sun, 6 Nov 2016 19:35:04 +0000 (20:35 +0100)] 
Makefile: set NO_OPENSSL on macOS by default

Apple removed the OpenSSL header files in macOS 10.11 and above. OpenSSL
was deprecated since macOS 10.7.

Set `NO_OPENSSL` and `APPLE_COMMON_CRYPTO` to `YesPlease` as default for
macOS. It is possible to override this and use OpenSSL by defining
`NO_APPLE_COMMON_CRYPTO`.

Original-patch-by: Torsten Bögershausen <tboegi@web.de>
Signed-off-by: Lars Schneider <larsxschneider@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
7 years agocreate_branch: drop unused "head" parameter
Jeff King [Fri, 4 Nov 2016 16:30:12 +0000 (12:30 -0400)] 
create_branch: drop unused "head" parameter

This function used to have the caller pass in the current
value of HEAD, in order to make sure we didn't clobber HEAD.
In 55c4a6730, that logic moved to validate_new_branchname(),
which just resolves HEAD itself. The parameter to
create_branch is now unused.

Since we have to update and re-wrap the docstring describing
the parameters anyway, let's take this opportunity to break
it out into a list, which makes it easier to find the
parameters.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
7 years agoMerge branch 'fr_v2.11.0_rnd1' of git://github.com/jnavila/git
Jiang Xin [Wed, 9 Nov 2016 14:54:19 +0000 (22:54 +0800)] 
Merge branch 'fr_v2.11.0_rnd1' of git://github.com/jnavila/git

* 'fr_v2.11.0_rnd1' of git://github.com/jnavila/git:
  l10n: fr.po fix grammar mistakes
  l10n: fr.po v2.11.0_rnd1

7 years agosequencer: silence -Wtautological-constant-out-of-range-compare
Jeff King [Wed, 9 Nov 2016 03:57:28 +0000 (22:57 -0500)] 
sequencer: silence -Wtautological-constant-out-of-range-compare

When clang compiles sequencer.c, it complains:

  sequencer.c:632:14: warning: comparison of constant 2 with
    expression of type 'const enum todo_command' is always
    true [-Wtautological-constant-out-of-range-compare]
          if (command < ARRAY_SIZE(todo_command_strings))

This is because "command" is an enum that may only have two
values (0 and 1) and the array in question has two elements.

As it turns out, clang is actually wrong here, at least
according to its own bug tracker:

  https://llvm.org/bugs/show_bug.cgi?id=16154

But it's still worth working around this, as the warning is
present with -Wall, meaning we fail compilation with "make
DEVELOPER=1".

Casting the enum to size_t sufficiently unconfuses clang. As
a bonus, it also catches any possible out-of-bounds access
if the enum takes on a negative value (which shouldn't
happen either, but again, this is a defensive check).

Signed-off-by: Jeff King <peff@peff.net>
7 years agot6026-merge-attr: don't fail if sleep exits early
Andreas Schwab [Tue, 8 Nov 2016 17:03:04 +0000 (18:03 +0100)] 
t6026-merge-attr: don't fail if sleep exits early

Commit 5babb5bdb3 ("t6026-merge-attr: clean up background process at end
of test case") added a kill command to clean up after the test, but this
can fail if the sleep command exits before the cleanup is executed.
Ignore the error from the kill command.

Signed-off-by: Andreas Schwab <schwab@suse.de>
Signed-off-by: Jeff King <peff@peff.net>
7 years agoalternates: re-allow relative paths from environment
Jeff King [Tue, 8 Nov 2016 04:50:17 +0000 (23:50 -0500)] 
alternates: re-allow relative paths from environment

Commit 670c359da (link_alt_odb_entry: handle normalize_path
errors, 2016-10-03) regressed the handling of relative paths
in the GIT_ALTERNATE_OBJECT_DIRECTORIES variable. It's not
entirely clear this was ever meant to work, but it _has_
worked for several years, so this commit restores the
original behavior.

When we get a path in GIT_ALTERNATE_OBJECT_DIRECTORIES, we
add it the path to the list of alternate object directories
as if it were found in objects/info/alternates, but with one
difference: we do not provide the link_alt_odb_entry()
function with a base for relative paths. That function
doesn't turn it into an absolute path, and we end up feeding
the relative path to the strbuf_normalize_path() function.

Most relative paths break out of the top-level directory
(e.g., "../foo.git/objects"), and thus normalizing fails.
Prior to 670c359da, we simply ignored the error, and due to
the way normalize_path_copy() was implemented it happened to
return the original path in this case. We then accessed the
alternate objects using this relative path.

By storing the relative path in the alt_odb list, the path
is relative to wherever we happen to be at the time we do an
object lookup. That means we look from $GIT_DIR in a bare
repository, and from the top of the worktree in a non-bare
repository.

If this were being designed from scratch, it would make
sense to pick a stable location (probably $GIT_DIR, or even
the object directory) and use that as the relative base,
turning the result into an absolute path.  However, given
the history, at this point the minimal fix is to match the
pre-670c359da behavior.

We can do this simply by ignoring the error when we have no
relative base and using the original value (which we now
reliably have, thanks to strbuf_normalize_path()).

That still leaves us with a relative path that foils our
duplicate detection, and may act strangely if we ever
chdir() later in the process. We could solve that by storing
an absolute path based on getcwd(). That may be a good
future direction; for now we'll do just the minimum to fix
the regression.

The new t5615 script demonstrates the fix in its final three
tests. Since we didn't have any tests of the alternates
environment variable at all, it also adds some tests of
absolute paths.

Reported-by: Bryan Turner <bturner@atlassian.com>
Signed-off-by: Jeff King <peff@peff.net>
7 years agot0021: compute file size with a single process instead of a pipeline
Johannes Sixt [Sun, 6 Nov 2016 19:31:19 +0000 (20:31 +0100)] 
t0021: compute file size with a single process instead of a pipeline

Avoid unwanted coding patterns (prodigal use of pipelines), and in
particular a useless use of cat.

Signed-off-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Jeff King <peff@peff.net>
7 years agot0021: expect more variations in the output of uniq -c
Johannes Sixt [Thu, 3 Nov 2016 20:12:13 +0000 (21:12 +0100)] 
t0021: expect more variations in the output of uniq -c

Some versions of uniq -c write the count left-justified, other version
write it right-justified. Be prepared for both kinds.

Signed-off-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Jeff King <peff@peff.net>
7 years agol10n: fr.po fix grammar mistakes
jfbu [Sun, 6 Nov 2016 10:10:50 +0000 (11:10 +0100)] 
l10n: fr.po fix grammar mistakes

Signed-off-by: Jean-Noel Avila <jn.avila@free.fr>
Signed-off-by: jfbu <jfbu@free.fr>
7 years agol10n: fr.po v2.11.0_rnd1
Jean-Noel Avila [Sat, 5 Nov 2016 20:43:53 +0000 (21:43 +0100)] 
l10n: fr.po v2.11.0_rnd1

Signed-off-by: Jean-Noel Avila <jn.avila@free.fr>
7 years agol10n: sv.po: Update Swedish translation (2913t0f0u)
Peter Krefting [Sat, 5 Nov 2016 15:02:45 +0000 (16:02 +0100)] 
l10n: sv.po: Update Swedish translation (2913t0f0u)

Signed-off-by: Peter Krefting <peter@softwolves.pp.se>
7 years agoMerge branch 'ko/merge-l10n' of https://github.com/changwoo/git-l10n-ko
Jiang Xin [Sat, 5 Nov 2016 12:09:16 +0000 (20:09 +0800)] 
Merge branch 'ko/merge-l10n' of https://github.com/changwoo/git-l10n-ko

* 'ko/merge-l10n' of https://github.com/changwoo/git-l10n-ko:
  l10n: ko.po: Update Korean translation