Commit graph

46077 commits

Author SHA1 Message Date
Junio C Hamano bfee58c0a5 Merge branch 'dp/filter-branch-prune-empty' into maint
"git filter-branch --prune-empty" drops a single-parent commit that
becomes a no-op, but did not drop a root commit whose tree is empty.

* dp/filter-branch-prune-empty:
  p7000: add test for filter-branch with --prune-empty
  filter-branch: fix --prune-empty on parentless commits
  t7003: ensure --prune-empty removes entire branch when applicable
  t7003: ensure --prune-empty can prune root commit
2017-03-28 13:52:22 -07:00
Junio C Hamano 2b69d3116f Merge branch 'mm/fetch-show-error-message-on-unadvertised-object' into maint
"git fetch" that requests a commit by object name, when the other
side does not allow such an request, failed without much
explanation.

* mm/fetch-show-error-message-on-unadvertised-object:
  fetch-pack: add specific error for fetching an unadvertised object
  fetch_refs_via_pack: call report_unmatched_refs
  fetch-pack: move code to report unmatched refs to a function
2017-03-28 13:52:22 -07:00
Junio C Hamano 41534b626e Merge branch 'jk/interpret-branch-name' into maint
"git branch @" created refs/heads/@ as a branch, and in general the
code that handled @{-1} and @{upstream} was a bit too loose in
disambiguating.

* jk/interpret-branch-name:
  checkout: restrict @-expansions when finding branch
  strbuf_check_ref_format(): expand only local branches
  branch: restrict @-expansions when deleting
  t3204: test git-branch @-expansion corner cases
  interpret_branch_name: allow callers to restrict expansions
  strbuf_branchname: add docstring
  strbuf_branchname: drop return value
  interpret_branch_name: move docstring to header file
  interpret_branch_name(): handle auto-namelen for @{-1}
2017-03-28 13:52:22 -07:00
Junio C Hamano e25c1229b2 Merge branch 'ab/cond-skip-tests' into maint
A few tests were run conditionally under (rare) conditions where
they cannot be run (like running cvs tests under 'root' account).

* ab/cond-skip-tests:
  gitweb tests: skip tests when we don't have Time::HiRes
  gitweb tests: change confusing "skip_all" phrasing
  cvs tests: skip tests that call "cvs commit" when running as root
2017-03-28 13:52:21 -07:00
Junio C Hamano bb622de88d Merge branch 'jk/ident-empty' into maint
user.email that consists of only cruft chars should consistently
error out, but didn't.

* jk/ident-empty:
  ident: do not ignore empty config name/email
  ident: reject all-crud ident name
  ident: handle NULL email when complaining of empty name
  ident: mark error messages for translation
2017-03-28 13:52:21 -07:00
Junio C Hamano 252ef8fe9e Merge branch 'jk/delta-chain-limit' into maint
"git repack --depth=<n>" for a long time busted the specified depth
when reusing delta from existing packs.  This has been corrected.

* jk/delta-chain-limit:
  pack-objects: convert recursion to iteration in break_delta_chain()
  pack-objects: enforce --depth limit in reused deltas
2017-03-28 13:52:21 -07:00
Junio C Hamano 930405224f Merge branch 'sg/test-with-stdin' into maint
Teach the "debug" helper used in the test framework that allows a
command to run under "gdb" to make the session interactive.

* sg/test-with-stdin:
  tests: make the 'test_pause' helper work in non-verbose mode
  tests: create an interactive gdb session with the 'debug' helper
2017-03-28 13:52:20 -07:00
Junio C Hamano c34aa34299 Merge branch 'jk/interop-test' into maint
Picking two versions of Git and running tests to make sure the
older one and the newer one interoperate happily has now become
possible.

* jk/interop-test:
  t/interop: add test of old clients against modern git-daemon
  t: add an interoperability test harness
2017-03-28 13:52:20 -07:00
Junio C Hamano e0c74e6f38 Merge branch 'jt/perf-updates' into maint
The t/perf performance test suite was not prepared to test not so
old versions of Git, but now it covers versions of Git that are not
so ancient.

* jt/perf-updates:
  t/perf: add fallback for pre-bin-wrappers versions of git
  t/perf: use $MODERN_GIT for all repo-copying steps
  t/perf: export variable used in other blocks
2017-03-28 13:52:19 -07:00
Junio C Hamano cd27bc7a0b Merge branch 'rs/strbuf-add-real-path' into maint
An helper function to make it easier to append the result from
real_path() to a strbuf has been added.

* rs/strbuf-add-real-path:
  strbuf: add strbuf_add_real_path()
  cocci: use ALLOC_ARRAY
2017-03-28 13:52:19 -07:00
Junio C Hamano c772d1bcdc Merge branch 'jk/parse-config-key-cleanup' into maint
The "parse_config_key()" API function has been cleaned up.

* jk/parse-config-key-cleanup:
  parse_hide_refs_config: tell parse_config_key we don't want a subsection
  parse_config_key: allow matching single-level config
  parse_config_key: use skip_prefix instead of starts_with
  refs: parse_hide_refs_config to use parse_config_key
2017-03-28 13:52:19 -07:00
Junio C Hamano 8f9aeb0d36 Git 2.12.2
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-03-24 12:59:15 -07:00
Junio C Hamano 75d4476f52 Merge branch 'ab/doc-no-option-notation-fix' into maint
Doc fix.

* ab/doc-no-option-notation-fix:
  doc: change erroneous --[no]-whatever into --[no-]whatever
2017-03-24 12:57:55 -07:00
Junio C Hamano ce9e6178d3 Merge branch 'ab/push-default-doc-fix' into maint
Doc fix.

* ab/push-default-doc-fix:
  push: mention "push.default=tracking" in the documentation
2017-03-24 12:57:54 -07:00
Junio C Hamano 7bd881f7ca Merge branch 'nd/commit-hook-doc-fix' into maint
Doc fix.

* nd/commit-hook-doc-fix:
  git-commit.txt: list post-rewrite in HOOKS section
2017-03-24 12:57:54 -07:00
Junio C Hamano eb4e87cef9 Merge branch 'jc/config-case-cmdline-take-2' into maint
The code to parse "git -c VAR=VAL cmd" and set configuration
variable for the duration of cmd had two small bugs, which have
been fixed.
This supersedes jc/config-case-cmdline topic that has been discarded.

* jc/config-case-cmdline-take-2:
  config: use git_config_parse_key() in git_config_parse_parameter()
  config: move a few helper functions up
2017-03-24 12:57:54 -07:00
Junio C Hamano ea7aa5a464 Merge branch 'jk/grep-no-index-fix' into maint
The code to parse the command line "git grep <patterns>... <rev>
[[--] <pathspec>...]" has been cleaned up, and a handful of bugs
have been fixed (e.g. we used to check "--" if it is a rev).

* jk/grep-no-index-fix:
  grep: treat revs the same for --untracked as for --no-index
  grep: do not diagnose misspelt revs with --no-index
  grep: avoid resolving revision names in --no-index case
  grep: fix "--" rev/pathspec disambiguation
  grep: re-order rev-parsing loop
  grep: do not unnecessarily query repo for "--"
  grep: move thread initialization a little lower
2017-03-24 12:57:53 -07:00
Junio C Hamano 411a179412 Merge branch 'jn/remote-helpers-with-git-dir' into maint
"git ls-remote" and "git archive --remote" are designed to work
without being in a directory under Git's control.  However, recent
updates revealed that we randomly look into a directory called
.git/ without actually doing necessary set-up when working in a
repository.  Stop doing so.

* jn/remote-helpers-with-git-dir:
  remote helpers: avoid blind fall-back to ".git" when setting GIT_DIR
  remote: avoid reading $GIT_DIR config in non-repo
2017-03-24 12:57:53 -07:00
Junio C Hamano f3d5bbb283 Merge branch 'sb/submodule-config-parse-ignore-fix' into maint
Code to read submodule.<name>.ignore config did not state the
variable name correctly when giving an error message diagnosing
misconfiguration.

* sb/submodule-config-parse-ignore-fix:
  submodule-config: correct error reporting for invalid ignore value
2017-03-24 12:57:52 -07:00
Junio C Hamano f4d3af1859 Merge branch 'jk/push-deadlock-regression-fix' into maint
"git push" had a handful of codepaths that could lead to a deadlock
when unexpected error happened, which has been fixed.

* jk/push-deadlock-regression-fix:
  send-pack: report signal death of pack-objects
  send-pack: read "unpack" status even on pack-objects failure
  send-pack: improve unpack-status error messages
  send-pack: use skip_prefix for parsing unpack status
  send-pack: extract parsing of "unpack" response
  receive-pack: fix deadlock when we cannot create tmpdir
2017-03-24 12:57:52 -07:00
Michael J Gruber 296ab786ee mailmap: use Michael J Gruber's new address
Map both old addresses to the new, hopefully more permanent one.

Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
Signed-off-by: Michael J Gruber <git@grubix.eu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-03-24 12:30:27 -07:00
Junio C Hamano 8624735d9a Prepare for 2.12.2
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-03-21 15:04:12 -07:00
Junio C Hamano 71da2fb077 Merge branch 'jh/send-email-one-cc' into maint
"Cc:" on the trailer part does not have to conform to RFC strictly,
unlike in the e-mail header.  "git send-email" has been updated to
ignore anything after '>' when picking addresses, to allow non-address
cruft like " # stable 4.4" after the address.

* jh/send-email-one-cc:
  send-email: only allow one address per body tag
2017-03-21 15:03:30 -07:00
Junio C Hamano 7e02ec2c5d Merge branch 'jk/t6300-cleanup' into maint
A test that creates a confusing branch whose name is HEAD has been
corrected not to do so.

* jk/t6300-cleanup:
  t6300: avoid creating refs/heads/HEAD
2017-03-21 15:03:30 -07:00
Junio C Hamano d6bc22e64b Merge branch 'rs/commit-parsing-optim' into maint
The code that parses header fields in the commit object has been
updated for (micro)performance and code hygiene.

* rs/commit-parsing-optim:
  commit: don't check for space twice when looking for header
  commit: be more precise when searching for headers
2017-03-21 15:03:29 -07:00
Junio C Hamano 93abd17871 Merge branch 'jk/show-branch-lift-name-len-limit' into maint
"git show-branch" expected there were only very short branch names
in the repository and used a fixed-length buffer to hold them
without checking for overflow.

* jk/show-branch-lift-name-len-limit:
  show-branch: use skip_prefix to drop magic numbers
  show-branch: store resolved head in heap buffer
  show-branch: drop head_len variable
2017-03-21 15:03:29 -07:00
Junio C Hamano f63df942a3 Merge branch 'jk/tempfile-ferror-fclose-confusion' into maint
A caller of tempfile API that uses stdio interface to write to
files may ignore errors while writing, which is detected when
tempfile is closed (with a call to ferror()).  By that time, the
original errno that may have told us what went wrong is likely to
be long gone and was overwritten by an irrelevant value.
close_tempfile() now resets errno to EIO to make errno at least
predictable.

* jk/tempfile-ferror-fclose-confusion:
  tempfile: set errno to a known value before calling ferror()
2017-03-21 15:03:28 -07:00
Junio C Hamano 0d9f9424ad Merge branch 'rl/remote-allow-missing-branch-name-merge' into maint
"git remote rm X", when a branch has remote X configured as the
value of its branch.*.remote, tried to remove branch.*.remote and
branch.*.merge and failed if either is unset.

* rl/remote-allow-missing-branch-name-merge:
  remote: ignore failure to remove missing branch.<name>.merge
2017-03-21 15:03:28 -07:00
Junio C Hamano d30ec1bece Merge branch 'dt/gc-ignore-old-gc-logs' into maint
A "gc.log" file left by a backgrounded "gc --auto" disables further
automatic gc; it has been taught to run at least once a day (by
default) by ignoring a stale "gc.log" file that is too old.

* dt/gc-ignore-old-gc-logs:
  gc: ignore old gc.log files
2017-03-21 15:03:28 -07:00
Junio C Hamano f4470f2db0 Merge branch 'jt/upload-pack-error-report' into maint
"git upload-pack", which is a counter-part of "git fetch", did not
report a request for a ref that was not advertised as invalid.
This is generally not a problem (because "git fetch" will stop
before making such a request), but is the right thing to do.

* jt/upload-pack-error-report:
  upload-pack: report "not our ref" to client
2017-03-21 15:03:27 -07:00
Junio C Hamano e36e28e697 Merge branch 'rs/sha1-file-plug-fallback-base-leak' into maint
A leak in a codepath to read from a packed object in (rare) cases
has been plugged.

* rs/sha1-file-plug-fallback-base-leak:
  sha1_file: release fallback base's memory in unpack_entry()
2017-03-21 15:03:27 -07:00
Junio C Hamano d46d432577 Merge branch 'ss/remote-bzr-hg-placeholder-wo-python' into maint
There is no need for Python only to give a few messages to the
standard error stream, but we somehow did.

* ss/remote-bzr-hg-placeholder-wo-python:
  contrib: git-remote-{bzr,hg} placeholders don't need Python
2017-03-21 15:03:27 -07:00
Junio C Hamano cc8e385a7c Merge branch 'jc/diff-populate-filespec-size-only-fix' into maint
"git diff --quiet" relies on the size field in diff_filespec to be
correctly populated, but diff_populate_filespec() helper function
made an incorrect short-cut when asked only to populate the size
field for paths that need to go through convert_to_git() (e.g. CRLF
conversion).

* jc/diff-populate-filespec-size-only-fix:
  diff: do not short-cut CHECK_SIZE_ONLY check in diff_populate_filespec()
2017-03-21 15:03:26 -07:00
Junio C Hamano 36238fc4a5 Merge branch 'jk/http-walker-buffer-underflow-fix' into maint
"Dumb http" transport used to misparse a nonsense http-alternates
response, which has been fixed.

* jk/http-walker-buffer-underflow-fix:
  http-walker: fix buffer underflow processing remote alternates
2017-03-21 15:03:25 -07:00
Junio C Hamano 1a61be2a52 Merge branch 'mg/status-porcelain-no-i18n' into maint
"git status --porcelain" is supposed to give a stable output, but a
few strings were left as translatable by mistake.

* mg/status-porcelain-no-i18n:
  git-status: make porcelain more robust
2017-03-21 15:03:25 -07:00
Junio C Hamano 5c6bc96896 Merge branch 'ps/docs-diffcore' into maint
Doc update.

* ps/docs-diffcore:
  docs/diffcore: unquote "Complete Rewrites" in headers
  docs/diffcore: fix grammar in diffcore-rename header
2017-03-21 15:03:25 -07:00
Junio C Hamano c157ae9c91 Merge branch 'ew/markdown-url-in-readme' into maint
Doc update.

* ew/markdown-url-in-readme:
  README: create HTTP/HTTPS links from URLs in Markdown
2017-03-21 15:03:24 -07:00
Junio C Hamano f56a4390ee Merge branch 'rj/remove-unused-mktemp' into maint
Code cleanup.

* rj/remove-unused-mktemp:
  wrapper.c: remove unused gitmkstemps() function
  wrapper.c: remove unused git_mkstemp() function
2017-03-21 15:03:24 -07:00
Junio C Hamano 06c0ed7bfb Merge branch 'jk/ewah-use-right-type-in-sizeof' into maint
Code clean-up.

* jk/ewah-use-right-type-in-sizeof:
  ewah: fix eword_t/uint64_t confusion
2017-03-21 15:03:24 -07:00
Junio C Hamano 1f6b1afea0 Git 2.12.1
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-03-20 13:17:08 -07:00
Ævar Arnfjörð Bjarmason e4e016f65d push: mention "push.default=tracking" in the documentation
Change the documentation for push.tracking=* to re-include a mention
of what "tracking" does.

The "tracking" option was renamed to "upstream" back in
53c4031 ("push.default: Rename 'tracking' to 'upstream'", 2011-02-16),
this section was then subsequently rewritten in 87a70e4 ("config doc:
rewrite push.default section", 2013-06-19) to remove any mention of
"tracking".

Maybe we should just warn or die nowadays if this option is in the
config, but I had some old config of mine use this option, I'd
forgotten that it was a synonym, and nothing in git's documentation
mentioned that.

That's bad, either we shouldn't support it at all, or we should
document what it does. This patch does the latter.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-03-20 10:59:43 -07:00
Nguyễn Thái Ngọc Duy baced9e4e5 git-commit.txt: list post-rewrite in HOOKS section
The hook was added in a86ed83cce (Merge branch 'tr/notes-display' -
2010-03-24), which updated githooks.txt but not git-commit.txt.

git-commit.txt was later updated in e858af6d50 (commit: document a
couple of options - 2012-06-08). Since this commit focused on command
line options, this section was probably forgotten.

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-03-20 10:53:29 -07:00
Ævar Arnfjörð Bjarmason 2c7ee986c7 doc: change erroneous --[no]-whatever into --[no-]whatever
Change these two obvious typos to be in line with the rest of the
documentation, which uses the correct --[no-]whatever form.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-03-20 10:04:57 -07:00
SZEDER Gábor 59210dd56c tests: make the 'test_pause' helper work in non-verbose mode
When the 'test_pause' helper function invokes the shell mid-test, it
explicitly redirects the shell's stdout and stderr to file descriptors
3 and 4, which are the stdout and stderr of the tests (i.e. where they
would be connected anyway without those redirections).  These file
descriptors are only attached to the terminal in verbose mode, hence
the restriction of 'test_pause' to work only with '-v'.

Redirect the shell's stdout and stderr to the test environment's
original stdout and stderr, allowing it to work properly even in
non-verbose mode, and the restriction can be lifted.

Signed-off-by: SZEDER Gábor <szeder.dev@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-03-18 10:18:22 -07:00
SZEDER Gábor 4ecae3c8c1 tests: create an interactive gdb session with the 'debug' helper
The 'debug' test helper is supposed to facilitate debugging by running
a command of the test suite under gdb.  Unfortunately, its usefulness
is severely limited, because that gdb session is not interactive,
since the test's, and thus gdb's standard input is redirected from
/dev/null (for a good reason, see 781f76b15 (test-lib: redirect stdin
of tests, 2011-12-15)).

Redirect gdb's standard file descriptors from/to the test
environment's stdin, stdout and stderr in the 'debug' helper, thus
creating an interactive gdb session (even in non-verbose mode), which
is much, much more useful.

Signed-off-by: SZEDER Gábor <szeder.dev@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-03-18 10:18:20 -07:00
Junio C Hamano 7c9c2f8c39 Preparing for 2.12.1
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-03-16 14:01:20 -07:00
Junio C Hamano 2846ef3e27 Merge branch 'js/realpath-pathdup-fix' into maint
Git v2.12 was shipped with an embarrassing breakage where various
operations that verify paths given from the user stopped dying when
seeing an issue, and instead later triggering segfault.
... and then to down to 'maint'.

* js/realpath-pathdup-fix:
  real_pathdup(): fix callsites that wanted it to die on error
  t1501: demonstrate NULL pointer access with invalid GIT_WORK_TREE
2017-03-16 13:57:00 -07:00
Junio C Hamano f989ac276d Merge branch 'mm/two-more-xstrfmt' into maint
Code clean-up and a string truncation fix.

* mm/two-more-xstrfmt:
  bisect_next_all: convert xsnprintf to xstrfmt
  stop_progress_msg: convert xsnprintf to xstrfmt
2017-03-16 13:56:43 -07:00
Junio C Hamano 3d0449ded8 Merge branch 'vn/line-log-memcpy-size-fix' into maint
The command-line parsing of "git log -L" copied internal data
structures using incorrect size on ILP32 systems.

* vn/line-log-memcpy-size-fix:
  line-log: use COPY_ARRAY to fix mis-sized memcpy
2017-03-16 13:56:42 -07:00
Junio C Hamano c5bd9e5a97 Merge branch 'ax/line-log-range-merge-fix' into maint
The code to parse "git log -L..." command line was buggy when there
are many ranges specified with -L; overrun of the allocated buffer
has been fixed.

* ax/line-log-range-merge-fix:
  line-log.c: prevent crash during union of too many ranges
2017-03-16 13:56:42 -07:00