]> git.ipfire.org Git - thirdparty/git.git/log
thirdparty/git.git
7 years agouse COPY_ARRAY
René Scharfe [Sun, 25 Sep 2016 07:24:03 +0000 (09:24 +0200)] 
use COPY_ARRAY

Add a semantic patch for converting certain calls of memcpy(3) to
COPY_ARRAY() and apply that transformation to the code base.  The result
is
 shorter and safer code.  For now only consider calls where source and
destination have the same type, or in other words: easy cases.

Signed-off-by: Rene Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
7 years agoadd COPY_ARRAY
René Scharfe [Sun, 25 Sep 2016 07:15:42 +0000 (09:15 +0200)] 
add COPY_ARRAY

Add COPY_ARRAY, a safe and convenient helper for copying arrays,
complementing ALLOC_ARRAY and REALLOC_ARRAY.  Users just specify source,
destination and the number of elements; the size of an element is
inferred automatically.

It checks if the multiplication of size and element count overflows.
The inferred size is passed first to st_mult, which allows the division
there to be done at compilation time.

As a basic type safety check it makes sure the sizes of source and
destination elements are the same.  That's evaluated at compilation time
as well.

COPY_ARRAY is safe to use with NULL as source pointer iff 0 elements are
to be copied.  That convention is used in some cases for initializing
arrays.  Raw memcpy(3) does not support it -- compilers are allowed to
assume that only valid pointers are passed to it and can optimize away
NULL checks after such a call.

Signed-off-by: Rene Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
7 years agoMerge branch 'bc/cocci'
Junio C Hamano [Tue, 19 Jul 2016 20:22:16 +0000 (13:22 -0700)] 
Merge branch 'bc/cocci'

Conversion from unsigned char sha1[20] to struct object_id
continues.

* bc/cocci:
  diff: convert prep_temp_blob() to struct object_id
  merge-recursive: convert merge_recursive_generic() to object_id
  merge-recursive: convert leaf functions to use struct object_id
  merge-recursive: convert struct merge_file_info to object_id
  merge-recursive: convert struct stage_data to use object_id
  diff: rename struct diff_filespec's sha1_valid member
  diff: convert struct diff_filespec to struct object_id
  coccinelle: apply object_id Coccinelle transformations
  coccinelle: convert hashcpy() with null_sha1 to hashclr()
  contrib/coccinelle: add basic Coccinelle transforms
  hex: add oid_to_hex_r()

7 years agoMerge branch 'js/log-to-diffopt-file'
Junio C Hamano [Tue, 19 Jul 2016 20:22:15 +0000 (13:22 -0700)] 
Merge branch 'js/log-to-diffopt-file'

The commands in the "log/diff" family have had an FILE* pointer in the
data structure they pass around for a long time, but some codepaths
used to always write to the standard output.  As a preparatory step
to make "git format-patch" available to the internal callers, these
codepaths have been updated to consistently write into that FILE*
instead.

* js/log-to-diffopt-file:
  mingw: fix the shortlog --output=<file> test
  diff: do not color output when --color=auto and --output=<file> is given
  t4211: ensure that log respects --output=<file>
  shortlog: respect the --output=<file> setting
  format-patch: use stdout directly
  format-patch: avoid freopen()
  format-patch: explicitly switch off color when writing to files
  shortlog: support outputting to streams other than stdout
  graph: respect the diffopt.file setting
  line-log: respect diffopt's configured output file stream
  log-tree: respect diffopt's configured output file stream
  log: prepare log/log-tree to reuse the diffopt.close_file attribute

7 years agoMerge branch 'sb/submodule-parallel-fetch'
Junio C Hamano [Tue, 19 Jul 2016 20:22:14 +0000 (13:22 -0700)] 
Merge branch 'sb/submodule-parallel-fetch'

Fix recently introduced codepaths that are involved in parallel
submodule operations, which gave up on reading too early, and
could have wasted CPU while attempting to write under a corner
case condition.

* sb/submodule-parallel-fetch:
  hoist out handle_nonblock function for xread and xwrite
  xwrite: poll on non-blocking FDs
  xread: retry after poll on EAGAIN/EWOULDBLOCK

7 years agoMerge branch 'lf/recv-sideband-cleanup'
Junio C Hamano [Tue, 19 Jul 2016 20:22:14 +0000 (13:22 -0700)] 
Merge branch 'lf/recv-sideband-cleanup'

Code simplification.

* lf/recv-sideband-cleanup:
  sideband.c: small optimization of strbuf usage
  sideband.c: refactor recv_sideband()

7 years agoMerge branch 'dk/blame-move-no-reason-for-1-line-context'
Junio C Hamano [Tue, 19 Jul 2016 20:22:12 +0000 (13:22 -0700)] 
Merge branch 'dk/blame-move-no-reason-for-1-line-context'

"git blame -M" missed a single line that was moved within the file.

* dk/blame-move-no-reason-for-1-line-context:
  blame: require 0 context lines while finding moved lines with -M

7 years agoMerge branch 'nd/connect-ssh-command-config'
Junio C Hamano [Tue, 19 Jul 2016 20:22:12 +0000 (13:22 -0700)] 
Merge branch 'nd/connect-ssh-command-config'

A new configuration variable core.sshCommand has been added to
specify what value for GIT_SSH_COMMAND to use per repository.

* nd/connect-ssh-command-config:
  connect: read $GIT_SSH_COMMAND from config file

7 years agoarchive-tar: huge offset and future timestamps would not work on 32-bit
Junio C Hamano [Thu, 14 Jul 2016 20:04:43 +0000 (13:04 -0700)] 
archive-tar: huge offset and future timestamps would not work on 32-bit

As we are not yet moving everything to size_t but still using ulong
internally when talking about the size of object, platforms with
32-bit long will not be able to produce tar archive with 4GB+ file,
and cannot grok 077777777777UL as a constant.  Disable the extended
header feature and do not test it on them.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
7 years agoSync with 2.9.2
Junio C Hamano [Fri, 15 Jul 2016 17:49:23 +0000 (10:49 -0700)] 
Sync with 2.9.2

* maint:
  Git 2.9.2
  t0006: skip "far in the future" test when unsigned long is not long enough

7 years agoGit 2.9.2 v2.9.2
Junio C Hamano [Fri, 15 Jul 2016 17:48:16 +0000 (10:48 -0700)] 
Git 2.9.2

Signed-off-by: Junio C Hamano <gitster@pobox.com>
7 years agoMerge branch 'jk/tzoffset-fix' into maint
Junio C Hamano [Fri, 15 Jul 2016 16:43:42 +0000 (09:43 -0700)] 
Merge branch 'jk/tzoffset-fix' into maint

Skip tests that are unrunnable on platforms without 64-bit long
to avoid unnecessary test failures.

* jk/tzoffset-fix:
  t0006: skip "far in the future" test when unsigned long is not long enough

7 years agot0006: skip "far in the future" test when unsigned long is not long enough
Jeff King [Mon, 11 Jul 2016 23:54:18 +0000 (19:54 -0400)] 
t0006: skip "far in the future" test when unsigned long is not long enough

Git's source code refers to timestamps as unsigned longs.  On 32-bit
platforms, as well as on Windows, unsigned long is not large enough
to capture dates that are "absurdly far in the future".

While we can fix this issue properly by replacing unsigned long with
a larger type, we want to be a bit more conservative and just skip
those tests on the maint track.

Signed-off-by: Jeff King <peff@peff.net>
Helped-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
7 years agoMerge branch 'jk/upload-pack-hook'
Junio C Hamano [Thu, 14 Jul 2016 17:38:57 +0000 (10:38 -0700)] 
Merge branch 'jk/upload-pack-hook'

A hot-fix to make a test working in mingw again.

* jk/upload-pack-hook:
  mingw: fix regression in t1308-config-set

7 years agomingw: fix regression in t1308-config-set
Johannes Schindelin [Thu, 14 Jul 2016 13:58:59 +0000 (15:58 +0200)] 
mingw: fix regression in t1308-config-set

When we tried to fix in 58461bd (t1308: do not get fooled by symbolic
links to the source tree, 2016-06-02) an obscure case where the user
cd's into Git's source code via a symbolic link, a regression was
introduced that affects all test runs on Windows.

The original patch introducing the test case in question was careful to
use `$(pwd)` instead of `$PWD`.

This was done to account for the fact that Git's test suite uses shell
scripting even on Windows, where the shell's Unix-y paths are
incompatible with the main Git executable's idea of paths: it only
accepts Windows paths.

It is an awkward but necessary thing, then, to use `$(pwd)` (which gives
us a Windows path) when interacting with the Git executable and `$PWD`
(which gives the shell's idea of the current working directory in Unix-y
form) for shell scripts, including the test suite itself.

Obviously this broke the use case of the Git maintainer when changing
the working directory into Git's source code directory via a symlink,
i.e. when `$(pwd)` does not agree with `$PWD`.

However, we must not fix that use case at the expense of regressing
another use case.

Let's special-case Windows here, even if it is ugly, for lack of a more
elegant solution.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
7 years agoFifth batch of topics for 2.10
Junio C Hamano [Wed, 13 Jul 2016 18:26:49 +0000 (11:26 -0700)] 
Fifth batch of topics for 2.10

Signed-off-by: Junio C Hamano <gitster@pobox.com>
7 years agoMerge branch 'jk/big-and-future-archive-tar'
Junio C Hamano [Wed, 13 Jul 2016 18:24:18 +0000 (11:24 -0700)] 
Merge branch 'jk/big-and-future-archive-tar'

"git archive" learned to handle files that are larger than 8GB and
commits far in the future than expressible by the traditional US-TAR
format.

* jk/big-and-future-archive-tar:
  archive-tar: drop return value
  archive-tar: write extended headers for far-future mtime
  archive-tar: write extended headers for file sizes >= 8GB
  t5000: test tar files that overflow ustar headers
  t9300: factor out portable "head -c" replacement

7 years agoMerge branch 'nd/ita-cleanup'
Junio C Hamano [Wed, 13 Jul 2016 18:24:17 +0000 (11:24 -0700)] 
Merge branch 'nd/ita-cleanup'

Git does not know what the contents in the index should be for a
path added with "git add -N" yet, so "git grep --cached" should not
show hits (or show lack of hits, with -L) in such a path, but that
logic does not apply to "git grep", i.e. searching in the working
tree files.  But we did so by mistake, which has been corrected.

* nd/ita-cleanup:
  grep: fix grepping for "intent to add" files
  t7810-grep.sh: fix a whitespace inconsistency
  t7810-grep.sh: fix duplicated test name

7 years agoMerge branch 'ps/rebase-i-auto-unstash-upon-abort'
Junio C Hamano [Wed, 13 Jul 2016 18:24:16 +0000 (11:24 -0700)] 
Merge branch 'ps/rebase-i-auto-unstash-upon-abort'

"git rebase -i --autostash" did not restore the auto-stashed change
when the operation was aborted.

* ps/rebase-i-auto-unstash-upon-abort:
  rebase -i: restore autostash on abort

7 years agoMerge branch 'js/t3404-grammo-fix'
Junio C Hamano [Wed, 13 Jul 2016 18:24:16 +0000 (11:24 -0700)] 
Merge branch 'js/t3404-grammo-fix'

Grammofix.

* js/t3404-grammo-fix:
  t3404: fix a grammo (commands are ran -> commands are run)

7 years agoMerge branch 'js/sign-empty-commit-fix'
Junio C Hamano [Wed, 13 Jul 2016 18:24:14 +0000 (11:24 -0700)] 
Merge branch 'js/sign-empty-commit-fix'

"git commit --amend --allow-empty-message -S" for a commit without
any message body could have misidentified where the header of the
commit object ends.

* js/sign-empty-commit-fix:
  commit -S: avoid invalid pointer with empty message

7 years agoMerge branch 'mm/doc-tt'
Junio C Hamano [Wed, 13 Jul 2016 18:24:14 +0000 (11:24 -0700)] 
Merge branch 'mm/doc-tt'

More mark-up updates to typeset strings that are expected to
literally typed by the end user in fixed-width font.

* mm/doc-tt:
  doc: typeset HEAD and variants as literal
  CodingGuidelines: formatting HEAD in documentation
  doc: typeset long options with argument as literal
  doc: typeset '--' as literal
  doc: typeset long command-line options as literal
  doc: typeset short command-line options as literal
  Documentation/git-mv.txt: fix whitespace indentation

7 years agoMerge branch 'dg/subtree-rebase-test'
Junio C Hamano [Wed, 13 Jul 2016 18:24:13 +0000 (11:24 -0700)] 
Merge branch 'dg/subtree-rebase-test'

Add a test to specify the desired behaviour that currently is not
available in "git rebase -Xsubtree=...".

* dg/subtree-rebase-test:
  contrib/subtree: Add a test for subtree rebase that loses commits

7 years agoMerge branch 'nd/doc-new-command'
Junio C Hamano [Wed, 13 Jul 2016 18:24:12 +0000 (11:24 -0700)] 
Merge branch 'nd/doc-new-command'

Typofix in a doc.

* nd/doc-new-command:
  new-command.txt: correct the command description file

7 years agoMerge branch 'ew/gc-auto-pack-limit-fix'
Junio C Hamano [Wed, 13 Jul 2016 18:24:12 +0000 (11:24 -0700)] 
Merge branch 'ew/gc-auto-pack-limit-fix'

"gc.autoPackLimit" when set to 1 should not trigger a repacking
when there is only one pack, but the code counted poorly and did
so.

* ew/gc-auto-pack-limit-fix:
  gc: fix off-by-one error with gc.autoPackLimit

7 years agoMerge branch 'ah/unpack-trees-advice-messages'
Junio C Hamano [Wed, 13 Jul 2016 18:24:11 +0000 (11:24 -0700)] 
Merge branch 'ah/unpack-trees-advice-messages'

Grammofix.

* ah/unpack-trees-advice-messages:
  unpack-trees: fix English grammar in do-this-before-that messages

7 years agoMerge branch 'va/i18n-even-more'
Junio C Hamano [Wed, 13 Jul 2016 18:24:10 +0000 (11:24 -0700)] 
Merge branch 'va/i18n-even-more'

More markings of messages for i18n, with updates to various tests
to pass GETTEXT_POISON tests.

One patch from the original submission dropped due to conflicts
with jk/upload-pack-hook, which is still in flux.

* va/i18n-even-more: (38 commits)
  t5541: become resilient to GETTEXT_POISON
  i18n: branch: mark comment when editing branch description for translation
  i18n: unmark die messages for translation
  i18n: submodule: escape shell variables inside eval_gettext
  i18n: submodule: join strings marked for translation
  i18n: init-db: join message pieces
  i18n: remote: allow translations to reorder message
  i18n: remote: mark URL fallback text for translation
  i18n: standardise messages
  i18n: sequencer: add period to error message
  i18n: merge: change command option help to lowercase
  i18n: merge: mark messages for translation
  i18n: notes: mark options for translation
  i18n: notes: mark strings for translation
  i18n: transport-helper.c: change N_() call to _()
  i18n: bisect: mark strings for translation
  t5523: use test_i18ngrep for negation
  t4153: fix negated test_i18ngrep call
  t9003: become resilient to GETTEXT_POISON
  tests: unpack-trees: update to use test_i18n* functions
  ...

7 years agomingw: fix the shortlog --output=<file> test
Johannes Schindelin [Mon, 11 Jul 2016 13:11:37 +0000 (15:11 +0200)] 
mingw: fix the shortlog --output=<file> test

Adjust t4201 to pass on Windows; a couple of test cases need to be
skipped on Windows which leads to a different shortlog than on Linux.

Let's just fix that by limiting the shortlog's commit range to traverse
only one commit: that guarantees that it does not matter how many test
cases were skipped.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
7 years agoSync with v2.9.1
Junio C Hamano [Mon, 11 Jul 2016 17:46:39 +0000 (10:46 -0700)] 
Sync with v2.9.1

* maint:
  Git 2.9.1

7 years agoGit 2.9.1 v2.9.1
Junio C Hamano [Mon, 11 Jul 2016 17:45:50 +0000 (10:45 -0700)] 
Git 2.9.1

Signed-off-by: Junio C Hamano <gitster@pobox.com>
7 years agoMerge branch 'jc/t2300-setup' into maint
Junio C Hamano [Mon, 11 Jul 2016 17:44:19 +0000 (10:44 -0700)] 
Merge branch 'jc/t2300-setup' into maint

Portability fix for Windows.

* jc/t2300-setup:
  t2300: "git --exec-path" is not usable in $PATH on Windows as-is

7 years agoMerge branch 'cb/t7810-test-label-fix' into maint
Junio C Hamano [Mon, 11 Jul 2016 17:44:18 +0000 (10:44 -0700)] 
Merge branch 'cb/t7810-test-label-fix' into maint

Test clean-up.

* cb/t7810-test-label-fix:
  t7810: fix duplicated test title

7 years agoMerge branch 'sb/t5614-modernize' into maint
Junio C Hamano [Mon, 11 Jul 2016 17:44:17 +0000 (10:44 -0700)] 
Merge branch 'sb/t5614-modernize' into maint

Test clean-up.

* sb/t5614-modernize:
  t5614: don't use subshells

7 years agoMerge branch 'jn/preformatted-doc-url' into maint
Junio C Hamano [Mon, 11 Jul 2016 17:44:16 +0000 (10:44 -0700)] 
Merge branch 'jn/preformatted-doc-url' into maint

The top level documentation "git help git" still pointed at the
documentation set hosted at now-defunct google-code repository.
Update it to point to https://git.github.io/htmldocs/git.html
instead.

* jn/preformatted-doc-url:
  doc: git-htmldocs.googlecode.com is no more

7 years agoMerge branch 'ao/p4-has-branch-prefix-fix' into maint
Junio C Hamano [Mon, 11 Jul 2016 17:44:16 +0000 (10:44 -0700)] 
Merge branch 'ao/p4-has-branch-prefix-fix' into maint

A bug, which caused "git p4" while running under verbose mode to
report paths that are omitted due to branch prefix incorrectly, has
been fixed; the command said "Ignoring file outside of prefix" for
paths that are _inside_.

* ao/p4-has-branch-prefix-fix:
  git-p4: correct hasBranchPrefix verbose output

7 years agoMerge branch 'js/perf-on-apple' into maint
Junio C Hamano [Mon, 11 Jul 2016 17:44:15 +0000 (10:44 -0700)] 
Merge branch 'js/perf-on-apple' into maint

t/perf needs /usr/bin/time with GNU extension; the invocation of it
is updated to "gtime" on Darwin.

* js/perf-on-apple:
  perf: accommodate for MacOSX

7 years agoMerge branch 'ak/t7800-wo-readlink' into maint
Junio C Hamano [Mon, 11 Jul 2016 17:44:15 +0000 (10:44 -0700)] 
Merge branch 'ak/t7800-wo-readlink' into maint

One among four invocations of readlink(1) in our test suite has
been rewritten so that the test can run on systems without the
command (others are in valgrind test framework and t9802).

* ak/t7800-wo-readlink:
  t7800: readlink may not be available

7 years agoMerge branch 'jk/tzoffset-fix' into maint
Junio C Hamano [Mon, 11 Jul 2016 17:44:14 +0000 (10:44 -0700)] 
Merge branch 'jk/tzoffset-fix' into maint

The internal code used to show local timezone offset is not
prepared to handle timestamps beyond year 2100, and gave a
bogus offset value to the caller.  Use a more benign looking
+0000 instead and let "git log" going in such a case, instead
of aborting.

* jk/tzoffset-fix:
  local_tzoffset: detect errors from tm_to_time_t
  t0006: test various date formats
  t0006: rename test-date's "show" to "relative"

7 years agoMerge branch 'js/mingw-parameter-less-c-functions' into maint
Junio C Hamano [Mon, 11 Jul 2016 17:44:13 +0000 (10:44 -0700)] 
Merge branch 'js/mingw-parameter-less-c-functions' into maint

Some platform-specific code had non-ANSI strict declarations of C
functions that do not take any parameters, which has been
corrected.

* js/mingw-parameter-less-c-functions:
  mingw: let the build succeed with DEVELOPER=1

7 years agoMerge branch 'lc/shell-default-value-noexpand' into maint
Junio C Hamano [Mon, 11 Jul 2016 17:44:13 +0000 (10:44 -0700)] 
Merge branch 'lc/shell-default-value-noexpand' into maint

Fix unnecessarily waste in the idiomatic use of ': ${VAR=default}'
to set the default value, without enclosing it in double quotes.

* lc/shell-default-value-noexpand:
  sh-setup: enclose setting of ${VAR=default} in double-quotes

7 years agoMerge branch 'sb/clone-shallow-passthru' into maint
Junio C Hamano [Mon, 11 Jul 2016 17:44:12 +0000 (10:44 -0700)] 
Merge branch 'sb/clone-shallow-passthru' into maint

Fix an unintended regression in v2.9 that breaks "clone --depth"
that recurses down to submodules by forcing the submodules to also
be cloned shallowly, which many server instances that host upstream
of the submodules are not prepared for.

* sb/clone-shallow-passthru:
  clone: do not let --depth imply --shallow-submodules

7 years agoMerge branch 'mg/signature-doc' into maint
Junio C Hamano [Mon, 11 Jul 2016 17:44:11 +0000 (10:44 -0700)] 
Merge branch 'mg/signature-doc' into maint

Formats of the various data (and how to validate them) where we use
GPG signature have been documented.

* mg/signature-doc:
  Documentation/technical: signed merge tag format
  Documentation/technical: signed commit format
  Documentation/technical: signed tag format
  Documentation/technical: describe signature formats

7 years agoMerge branch 'jk/bisect-show-tree' into maint
Junio C Hamano [Mon, 11 Jul 2016 17:44:11 +0000 (10:44 -0700)] 
Merge branch 'jk/bisect-show-tree' into maint

"git bisect" makes an internal call to "git diff-tree" when
bisection finds the culprit, but this call did not initialize the
data structure to pass to the diff-tree API correctly.

* jk/bisect-show-tree:
  bisect: always call setup_revisions after init_revisions

7 years agoMerge branch 'km/fetch-do-not-free-remote-name' into maint
Junio C Hamano [Mon, 11 Jul 2016 17:44:10 +0000 (10:44 -0700)] 
Merge branch 'km/fetch-do-not-free-remote-name' into maint

The ownership rule for the piece of memory that hold references to
be fetched in "git fetch" was screwy, which has been cleaned up.

* km/fetch-do-not-free-remote-name:
  builtin/fetch.c: don't free remote->name after fetch

7 years agoMerge branch 'nd/graph-width-padded' into maint
Junio C Hamano [Mon, 11 Jul 2016 17:44:09 +0000 (10:44 -0700)] 
Merge branch 'nd/graph-width-padded' into maint

"log --graph --format=" learned that "%>|(N)" specifies the width
relative to the terminal's left edge, not relative to the area to
draw text that is to the right of the ancestry-graph section.  It
also now accepts negative N that means the column limit is relative
to the right border.

* nd/graph-width-padded:
  pretty.c: support <direction>|(<negative number>) forms
  pretty: pass graph width to pretty formatting for use in '%>|(N)'

7 years agoMerge branch 'jk/add-i-diff-compact-heuristics' into maint
Junio C Hamano [Mon, 11 Jul 2016 17:44:09 +0000 (10:44 -0700)] 
Merge branch 'jk/add-i-diff-compact-heuristics' into maint

"git add -i/-p" learned to honor diff.compactionHeuristic
experimental knob, so that the user can work on the same hunk split
as "git diff" output.

* jk/add-i-diff-compact-heuristics:
  add--interactive: respect diff.compactionHeuristic

7 years agoFourth batch of topics for 2.10
Junio C Hamano [Mon, 11 Jul 2016 17:36:29 +0000 (10:36 -0700)] 
Fourth batch of topics for 2.10

Signed-off-by: Junio C Hamano <gitster@pobox.com>
7 years agoMerge branch 'master' of git://bogomips.org/git-svn
Junio C Hamano [Mon, 11 Jul 2016 17:31:52 +0000 (10:31 -0700)] 
Merge branch 'master' of git://bogomips.org/git-svn

* 'master' of git://bogomips.org/git-svn:
  git-svn: warn instead of dying when commit data is missing
  git-svn: clone: Fail on missing url argument

7 years agoMerge branch 'js/color-on-windows-comment'
Junio C Hamano [Mon, 11 Jul 2016 17:31:09 +0000 (10:31 -0700)] 
Merge branch 'js/color-on-windows-comment'

For a long time, we carried an in-code comment that said our
colored output would work only when we use fprintf/fputs on
Windows, which no longer is the case for the past few years.

* js/color-on-windows-comment:
  color.h: remove obsolete comment about limitations on Windows

7 years agoMerge branch 'mj/log-show-signature-conf'
Junio C Hamano [Mon, 11 Jul 2016 17:31:08 +0000 (10:31 -0700)] 
Merge branch 'mj/log-show-signature-conf'

"git log" learns log.showSignature configuration variable, and a
command line option "--no-show-signature" to countermand it.

* mj/log-show-signature-conf:
  log: add log.showSignature configuration variable
  log: add "--no-show-signature" command line option
  t4202: refactor test

7 years agoMerge branch 'js/find-commit-subject-ignore-leading-blanks'
Junio C Hamano [Mon, 11 Jul 2016 17:31:07 +0000 (10:31 -0700)] 
Merge branch 'js/find-commit-subject-ignore-leading-blanks'

A helper function that takes the contents of a commit object and
finds its subject line did not ignore leading blank lines, as is
commonly done by other codepaths.  Make it ignore leading blank
lines to match.

* js/find-commit-subject-ignore-leading-blanks:
  reset --hard: skip blank lines when reporting the commit subject
  sequencer: use skip_blank_lines() to find the commit subject
  commit -C: skip blank lines at the beginning of the message
  commit.c: make find_commit_subject() more robust
  pretty: make the skip_blank_lines() function public

7 years agoMerge branch 'jn/preformatted-doc-url'
Junio C Hamano [Mon, 11 Jul 2016 17:31:06 +0000 (10:31 -0700)] 
Merge branch 'jn/preformatted-doc-url'

The top level documentation "git help git" still pointed at the
documentation set hosted at now-defunct google-code repository.
Update it to point to https://git.github.io/htmldocs/git.html
instead.

* jn/preformatted-doc-url:
  doc: git-htmldocs.googlecode.com is no more

7 years agoMerge branch 'jk/perf-any-version'
Junio C Hamano [Mon, 11 Jul 2016 17:31:06 +0000 (10:31 -0700)] 
Merge branch 'jk/perf-any-version'

Allow t/perf framework to use the features from the most recent
version of Git even when testing an older installed version.

* jk/perf-any-version:
  p4211: explicitly disable renames in no-rename test
  t/perf: fix regression in testing older versions of git

7 years agoMerge branch 'jk/ansi-color'
Junio C Hamano [Mon, 11 Jul 2016 17:31:05 +0000 (10:31 -0700)] 
Merge branch 'jk/ansi-color'

The output coloring scheme learned two new attributes, italic and
strike, in addition to existing bold, reverse, etc.

* jk/ansi-color:
  color: support strike-through attribute
  color: support "italic" attribute
  color: allow "no-" for negating attributes
  color: refactor parse_attr
  add skip_prefix_mem helper
  doc: refactor description of color format
  color: fix max-size comment

7 years agoMerge branch 'sb/submodule-clone-retry'
Junio C Hamano [Mon, 11 Jul 2016 17:31:04 +0000 (10:31 -0700)] 
Merge branch 'sb/submodule-clone-retry'

"git submodule update" that drives many "git clone" could
eventually hit flaky servers/network conditions on one of the
submodules; the command learned to retry the attempt.

* sb/submodule-clone-retry:
  submodule update: continue when a clone fails
  submodule--helper: initial clone learns retry logic

7 years agoMerge branch 'jc/send-email-skip-backup'
Junio C Hamano [Mon, 11 Jul 2016 17:31:04 +0000 (10:31 -0700)] 
Merge branch 'jc/send-email-skip-backup'

A careless invocation of "git send-email directory/" after editing
0001-change.patch with an editor often ends up sending both
0001-change.patch and its backup file, 0001-change.patch~, causing
embarrassment and a minor confusion.  Detect such an input and
offer to skip the backup files when sending the patches out.

* jc/send-email-skip-backup:
  send-email: detect and offer to skip backup files

7 years agohoist out handle_nonblock function for xread and xwrite
Eric Wong [Sun, 10 Jul 2016 08:20:46 +0000 (08:20 +0000)] 
hoist out handle_nonblock function for xread and xwrite

At least for me, this improves the readability of xread and
xwrite; hopefully allowing missing "continue" statements to
be spotted more easily.

Signed-off-by: Eric Wong <e@80x24.org>
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
7 years agogit-svn: warn instead of dying when commit data is missing
Eric Wong [Sat, 2 Jul 2016 10:33:18 +0000 (10:33 +0000)] 
git-svn: warn instead of dying when commit data is missing

It is possible to have refs globbed by git-svn which stores data
purely in git; gently skip those instead of dying and assuming
user error.

ref: http://mid.gmane.org/CALi1mtdtNF_GtzyPTbfb7N51wwxsFY7zm8hsgwxr3tHcZZboyg@mail.gmail.com

Suggested-by: Jacob Godserv <jacobgodserv@gmail.com>
Cc: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Eric Wong <e@80x24.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
7 years agosideband.c: small optimization of strbuf usage
Nicolas Pitre [Tue, 5 Jul 2016 20:35:50 +0000 (16:35 -0400)] 
sideband.c: small optimization of strbuf usage

Signed-off-by: Nicolas Pitre <nico@fluxnic.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
7 years agoconnect: read $GIT_SSH_COMMAND from config file
Nguyễn Thái Ngọc Duy [Sun, 26 Jun 2016 11:16:35 +0000 (13:16 +0200)] 
connect: read $GIT_SSH_COMMAND from config file

Similar to $GIT_ASKPASS or $GIT_PROXY_COMMAND, we also read from
config file first then fall back to $GIT_SSH_COMMAND.

This is useful for selecting different private keys targetting the
same host (e.g. github)

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
7 years agoThird batch of topics for 2.10
Junio C Hamano [Wed, 6 Jul 2016 20:42:58 +0000 (13:42 -0700)] 
Third batch of topics for 2.10

Signed-off-by: Junio C Hamano <gitster@pobox.com>
7 years agoSync with maint
Junio C Hamano [Wed, 6 Jul 2016 20:42:37 +0000 (13:42 -0700)] 
Sync with maint

* maint:
  More fixes for 2.9.1
  mailmap: use main email address for dturner

7 years agoMerge branch 'jc/t2300-setup'
Junio C Hamano [Wed, 6 Jul 2016 20:38:19 +0000 (13:38 -0700)] 
Merge branch 'jc/t2300-setup'

Portability fix for Windows.

* jc/t2300-setup:
  t2300: "git --exec-path" is not usable in $PATH on Windows as-is

7 years agoMerge branch 'ao/p4-has-branch-prefix-fix'
Junio C Hamano [Wed, 6 Jul 2016 20:38:19 +0000 (13:38 -0700)] 
Merge branch 'ao/p4-has-branch-prefix-fix'

A bug, which caused "git p4" while running under verbose mode to
report paths that are omitted due to branch prefix incorrectly, has
been fixed; the command said "Ignoring file outside of prefix" for
paths that are _inside_.

* ao/p4-has-branch-prefix-fix:
  git-p4: correct hasBranchPrefix verbose output

7 years agoMerge branch 'cb/t7810-test-label-fix'
Junio C Hamano [Wed, 6 Jul 2016 20:38:18 +0000 (13:38 -0700)] 
Merge branch 'cb/t7810-test-label-fix'

Test clean-up.

* cb/t7810-test-label-fix:
  t7810: fix duplicated test title

7 years agoMerge branch 'sb/t5614-modernize'
Junio C Hamano [Wed, 6 Jul 2016 20:38:17 +0000 (13:38 -0700)] 
Merge branch 'sb/t5614-modernize'

Test clean-up.

* sb/t5614-modernize:
  t5614: don't use subshells

7 years agoMerge branch 'js/perf-on-apple'
Junio C Hamano [Wed, 6 Jul 2016 20:38:16 +0000 (13:38 -0700)] 
Merge branch 'js/perf-on-apple'

t/perf needs /usr/bin/time with GNU extension; the invocation of it
is updated to "gtime" on Darwin.

* js/perf-on-apple:
  perf: accommodate for MacOSX

7 years agoMerge branch 'ak/t7800-wo-readlink'
Junio C Hamano [Wed, 6 Jul 2016 20:38:16 +0000 (13:38 -0700)] 
Merge branch 'ak/t7800-wo-readlink'

One among four invocations of readlink(1) in our test suite has
been rewritten so that the test can run on systems without the
command (others are in valgrind test framework and t9802).

* ak/t7800-wo-readlink:
  t7800: readlink may not be available

7 years agoMerge branch 'jk/tzoffset-fix'
Junio C Hamano [Wed, 6 Jul 2016 20:38:15 +0000 (13:38 -0700)] 
Merge branch 'jk/tzoffset-fix'

The internal code used to show local timezone offset is not
prepared to handle timestamps beyond year 2100, and gave a
bogus offset value to the caller.  Use a more benign looking
+0000 instead and let "git log" going in such a case, instead
of aborting.

* jk/tzoffset-fix:
  local_tzoffset: detect errors from tm_to_time_t
  t0006: test various date formats
  t0006: rename test-date's "show" to "relative"

7 years agoMerge branch 'js/mingw-parameter-less-c-functions'
Junio C Hamano [Wed, 6 Jul 2016 20:38:14 +0000 (13:38 -0700)] 
Merge branch 'js/mingw-parameter-less-c-functions'

Some platform-specific code had non-ANSI strict declarations of C
functions that do not take any parameters, which has been
corrected.

* js/mingw-parameter-less-c-functions:
  mingw: let the build succeed with DEVELOPER=1

7 years agoMerge branch 'lc/shell-default-value-noexpand'
Junio C Hamano [Wed, 6 Jul 2016 20:38:14 +0000 (13:38 -0700)] 
Merge branch 'lc/shell-default-value-noexpand'

Fix unnecessarily waste in the idiomatic use of ': ${VAR=default}'
to set the default value, without enclosing it in double quotes.

* lc/shell-default-value-noexpand:
  sh-setup: enclose setting of ${VAR=default} in double-quotes

7 years agoMerge branch 'sb/clone-shallow-passthru'
Junio C Hamano [Wed, 6 Jul 2016 20:38:13 +0000 (13:38 -0700)] 
Merge branch 'sb/clone-shallow-passthru'

Fix an unintended regression in v2.9 that breaks "clone --depth"
that recurses down to submodules by forcing the submodules to also
be cloned shallowly, which many server instances that host upstream
of the submodules are not prepared for.

* sb/clone-shallow-passthru:
  clone: do not let --depth imply --shallow-submodules

7 years agoMerge branch 'jk/gpg-interface-cleanup'
Junio C Hamano [Wed, 6 Jul 2016 20:38:12 +0000 (13:38 -0700)] 
Merge branch 'jk/gpg-interface-cleanup'

A new run-command API function pipe_command() is introduced to
sanely feed data to the standard input while capturing data from
the standard output and the standard error of an external process,
which is cumbersome to hand-roll correctly without deadlocking.

The codepath to sign data in a prepared buffer with GPG has been
updated to use this API to read from the status-fd to check for
errors (instead of relying on GPG's exit status).

* jk/gpg-interface-cleanup:
  gpg-interface: check gpg signature creation status
  sign_buffer: use pipe_command
  verify_signed_buffer: use pipe_command
  run-command: add pipe_command helper
  verify_signed_buffer: use tempfile object
  verify_signed_buffer: drop pbuf variable
  gpg-interface: use child_process.args

7 years agoMerge branch 'mg/signature-doc'
Junio C Hamano [Wed, 6 Jul 2016 20:38:12 +0000 (13:38 -0700)] 
Merge branch 'mg/signature-doc'

Formats of the various data (and how to validate them) where we use
GPG signature have been documented.

* mg/signature-doc:
  Documentation/technical: signed merge tag format
  Documentation/technical: signed commit format
  Documentation/technical: signed tag format
  Documentation/technical: describe signature formats

7 years agoMerge branch 'nd/graph-width-padded'
Junio C Hamano [Wed, 6 Jul 2016 20:38:12 +0000 (13:38 -0700)] 
Merge branch 'nd/graph-width-padded'

"log --graph --format=" learned that "%>|(N)" specifies the width
relative to the terminal's left edge, not relative to the area to
draw text that is to the right of the ancestry-graph section.  It
also now accepts negative N that means the column limit is relative
to the right border.

* nd/graph-width-padded:
  pretty.c: support <direction>|(<negative number>) forms
  pretty: pass graph width to pretty formatting for use in '%>|(N)'

7 years agoMerge branch 'jk/repack-keep-unreachable'
Junio C Hamano [Wed, 6 Jul 2016 20:38:11 +0000 (13:38 -0700)] 
Merge branch 'jk/repack-keep-unreachable'

"git repack" learned the "--keep-unreachable" option, which sends
loose unreachable objects to a pack instead of leaving them loose.
This helps heuristics based on the number of loose objects
(e.g. "gc --auto").

* jk/repack-keep-unreachable:
  repack: extend --keep-unreachable to loose objects
  repack: add --keep-unreachable option
  repack: document --unpack-unreachable option

7 years agoMerge branch 'ew/mboxrd-format-am'
Junio C Hamano [Wed, 6 Jul 2016 20:38:11 +0000 (13:38 -0700)] 
Merge branch 'ew/mboxrd-format-am'

Teach format-patch and mailsplit (hence "am") how a line that
happens to begin with "From " in the e-mail message is quoted with
">", so that these lines can be restored to their original shape.

* ew/mboxrd-format-am:
  am: support --patch-format=mboxrd
  mailsplit: support unescaping mboxrd messages
  pretty: support "mboxrd" output format

7 years agoMerge branch 'jk/upload-pack-hook'
Junio C Hamano [Wed, 6 Jul 2016 20:38:11 +0000 (13:38 -0700)] 
Merge branch 'jk/upload-pack-hook'

"upload-pack" allows a custom "git pack-objects" replacement when
responding to "fetch/clone" via the uploadpack.packObjectsHook.

* jk/upload-pack-hook:
  upload-pack: provide a hook for running pack-objects
  t1308: do not get fooled by symbolic links to the source tree
  config: add a notion of "scope"
  config: return configset value for current_config_ functions
  config: set up config_source for command-line config
  git_config_parse_parameter: refactor cleanup code
  git_config_with_options: drop "found" counting

7 years agoMerge branch 'nd/worktree-cleanup-post-head-protection'
Junio C Hamano [Wed, 6 Jul 2016 20:38:11 +0000 (13:38 -0700)] 
Merge branch 'nd/worktree-cleanup-post-head-protection'

Further preparatory clean-up for "worktree" feature continues.

* nd/worktree-cleanup-post-head-protection:
  worktree: simplify prefixing paths
  worktree: avoid 0{40}, too many zeroes, hard to read
  worktree.c: use is_dot_or_dotdot()
  git-worktree.txt: keep subcommand listing in alphabetical order
  worktree.c: rewrite mark_current_worktree() to avoid strbuf
  completion: support git-worktree

7 years agoMerge branch 'jk/bisect-show-tree'
Junio C Hamano [Wed, 6 Jul 2016 20:38:10 +0000 (13:38 -0700)] 
Merge branch 'jk/bisect-show-tree'

"git bisect" makes an internal call to "git diff-tree" when
bisection finds the culprit, but this call did not initialize the
data structure to pass to the diff-tree API correctly.

* jk/bisect-show-tree:
  bisect: always call setup_revisions after init_revisions

7 years agoMerge branch 'lf/sideband-returns-void'
Junio C Hamano [Wed, 6 Jul 2016 20:38:09 +0000 (13:38 -0700)] 
Merge branch 'lf/sideband-returns-void'

A small internal API cleanup.

* lf/sideband-returns-void:
  upload-pack.c: make send_client_data() return void
  sideband.c: make send_sideband() return void

7 years agoMerge branch 'jk/add-i-diff-compact-heuristics'
Junio C Hamano [Wed, 6 Jul 2016 20:38:09 +0000 (13:38 -0700)] 
Merge branch 'jk/add-i-diff-compact-heuristics'

"git add -i/-p" learned to honor diff.compactionHeuristic
experimental knob, so that the user can work on the same hunk split
as "git diff" output.

* jk/add-i-diff-compact-heuristics:
  add--interactive: respect diff.compactionHeuristic

7 years agoMerge branch 'km/fetch-do-not-free-remote-name'
Junio C Hamano [Wed, 6 Jul 2016 20:38:08 +0000 (13:38 -0700)] 
Merge branch 'km/fetch-do-not-free-remote-name'

The ownership rule for the piece of memory that hold references to
be fetched in "git fetch" was screwy, which has been cleaned up.

* km/fetch-do-not-free-remote-name:
  builtin/fetch.c: don't free remote->name after fetch

7 years agoMerge branch 'nd/test-lib-httpd-show-error-log-in-verbose'
Junio C Hamano [Wed, 6 Jul 2016 20:38:08 +0000 (13:38 -0700)] 
Merge branch 'nd/test-lib-httpd-show-error-log-in-verbose'

HTTPd tests learned to show the server error log to help diagnosing
a failing tests.

* nd/test-lib-httpd-show-error-log-in-verbose:
  lib-httpd.sh: print error.log on error

7 years agoMerge branch 'jk/string-list-static-init'
Junio C Hamano [Wed, 6 Jul 2016 20:38:07 +0000 (13:38 -0700)] 
Merge branch 'jk/string-list-static-init'

Instead of taking advantage of a struct string_list that is
allocated with all NULs happens to be STRING_LIST_INIT_NODUP kind,
initialize them explicitly as such, to document their behaviour
better.

* jk/string-list-static-init:
  use string_list initializer consistently
  blame,shortlog: don't make local option variables static
  interpret-trailers: don't duplicate option strings
  parse_opt_string_list: stop allocating new strings

7 years agoMerge branch 'jk/send-pack-stdio'
Junio C Hamano [Wed, 6 Jul 2016 20:38:07 +0000 (13:38 -0700)] 
Merge branch 'jk/send-pack-stdio'

Code clean-up.

* jk/send-pack-stdio:
  write_or_die: remove the unused write_or_whine() function
  send-pack: use buffered I/O to talk to pack-objects

7 years agoMerge branch 'pb/commit-editmsg-path'
Junio C Hamano [Wed, 6 Jul 2016 20:38:06 +0000 (13:38 -0700)] 
Merge branch 'pb/commit-editmsg-path'

Code clean-up.

* pb/commit-editmsg-path:
  builtin/commit.c: memoize git-path for COMMIT_EDITMSG

7 years agoMerge branch 'ep/http-curl-trace'
Junio C Hamano [Wed, 6 Jul 2016 20:38:06 +0000 (13:38 -0700)] 
Merge branch 'ep/http-curl-trace'

HTTP transport gained an option to produce more detailed debugging
trace.

* ep/http-curl-trace:
  imap-send.c: introduce the GIT_TRACE_CURL enviroment variable
  http.c: implement the GIT_TRACE_CURL environment variable

7 years agoMore fixes for 2.9.1
Junio C Hamano [Wed, 6 Jul 2016 20:08:02 +0000 (13:08 -0700)] 
More fixes for 2.9.1

Signed-off-by: Junio C Hamano <gitster@pobox.com>
7 years agoMerge branch 'jc/deref-tag' into maint
Junio C Hamano [Wed, 6 Jul 2016 20:06:46 +0000 (13:06 -0700)] 
Merge branch 'jc/deref-tag' into maint

Code clean-up.

* jc/deref-tag:
  blame, line-log: do not loop around deref_tag()

7 years agoMerge branch 'pb/strbuf-read-file-doc' into maint
Junio C Hamano [Wed, 6 Jul 2016 20:06:45 +0000 (13:06 -0700)] 
Merge branch 'pb/strbuf-read-file-doc' into maint

Minor doc update.

* pb/strbuf-read-file-doc:
  strbuf: describe the return value of strbuf_read_file

7 years agoMerge branch 'jk/fetch-prune-doc' into maint
Junio C Hamano [Wed, 6 Jul 2016 20:06:44 +0000 (13:06 -0700)] 
Merge branch 'jk/fetch-prune-doc' into maint

Minor doc update.

* jk/fetch-prune-doc:
  fetch: document that pruning happens before fetching

7 years agoMerge branch 'pc/occurred' into maint
Junio C Hamano [Wed, 6 Jul 2016 20:06:43 +0000 (13:06 -0700)] 
Merge branch 'pc/occurred' into maint

Typofix.

* pc/occurred:
  config.c: fix misspelt "occurred" in an error message
  refs.h: fix misspelt "occurred" in a comment

7 years agoMerge branch 'mg/cherry-pick-multi-on-unborn' into maint
Junio C Hamano [Wed, 6 Jul 2016 20:06:42 +0000 (13:06 -0700)] 
Merge branch 'mg/cherry-pick-multi-on-unborn' into maint

"git cherry-pick A" worked on an unborn branch, but "git
cherry-pick A..B" didn't.

* mg/cherry-pick-multi-on-unborn:
  cherry-pick: allow to pick to unborn branches

7 years agoMerge branch 'em/newer-freebsd-shells-are-fine-with-returns' into maint
Junio C Hamano [Wed, 6 Jul 2016 20:06:41 +0000 (13:06 -0700)] 
Merge branch 'em/newer-freebsd-shells-are-fine-with-returns' into maint

Comments about misbehaving FreeBSD shells have been clarified with
the version number (9.x and before are broken, newer ones are OK).

* em/newer-freebsd-shells-are-fine-with-returns:
  rebase: update comment about FreeBSD /bin/sh

7 years agoMerge branch 'lv/status-say-working-tree-not-directory' into maint
Junio C Hamano [Wed, 6 Jul 2016 20:06:40 +0000 (13:06 -0700)] 
Merge branch 'lv/status-say-working-tree-not-directory' into maint

"git status" used to say "working directory" when it meant "working
tree".

* lv/status-say-working-tree-not-directory:
  Use "working tree" instead of "working directory" for git status

7 years agoMerge branch 'nb/gnome-keyring-build' into maint
Junio C Hamano [Wed, 6 Jul 2016 20:06:40 +0000 (13:06 -0700)] 
Merge branch 'nb/gnome-keyring-build' into maint

Build improvements for gnome-keyring (in contrib/)

* nb/gnome-keyring-build:
  gnome-keyring: Don't hard-code pkg-config executable

7 years agoMerge branch 'et/add-chmod-x' into maint
Junio C Hamano [Wed, 6 Jul 2016 20:06:39 +0000 (13:06 -0700)] 
Merge branch 'et/add-chmod-x' into maint

"git update-index --add --chmod=+x file" may be usable as an escape
hatch, but not a friendly thing to force for people who do need to
use it regularly.  "git add --chmod=+x file" can be used instead.

* et/add-chmod-x:
  add: add --chmod=+x / --chmod=-x options

7 years agoMerge branch 'jk/avoid-unbounded-alloca' into maint
Junio C Hamano [Wed, 6 Jul 2016 20:06:39 +0000 (13:06 -0700)] 
Merge branch 'jk/avoid-unbounded-alloca' into maint

A codepath that used alloca(3) to place an unbounded amount of data
on the stack has been updated to avoid doing so.

* jk/avoid-unbounded-alloca:
  tree-diff: avoid alloca for large allocations

7 years agoMerge branch 'rj/compat-regex-size-max-fix' into maint
Junio C Hamano [Wed, 6 Jul 2016 20:06:38 +0000 (13:06 -0700)] 
Merge branch 'rj/compat-regex-size-max-fix' into maint

A compilation fix.

* rj/compat-regex-size-max-fix:
  regex: fix a SIZE_MAX macro redefinition warning