Commit graph

10117 commits

Author SHA1 Message Date
Junio C Hamano e1104a5ee5 Ninth batch for 2.13
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-03-28 14:14:56 -07:00
Junio C Hamano e471fa3405 Sync with 'maint' 2017-03-28 14:14:24 -07:00
Junio C Hamano 0330344e0f Merge branch 'jh/memihash-opt'
The name-hash used for detecting paths that are different only in
cases (which matter on case insensitive filesystems) has been
optimized to take advantage of multi-threading when it makes sense.

* jh/memihash-opt:
  name-hash: add test-lazy-init-name-hash to .gitignore
  name-hash: add perf test for lazy_init_name_hash
  name-hash: add test-lazy-init-name-hash
  name-hash: perf improvement for lazy_init_name_hash
  hashmap: document memihash_cont, hashmap_disallow_rehash api
  hashmap: add disallow_rehash setting
  hashmap: allow memihash computation to be continued
  name-hash: specify initial size for istate.dir_hash table
2017-03-28 14:06:00 -07:00
Junio C Hamano e779b0f070 Merge branch 'ab/branch-list-doc'
Doc update.

* ab/branch-list-doc:
  branch doc: update description for `--list`
  branch doc: change `git branch <pattern>` to use `<branchname>`
2017-03-28 14:05:59 -07:00
Junio C Hamano e394fa01d6 Merge branch 'sb/checkout-recurse-submodules'
"git checkout" is taught the "--recurse-submodules" option.

* sb/checkout-recurse-submodules:
  builtin/read-tree: add --recurse-submodules switch
  builtin/checkout: add --recurse-submodules switch
  entry.c: create submodules when interesting
  unpack-trees: check if we can perform the operation for submodules
  unpack-trees: pass old oid to verify_clean_submodule
  update submodules: add submodule_move_head
  submodule.c: get_super_prefix_or_empty
  update submodules: move up prepare_submodule_repo_env
  submodules: introduce check to see whether to touch a submodule
  update submodules: add a config option to determine if submodules are updated
  update submodules: add submodule config parsing
  make is_submodule_populated gently
  lib-submodule-update.sh: define tests for recursing into submodules
  lib-submodule-update.sh: replace sha1 by hash
  lib-submodule-update: teach test_submodule_content the -C <dir> flag
  lib-submodule-update.sh: do not use ./. as submodule remote
  lib-submodule-update.sh: reorder create_lib_submodule_repo
  submodule--helper.c: remove duplicate code
  connect_work_tree_and_git_dir: safely create leading directories
2017-03-28 14:05:58 -07:00
Junio C Hamano 49800c9407 Prepare for 2.12.3 2017-03-28 13:54:14 -07:00
Junio C Hamano 67476f59bc Merge branch 'km/config-grammofix' into maint
Doc update.

* km/config-grammofix:
  doc/config: grammar fixes for core.{editor,commentChar}
2017-03-28 13:52:29 -07:00
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 e0ef7fe78c Eighth batch for 2.13
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-03-27 11:00:12 -07:00
Junio C Hamano 3d6586d100 Merge branch 'km/config-grammofix'
Doc update.

* km/config-grammofix:
  doc/config: grammar fixes for core.{editor,commentChar}
2017-03-27 10:59:29 -07:00
Junio C Hamano 844768a298 Merge branch 'sb/describe-broken'
"git describe --dirty" dies when it cannot be determined if the
state in the working tree matches that of HEAD (e.g. broken
repository or broken submodule).  The command learned a new option
"git describe --broken" to give "$name-broken" (where $name is the
description of HEAD) in such a case.

* sb/describe-broken:
  builtin/describe: introduce --broken flag
2017-03-27 10:59:28 -07:00
Junio C Hamano 4e87565d2a Merge branch 'sb/push-options-via-transport'
Recently we started passing the "--push-options" through the
external remote helper interface; now the "smart HTTP" remote
helper understands what to do with the passed information.

* sb/push-options-via-transport:
  remote-curl: allow push options
  send-pack: send push options correctly in stateless-rpc case
2017-03-27 10:59:27 -07:00
Junio C Hamano 034667a458 Git 2.12.2
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJY1XqcAAoJELC16IaWr+bL0/EQAMFyPd8Rzjpt+yWs/gSllSSB
 KuBKpBssfBVhqEjHz7o1y3NseOzQj6mbJR3WIrGpUOhlzDU/ARFYL//3EkHEbDzd
 Cw9BXfU5B/zfkP9zPI8ecmjmjFfRwrCGA+DOTXYAA5RZz0Done+VsZwQYsBShEd8
 7cQNFNoThic4ww3Lba+VM6rh+6D89PcG21pQQy+DgwEWWTYPQXmebIYAnCgpLGcv
 JLIPgefEBGwDlQ08rGZaiuKU3cqSSXIovNz7Oslntr6OlH3tox4lHtGVV3w/i2uY
 /488+yiKqO7MP85/0Qg8xmv1sVnGOk9UilS18OsJsHGd1uByjWq6abfbdGqEmYJR
 JhY5L3OBX8hlCsP3//JESqMWoXFZTzaCL2FQAh59FdNTk0BxvQFw3OVRz2CP6Y6y
 Ghn4ywU3HSgZDYzPjE7sHsn+xTUAm3BZcHZ0VWM0we3QRibTewVkBmAh8nukZxfb
 MutOGVRTHBoPKlQ+THz6eyBHV4N431Wko+Zq7bl4KttJk/WXl1nCzyLVi0TizsoO
 NfeI1dtrOnMiBMR+dAIWoNd9cyDMU6j1wzvnWoCZs8YUrtegB9cM6XbI+gJ5NK6v
 TVvYcqoZf4JFteYqVAXN7NtHApPcoPDOtV4vsB/qNoY2xiX7YZRGshuijlst6jOC
 WfuyDe+wnrMb4Q4LVknC
 =jgnW
 -----END PGP SIGNATURE-----

Sync with 2.12.2
2017-03-24 13:31:01 -07:00
Junio C Hamano ea5b2dd28f Seventh batch for 2.13
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-03-24 13:30:34 -07:00
Junio C Hamano 78cf8efec3 Merge branch 'dl/credential-cache-socket-in-xdg-cache'
The default location "~/.git-credential-cache/socket" for the
socket used to communicate with the credential-cache daemon has
been moved to "~/.cache/git/credential/socket".

* dl/credential-cache-socket-in-xdg-cache:
  credential-cache: add tests for XDG functionality
  credential-cache: use XDG_CACHE_HOME for socket
  path.c: add xdg_cache_home
2017-03-24 13:07:34 -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 75ec4a6cb0 branch doc: update description for --list
The paragraph begins with a sample command line `git branch <name>`
that has nothing to do with the option being described.  Remove it,
but use the space to instead show that multiple patterns can be
given.

Also mention the unfortunate `-l` that can be easily confused with
it.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
Reviewed-by: Jonathan Nieder <jrnieder@gmail.com>
Reviewed-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-03-24 10:15:49 -07:00
Ævar Arnfjörð Bjarmason b66f3b6bba branch doc: change git branch <pattern> to use <branchname>
Change an example for `git branch <pattern>` to say `git branch
<branchname>` to be consistent with the synopsis. This changes
documentation added in d8d33736b5 ("branch: allow pattern arguments",
2011-08-28).

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-03-23 21:22:25 -07:00
Kyle Meyer e7e183d6ee doc/config: grammar fixes for core.{editor,commentChar}
Signed-off-by: Kyle Meyer <kyle@kyleam.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-03-23 12:04:08 -07:00
Jeff Hostetler 4f4458aafa hashmap: document memihash_cont, hashmap_disallow_rehash api
Document memihash_cont() and hashmap_disallow_rehash()
in Documentation/technical/api-hashmap.txt.

Signed-off-by: Jeff Hostetler <jeffhost@microsoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-03-23 10:40:07 -07:00
Brandon Williams 511155db51 remote-curl: allow push options
Teach remote-curl to understand push options and to be able to convey
them across HTTP.

Signed-off-by: Brandon Williams <bmwill@google.com>
Reviewed-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-03-22 15:41:21 -07:00
Stefan Beller b0176ce6b5 builtin/describe: introduce --broken flag
git-describe tells you the version number you're at, or errors out, e.g.
when you run it outside of a repository, which may happen when downloading
a tar ball instead of using git to obtain the source code.

To keep this property of only erroring out, when not in a repository,
severe (submodule) errors must be downgraded to reporting them gently
instead of having git-describe error out completely.

To achieve that a flag '--broken' is introduced, which is in the same
vein as '--dirty' but uses an actual child process to check for dirtiness.
When that child dies unexpectedly, we'll append '-broken' instead of
'-dirty'.

Signed-off-by: Stefan Beller <sbeller@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-03-22 10:13:41 -07:00
Junio C Hamano afd6726309 Sync with maint 2017-03-21 15:11:38 -07:00
Junio C Hamano 92f74a6192 Sixth batch for 2.13
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-03-21 15:11:13 -07:00
Junio C Hamano fbcfbc4d5d Merge branch 'nd/commit-hook-doc-fix'
Doc fix.

* nd/commit-hook-doc-fix:
  git-commit.txt: list post-rewrite in HOOKS section
2017-03-21 15:07:20 -07:00
Junio C Hamano b7b57b1434 Merge branch 'ab/push-default-doc-fix'
Doc fix.

* ab/push-default-doc-fix:
  push: mention "push.default=tracking" in the documentation
2017-03-21 15:07:19 -07:00
Junio C Hamano 9f43095e46 Merge branch 'ab/doc-no-option-notation-fix'
Doc fix.

* ab/doc-no-option-notation-fix:
  doc: change erroneous --[no]-whatever into --[no-]whatever
2017-03-21 15:07:19 -07:00
Junio C Hamano 4b7989b103 Merge branch 'nd/conditional-config-include'
The configuration file learned a new "includeIf.<condition>.path"
that includes the contents of the given path only when the
condition holds.  This allows you to say "include this work-related
bit only in the repositories under my ~/work/ directory".

* nd/conditional-config-include:
  config: add conditional include
  config.txt: reflow the second include.path paragraph
  config.txt: clarify multiple key values in include.path
2017-03-21 15:07:18 -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 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 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 c0f9c70589 Git 2.12.1
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJY0DjLAAoJELC16IaWr+bLunoQANIiSAbmnTjtiv2GOvWLIeGX
 YqSr8MsgpiXyuEgvh72gn/WGJvT+NoAQckV/J5/9iKOFce1KEhbjXdkcZMmUs/Ep
 6mFO7YObMZ/mrIkyXdboCr8fzhaRXDFmR99UvJnshljAQjQT3YNQjcSHwm+QrpF5
 jD0IaZqZcTkbRqJDWeM3TDhn1wdpvsFCTRXYivUOSHacLmf0vdsBk5auG7Qe9WOX
 sJdm4BtvklG/uiCdLar1Izpueo56iUxas3WKh6BFgvJQ9S0678lfYaQEQhul4brF
 M84GIIKqTg4Wmx/nFfcgLCT4t14XwmbR5kM5fTXvxRhzf+Cwc5JmUKqiZZRJmV8L
 SxkoFPypASpcD4915YsGTUs/tzTAvTmaLPkGbQrgZHuLXAfq5toKqJOjDx7MHnrl
 K9hxyDX0vbH9tpzuTcEkncgn8Hy1PaBN4+425s1ozIEsXhMK4uQgfHsi4TH10dvK
 zp463Ux1NSAsYCko+hkvkd3jG0zbRCY0akpLuXhVlqmYzMnGgY3nwfDPGTmroRBH
 0NK6wmnB+z+8RvQzaBLzfVN2SeZs0Ay2igjcWCk5lEbPEZtbOMYRLYVw0cz9os0y
 9Br8UBSQLBd3AyagVZE4NZpt5TKYP9EQ25cwOuXaiHK52NaY6inH9bA/vvPqT5fc
 YfeTRoCCnn/rkHz6cnF0
 =jkWN
 -----END PGP SIGNATURE-----

Sync with 2.12.1
2017-03-20 13:56:13 -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
Junio C Hamano 9d77b0405c Fifth batch for 2.13
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-03-17 13:51:58 -07:00
Junio C Hamano f6c64c648a Merge branch 'bw/attr-pathspec'
The pathspec mechanism learned to further limit the paths that
match the pattern to those that have specified attributes attached
via the gitattributes mechanism.

* bw/attr-pathspec:
  pathspec: allow escaped query values
  pathspec: allow querying for attributes
2017-03-17 13:50:26 -07:00
Junio C Hamano 3edcc04862 Merge branch 'sb/rev-parse-show-superproject-root'
From a working tree of a repository, a new option of "rev-parse"
lets you ask if the repository is used as a submodule of another
project, and where the root level of the working tree of that
project (i.e. your superproject) is.

* sb/rev-parse-show-superproject-root:
  rev-parse: add --show-superproject-working-tree
2017-03-17 13:50:25 -07:00
Junio C Hamano 94c9b5af70 Merge branch 'cc/split-index-config'
The experimental "split index" feature has gained a few
configuration variables to make it easier to use.

* cc/split-index-config: (22 commits)
  Documentation/git-update-index: explain splitIndex.*
  Documentation/config: add splitIndex.sharedIndexExpire
  read-cache: use freshen_shared_index() in read_index_from()
  read-cache: refactor read_index_from()
  t1700: test shared index file expiration
  read-cache: unlink old sharedindex files
  config: add git_config_get_expiry() from gc.c
  read-cache: touch shared index files when used
  sha1_file: make check_and_freshen_file() non static
  Documentation/config: add splitIndex.maxPercentChange
  t1700: add tests for splitIndex.maxPercentChange
  read-cache: regenerate shared index if necessary
  config: add git_config_get_max_percent_split_change()
  Documentation/git-update-index: talk about core.splitIndex config var
  Documentation/config: add information for core.splitIndex
  t1700: add tests for core.splitIndex
  update-index: warn in case of split-index incoherency
  read-cache: add and then use tweak_split_index()
  split-index: add {add,remove}_split_index() functions
  config: add git_config_get_split_index()
  ...
2017-03-17 13:50:23 -07:00
Devin Lehmacher 60759baac1 credential-cache: use XDG_CACHE_HOME for socket
Make git-credential-cache follow the XDG base path specification by
default. This increases consistency with other applications and helps
keep clutter out of users' home directories.

Check the old socket location, ~/.git-credential-cache/, and use
~/.git-credential-cache/socket if that directory exists rather than
forcing users who have used `git credential-cache` before to migrate to
the new XDG compliant location.
Otherwise use the socket $XDG_CACHE_HOME/git/credential/socket following
XDG base path specification. Use the subdirectory credential/ in case
other files are cached under $XDG_CACHE_HOME/git/ in the future and to
make the socket's purpose clear.

Signed-off-by: Devin Lehmacher <lehmacdj@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-03-17 11:19:40 -07:00
Stefan Beller 25804914fa builtin/read-tree: add --recurse-submodules switch
A new known failure mode is introduced[1], which is actually not
a failure but a feature in read-tree. Unlike checkout for which
the recursive submodule tests were originally written, read-tree does
warn about ignored untracked files that would be overwritten.
For the sake of keeping the test library for submodules generic, just
mark the test as a failure.

[1] KNOWN_FAILURE_SUBMODULE_OVERWRITE_IGNORED_UNTRACKED

Signed-off-by: Stefan Beller <sbeller@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-03-16 14:07:16 -07:00
Stefan Beller 1fc458d958 builtin/checkout: add --recurse-submodules switch
This exposes a flag to recurse into submodules
in builtin/checkout making use of the code implemented
in prior patches.

A new failure mode is introduced in the submodule
update library, as the directory/submodule conflict
is not solved in prior patches.

Signed-off-by: Stefan Beller <sbeller@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-03-16 14:07:16 -07:00
Junio C Hamano 32c43f595f Sync with 'maint'
* maint:
  Preparing for 2.12.1
2017-03-16 14:03:11 -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 4a9b9b32d4 Fourth batch after 2.12
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-03-14 15:29:40 -07:00
Junio C Hamano 5296357386 Merge branch 'dp/filter-branch-prune-empty'
"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-14 15:23:19 -07:00