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
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
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
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>
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
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
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
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
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
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
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
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"
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
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
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
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
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
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)'
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
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
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
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
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
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
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
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
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
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
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
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
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
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>
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()
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
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
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
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
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
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
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
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
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
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
Junio C Hamano [Wed, 6 Jul 2016 20:06:38 +0000 (13:06 -0700)]
Merge branch 'vs/prompt-avoid-unset-variable' into maint
The git-prompt scriptlet (in contrib/) was not friendly with those
who uses "set -u", which has been fixed.
* vs/prompt-avoid-unset-variable:
git-prompt.sh: Don't error on null ${ZSH,BASH}_VERSION, $short_sha
Junio C Hamano [Wed, 6 Jul 2016 20:06:37 +0000 (13:06 -0700)]
Merge branch 'sg/reflog-past-root' into maint
"git reflog" stopped upon seeing an entry that denotes a branch
creation event (aka "unborn"), which made it appear as if the
reflog was truncated.
* sg/reflog-past-root:
reflog: continue walking the reflog past root commits
Junio C Hamano [Wed, 6 Jul 2016 20:06:36 +0000 (13:06 -0700)]
Merge branch 'dn/gpg-doc' into maint
The documentation tries to consistently spell "GPG"; when
referring to the specific program name, "gpg" is used.
* dn/gpg-doc:
Documentation: GPG capitalization
Junio C Hamano [Wed, 6 Jul 2016 20:06:35 +0000 (13:06 -0700)]
Merge branch 'ap/git-svn-propset-doc' into maint
"git svn propset" subcommand that was added in 2.3 days is
documented now.
* ap/git-svn-propset-doc:
git-svn: document the 'git svn propset' command
Junio C Hamano [Wed, 6 Jul 2016 20:06:34 +0000 (13:06 -0700)]
Merge branch 'tr/doc-tt' into maint
The documentation set has been updated so that literal commands,
configuration variables and environment variables are consistently
typeset in fixed-width font and bold in manpages.
* tr/doc-tt:
doc: change configuration variables format
doc: more consistency in environment variables format
doc: change environment variables format
doc: clearer rule about formatting literals
David Turner [Mon, 4 Jul 2016 06:05:24 +0000 (02:05 -0400)]
mailmap: use main email address for dturner
Signed-off-by: David Turner <novalis@novalis.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Mon, 27 Jun 2016 17:07:08 +0000 (10:07 -0700)]
Second batch of topics for 2.10
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Mon, 27 Jun 2016 17:00:15 +0000 (10:00 -0700)]
Sync with maint
* maint:
Start preparing for 2.9.1
Junio C Hamano [Mon, 27 Jun 2016 16:59:51 +0000 (09:59 -0700)]
Start preparing for 2.9.1
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Mon, 27 Jun 2016 16:56:54 +0000 (09:56 -0700)]
Merge branch 'tb/complete-status'
The completion script (in contrib/) learned to complete "git
status" options.
* tb/complete-status:
completion: add git status
completion: add __git_get_option_value helper
completion: factor out untracked file modes into a variable
Junio C Hamano [Mon, 27 Jun 2016 16:56:53 +0000 (09:56 -0700)]
Merge branch 'mg/cherry-pick-multi-on-unborn'
"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
Junio C Hamano [Mon, 27 Jun 2016 16:56:52 +0000 (09:56 -0700)]
Merge branch 'lf/receive-pack-auto-gc-to-client'
Allow messages that are generated by auto gc during "git push" on
the receiving end to be explicitly passed back to the sending end
over sideband, so that they are shown with "remote: " prefix to
avoid confusing the users.
* lf/receive-pack-auto-gc-to-client:
receive-pack: send auto-gc output over sideband 2
Junio C Hamano [Mon, 27 Jun 2016 16:56:52 +0000 (09:56 -0700)]
Merge branch 'em/newer-freebsd-shells-are-fine-with-returns'
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
Junio C Hamano [Mon, 27 Jun 2016 16:56:51 +0000 (09:56 -0700)]
Merge branch 'lv/status-say-working-tree-not-directory'
"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
Junio C Hamano [Mon, 27 Jun 2016 16:56:50 +0000 (09:56 -0700)]
Merge branch 'nb/gnome-keyring-build'
Build improvements for gnome-keyring (in contrib/)
* nb/gnome-keyring-build:
gnome-keyring: Don't hard-code pkg-config executable
Junio C Hamano [Mon, 27 Jun 2016 16:56:49 +0000 (09:56 -0700)]
Merge branch 'jc/deref-tag'
Code clean-up.
* jc/deref-tag:
blame, line-log: do not loop around deref_tag()
Junio C Hamano [Mon, 27 Jun 2016 16:56:49 +0000 (09:56 -0700)]
Merge branch 'et/add-chmod-x'
"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
Junio C Hamano [Mon, 27 Jun 2016 16:56:48 +0000 (09:56 -0700)]
Merge branch 'jk/avoid-unbounded-alloca'
* jk/avoid-unbounded-alloca:
tree-diff: avoid alloca for large allocations
Junio C Hamano [Mon, 27 Jun 2016 16:56:47 +0000 (09:56 -0700)]
Merge branch 'rj/compat-regex-size-max-fix'
A compilation fix.
* rj/compat-regex-size-max-fix:
regex: fix a SIZE_MAX macro redefinition warning
Junio C Hamano [Mon, 27 Jun 2016 16:56:47 +0000 (09:56 -0700)]
Merge branch 'vs/prompt-avoid-unset-variable'
The git-prompt scriptlet (in contrib/) was not friendly with those
who uses "set -u", which has been fixed.
* vs/prompt-avoid-unset-variable:
git-prompt.sh: Don't error on null ${ZSH,BASH}_VERSION, $short_sha
Junio C Hamano [Mon, 27 Jun 2016 16:56:46 +0000 (09:56 -0700)]
Merge branch 'sg/reflog-past-root'
"git reflog" stopped upon seeing an entry that denotes a branch
creation event (aka "unborn"), which made it appear as if the
reflog was truncated.
* sg/reflog-past-root:
reflog: continue walking the reflog past root commits
Junio C Hamano [Mon, 27 Jun 2016 16:56:46 +0000 (09:56 -0700)]
Merge branch 'pb/strbuf-read-file-doc'
* pb/strbuf-read-file-doc:
strbuf: describe the return value of strbuf_read_file
Junio C Hamano [Mon, 27 Jun 2016 16:56:45 +0000 (09:56 -0700)]
Merge branch 'dn/gpg-doc'
The documentation tries to consistently spell "GPG"; when
referring to the specific program name, "gpg" is used.
* dn/gpg-doc:
Documentation: GPG capitalization
Junio C Hamano [Mon, 27 Jun 2016 16:56:44 +0000 (09:56 -0700)]
Merge branch 'jk/fetch-prune-doc'
* jk/fetch-prune-doc:
fetch: document that pruning happens before fetching
Junio C Hamano [Mon, 27 Jun 2016 16:56:43 +0000 (09:56 -0700)]
Merge branch 'ap/git-svn-propset-doc'
"git svn propset" subcommand that was added in 2.3 days is
documented now.
* ap/git-svn-propset-doc:
git-svn: document the 'git svn propset' command
Junio C Hamano [Mon, 27 Jun 2016 16:56:42 +0000 (09:56 -0700)]
Merge branch 'tr/doc-tt'
The documentation set has been updated so that literal commands,
configuration variables and environment variables are consistently
typeset in fixed-width font and bold in manpages.
* tr/doc-tt:
doc: change configuration variables format
doc: more consistency in environment variables format
doc: change environment variables format
doc: clearer rule about formatting literals
Junio C Hamano [Mon, 27 Jun 2016 16:56:42 +0000 (09:56 -0700)]
Merge branch 'pc/occurred'
* pc/occurred:
config.c: fix misspelt "occurred" in an error message
refs.h: fix misspelt "occurred" in a comment
Junio C Hamano [Mon, 27 Jun 2016 16:56:42 +0000 (09:56 -0700)]
Merge branch 'cc/apply-introduce-state'
The "git apply" standalone program is being libified; this is the
first step to move many state variables into a structure that can
be explicitly (re)initialized to make the machinery callable more
than once.
The next step that moves some remaining state variables into the
structure and turns die()s into an error return that propagates up
to the caller is not queued yet but in flight. It would be good to
review the above first and give the remainder of the series a solid
base to build on.
* cc/apply-introduce-state: (50 commits)
builtin/apply: remove misleading comment on lock_file field
builtin/apply: move 'newfd' global into 'struct apply_state'
builtin/apply: add 'lock_file' pointer into 'struct apply_state'
builtin/apply: move applying patches into apply_all_patches()
builtin/apply: move 'state' check into check_apply_state()
builtin/apply: move 'symlink_changes' global into 'struct apply_state'
builtin/apply: move 'fn_table' global into 'struct apply_state'
builtin/apply: move 'state_linenr' global into 'struct apply_state'
builtin/apply: move 'max_change' and 'max_len' into 'struct apply_state'
builtin/apply: move 'ws_ignore_action' into 'struct apply_state'
builtin/apply: move 'ws_error_action' into 'struct apply_state'
builtin/apply: move 'applied_after_fixing_ws' into 'struct apply_state'
builtin/apply: move 'squelch_whitespace_errors' into 'struct apply_state'
builtin/apply: remove whitespace_option arg from set_default_whitespace_mode()
builtin/apply: move 'whitespace_option' into 'struct apply_state'
builtin/apply: move 'whitespace_error' global into 'struct apply_state'
builtin/apply: move 'root' global into 'struct apply_state'
builtin/apply: move 'p_value_known' global into 'struct apply_state'
builtin/apply: move 'p_value' global into 'struct apply_state'
builtin/apply: move 'has_include' global into 'struct apply_state'
...
Junio C Hamano [Mon, 27 Jun 2016 16:56:24 +0000 (09:56 -0700)]
Merge branch 'rs/xdiff-hunk-with-func-line' into maint
"git show -W" (extend hunks to cover the entire function, delimited
by lines that match the "funcname" pattern) used to show the entire
file when a change added an entire function at the end of the file,
which has been fixed.
* rs/xdiff-hunk-with-func-line:
xdiff: fix merging of appended hunk with -W
grep: -W: don't extend context to trailing empty lines
t7810: add test for grep -W and trailing empty context lines
xdiff: don't trim common tail with -W
xdiff: -W: don't include common trailing empty lines in context
xdiff: ignore empty lines before added functions with -W
xdiff: handle appended chunks better with -W
xdiff: factor out match_func_rec()
t4051: rewrite, add more tests
Junio C Hamano [Mon, 27 Jun 2016 16:56:24 +0000 (09:56 -0700)]
Merge branch 'jk/rev-list-count-with-bitmap' into maint
"git rev-list --count" whose walk-length is limited with "-n"
option did not work well with the counting optimized to look at the
bitmap index.
* jk/rev-list-count-with-bitmap:
rev-list: disable bitmaps when "-n" is used with listing objects
rev-list: "adjust" results of "--count --use-bitmap-index -n"
Junio C Hamano [Mon, 27 Jun 2016 16:56:23 +0000 (09:56 -0700)]
Merge branch 'et/pretty-format-c-auto' into maint
The commands in `git log` family take %C(auto) in a custom format
string. This unconditionally turned the color on, ignoring
--no-color or with --color=auto when the output is not connected to
a tty; this was corrected to make the format truly behave as
"auto".
* et/pretty-format-c-auto:
format_commit_message: honor `color=auto` for `%C(auto)`
Junio C Hamano [Mon, 27 Jun 2016 16:56:22 +0000 (09:56 -0700)]
Merge branch 'ew/daemon-socket-keepalive' into maint
When "git daemon" is run without --[init-]timeout specified, a
connection from a client that silently goes offline can hang around
for a long time, wasting resources. The socket-level KEEPALIVE has
been enabled to allow the OS to notice such failed connections.
* ew/daemon-socket-keepalive:
daemon: enable SO_KEEPALIVE for all sockets
Jeff King [Thu, 23 Jun 2016 17:40:16 +0000 (13:40 -0400)]
color: support strike-through attribute
This is the only remaining attribute that is commonly
supported (at least by xterm) that we don't support. Let's
add it for completeness.
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Jeff King [Thu, 23 Jun 2016 17:39:07 +0000 (13:39 -0400)]
color: support "italic" attribute
We already support bold, underline, and similar attributes.
Let's add italic to the mix. According to the Wikipedia
page on ANSI colors, this attribute is "not widely
supported", but it does seem to work on my xterm.
We don't have to bump the maximum color size because we were
already over-allocating it (but we do adjust the comment
appropriately).
Requested-by: Simon Courtois <scourtois@cubyx.fr>
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Jeff King [Thu, 23 Jun 2016 17:38:44 +0000 (13:38 -0400)]
color: allow "no-" for negating attributes
Using "no-bold" rather than "nobold" is easier to read and
more natural to type (to me, anyway, even though I was the
person who introduced "nobold" in the first place). It's
easy to allow both.
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Jeff King [Thu, 23 Jun 2016 17:38:13 +0000 (13:38 -0400)]
color: refactor parse_attr
The list of attributes we recognize is a bit unwieldy, as we
actually have two arrays that must be kept in sync. Instead,
let's have a single array-of-struct to represent our
mapping. That means we can never have an accident that
causes us to read off the end of an array, and it makes
diffs for adding new attributes much easier to read.
This also makes it easy to handle the "no" cases without
having to repeat each attribute (this shortens the list,
making it easier to read, but also also cuts the size of our
linear search in half). Technically this makes it impossible
for us to add an attribute that starts with "no" (we could
confuse "nobody" for the negation of "body"), but since this
is a constrained set of attributes, that's OK.
Since we can also store the length of each name in the
struct, that makes it easy for us to avoid reading past the
"len" parameter given to us (though in practice it was not a
bug, since all of our current callers are interested in a
subset of a NUL-terminated buffer, not a true undelimited
range of memory).
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Jeff King [Thu, 23 Jun 2016 17:33:57 +0000 (13:33 -0400)]
add skip_prefix_mem helper
The skip_prefix function has been very useful for
simplifying pointer arithmetic and avoiding repeated magic
numbers, but we have no equivalent for length-limited
buffers. So we're stuck with:
if (3 <= len && skip_prefix(buf, "foo", &buf))
len -= 3;
That's not that complicated, but it needs to use magic
numbers for the length of the prefix (or else write out
strlen("foo"), repeating the string). By using a helper, we
can get the string length behind the scenes (and often at
compile time for string literals).
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Jeff King [Thu, 23 Jun 2016 17:32:30 +0000 (13:32 -0400)]
doc: refactor description of color format
This is a general cleanup of the description of colors in
git-config, mostly to address inaccuracies and confusion
that had grown over time:
- you can have many attributes, not just one
- the discussion flip-flopped between colors and
attributes; now we discuss everything about colors, then
everything about attributes
- many concepts were lumped into the first paragraph,
making it hard to read, and especially to find the
actual lists of colors and attributes. I stopped short
of breaking those out into their own lists, as it seemed
like an excessive use of vertical screen real estate.
- we introduced negated attributes, but then the next
paragraph basically explains how each item starts off
with no attributes. So why would one need negated
attributes? We now explain.
- minor typo, language, and typography fixes
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Jeff King [Thu, 23 Jun 2016 17:31:44 +0000 (13:31 -0400)]
color: fix max-size comment
We use fixed-size buffers for colors, because we know our
parsing cannot grow beyond a particular bound. However, our
comment description has two issues:
1. It has the description in two forms: a short one, and
one with more explanation. Over time the latter has
been updated, but the former has not. Let's just drop
the short one (after making sure everything it says
is in the long one).
2. As of
ff40d18 (parse_color: recognize "no$foo" to clear
the $foo attribute, 2014-11-20), the per-attribute size
bumped to "3" (because "nobold" is actually "21;"). But
that's not quite enough, as somebody may use both
"bold" and "nobold", requiring 5 characters.
This wasn't a problem for the final count, because we
over-estimated in other ways, but let's clarify how we
got to the final number.
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Eric Wong [Mon, 20 Jun 2016 21:52:53 +0000 (21:52 +0000)]
git-svn: skip mergeinfo handling with --no-follow-parent
For repositories without parent following enabled, finding
git parents through svn:mergeinfo or svk::parents can be
expensive and pointless.
Reported-by: Александр Овчинников <proff@proff.email>
http://mid.gmane.org/
4094761466408188@web24o.yandex.ru
Signed-off-by: Eric Wong <e@80x24.org>
Johannes Schindelin [Sat, 18 Jun 2016 10:49:11 +0000 (12:49 +0200)]
t2300: "git --exec-path" is not usable in $PATH on Windows as-is
The "git" command prepends the exec-path to the PATH environment
variable for processes it spawns. That is how ". git-sh-setup" in
our scripted Porcelains can find the dot-sourced file in the
exec-path location that is not usually on user's PATH.
When t2300 runs, because it is not spawned by the "git" command, the
scriptlet being tested did not run with a realistic setting of PATH
environment. It lacked the exec-path on the PATH, and failed to
find the dot-sourced file. A recent update to t2300 attempted to
fix this, with "PATH=$(git --exec-path):$PATH", which has been the
recommended way around v1.6.0 days (a script whose original was
written before that release that survives to this day is likely to
have such a line).
However, the "git --exec-path" command outputs C:\path\to\exec\dir
(not /c/path/to/exec/dir) on Windows; the recent update failed to
consider the problem that comes from it.
Even though Git itself, when doing the equivalent internally, does
so in a platform native way (i.e. on Windows, C:\path\to\exec\dir is
prepended to the existing value of %PATH% using ';' as a component
separator), the result is further massaged by bash and gets turned
into $PATH that uses /c/path/to/exec/dir with ':' separating the
components, which is the form understood by bash, so scripted
Porcelains find commands from PATH correctly.
An end user script written in shell, however, cannot prepend
"C:\path\to\exec\dir:" to the existing value of $PATH and expect
bash to magically turn it into the form it understands. In other
words, "PATH=$(git --exec-path):$PATH" does not work as an emulation
of what "Git" internally does to the PATH on Windows.
To correctly emulate how exec-path is prepended to the PATH
environment internally on Windows, we'd need to convert
C:\git-sdk-64\usr\src\git to at least /c\git-sdk-64\usr\src\git
ourselves before prepending it to PATH.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Andrew Oakley [Wed, 22 Jun 2016 09:26:11 +0000 (10:26 +0100)]
git-p4: correct hasBranchPrefix verbose output
The logic here was inverted, you got a message saying the file is
ignored for each file that is not ignored.
Signed-off-by: Andrew Oakley <aoakley@roku.com>
Acked-by: Lars Schneider <larsxschneider@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Charles Bailey [Tue, 21 Jun 2016 21:14:11 +0000 (14:14 -0700)]
t7810: fix duplicated test title
Signed-off-by: Charles Bailey <charles@hashpling.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Stefan Beller [Mon, 20 Jun 2016 17:21:18 +0000 (10:21 -0700)]
t5614: don't use subshells
Using a subshell for just one git command is both a waste in compute
overhead (create a new process) as well as in line count.
Suggested-by: Jeff King <peff@peff.net>
Signed-off-by: Stefan Beller <sbeller@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Armin Kunaschik [Tue, 31 May 2016 00:26:12 +0000 (02:26 +0200)]
t7800: readlink may not be available
The readlink(1) command is not available on all platforms (notably
not on AIX and HP-UX) and can be replaced in this test with the
"workaround"
ls -ld <name> | sed -e 's/.* -> //'
This is no universal readlink replacement but works in the
controlled test environment well enough.
Signed-off-by: Armin Kunaschik <megabreit@googlemail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Johannes Schindelin [Tue, 21 Jun 2016 13:53:43 +0000 (15:53 +0200)]
perf: accommodate for MacOSX
As this developer has no access to MacOSX developer setups anymore,
Travis becomes the best bet to run performance tests on that OS.
However, on MacOSX /usr/bin/time is that good old BSD executable that
no Linux user cares about, as demonstrated by the perf-lib.sh's use
of GNU-ish extensions. And by the hard-coded path.
Let's just work around this issue by using gtime on MacOSX, the
Homebrew-provided GNU implementation onto which pretty much every
MacOSX power user falls back anyway.
To help other developers use Travis to run performance tests on
MacOSX, the .travis.yml file now sports a commented-out line that
installs GNU time via Homebrew.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Reviewed-by: Lars Schneider <larsxschneider@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Jeff King [Mon, 20 Jun 2016 21:14:14 +0000 (17:14 -0400)]
local_tzoffset: detect errors from tm_to_time_t
When we want to know the local timezone offset at a given
timestamp, we compute it by asking for localtime() at the
given time, and comparing the offset to GMT at that time.
However, there's some juggling between time_t and "struct
tm" which happens, which involves calling our own
tm_to_time_t().
If that function returns an error (e.g., because it only
handles dates up to the year 2099), it returns "-1", which
we treat as a time_t, and is clearly bogus, leading to
bizarre timestamps (that seem to always adjust the time back
to (time_t)(uint32_t)-1, in the year 2106).
It's not a good idea for local_tzoffset() to simply die
here; it would make it hard to run "git log" on a repository
with funny timestamps. Instead, let's just treat such cases
as "zero offset".
Reported-by: Norbert Kiesel <nkiesel@gmail.com>
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Jeff King [Mon, 20 Jun 2016 21:11:59 +0000 (17:11 -0400)]
t0006: test various date formats
We ended up testing some of these date formats throughout
the rest of the suite (e.g., via for-each-ref's
"$(authordate:...)" format), but we never did so
systematically. t0006 is the right place for unit-testing of
our date-handling code.
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Jeff King [Mon, 20 Jun 2016 21:10:29 +0000 (17:10 -0400)]
t0006: rename test-date's "show" to "relative"
The "show" tests are really only checking relative formats;
we should make that more clear.
This also frees up the "show" name to later check other
formats. We could later fold "relative" into a more generic
"show" command, but it's not worth it. Relative times are a
special case already because we have to munge the concept of
"now" in our tests.
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Johannes Schindelin [Sat, 18 Jun 2016 12:38:36 +0000 (14:38 +0200)]
mingw: let the build succeed with DEVELOPER=1
The recently introduced developer flags identified a couple of
old-style function declarations in the Windows-specific code where
the parameter list was left empty instead of specifying "void"
explicitly. Let's just fix them.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Sun, 19 Jun 2016 20:51:56 +0000 (13:51 -0700)]
clone: do not let --depth imply --shallow-submodules
In v2.9.0, we prematurely flipped the default to force cloning
submodules shallowly, when the superproject is getting cloned
shallowly. This is likely to fail when the upstream repositories
submodules are cloned from a repository that is not prepared to
serve histories that ends at a commit that is not at the tip of a
branch, and we know the world is not yet ready.
Use a safer default to clone the submodules fully, unless the user
tells us that she knows that the upstream repository of the
submodules are willing to cooperate with "--shallow-submodules"
option.
Noticed-by: Vadim Eisenberg <VADIME@il.ibm.com>
Helped-by: Jeff King <peff@peff.net>
Helped-by: Stefan Beller <sbeller@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Mon, 20 Jun 2016 18:06:49 +0000 (11:06 -0700)]
Start the post-2.9 cycle
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Mon, 20 Jun 2016 18:01:04 +0000 (11:01 -0700)]
Merge branch 'rs/xdiff-hunk-with-func-line'
"git show -W" (extend hunks to cover the entire function, delimited
by lines that match the "funcname" pattern) used to show the entire
file when a change added an entire function at the end of the file,
which has been fixed.
* rs/xdiff-hunk-with-func-line:
xdiff: fix merging of appended hunk with -W
grep: -W: don't extend context to trailing empty lines
t7810: add test for grep -W and trailing empty context lines
xdiff: don't trim common tail with -W
xdiff: -W: don't include common trailing empty lines in context
xdiff: ignore empty lines before added functions with -W
xdiff: handle appended chunks better with -W
xdiff: factor out match_func_rec()
t4051: rewrite, add more tests
Junio C Hamano [Mon, 20 Jun 2016 18:01:03 +0000 (11:01 -0700)]
Merge branch 'jk/rev-list-count-with-bitmap'
"git rev-list --count" whose walk-length is limited with "-n"
option did not work well with the counting optimized to look at the
bitmap index.
* jk/rev-list-count-with-bitmap:
rev-list: disable bitmaps when "-n" is used with listing objects
rev-list: "adjust" results of "--count --use-bitmap-index -n"
Junio C Hamano [Mon, 20 Jun 2016 18:01:02 +0000 (11:01 -0700)]
Merge branch 'wd/userdiff-css'
Update the funcname definition to support css files.
* wd/userdiff-css:
userdiff: add built-in pattern for CSS
Junio C Hamano [Mon, 20 Jun 2016 18:01:02 +0000 (11:01 -0700)]
Merge branch 'jc/clear-pathspec'
We usually call a function that clears the contents a data
structure X without freeing the structure itself clear_X(), and
call a function that does clear_X() and also frees it free_X().
free_pathspec() function has been renamed to clear_pathspec()
to avoid confusion.
* jc/clear-pathspec:
pathspec: rename free_pathspec() to clear_pathspec()
Junio C Hamano [Mon, 20 Jun 2016 18:01:02 +0000 (11:01 -0700)]
Merge branch 'aq/upload-pack-use-parse-options'
"git upload-pack" command has been updated to use the parse-options
API.
* aq/upload-pack-use-parse-options:
upload-pack.c: use parse-options API