gitweb.git
Merge branch 'jh/status-no-ahead-behind'Junio C Hamano Thu, 8 Mar 2018 20:36:24 +0000 (12:36 -0800)

Merge branch 'jh/status-no-ahead-behind'

"git status" can spend a lot of cycles to compute the relation
between the current branch and its upstream, which can now be
disabled with "--no-ahead-behind" option.

* jh/status-no-ahead-behind:
status: support --no-ahead-behind in long format
status: update short status to respect --no-ahead-behind
status: add --[no-]ahead-behind to status and commit for V2 format.
stat_tracking_info: return +1 when branches not equal

Merge branch 'sg/travis-build-during-script-phase'Junio C Hamano Thu, 8 Mar 2018 20:36:23 +0000 (12:36 -0800)

Merge branch 'sg/travis-build-during-script-phase'

Build the executable in 'script' phase in Travis CI integration, to
follow the established practice, rather than during 'before_script'
phase. This allows the CI categorize the failures better ('failed'
is project's fault, 'errored' is build environment's).

* sg/travis-build-during-script-phase:
travis-ci: build Git during the 'script' phase

Seventh batch for 2.17Junio C Hamano Tue, 6 Mar 2018 22:59:10 +0000 (14:59 -0800)

Seventh batch for 2.17

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

Merge branch 'bw/perl-timegm-timelocal-fix'Junio C Hamano Tue, 6 Mar 2018 22:54:08 +0000 (14:54 -0800)

Merge branch 'bw/perl-timegm-timelocal-fix'

Y2k20 fix ;-) for our perl scripts.

* bw/perl-timegm-timelocal-fix:
perl: call timegm and timelocal with 4-digit year

Merge branch 'jk/strbuf-read-file-close-error'Junio C Hamano Tue, 6 Mar 2018 22:54:08 +0000 (14:54 -0800)

Merge branch 'jk/strbuf-read-file-close-error'

Code clean-up.

* jk/strbuf-read-file-close-error:
strbuf_read_file(): preserve errno across close() call

Merge branch 'bw/c-plus-plus'Junio C Hamano Tue, 6 Mar 2018 22:54:07 +0000 (14:54 -0800)

Merge branch 'bw/c-plus-plus'

Avoid using identifiers that clash with C++ keywords. Even though
it is not a goal to compile Git with C++ compilers, changes like
this help use of code analysis tools that targets C++ on our
codebase.

* bw/c-plus-plus: (37 commits)
replace: rename 'new' variables
trailer: rename 'template' variables
tempfile: rename 'template' variables
wrapper: rename 'template' variables
environment: rename 'namespace' variables
diff: rename 'template' variables
environment: rename 'template' variables
init-db: rename 'template' variables
unpack-trees: rename 'new' variables
trailer: rename 'new' variables
submodule: rename 'new' variables
split-index: rename 'new' variables
remote: rename 'new' variables
ref-filter: rename 'new' variables
read-cache: rename 'new' variables
line-log: rename 'new' variables
imap-send: rename 'new' variables
http: rename 'new' variables
entry: rename 'new' variables
diffcore-delta: rename 'new' variables
...

Merge branch 'rs/strbuf-read-file-or-whine'Junio C Hamano Tue, 6 Mar 2018 22:54:07 +0000 (14:54 -0800)

Merge branch 'rs/strbuf-read-file-or-whine'

Code clean-up.

* rs/strbuf-read-file-or-whine:
sequencer: factor out strbuf_read_file_or_whine()

Merge branch 'ms/non-ascii-ticks'Junio C Hamano Tue, 6 Mar 2018 22:54:06 +0000 (14:54 -0800)

Merge branch 'ms/non-ascii-ticks'

Doc markup fix.

* ms/non-ascii-ticks:
Documentation/gitsubmodules.txt: avoid non-ASCII apostrophes

Merge branch 'jk/test-helper-v-output-fix'Junio C Hamano Tue, 6 Mar 2018 22:54:05 +0000 (14:54 -0800)

Merge branch 'jk/test-helper-v-output-fix'

Test framework update.

* jk/test-helper-v-output-fix:
t: send verbose test-helper output to fd 4

Merge branch 'jk/cached-commit-buffer'Junio C Hamano Tue, 6 Mar 2018 22:54:05 +0000 (14:54 -0800)

Merge branch 'jk/cached-commit-buffer'

Code clean-up.

* jk/cached-commit-buffer:
revision: drop --show-all option
commit: drop uses of get_cached_commit_buffer()

Merge branch 'bw/doc-submodule-recurse-config-with... Junio C Hamano Tue, 6 Mar 2018 22:54:05 +0000 (14:54 -0800)

Merge branch 'bw/doc-submodule-recurse-config-with-clone'

Doc update.

* bw/doc-submodule-recurse-config-with-clone:
submodule: indicate that 'submodule.recurse' doesn't apply to clone

Merge branch 'jc/allow-ff-merging-kept-tags'Junio C Hamano Tue, 6 Mar 2018 22:54:04 +0000 (14:54 -0800)

Merge branch 'jc/allow-ff-merging-kept-tags'

Since Git 1.7.9, "git merge" defaulted to --no-ff (i.e. even when
the side branch being merged is a descendant of the current commit,
create a merge commit instead of fast-forwarding) when merging a
tag object. This was appropriate default for integrators who pull
signed tags from their downstream contributors, but caused an
unnecessary merges when used by downstream contributors who
habitually "catch up" their topic branches with tagged releases
from the upstream. Update "git merge" to default to --no-ff only
when merging a tag object that does *not* sit at its usual place in
refs/tags/ hierarchy, and allow fast-forwarding otherwise, to
mitigate the problem.

* jc/allow-ff-merging-kept-tags:
merge: allow fast-forward when merging a tracked tag

Merge branch 'ab/simplify-perl-makefile'Junio C Hamano Tue, 6 Mar 2018 22:54:04 +0000 (14:54 -0800)

Merge branch 'ab/simplify-perl-makefile'

Hotfix for a topic already in 'master'.

* ab/simplify-perl-makefile:
Makefile: generate Git(3pm) as dependency of the 'doc' and 'man' targets

Merge branch 'pw/add-p-single'Junio C Hamano Tue, 6 Mar 2018 22:54:03 +0000 (14:54 -0800)

Merge branch 'pw/add-p-single'

"git add -p" used to offer "/" (look for a matching hunk) as a
choice, even there was only one hunk, which has been corrected.
Also the single-key help is now given only for keys that are
enabled (e.g. help for '/' won't be shown when there is only one
hunk).

* pw/add-p-single:
add -p: improve error messages
add -p: only bind search key if there's more than one hunk
add -p: only display help for active keys

Merge branch 'sg/t6300-modernize'Junio C Hamano Tue, 6 Mar 2018 22:54:03 +0000 (14:54 -0800)

Merge branch 'sg/t6300-modernize'

Test update.

* sg/t6300-modernize:
t6300-for-each-ref: fix "more than one quoting style" tests

Merge branch 'sb/color-h-cleanup'Junio C Hamano Tue, 6 Mar 2018 22:54:02 +0000 (14:54 -0800)

Merge branch 'sb/color-h-cleanup'

Devdoc update.

* sb/color-h-cleanup:
color.h: document and modernize header

Merge branch 'nd/rebase-show-current-patch'Junio C Hamano Tue, 6 Mar 2018 22:54:02 +0000 (14:54 -0800)

Merge branch 'nd/rebase-show-current-patch'

The new "--show-current-patch" option gives an end-user facing way
to get the diff being applied when "git rebase" (and "git am")
stops with a conflict.

* nd/rebase-show-current-patch:
rebase: introduce and use pseudo-ref REBASE_HEAD
rebase: add --show-current-patch
am: add --show-current-patch

Merge branch 'xz/send-email-batch-size'Junio C Hamano Tue, 6 Mar 2018 22:54:02 +0000 (14:54 -0800)

Merge branch 'xz/send-email-batch-size'

"git send-email" learned to complain when the batch-size option is
not defined when the relogin-delay option is, since these two are
mutually required.

* xz/send-email-batch-size:
send-email: error out when relogin delay is missing

Merge branch 'ab/fetch-prune'Junio C Hamano Tue, 6 Mar 2018 22:54:01 +0000 (14:54 -0800)

Merge branch 'ab/fetch-prune'

Clarify how configured fetch refspecs interact with the "--prune"
option of "git fetch", and also add a handy short-hand for getting
rid of stale tags that are locally held.

* ab/fetch-prune:
fetch: make the --prune-tags work with <url>
fetch: add a --prune-tags option and fetch.pruneTags config
fetch tests: add scaffolding for the new fetch.pruneTags
git-fetch & config doc: link to the new PRUNING section
git remote doc: correct dangerous lies about what prune does
git fetch doc: add a new section to explain the ins & outs of pruning
fetch tests: fetch <url> <spec> as well as fetch [<remote>]
fetch tests: expand case/esac for later change
fetch tests: double quote a variable for interpolation
fetch tests: test --prune and refspec interaction
fetch tests: add a tag to be deleted to the pruning tests
fetch tests: re-arrange arguments for future readability
fetch tests: refactor in preparation for testing tag pruning
remote: add a macro for "refs/tags/*:refs/tags/*"
fetch: stop accessing "remote" variable indirectly
fetch: trivially refactor assignment to ref_nr
fetch: don't redundantly NULL something calloc() gave us

Merge branch 'sm/mv-dry-run-update'Junio C Hamano Tue, 6 Mar 2018 22:54:00 +0000 (14:54 -0800)

Merge branch 'sm/mv-dry-run-update'

Code clean-up.

* sm/mv-dry-run-update:
mv: remove unneeded 'if (!show_only)'
t7001: add test case for --dry-run

Merge branch 'nm/tag-edit'Junio C Hamano Tue, 6 Mar 2018 22:53:59 +0000 (14:53 -0800)

Merge branch 'nm/tag-edit'

"git tag" learned an explicit "--edit" option that allows the
message given via "-m" and "-F" to be further edited.

* nm/tag-edit:
tag: add --edit option

Sixth batch for 2.17Junio C Hamano Wed, 28 Feb 2018 21:39:24 +0000 (13:39 -0800)

Sixth batch for 2.17

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

Merge branch 'jk/push-options-via-transport-fix'Junio C Hamano Wed, 28 Feb 2018 21:37:58 +0000 (13:37 -0800)

Merge branch 'jk/push-options-via-transport-fix'

"git push" over http transport did not unquote the push-options
correctly.

* jk/push-options-via-transport-fix:
remote-curl: unquote incoming push-options
t5545: factor out http repository setup

Merge branch 'tz/do-not-clean-spec-file'Junio C Hamano Wed, 28 Feb 2018 21:37:58 +0000 (13:37 -0800)

Merge branch 'tz/do-not-clean-spec-file'

We no longer create any *.spec file, so "make clean" should not
remove it.

* tz/do-not-clean-spec-file:
Makefile: remove *.spec from clean target

Merge branch 'tg/worktree-create-tracking'Junio C Hamano Wed, 28 Feb 2018 21:37:56 +0000 (13:37 -0800)

Merge branch 'tg/worktree-create-tracking'

Hotfix for a recent topic.

* tg/worktree-create-tracking:
git-worktree.txt: fix indentation of example and text of 'add' command
git-worktree.txt: fix missing ")" typo

Merge branch 'gs/test-unset-xdg-cache-home'Junio C Hamano Wed, 28 Feb 2018 21:37:56 +0000 (13:37 -0800)

Merge branch 'gs/test-unset-xdg-cache-home'

Test update.

* gs/test-unset-xdg-cache-home:
test-lib.sh: unset XDG_CACHE_HOME

Merge branch 'tk/apply-dev-null-verify-name-fix'Junio C Hamano Wed, 28 Feb 2018 21:37:55 +0000 (13:37 -0800)

Merge branch 'tk/apply-dev-null-verify-name-fix'

Many places in "git apply" knew that "/dev/null" that signals
"there is no such file on this side of the diff" can be followed by
whitespace and garbage when parsing a patch, except for one, which
made an otherwise valid patch (e.g. ones from subversion) rejected.

* tk/apply-dev-null-verify-name-fix:
apply: handle Subversion diffs with /dev/null gracefully
apply: demonstrate a problem applying svn diffs

Merge branch 'sb/status-doc-fix'Junio C Hamano Wed, 28 Feb 2018 21:37:54 +0000 (13:37 -0800)

Merge branch 'sb/status-doc-fix'

Docfix.

* sb/status-doc-fix:
Documentation/git-status: clarify status table for porcelain mode

Merge branch 'es/worktree-add-post-checkout-hook'Junio C Hamano Wed, 28 Feb 2018 21:37:53 +0000 (13:37 -0800)

Merge branch 'es/worktree-add-post-checkout-hook'

"git worktree add" learned to run the post-checkout hook, just like
"git clone" runs it upon the initial checkout.

* es/worktree-add-post-checkout-hook:
worktree: add: fix 'post-checkout' not knowing new worktree location

Merge branch 'nd/am-quit'Junio C Hamano Wed, 28 Feb 2018 21:37:52 +0000 (13:37 -0800)

Merge branch 'nd/am-quit'

"git am" has learned the "--quit" option, in addition to the existing
"--abort" option; having the pair mirrors a few other commands like
"rebase" and "cherry-pick".

* nd/am-quit:
am: support --quit

Fifth batch for 2.17Junio C Hamano Tue, 27 Feb 2018 18:35:18 +0000 (10:35 -0800)

Fifth batch for 2.17

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

Sync with maintJunio C Hamano Tue, 27 Feb 2018 18:53:19 +0000 (10:53 -0800)

Sync with maint

Merge branch 'ys/bisect-object-id-missing-conversion... Junio C Hamano Tue, 27 Feb 2018 18:43:55 +0000 (10:43 -0800)

Merge branch 'ys/bisect-object-id-missing-conversion-fix' into maint

Fix for a commented-out code to adjust it to a rather old API change.

* ys/bisect-object-id-missing-conversion-fix:
bisect: debug: convert struct object to object_id

Merge branch 'sb/submodule-update-reset-fix' into maintJunio C Hamano Tue, 27 Feb 2018 18:43:54 +0000 (10:43 -0800)

Merge branch 'sb/submodule-update-reset-fix' into maint

When resetting the working tree files recursively, the working tree
of submodules are now also reset to match.

* sb/submodule-update-reset-fix:
submodule: submodule_move_head omits old argument in forced case
unpack-trees: oneway_merge to update submodules
t/lib-submodule-update.sh: fix test ignoring ignored files in submodules
t/lib-submodule-update.sh: clarify test

Merge branch 'ab/commit-m-with-fixup' into maintJunio C Hamano Tue, 27 Feb 2018 18:43:54 +0000 (10:43 -0800)

Merge branch 'ab/commit-m-with-fixup' into maint

"git commit --fixup" did not allow "-m<message>" option to be used
at the same time; allow it to annotate resulting commit with more
text.

* ab/commit-m-with-fixup:
commit: add support for --fixup <commit> -m"<extra message>"
commit doc: document that -c, -C, -F and --fixup with -m error

Merge branch 'nd/ita-wt-renames-in-status' into maintJunio C Hamano Tue, 27 Feb 2018 18:39:34 +0000 (10:39 -0800)

Merge branch 'nd/ita-wt-renames-in-status' into maint

"git status" after moving a path in the working tree (hence making
it appear "removed") and then adding with the -N option (hence
making that appear "added") detected it as a rename, but did not
report the old and new pathnames correctly.

* nd/ita-wt-renames-in-status:
wt-status.c: handle worktree renames
wt-status.c: rename rename-related fields in wt_status_change_data
wt-status.c: catch unhandled diff status codes
wt-status.c: coding style fix
Use DIFF_DETECT_RENAME for detect_rename assignments
t2203: test status output with porcelain v2 format

Merge branch 'jt/binsearch-with-fanout'Junio C Hamano Tue, 27 Feb 2018 18:34:03 +0000 (10:34 -0800)

Merge branch 'jt/binsearch-with-fanout'

Refactor the code to binary search starting from a fan-out table
(which is how the packfile is indexed with object names) into a
reusable helper.

* jt/binsearch-with-fanout:
packfile: refactor hash search with fanout table
packfile: remove GIT_DEBUG_LOOKUP log statements

Merge branch 'rd/typofix'Junio C Hamano Tue, 27 Feb 2018 18:34:03 +0000 (10:34 -0800)

Merge branch 'rd/typofix'

Typofix.

* rd/typofix:
Correct mispellings of ".gitmodule" to ".gitmodules"
t/: correct obvious typo "detahced"

Merge branch 'jk/test-hashmap-updates'Junio C Hamano Tue, 27 Feb 2018 18:34:02 +0000 (10:34 -0800)

Merge branch 'jk/test-hashmap-updates'

Code clean-up.

* jk/test-hashmap-updates:
test-hashmap: use "unsigned int" for hash storage
test-hashmap: simplify alloc_test_entry
test-hashmap: use strbuf_getline rather than fgets
test-hashmap: use xsnprintf rather than snprintf
test-hashmap: check allocation computation for overflow
test-hashmap: use ALLOC_ARRAY rather than bare malloc

Merge branch 'jk/sq-dequote-on-bogus-input'Junio C Hamano Tue, 27 Feb 2018 18:34:02 +0000 (10:34 -0800)

Merge branch 'jk/sq-dequote-on-bogus-input'

Code to unquote single-quoted string (used in the parser for
configuration files, etc.) did not diagnose bogus input correctly
and produced bogus results instead.

* jk/sq-dequote-on-bogus-input:
sq_dequote: fix extra consumption of source string

Merge branch 'bp/fsmonitor'Junio C Hamano Tue, 27 Feb 2018 18:34:01 +0000 (10:34 -0800)

Merge branch 'bp/fsmonitor'

Doc update for a recently added feature.

* bp/fsmonitor:
fsmonitor: update documentation to remove reference to invalid config settings

Merge branch 'bc/doc-interpret-trailers-grammofix'Junio C Hamano Tue, 27 Feb 2018 18:34:00 +0000 (10:34 -0800)

Merge branch 'bc/doc-interpret-trailers-grammofix'

Docfix.

* bc/doc-interpret-trailers-grammofix:
docs/interpret-trailers: fix agreement error

Merge branch 'as/ll-i18n'Junio C Hamano Tue, 27 Feb 2018 18:33:58 +0000 (10:33 -0800)

Merge branch 'as/ll-i18n'

Some messages in low level start-up codepath have been i18n-ized.

* as/ll-i18n:
Mark messages for translations

Merge branch 'sg/doc-test-must-fail-args'Junio C Hamano Tue, 27 Feb 2018 18:33:58 +0000 (10:33 -0800)

Merge branch 'sg/doc-test-must-fail-args'

Devdoc update.

* sg/doc-test-must-fail-args:
t: document 'test_must_fail ok=<signal-name>'

Merge branch 'sb/describe-blob'Junio C Hamano Tue, 27 Feb 2018 18:33:57 +0000 (10:33 -0800)

Merge branch 'sb/describe-blob'

"git describe $garbage" stopped giving any errors when the garbage
happens to be a string with 40 hexadecimal letters.

* sb/describe-blob:
describe: confirm that blobs actually exist

Merge branch 'rs/check-ignore-multi'Junio C Hamano Tue, 27 Feb 2018 18:33:56 +0000 (10:33 -0800)

Merge branch 'rs/check-ignore-multi'

"git check-ignore" with multiple paths got confused when one is a
file and the other is a directory, which has been fixed.

* rs/check-ignore-multi:
check-ignore: fix mix of directories and other file types

Merge branch 'rj/sparse-updates'Junio C Hamano Tue, 27 Feb 2018 18:33:55 +0000 (10:33 -0800)

Merge branch 'rj/sparse-updates'

Devtool update.

* rj/sparse-updates:
Makefile: suppress a sparse warning for pack-revindex.c
config.mak.uname: remove SPARSE_FLAGS setting for cygwin

Merge branch 'jk/t0002-simplify'Junio C Hamano Tue, 27 Feb 2018 18:33:55 +0000 (10:33 -0800)

Merge branch 'jk/t0002-simplify'

Code cleanup.

* jk/t0002-simplify:
t0002: simplify error checking

Merge branch 'js/packet-read-line-check-null'Junio C Hamano Tue, 27 Feb 2018 18:33:54 +0000 (10:33 -0800)

Merge branch 'js/packet-read-line-check-null'

Some low level protocol codepath could crash when they get an
unexpected flush packet, which is now fixed.

* js/packet-read-line-check-null:
always check for NULL return from packet_read_line()
correct error messages for NULL packet_read_line()

Merge branch 'js/fix-merge-arg-quoting-in-rebase-p'Junio C Hamano Tue, 27 Feb 2018 18:33:54 +0000 (10:33 -0800)

Merge branch 'js/fix-merge-arg-quoting-in-rebase-p'

"git rebase -p" mangled log messages of a merge commit, which is
now fixed.

* js/fix-merge-arg-quoting-in-rebase-p:
rebase -p: fix incorrect commit message when calling `git merge`.

Merge branch 'jk/gettext-poison'Junio C Hamano Tue, 27 Feb 2018 18:33:54 +0000 (10:33 -0800)

Merge branch 'jk/gettext-poison'

Test updates.

* jk/gettext-poison:
git-sh-i18n: check GETTEXT_POISON before USE_GETTEXT_SCHEME
t0205: drop redundant test

Merge branch 'jk/doc-do-not-write-extern'Junio C Hamano Tue, 27 Feb 2018 18:33:53 +0000 (10:33 -0800)

Merge branch 'jk/doc-do-not-write-extern'

Devdoc update.

* jk/doc-do-not-write-extern:
CodingGuidelines: mention "static" and "extern"

Merge branch 'bp/name-hash-dirname-fix'Junio C Hamano Tue, 27 Feb 2018 18:33:53 +0000 (10:33 -0800)

Merge branch 'bp/name-hash-dirname-fix'

"git add" files in the same directory, but spelling the directory
path in different cases on case insensitive filesystem, corrupted
the name hash data structure and led to unexpected results. This
has been corrected.

* bp/name-hash-dirname-fix:
name-hash: properly fold directory names in adjust_dirname_case()

Merge branch 'jc/blame-missing-path'Junio C Hamano Tue, 27 Feb 2018 18:33:50 +0000 (10:33 -0800)

Merge branch 'jc/blame-missing-path'

"git blame HEAD COPYING" in a bare repository failed to run, while
"git blame HEAD -- COPYING" run just fine. This has been corrected.

* jc/blame-missing-path:
blame: tighten command line parser

Merge branch 'ab/untracked-cache-invalidation-docs'Junio C Hamano Tue, 27 Feb 2018 18:33:50 +0000 (10:33 -0800)

Merge branch 'ab/untracked-cache-invalidation-docs'

Doc update to warn against remaining bugs in untracked cache.

* ab/untracked-cache-invalidation-docs:
update-index doc: note the caveat with "could not open..."
update-index doc: note a fixed bug in the untracked cache

Merge branch 'nd/fix-untracked-cache-invalidation'Junio C Hamano Tue, 27 Feb 2018 18:33:49 +0000 (10:33 -0800)

Merge branch 'nd/fix-untracked-cache-invalidation'

Some bugs around "untracked cache" feature have been fixed.

* nd/fix-untracked-cache-invalidation:
dir.c: ignore paths containing .git when invalidating untracked cache
dir.c: stop ignoring opendir() error in open_cached_dir()
dir.c: fix missing dir invalidation in untracked code
dir.c: avoid stat() in valid_cached_dir()
status: add a failing test showing a core.untrackedCache bug

perl: call timegm and timelocal with 4-digit yearBernhard M. Wiedemann Fri, 23 Feb 2018 17:20:45 +0000 (18:20 +0100)

perl: call timegm and timelocal with 4-digit year

Amazingly, timegm(gmtime(0)) is only 0 before 2020 because perl's
timegm deviates from GNU timegm(3) in how it handles years.

man Time::Local says

Whenever possible, use an absolute four digit year instead.

with a detailed explanation about ambiguity of 2-digit years above that.

Even though this ambiguity is error-prone with >50% of users getting it
wrong, it has been like this for 20+ years, so we just use 4-digit years
everywhere to be on the safe side.

We add some extra logic to cvsimport because it allows 2-digit year
input and interpreting an 18 as 1918 can be avoided easily and safely.

Signed-off-by: Bernhard M. Wiedemann <bwiedemann@suse.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

strbuf_read_file(): preserve errno across close() callJeff King Fri, 23 Feb 2018 07:00:54 +0000 (02:00 -0500)

strbuf_read_file(): preserve errno across close() call

If we encounter a read error, the user may want to report it
by looking at errno. However, our close() call may clobber
errno, leading to confusing results. Let's save and restore
it in the error case.

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

Documentation/gitsubmodules.txt: avoid non-ASCII apostr... Motoki Seki Thu, 22 Feb 2018 08:52:25 +0000 (08:52 +0000)

Documentation/gitsubmodules.txt: avoid non-ASCII apostrophes

In gitsubmodules.txt, a few non-ASCII apostrophes are used to spell
possessive, e.g. "submodule's". These unfortunately are not
rendered at https://git-scm.com/docs/gitsubmodules correctly by the
renderer used there.

Use ASCII apostrophes instead to work around the problem. It also
is good to be consistent, as there are possessives spelled with
ASCII apostrophes.

Signed-off-by: Motoki Seki <marmot.motoki@gmail.com>
Acked-by: Stefan Beller <sbeller@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

sequencer: factor out strbuf_read_file_or_whine()René Scharfe Thu, 22 Feb 2018 19:29:25 +0000 (20:29 +0100)

sequencer: factor out strbuf_read_file_or_whine()

Reduce code duplication by factoring out a function that reads an entire
file into a strbuf, or reports errors on stderr if something goes wrong.

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

t: send verbose test-helper output to fd 4Jeff King Thu, 22 Feb 2018 06:48:37 +0000 (01:48 -0500)

t: send verbose test-helper output to fd 4

Test helper functions like test_must_fail may produce
messages to stderr when they see a problem. When the tests
are run with "--verbose", this ends up on the test script's
stderr, and the user can read it.

But there's a problem. Some tests record stderr as part of
the test, like:

test_must_fail git foo 2>output &&
test_i18ngrep expected.message output

In this case the error text goes into "output". This makes
the --verbose output less useful (it also means we might
accidentally match it in the second, though in practice we
tend to produce these messages only on error, so we'd abort
the test when the first command fails).

Let's instead send this user-facing output directly to
descriptor 4, which always points to the original stderr (or
/dev/null in non-verbose mode). And it's already forbidden
to redirect descriptor 4, since we use it for BASH_XTRACEFD,
as explained in 9be795fbce (t5615: avoid re-using descriptor
4, 2017-12-08).

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

revision: drop --show-all optionJeff King Wed, 21 Feb 2018 23:27:24 +0000 (18:27 -0500)

revision: drop --show-all option

This was an undocumented debugging aid that does not seem to
have come in handy in the past decade, judging from its lack
of mentions on the mailing list.

Let's drop it in the name of simplicity. This is morally a
revert of 3131b71301 (Add "--show-all" revision walker flag
for debugging, 2008-02-09), but note that I did leave in the
mapping of UNINTERESTING to "^" in get_revision_mark(). I
don't think this would be possible to trigger with the
current code, but it's the only sensible marker.

We'll skip the usual deprecation period because this was
explicitly a debugging aid that was never documented.

Signed-off-by: Jeff King <peff@peff.net>
Acked-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

commit: drop uses of get_cached_commit_buffer()Jeff King Wed, 21 Feb 2018 23:13:38 +0000 (18:13 -0500)

commit: drop uses of get_cached_commit_buffer()

The "--show-all" revision option shows UNINTERESTING
commits. Some of these commits may be unparsed when we try
to show them (since we may or may not need to walk their
parents to fulfill the request).

Commit 3131b71301 (Add "--show-all" revision walker flag for
debugging, 2008-02-09) resolved this by just skipping
pretty-printing for commits without their object contents
cached, saying:

Because we now end up listing commits we may not even have been parsed
at all "show_log" and "show_commit" need to protect against commits
that don't have a commit buffer entry.

That was the easy fix to avoid the pretty-printer segfaulting,
but:

1. It doesn't work for all formats. E.g., --oneline
prints the oid for each such commit but not a trailing
newline, leading to jumbled output.

2. It only affects some commits, depending on whether we
happened to parse them or not (so if they were at the
tip of an UNINTERESTING starting point, or if we
happened to traverse over them, you'd see more data).

3. It unncessarily ties the decision to show the verbose
header to whether the commit buffer was cached. That
makes it harder to change the logic around caching
(e.g., if we could traverse without actually loading
the full commit objects).

These days it's safe to feed such a commit to the
pretty-print code. Since be5c9fb904 (logmsg_reencode: lazily
load missing commit buffers, 2013-01-26), we'll load it on
demand in such a case. So let's just always show the verbose
headers.

This does change the behavior of plumbing, but:

a. The --show-all option was explicitly introduced as a
debugging aid, and was never documented (and has rarely
even been mentioned on the list by git devs).

b. Avoiding the commits was already not deterministic due
to (2) above. So the caller might have seen full
headers for these commits anyway, and would need to be
prepared for it.

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

replace: rename 'new' variablesBrandon Williams Wed, 14 Feb 2018 18:59:59 +0000 (10:59 -0800)

replace: rename 'new' variables

Rename C++ keyword in order to bring the codebase closer to being able
to be compiled with a C++ compiler.

Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

trailer: rename 'template' variablesBrandon Williams Wed, 14 Feb 2018 18:59:58 +0000 (10:59 -0800)

trailer: rename 'template' variables

Rename C++ keyword in order to bring the codebase closer to being able
to be compiled with a C++ compiler.

Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

tempfile: rename 'template' variablesBrandon Williams Wed, 14 Feb 2018 18:59:57 +0000 (10:59 -0800)

tempfile: rename 'template' variables

Rename C++ keyword in order to bring the codebase closer to being able
to be compiled with a C++ compiler.

Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

wrapper: rename 'template' variablesBrandon Williams Wed, 14 Feb 2018 18:59:56 +0000 (10:59 -0800)

wrapper: rename 'template' variables

Rename C++ keyword in order to bring the codebase closer to being able
to be compiled with a C++ compiler.

Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

environment: rename 'namespace' variablesBrandon Williams Wed, 14 Feb 2018 18:59:55 +0000 (10:59 -0800)

environment: rename 'namespace' variables

Rename C++ keyword in order to bring the codebase closer to being able
to be compiled with a C++ compiler.

Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

diff: rename 'template' variablesBrandon Williams Wed, 14 Feb 2018 18:59:54 +0000 (10:59 -0800)

diff: rename 'template' variables

Rename C++ keyword in order to bring the codebase closer to being able
to be compiled with a C++ compiler.

Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

environment: rename 'template' variablesBrandon Williams Wed, 14 Feb 2018 18:59:53 +0000 (10:59 -0800)

environment: rename 'template' variables

Rename C++ keyword in order to bring the codebase closer to being able
to be compiled with a C++ compiler.

Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

init-db: rename 'template' variablesBrandon Williams Wed, 14 Feb 2018 18:59:52 +0000 (10:59 -0800)

init-db: rename 'template' variables

Rename C++ keyword in order to bring the codebase closer to being able
to be compiled with a C++ compiler.

Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

unpack-trees: rename 'new' variablesBrandon Williams Wed, 14 Feb 2018 18:59:51 +0000 (10:59 -0800)

unpack-trees: rename 'new' variables

Rename C++ keyword in order to bring the codebase closer to being able
to be compiled with a C++ compiler.

Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

trailer: rename 'new' variablesBrandon Williams Wed, 14 Feb 2018 18:59:50 +0000 (10:59 -0800)

trailer: rename 'new' variables

Rename C++ keyword in order to bring the codebase closer to being able
to be compiled with a C++ compiler.

Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

submodule: rename 'new' variablesBrandon Williams Wed, 14 Feb 2018 18:59:49 +0000 (10:59 -0800)

submodule: rename 'new' variables

Rename C++ keyword in order to bring the codebase closer to being able
to be compiled with a C++ compiler.

Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

split-index: rename 'new' variablesBrandon Williams Wed, 14 Feb 2018 18:59:48 +0000 (10:59 -0800)

split-index: rename 'new' variables

Rename C++ keyword in order to bring the codebase closer to being able
to be compiled with a C++ compiler.

Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

remote: rename 'new' variablesBrandon Williams Wed, 14 Feb 2018 18:59:47 +0000 (10:59 -0800)

remote: rename 'new' variables

Rename C++ keyword in order to bring the codebase closer to being able
to be compiled with a C++ compiler.

Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

ref-filter: rename 'new' variablesBrandon Williams Wed, 14 Feb 2018 18:59:46 +0000 (10:59 -0800)

ref-filter: rename 'new' variables

Rename C++ keyword in order to bring the codebase closer to being able
to be compiled with a C++ compiler.

Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

read-cache: rename 'new' variablesBrandon Williams Wed, 14 Feb 2018 18:59:45 +0000 (10:59 -0800)

read-cache: rename 'new' variables

Rename C++ keyword in order to bring the codebase closer to being able
to be compiled with a C++ compiler.

Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

line-log: rename 'new' variablesBrandon Williams Wed, 14 Feb 2018 18:59:44 +0000 (10:59 -0800)

line-log: rename 'new' variables

Rename C++ keyword in order to bring the codebase closer to being able
to be compiled with a C++ compiler.

Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

imap-send: rename 'new' variablesBrandon Williams Wed, 14 Feb 2018 18:59:43 +0000 (10:59 -0800)

imap-send: rename 'new' variables

Rename C++ keyword in order to bring the codebase closer to being able
to be compiled with a C++ compiler.

Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

http: rename 'new' variablesBrandon Williams Wed, 14 Feb 2018 18:59:42 +0000 (10:59 -0800)

http: rename 'new' variables

Rename C++ keyword in order to bring the codebase closer to being able
to be compiled with a C++ compiler.

Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

entry: rename 'new' variablesBrandon Williams Wed, 14 Feb 2018 18:59:41 +0000 (10:59 -0800)

entry: rename 'new' variables

Rename C++ keyword in order to bring the codebase closer to being able
to be compiled with a C++ compiler.

Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

diffcore-delta: rename 'new' variablesBrandon Williams Wed, 14 Feb 2018 18:59:40 +0000 (10:59 -0800)

diffcore-delta: rename 'new' variables

Rename C++ keyword in order to bring the codebase closer to being able
to be compiled with a C++ compiler.

Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

diff: rename 'new' variablesBrandon Williams Wed, 14 Feb 2018 18:59:39 +0000 (10:59 -0800)

diff: rename 'new' variables

Rename C++ keyword in order to bring the codebase closer to being able
to be compiled with a C++ compiler.

Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

diff-lib: rename 'new' variableBrandon Williams Wed, 14 Feb 2018 18:59:38 +0000 (10:59 -0800)

diff-lib: rename 'new' variable

Rename C++ keyword in order to bring the codebase closer to being able
to be compiled with a C++ compiler.

Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

commit: rename 'new' variablesBrandon Williams Wed, 14 Feb 2018 18:59:37 +0000 (10:59 -0800)

commit: rename 'new' variables

Rename C++ keyword in order to bring the codebase closer to being able
to be compiled with a C++ compiler.

Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

combine-diff: rename 'new' variablesBrandon Williams Wed, 14 Feb 2018 18:59:36 +0000 (10:59 -0800)

combine-diff: rename 'new' variables

Rename C++ keyword in order to bring the codebase closer to being able
to be compiled with a C++ compiler.

Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

remote: rename 'new' variablesBrandon Williams Wed, 14 Feb 2018 18:59:35 +0000 (10:59 -0800)

remote: rename 'new' variables

Rename C++ keyword in order to bring the codebase closer to being able
to be compiled with a C++ compiler.

Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

reflog: rename 'new' variablesBrandon Williams Wed, 14 Feb 2018 18:59:34 +0000 (10:59 -0800)

reflog: rename 'new' variables

Rename C++ keyword in order to bring the codebase closer to being able
to be compiled with a C++ compiler.

Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

pack-redundant: rename 'new' variablesBrandon Williams Wed, 14 Feb 2018 18:59:33 +0000 (10:59 -0800)

pack-redundant: rename 'new' variables

Rename C++ keyword in order to bring the codebase closer to being able
to be compiled with a C++ compiler.

Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

help: rename 'new' variablesBrandon Williams Wed, 14 Feb 2018 18:59:32 +0000 (10:59 -0800)

help: rename 'new' variables

Rename C++ keyword in order to bring the codebase closer to being able
to be compiled with a C++ compiler.

Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

checkout: rename 'new' variablesBrandon Williams Wed, 14 Feb 2018 18:59:31 +0000 (10:59 -0800)

checkout: rename 'new' variables

Rename C++ keyword in order to bring the codebase closer to being able
to be compiled with a C++ compiler.

Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

apply: rename 'new' variablesBrandon Williams Wed, 14 Feb 2018 18:59:30 +0000 (10:59 -0800)

apply: rename 'new' variables

Rename C++ keyword in order to bring the codebase closer to being able
to be compiled with a C++ compiler.

Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

apply: rename 'try' variablesBrandon Williams Wed, 14 Feb 2018 18:59:29 +0000 (10:59 -0800)

apply: rename 'try' variables

Rename C++ keyword in order to bring the codebase closer to being able
to be compiled with a C++ compiler.

Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

diff: rename 'this' variablesBrandon Williams Wed, 14 Feb 2018 18:59:28 +0000 (10:59 -0800)

diff: rename 'this' variables

Rename C++ keyword in order to bring the codebase closer to being able
to be compiled with a C++ compiler.

Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Fourth batch for 2.17Junio C Hamano Wed, 21 Feb 2018 20:45:35 +0000 (12:45 -0800)

Fourth batch for 2.17

Merge branch 'sg/test-i18ngrep'Junio C Hamano Wed, 21 Feb 2018 20:45:05 +0000 (12:45 -0800)

Merge branch 'sg/test-i18ngrep'

Test fixes.

* sg/test-i18ngrep:
t: make 'test_i18ngrep' more informative on failure
t: validate 'test_i18ngrep's parameters
t: move 'test_i18ncmp' and 'test_i18ngrep' to 'test-lib-functions.sh'
t5536: let 'test_i18ngrep' read the file without redirection
t5510: consolidate 'grep' and 'test_i18ngrep' patterns
t4001: don't run 'git status' upstream of a pipe
t6022: don't run 'git merge' upstream of a pipe
t5812: add 'test_i18ngrep's missing filename parameter
t5541: add 'test_i18ngrep's missing filename parameter

Merge branch 'gs/rebase-allow-empty-message'Junio C Hamano Wed, 21 Feb 2018 20:45:04 +0000 (12:45 -0800)

Merge branch 'gs/rebase-allow-empty-message'

"git rebase" learned to take "--allow-empty-message" option.

* gs/rebase-allow-empty-message:
rebase: add --allow-empty-message option

Merge branch 'lw/daemon-log-destination'Junio C Hamano Wed, 21 Feb 2018 20:45:04 +0000 (12:45 -0800)

Merge branch 'lw/daemon-log-destination'

The log from "git daemon" can be redirected with a new option; one
relevant use case is to send the log to standard error (instead of
syslog) when running it from inetd.

* lw/daemon-log-destination:
daemon: add --log-destination=(stderr|syslog|none)

Merge branch 'nd/format-patch-stat-width'Junio C Hamano Wed, 21 Feb 2018 20:45:04 +0000 (12:45 -0800)

Merge branch 'nd/format-patch-stat-width'

"git format-patch" learned to give 72-cols to diffstat, which is
consistent with other line length limits the subcommand uses for
its output meant for e-mails.

* nd/format-patch-stat-width:
format-patch: reduce patch diffstat width to 72
format-patch: keep cover-letter diffstat wrapped in 72 columns