Commit graph

45355 commits

Author SHA1 Message Date
Jeff Hostetler 16f9b4cdd3 name-hash: specify initial size for istate.dir_hash table
Specify an initial size for the istate.dir_hash HashMap matching
the size of the istate.name_hash.

Previously hashmap_init() was given 0, causing a 64 bucket
hashmap to be created.  When working with very large
repositories, this would cause numerous rehash() calls to
realloc and rebalance the hashmap. This is especially true
when the worktree is deep, with many directories containing
a few files.

Signed-off-by: Jeff Hostetler <jeffhost@microsoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-03-22 13:41:41 -07:00
Junio C Hamano 3b9e3c2ced Git 2.11.1
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-02-02 13:21:27 -08:00
Junio C Hamano 45f28edbe9 Merge branch 'ws/request-pull-code-cleanup' into maint
Code clean-up.

* ws/request-pull-code-cleanup:
  request-pull: drop old USAGE stuff
2017-02-02 13:20:30 -08:00
Junio C Hamano 5816d3cdfb Merge branch 'jk/execv-dashed-external' into maint
Typing ^C to pager, which usually does not kill it, killed Git and
took the pager down as a collateral damage in certain process-tree
structure.  This has been fixed.

* jk/execv-dashed-external:
  execv_dashed_external: wait for child on signal death
  execv_dashed_external: stop exiting with negative code
  execv_dashed_external: use child_process struct
2017-02-02 13:20:29 -08:00
Junio C Hamano b32fe956d0 Ready for 2.11.1
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-01-31 13:34:48 -08:00
Junio C Hamano 1ac2ec6dd8 Merge branch 'sb/in-core-index-doc' into maint
Documentation and in-code comments updates.

* sb/in-core-index-doc:
  documentation: retire unfinished documentation
  cache.h: document add_[file_]to_index
  cache.h: document remove_index_entry_at
  cache.h: document index_name_pos
2017-01-31 13:32:11 -08:00
Junio C Hamano 6a7e25d155 Merge branch 'js/mingw-isatty' into maint
An update to a topic that is already in 'master'.

* js/mingw-isatty:
  mingw: follow-up to "replace isatty() hack"
2017-01-31 13:32:11 -08:00
Junio C Hamano 63f1bb8109 Merge branch 'jk/coding-guidelines-update' into maint
Developer doc update.

* jk/coding-guidelines-update:
  CodingGuidelines: clarify multi-line brace style
2017-01-31 13:32:11 -08:00
Junio C Hamano 21a9002fd1 Merge branch 'js/exec-path-coverity-workaround' into maint
Code cleanup.

* js/exec-path-coverity-workaround:
  git_exec_path: do not return the result of getenv()
  git_exec_path: avoid Coverity warning about unfree()d result
2017-01-31 13:32:10 -08:00
Junio C Hamano 2ae2362473 Merge branch 'ad/bisect-terms' into maint
Documentation fix.

* ad/bisect-terms:
  Documentation/bisect: improve on (bad|new) and (good|bad)
2017-01-31 13:32:10 -08:00
Junio C Hamano 14beee0d0d Merge branch 'jk/grep-e-could-be-extended-beyond-posix' into maint
Tighten a test to avoid mistaking an extended ERE regexp engine as
a PRE regexp engine.

* jk/grep-e-could-be-extended-beyond-posix:
  t7810: avoid assumption about invalid regex syntax
2017-01-31 13:32:09 -08:00
Junio C Hamano f5f55a1046 Merge branch 'km/branch-get-push-while-detached' into maint
"git <cmd> @{push}" on a detached HEAD used to segfault; it has
been corrected to error out with a message.

* km/branch-get-push-while-detached:
  branch_get_push: do not segfault when HEAD is detached
2017-01-31 13:32:08 -08:00
Junio C Hamano 2b3f61dc8b Merge branch 'jk/rebase-i-squash-count-fix' into maint
"git rebase -i" with a recent update started showing an incorrect
count when squashing more than 10 commits.

* jk/rebase-i-squash-count-fix:
  rebase--interactive: count squash commits above 10 correctly
2017-01-31 13:32:07 -08:00
Junio C Hamano 5fbb42a21e Merge branch 'jk/blame-fixes' into maint
"git blame --porcelain" misidentified the "previous" <commit, path>
pair (aka "source") when contents came from two or more files.

* jk/blame-fixes:
  blame: output porcelain "previous" header for each file
  blame: handle --no-abbrev
  blame: fix alignment with --abbrev=40
2017-01-31 13:32:07 -08:00
Junio C Hamano b1e4e1782f Merge branch 'jk/archive-zip-userdiff-config' into maint
"git archive" did not read the standard configuration files, and
failed to notice a file that is marked as binary via the userdiff
driver configuration.

* jk/archive-zip-userdiff-config:
  archive-zip: load userdiff config
2017-01-31 13:32:07 -08:00
Junio C Hamano 81037171a5 Merge branch 'dt/disable-bitmap-in-auto-gc' into maint
It is natural that "git gc --auto" may not attempt to pack
everything into a single pack, and there is no point in warning
when the user has configured the system to use the pack bitmap,
leading to disabling further "gc".

* dt/disable-bitmap-in-auto-gc:
  repack: die on incremental + write-bitmap-index
  auto gc: don't write bitmaps for incremental repacks
2017-01-31 13:32:06 -08:00
Junio C Hamano bb7c47a452 Merge branch 'nd/config-misc-fixes' into maint
Leakage of lockfiles in the config subsystem has been fixed.

* nd/config-misc-fixes:
  config.c: handle lock file in error case in git_config_rename_...
  config.c: rename label unlock_and_out
  config.c: handle error case for fstat() calls
2017-01-31 13:32:06 -08:00
Junio C Hamano 46ab222616 Merge branch 'jc/abbrev-autoscale-config' into maint
Recent update to the default abbreviation length that auto-scales
lacked documentation update, which has been corrected.

* jc/abbrev-autoscale-config:
  config.abbrev: document the new default that auto-scales
2017-01-31 13:32:06 -08:00
Junio C Hamano 867ce0416c Merge branch 'mh/fast-import-notes-fix-new' into maint
"git fast-import" sometimes mishandled while rebalancing notes
tree, which has been fixed.

* mh/fast-import-notes-fix-new:
  fast-import: properly fanout notes when tree is imported
2017-01-31 13:32:05 -08:00
Junio C Hamano bdc370a5c1 Merge branch 'jc/compression-config' into maint
Compression setting for producing packfiles were spread across
three codepaths, one of which did not honor any configuration.
Unify these so that all of them honor core.compression and
pack.compression variables the same way.

* jc/compression-config:
  compression: unify pack.compression configuration parsing
2017-01-31 13:32:05 -08:00
Junio C Hamano 844f7e61c9 Merge branch 'ew/svn-fixes' into maint
Meant eventually for 'maint'.

* ew/svn-fixes:
  git-svn: document useLogAuthor and addAuthorFrom config keys
  git-svn: allow "0" in SVN path components
2017-01-31 13:32:05 -08:00
Junio C Hamano af1a71f116 Merge branch 'ls/travis-p4-on-macos' into maint
Update the definition of the MacOSX test environment used by
TravisCI.

* ls/travis-p4-on-macos:
  travis-ci: fix Perforce install on macOS
2017-01-31 13:32:04 -08:00
Junio C Hamano fccb41391f Merge branch 'jk/make-tags-find-sources-tweak' into maint
Update the procedure to generate "tags" for developer support.

* jk/make-tags-find-sources-tweak:
  Makefile: exclude contrib from FIND_SOURCE_FILES
  Makefile: match shell scripts in FIND_SOURCE_FILES
  Makefile: exclude test cruft from FIND_SOURCE_FILES
  Makefile: reformat FIND_SOURCE_FILES
2017-01-31 13:32:04 -08:00
Junio C Hamano 424b07a17a Merge branch 'jc/latin-1' into maint
Some platforms no longer understand "latin-1" that is still seen in
the wild in e-mail headers; replace them with "iso-8859-1" that is
more widely known when conversion fails from/to it.

* jc/latin-1:
  utf8: accept "latin-1" as ISO-8859-1
  utf8: refactor code to decide fallback encoding
2017-01-31 13:32:04 -08:00
Lars Schneider 672f51cb83 travis-ci: fix Perforce install on macOS
The `perforce` and `perforce-server` package were moved from brew [1][2]
to cask [3]. Teach TravisCI the new location.

Perforce updates their binaries without version bumps. That made the
brew install (legitimately!) fail due to checksum mismatches. The
workaround is not necessary anymore as Cask [4] allows to disable the
checksum test for individual formulas.

[1] 1394e42de0
[2] f8da22d6b8
[3] https://github.com/caskroom/homebrew-cask/pull/29180
[4] https://caskroom.github.io/

Signed-off-by: Lars Schneider <larsxschneider@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-01-23 10:55:00 -08:00
Stefan Beller 830c912a0e documentation: retire unfinished documentation
When looking for documentation for a specific function, you may be tempted
to run

  git -C Documentation grep index_name_pos

only to find the file technical/api-in-core-index.txt, which doesn't
help for understanding the given function. It would be better to not find
these functions in the documentation, such that people directly dive into
the code instead.

In the previous patches we have documented
* index_name_pos()
* remove_index_entry_at()
* add_[file_]to_index()
in cache.h

We already have documentation for:
* add_index_entry()
* read_index()

Which leaves us with a TODO for:
* cache -> the_index macros
* refresh_index()
* discard_index()
* ie_match_stat() and ie_modified(); how they are different and when to
  use which.
* write_index() that was renamed to write_locked_index
* cache_tree_invalidate_path()
* cache_tree_update()

Signed-off-by: Stefan Beller <sbeller@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-01-19 12:18:43 -08:00
Stefan Beller 20cf41d021 cache.h: document add_[file_]to_index
Helped-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Stefan Beller <sbeller@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-01-19 12:18:06 -08:00
Stefan Beller 3bd72adff1 cache.h: document remove_index_entry_at
Do this by moving the existing documentation from
read-cache.c to cache.h.

Signed-off-by: Stefan Beller <sbeller@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-01-19 12:17:57 -08:00
Stefan Beller 12733e9dd3 cache.h: document index_name_pos
Signed-off-by: Stefan Beller <sbeller@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-01-19 12:13:46 -08:00
Johannes Schindelin 1d3f065e0e mingw: follow-up to "replace isatty() hack"
The version of the "replace isatty() hack" that got merged a few
weeks ago did not actually reflect the latest iteration of the patch
series: v3 was sent out with these changes, as requested by the
reviewer Johannes Sixt:

- reworded the comment about "recycling handles"

- moved the reassignment of the `console` variable before the dup2()
  call so that it is valid at all times

- removed the "handle = INVALID_HANDLE_VALUE" assignment, as the local
  variable `handle` is not used afterwards anyway

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Reviewed-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-01-18 13:31:25 -08:00
Junio C Hamano ad36dc8b4b Almost ready for 2.11.1
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-01-17 15:19:11 -08:00
Junio C Hamano 647a1bcf14 Merge branch 'mm/gc-safety-doc' into maint
Doc update.

* mm/gc-safety-doc:
  git-gc.txt: expand discussion of races with other processes
2017-01-17 15:19:11 -08:00
Junio C Hamano f976c89a20 Merge branch 'mm/push-social-engineering-attack-doc' into maint
Doc update on fetching and pushing.

* mm/push-social-engineering-attack-doc:
  doc: mention transfer data leaks in more places
2017-01-17 15:19:10 -08:00
Junio C Hamano 8ee6fc96f0 Merge branch 'jt/fetch-no-redundant-tag-fetch-map' into maint
Code cleanup to avoid using redundant refspecs while fetching with
the --tags option.

* jt/fetch-no-redundant-tag-fetch-map:
  fetch: do not redundantly calculate tag refmap
2017-01-17 15:19:09 -08:00
Junio C Hamano d4a682d42f Merge branch 'ls/filter-process' into maint
Doc update.

* ls/filter-process:
  t0021: fix flaky test
  docs: warn about possible '=' in clean/smudge filter process values
2017-01-17 15:19:08 -08:00
Junio C Hamano ef6e815133 Merge branch 'kh/tutorial-grammofix' into maint
* kh/tutorial-grammofix:
  doc: omit needless "for"
  doc: make the intent of sentence clearer
  doc: add verb in front of command to run
  doc: add articles (grammar)
2017-01-17 15:19:08 -08:00
Junio C Hamano 34d5a66a61 Merge branch 'lr/doc-fix-cet' into maint
* lr/doc-fix-cet:
  date-formats.txt: Typo fix
2017-01-17 15:19:08 -08:00
Junio C Hamano 1fb4a1126a Merge branch 'sb/t3600-cleanup' into maint
Code cleanup.

* sb/t3600-cleanup:
  t3600: slightly modernize style
  t3600: remove useless redirect
2017-01-17 15:19:07 -08:00
Junio C Hamano bc7547fd92 Merge branch 'jk/readme-gmane-is-no-more' into maint
* jk/readme-gmane-is-no-more:
  README: replace gmane link with public-inbox
2017-01-17 15:19:05 -08:00
Junio C Hamano 1addc197eb Merge branch 'sb/unpack-trees-grammofix' into maint
* sb/unpack-trees-grammofix:
  unpack-trees: fix grammar for untracked files in directories
2017-01-17 15:19:05 -08:00
Junio C Hamano 13236160c3 Merge branch 'ls/t0021-fixup' into maint
* ls/t0021-fixup:
  t0021: minor filter process test cleanup
2017-01-17 15:19:04 -08:00
Junio C Hamano d0366b137c Merge branch 'ak/lazy-prereq-mktemp' into maint
Test code clean-up.

* ak/lazy-prereq-mktemp:
  t7610: clean up foo.XXXXXX tmpdir
2017-01-17 15:19:04 -08:00
Junio C Hamano 1df2046d27 Merge branch 'nd/qsort-in-merge-recursive' into maint
Code simplification.

* nd/qsort-in-merge-recursive:
  merge-recursive.c: use string_list_sort instead of qsort
2017-01-17 15:19:03 -08:00
Junio C Hamano 48d23c12e7 Merge branch 'dt/smart-http-detect-server-going-away' into maint
When the http server gives an incomplete response to a smart-http
rpc call, it could lead to client waiting for a full response that
will never come.  Teach the client side to notice this condition
and abort the transfer.

An improvement counterproposal has failed.
cf. <20161114194049.mktpsvgdhex2f4zv@sigill.intra.peff.net>

* dt/smart-http-detect-server-going-away:
  upload-pack: optionally allow fetching any sha1
  remote-curl: don't hang when a server dies before any output
2017-01-17 15:19:03 -08:00
Junio C Hamano 8554ee155d Merge branch 'mk/mingw-winansi-ttyname-termination-fix' into maint
A potential but unlikely buffer overflow in Windows port has been
fixed.

* mk/mingw-winansi-ttyname-termination-fix:
  mingw: consider that UNICODE_STRING::Length counts bytes
2017-01-17 15:19:03 -08:00
Junio C Hamano 1d5cb4596d Merge branch 'gv/p4-multi-path-commit-fix' into maint
"git p4" that tracks multile p4 paths imported a single changelist
that touches files in these multiple paths as one commit, followed
by many empty commits.  This has been fixed.

* gv/p4-multi-path-commit-fix:
  git-p4: fix multi-path changelist empty commits
2017-01-17 15:19:02 -08:00
Junio C Hamano a558332f5e Merge branch 'jk/difftool-in-subdir' into maint
Even though an fix was attempted in Git 2.9.3 days, but running
"git difftool --dir-diff" from a subdirectory never worked. This
has been fixed.

* jk/difftool-in-subdir:
  difftool: rename variables for consistency
  difftool: chdir as early as possible
  difftool: sanitize $workdir as early as possible
  difftool: fix dir-diff index creation when in a subdirectory
2017-01-17 15:14:40 -08:00
Junio C Hamano aa83f7a2a4 Merge branch 'ld/p4-compare-dir-vs-symlink' into maint
"git p4" misbehaved when swapping a directory and a symbolic link.

* ld/p4-compare-dir-vs-symlink:
  git-p4: avoid crash adding symlinked directory
2017-01-17 15:11:08 -08:00
Junio C Hamano af04b1171b Merge branch 'jc/push-default-explicit' into maint
A lazy "git push" without refspec did not internally use a fully
specified refspec to perform 'current', 'simple', or 'upstream'
push, causing unnecessary "ambiguous ref" errors.

* jc/push-default-explicit:
  push: test pushing ambiguously named branches
  push: do not use potentially ambiguous default refspec
2017-01-17 15:11:07 -08:00
Junio C Hamano 943c9a7b86 Merge branch 'jt/mailinfo-fold-in-body-headers' into maint
Fix for NDEBUG builds.

* jt/mailinfo-fold-in-body-headers:
  mailinfo.c: move side-effects outside of assert
2017-01-17 15:11:06 -08:00