Commit graph

11766 commits

Author SHA1 Message Date
Frank Dana 112ea42663 docs/gitweb.conf: config variable typo
The documentation for the feature 'snapshot' claimed
"This feature can be configured on a per-repository basis via
repository's `gitweb.blame` configuration variable"

Fixed to specify `gitweb.snapshot` as the variable name.

Signed-off-by: Frank Dana <ferdnyc@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-12-09 10:59:55 +09:00
Elijah Newren a8f5a59067 git-rebase.txt: update note about directory rename detection and am
In commit 6aba117d5c ("am: avoid directory rename detection when
calling recursive merge machinery", 2018-08-29), the git-rebase manpage
probably should have also been updated to note the stronger
incompatibility between git-am and directory rename detection.  Update
it now.

Signed-off-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-12-09 09:21:23 +09:00
Stefan Beller 161b1cf3bd sha1-array: provide oid_array_filter
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>
2018-12-05 11:42:31 +09:00
Junio C Hamano 5335669531 Merge branch 'en/rebase-consistency'
* en/rebase-consistency:
  rebase docs: fix incorrect format of the section Behavioral Differences
2018-12-04 12:49:39 +09:00
Johannes Sixt 6fcbad87d4 rebase docs: fix incorrect format of the section Behavioral Differences
The text body of section Behavioral Differences is typeset as code,
but should be regular text. Remove the indentation to achieve that.

While here, prettify the language:

- use "the x backend" instead of "x-based rebase";
- use present tense instead of future tense;

and use subsections instead of a list.

Signed-off-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-12-04 11:50:52 +09:00
Martin Ågren 7e75a63d74 RelNotes 2.20: drop spurious double quote
We have three double-quote characters, which is one too many or too few.
Dropping the last one seems to match the original intention best.

Signed-off-by: Martin Ågren <martin.agren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-12-04 11:26:40 +09:00
Martin Ågren 7a49e44465 RelNotes 2.20: clarify sentence
I had to read this sentence a few times to understand it. Let's try to
clarify it.

Signed-off-by: Martin Ågren <martin.agren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-12-04 11:26:38 +09:00
Martin Ågren 00ac55c7bd RelNotes 2.20: move some items between sections
Some items that should be in "Performance, Internal Implementation,
Development Support etc." have ended up in "UI, Workflows & Features"
and "Fixes since v2.19". Move them, and do s/uses/use/ while at it.

Signed-off-by: Martin Ågren <martin.agren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-12-04 11:26:36 +09:00
Junio C Hamano 8a0ba68f6d Git 2.20-rc2
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-12-01 21:44:56 +09:00
Junio C Hamano 15cc2da0b5 Merge branch 'gh/diff-raw-has-no-ellipses'
"git diff --raw" lost ellipses to adjust the output columns for
some time now, but the documentation still showed them.

* gh/diff-raw-has-no-ellipses:
  doc: update diff-format.txt for removed ellipses in --raw
2018-12-01 21:41:45 +09:00
Junio C Hamano 1efd0e8437 Merge branch 'ma/reset-doc-rendering-fix'
Doc updates.

* ma/reset-doc-rendering-fix:
  git-reset.txt: render literal examples as monospace
  git-reset.txt: render tables correctly under Asciidoctor
2018-12-01 21:41:43 +09:00
Junio C Hamano d8981c3f88 format-patch: do not let its diff-options affect --range-diff
Stop leaking how the primary output of format-patch is customized to
the range-diff machinery and instead let the latter use its own
"reasonable default", in order to correct the breakage introduced by
a5170794 ("Merge branch 'ab/range-diff-no-patch'", 2018-11-18) on
the 'master' front.  "git format-patch --range-diff..." without any
weird diff option started to include the "range-diff --stat" output,
which is rather useless right now, that made the whole thing
unusable and this is probably the least disruptive way to whip the
codebase into a shippable shape.

We may want to later make the range-diff driven by format-patch more
configurable, but that would have to wait until we have a good
design.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-11-30 13:47:55 +09:00
Martin Ågren 3006f5ee16 git-reset.txt: render literal examples as monospace
Large parts of this document do not use `backticks` around literal
examples such as branch names (`topic/wip`), git usages, `HEAD` and
`<commit-ish>` so they render as ordinary text. Fix that.

Signed-off-by: Martin Ågren <martin.agren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-11-29 15:44:18 +09:00
Martin Ågren 4724f3177a git-reset.txt: render tables correctly under Asciidoctor
Asciidoctor removes the indentation of each line in these tables, so the
last lines of each table have a completely broken alignment.

Similar to 379805051d ("Documentation: render revisions correctly under
Asciidoctor", 2018-05-06), use an explicit literal block to indicate
that we want to keep the leading whitespace in the tables.

Because this gives us some extra indentation, we can remove the one that
we have been carrying explicitly. That is, drop the first six spaces of
indentation on each line. With Asciidoc (8.6.10), this results in
identical rendering before and after this commit, both for git-reset.1
and git-reset.html.

Reported-by: Paweł Samoraj <samoraj.pawel@gmail.com>
Signed-off-by: Martin Ågren <martin.agren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-11-29 15:44:15 +09:00
Greg Hurrell f9ea6e45ed doc: update diff-format.txt for removed ellipses in --raw
Since 7cb6ac1e4b ("diff: diff_aligned_abbrev: remove ellipsis after
abbreviated SHA-1 value", 2017-12-03), the "--raw" format of diff
does not add ellipses in an attempt to align the output, but the
documentation was not updated to reflect this.

Signed-off-by: Greg Hurrell <greg@hurrell.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-11-26 15:59:14 +09:00
Junio C Hamano 7f4e641693 Git 2.20-rc1
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-11-21 23:24:52 +09:00
Junio C Hamano 7cb1ea13d4 Sync with 2.19.2 2018-11-21 23:23:48 +09:00
Junio C Hamano 98cdfbb84a Git 2.19.2
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-11-21 23:22:12 +09:00
Junio C Hamano 227124b271 Merge branch 'uk/merge-subtree-doc-update' into maint
Belated documentation update to adjust to a new world order that
happened a yew years ago.

* uk/merge-subtree-doc-update:
  howto/using-merge-subtree: mention --allow-unrelated-histories
2018-11-21 22:58:08 +09:00
Junio C Hamano eba14167f1 Merge branch 'ah/doc-updates' into maint
Doc updates.

* ah/doc-updates:
  doc: fix formatting in git-update-ref
  doc: fix indentation of listing blocks in gitweb.conf.txt
  doc: fix descripion for 'git tag --format'
  doc: fix inappropriate monospace formatting
  doc: fix ASCII art tab spacing
  doc: clarify boundaries of 'git worktree list --porcelain'
2018-11-21 22:58:07 +09:00
Junio C Hamano b53df43bf5 Merge branch 'sg/doc-show-branch-typofix' into maint
Docfix.

* sg/doc-show-branch-typofix:
  doc: fix small typo in git show-branch
2018-11-21 22:58:07 +09:00
Junio C Hamano 53016f4c13 Merge branch 'mm/doc-no-dashed-git' into maint
Doc update.

* mm/doc-no-dashed-git:
  doc: fix a typo and clarify a sentence
2018-11-21 22:58:05 +09:00
Junio C Hamano 6b57374d3e Merge branch 'jc/how-to-document-api' into maint
Doc update.

* jc/how-to-document-api:
  CodingGuidelines: document the API in *.h files
2018-11-21 22:58:03 +09:00
Junio C Hamano 368ba6b7ac Merge branch 'mw/doc-typofixes' into maint
Typofixes.

* mw/doc-typofixes:
  docs: typo: s/isimilar/similar/
  docs: graph: remove unnecessary `graph_update()' call
  docs: typo: s/go/to/
2018-11-21 22:58:03 +09:00
Junio C Hamano 171309399a Merge branch 'ma/mailing-list-address-in-git-help' into maint
Doc update.

* ma/mailing-list-address-in-git-help:
  git doc: direct bug reporters to mailing list archive
2018-11-21 22:58:02 +09:00
Junio C Hamano 060d0617ef Merge branch 'nd/packobjectshook-doc-fix' into maint
Doc update.

* nd/packobjectshook-doc-fix:
  config.txt: correct the note about uploadpack.packObjectsHook
2018-11-21 22:58:01 +09:00
Junio C Hamano 35e54ea2e0 Merge branch 'ma/commit-graph-docs' into maint
Doc update.

* ma/commit-graph-docs:
  Doc: refer to the "commit-graph file" with dash
  git-commit-graph.txt: refer to "*commit*-graph file"
  git-commit-graph.txt: typeset more in monospace
  git-commit-graph.txt: fix bullet lists
2018-11-21 22:58:00 +09:00
Junio C Hamano 871955c797 Merge branch 'dz/credential-doc-url-matching-rules' into maint
Doc update.

* dz/credential-doc-url-matching-rules:
  doc: clarify gitcredentials path component matching
2018-11-21 22:58:00 +09:00
Junio C Hamano 0caea62a4b Merge branch 'fe/doc-updates' into maint
Doc updates.

* fe/doc-updates:
  git-describe.1: clarify that "human readable" is also git-readable
  git-column.1: clarify initial description, provide examples
  git-archimport.1: specify what kind of Arch we're talking about
2018-11-21 22:57:58 +09:00
Junio C Hamano 3ae0ac65cf Merge branch 'bw/protocol-v2' into maint
Doc fix.

* bw/protocol-v2:
  config: document value 2 for protocol.version
2018-11-21 22:57:57 +09:00
Junio C Hamano 04b9bdbe16 Merge branch 'sg/doc-trace-appends' into maint
Docfix.

* sg/doc-trace-appends:
  Documentation/git.txt: clarify that GIT_TRACE=/path appends
2018-11-21 22:57:54 +09:00
Junio C Hamano 7532a18189 Merge branch 'ts/doc-build-manpage-xsl-quietly' into maint
Build tweak.

* ts/doc-build-manpage-xsl-quietly:
  Documentation/Makefile: make manpage-base-url.xsl generation quieter
2018-11-21 22:57:53 +09:00
Junio C Hamano b52ac60bc4 Merge branch 'md/exclude-promisor-objects-fix' into maint
Operations on promisor objects make sense in the context of only a
small subset of the commands that internally use the revisions
machinery, but the "--exclude-promisor-objects" option were taken
and led to nonsense results by commands like "log", to which it
didn't make much sense.  This has been corrected.

* md/exclude-promisor-objects-fix:
  exclude-promisor-objects: declare when option is allowed
  Documentation/git-log.txt: do not show --exclude-promisor-objects
2018-11-21 22:57:52 +09:00
Junio C Hamano e60e38a15d Merge branch 'ds/commit-graph-with-grafts' into maint
The recently introduced commit-graph auxiliary data is incompatible
with mechanisms such as replace & grafts that "breaks" immutable
nature of the object reference relationship.  Disable optimizations
based on its use (and updating existing commit-graph) when these
incompatible features are in use in the repository.

* ds/commit-graph-with-grafts:
  commit-graph: close_commit_graph before shallow walk
  commit-graph: not compatible with uninitialized repo
  commit-graph: not compatible with grafts
  commit-graph: not compatible with replace objects
  test-repository: properly init repo
  commit-graph: update design document
  refs.c: upgrade for_each_replace_ref to be a each_repo_ref_fn callback
  refs.c: migrate internal ref iteration to pass thru repository argument
2018-11-21 22:57:47 +09:00
Junio C Hamano 50e6df214d Merge branch 'en/update-ref-no-deref-stdin' into maint
"git update-ref" learned to make both "--no-deref" and "--stdin"
work at the same time.

* en/update-ref-no-deref-stdin:
  update-ref: allow --no-deref with --stdin
  update-ref: fix type of update_flags variable to match its usage
2018-11-21 22:57:46 +09:00
Junio C Hamano e293824d00 Merge branch 'jk/trailer-fixes' into maint
"git interpret-trailers" and its underlying machinery had a buggy
code that attempted to ignore patch text after commit log message,
which triggered in various codepaths that will always get the log
message alone and never get such an input.

* jk/trailer-fixes:
  append_signoff: use size_t for string offsets
  sequencer: ignore "---" divider when parsing trailers
  pretty, ref-filter: format %(trailers) with no_divider option
  interpret-trailers: allow suppressing "---" divider
  interpret-trailers: tighten check for "---" patch boundary
  trailer: pass process_trailer_opts to trailer_info_get()
  trailer: use size_t for iterating trailer list
  trailer: use size_t for string offsets
2018-11-21 22:57:42 +09:00
Junio C Hamano 5e8feea17a Merge branch 'tz/build-tech-midx-doc'
A documentation page that is referred to by other pages was not
built by mistake, which has been corrected.

* tz/build-tech-midx-doc:
  Documentation: build technical/multi-pack-index
2018-11-21 20:39:02 +09:00
Jonathan Nieder 2a9dedef2e index: make index.threads=true enable ieot and eoie
If a user explicitly sets

	[index]
		threads = true

to read the index using multiple threads, ensure that index writes
include the offset table by default to make that possible.  This
ensures that the user's intent of turning on threading is respected.

In other words, permit the following configurations:

- index.threads and index.recordOffsetTable unspecified: do not write
  the offset table yet (to avoid alarming the user with "ignoring IEOT
  extension" messages when an older version of Git accesses the
  repository) but do make use of multiple threads to read the index if
  the supporting offset table is present.

  This can also be requested explicitly by setting index.threads=true,
  0, or >1 and index.recordOffsetTable=false.

- index.threads=false or 1: do not write the offset table, and do not
  make use of the offset table.

  One can set index.recordOffsetTable=false as well, to be more
  explicit.

- index.threads=true, 0, or >1 and index.recordOffsetTable unspecified:
  write the offset table and make use of threads at read time.

  This can also be requested by setting index.threads=true, 0, >1, or
  unspecified and index.recordOffsetTable=true.

Fortunately the complication is temporary: once most Git installations
have upgraded to a version with support for the IEOT and EOIE
extensions, we can flip the defaults for index.recordEndOfIndexEntries
and index.recordOffsetTable to true and eliminate the settings.

Helped-by: Ben Peart <benpeart@microsoft.com>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-11-21 16:46:54 +09:00
Todd Zullinger 6056817879 Documentation: build technical/multi-pack-index
The git-multi-pack-index doc links to technical/multi-pack-index.html.
Ensure it is built to prevent a broken link.

Signed-off-by: Todd Zullinger <tmz@pobox.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-11-21 13:53:22 +09:00
Jonathan Nieder 429160544d ieot: default to not writing IEOT section
As with EOIE, popular versions of Git do not support the new IEOT
extension yet.  When accessing a Git repository written by a more
modern version of Git, they correctly ignore the unrecognized section,
but in the process they loudly warn

	ignoring IEOT extension

resulting in confusion for users.  Introduce the index extension more
gently by not writing it yet in this first version with support for
it.  Soon, once sufficiently many users are running a modern version
of Git, we can flip the default so users benefit from this index
extension by default.

Introduce a '[index] recordOffsetTable' configuration variable to
control whether the new index extension is written.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-11-21 13:43:06 +09:00
Jonathan Nieder d8465500c3 eoie: default to not writing EOIE section
Since 3b1d9e04 (eoie: add End of Index Entry (EOIE) extension,
2018-10-10) Git defaults to writing the new EOIE section when writing
out an index file.  Usually that is a good thing because it improves
threaded performance, but when a Git repository is shared with older
versions of Git, it produces a confusing warning:

  $ git status
  ignoring EOIE extension
  HEAD detached at 371ed0defa
  nothing to commit, working tree clean

Let's introduce the new index extension more gently.  First we'll roll
out the new version of Git that understands it, and then once
sufficiently many users are using such a version, we can flip the
default to writing it by default.

Introduce a '[index] recordEndOfIndexEntries' configuration variable
to allow interested users to benefit from this index extension early.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-11-21 13:43:06 +09:00
Junio C Hamano bb75be6cb9 Prepare for 2.20-rc1
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-11-19 16:24:41 +09:00
Nguyễn Thái Ngọc Duy 5a0b97b34c tree-walk: support :(attr) matching
This lets us use :(attr) with "git grep <tree-ish>" or "git log".

:(attr) requires another round of checking before we can declare that
a path is matched. This is done after path matching since we have lots
of optimization to take a shortcut when things don't match.

Note that if :(attr) is present, we can't return
all_entries_interesting / all_entries_not_interesting anymore because
we can't be certain about that. Not until match_pathspec_attrs() can
tell us "yes all these paths satisfy :(attr)".

Second note. Even though we walk a specific tree, we use attributes
from _worktree_ (or falling back to the index), not from .gitattributes
files on that tree. This by itself is not necessarily wrong, but the
user just have to be aware of this.

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-11-19 10:50:33 +09:00
Junio C Hamano 0e94dab5be RelNotes: name the release properly
In the title, we should state for which version this release notes
document is about.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-11-19 08:23:09 +09:00
Junio C Hamano 26aa9fc81d Git 2.20-rc0
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-11-18 18:24:49 +09:00
Junio C Hamano 4520c23374 Merge branch 'ab/rebase-in-c-escape-hatch'
The recently merged "rebase in C" has an escape hatch to use the
scripted version when necessary, but it hasn't been documented,
which has been corrected.

* ab/rebase-in-c-escape-hatch:
  tests: add a special setup where rebase.useBuiltin is off
  rebase doc: document rebase.useBuiltin
2018-11-18 18:23:59 +09:00
Junio C Hamano 56e4af3d34 Merge branch 'nd/doc-extensions'
Doc update.

* nd/doc-extensions:
  doc: move extensions.worktreeConfig to the right place
2018-11-18 18:23:59 +09:00
Junio C Hamano a517079437 Merge branch 'ab/range-diff-no-patch'
The "--no-patch" option, which can be used to get a high-level
overview without the actual line-by-line patch difference shown, of
the "range-diff" command was earlier broken, which has been
corrected.

* ab/range-diff-no-patch:
  range-diff: make diff option behavior (e.g. --stat) consistent
  range-diff: fix regression in passing along diff options
  range-diff doc: add a section about output stability
2018-11-18 18:23:54 +09:00
Junio C Hamano ab96f28ba4 Merge branch 'jk/unused-parameter-fixes'
Various functions have been audited for "-Wunused-parameter" warnings
and bugs in them got fixed.

* jk/unused-parameter-fixes:
  midx: double-check large object write loop
  assert NOARG/NONEG behavior of parse-options callbacks
  parse-options: drop OPT_DATE()
  apply: return -1 from option callback instead of calling exit(1)
  cat-file: report an error on multiple --batch options
  tag: mark "--message" option with NONEG
  show-branch: mark --reflog option as NONEG
  format-patch: mark "--no-numbered" option with NONEG
  status: mark --find-renames option with NONEG
  cat-file: mark batch options with NONEG
  pack-objects: mark index-version option as NONEG
  ls-files: mark exclude options as NONEG
  am: handle --no-patch-format option
  apply: mark include/exclude options as NONEG
2018-11-18 18:23:53 +09:00
Elijah Newren a965bb3116 fast-export: add a --show-original-ids option to show original names
Knowing the original names (hashes) of commits can sometimes enable
post-filtering that would otherwise be difficult or impossible.  In
particular, the desire to rewrite commit messages which refer to other
prior commits (on top of whatever other filtering is being done) is
very difficult without knowing the original names of each commit.

In addition, knowing the original names (hashes) of blobs can allow
filtering by blob-id without requiring re-hashing the content of the
blob, and is thus useful as a small optimization.

Once we add original ids for both commits and blobs, we may as well
add them for tags too for completeness.  Perhaps someone will have a
use for them.

This commit teaches a new --show-original-ids option to fast-export
which will make it add a 'original-oid <hash>' line to blob, commits,
and tags.  It also teaches fast-import to parse (and ignore) such
lines.

Signed-off-by: Elijah Newren <newren@gmail.com>
Acked-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-11-17 18:43:52 +09:00
Elijah Newren 530ca19c02 fast-export: add --reference-excluded-parents option
git filter-branch has a nifty feature allowing you to rewrite, e.g. just
the last 8 commits of a linear history
  git filter-branch $OPTIONS HEAD~8..HEAD

If you try the same with git fast-export, you instead get a history of
only 8 commits, with HEAD~7 being rewritten into a root commit.  There
are two alternatives:

  1) Don't use the negative revision specification, and when you're
     filtering the output to make modifications to the last 8 commits,
     just be careful to not modify any earlier commits somehow.

  2) First run 'git fast-export --export-marks=somefile HEAD~8', then
     run 'git fast-export --import-marks=somefile HEAD~8..HEAD'.

Both are more error prone than I'd like (the first for obvious reasons;
with the second option I have sometimes accidentally included too many
revisions in the first command and then found that the corresponding
extra revisions were not exported by the second command and thus were
not modified as I expected).  Also, both are poor from a performance
perspective.

Add a new --reference-excluded-parents option which will cause
fast-export to refer to commits outside the specified rev-list-args
range by their sha1sum.  Such a stream will only be useful in a
repository which already contains the necessary commits (much like the
restriction imposed when using --no-data).

Note from Peff:
  I think we might be able to do a little more optimization here. If
  we're exporting HEAD^..HEAD and there's an object in HEAD^ which is
  unchanged in HEAD, I think we'd still print it (because it would not
  be marked SHOWN), but we could omit it (by walking the tree of the
  boundary commits and marking them shown).  I don't think it's a
  blocker for what you're doing here, but just a possible future
  optimization.

Signed-off-by: Elijah Newren <newren@gmail.com>
Acked-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-11-17 18:43:52 +09:00
Elijah Newren 4532be7cba git-fast-export.txt: clarify misleading documentation about rev-list args
Signed-off-by: Elijah Newren <newren@gmail.com>
Acked-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-11-17 18:43:51 +09:00
Elijah Newren f55c979b14 git-fast-import.txt: fix documentation for --quiet option
Signed-off-by: Elijah Newren <newren@gmail.com>
Acked-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-11-17 18:43:50 +09:00
Ævar Arnfjörð Bjarmason d8d0a546f0 rebase doc: document rebase.useBuiltin
The rebase.useBuiltin variable introduced in 55071ea248 ("rebase:
start implementing it as a builtin", 2018-08-07) was turned on by
default in 5541bd5b8f ("rebase: default to using the builtin rebase",
2018-08-08), but had no documentation.

Let's document it so that users who run into any stability issues with
the C rewrite know there's an escape hatch[1], and make it clear that
needing to turn off builtin rebase means you've found a bug in git.

1. https://public-inbox.org/git/87y39w1wc2.fsf@evledraar.gmail.com/

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-11-16 19:02:54 +09:00
Nguyễn Thái Ngọc Duy 356aea6f79 doc: move extensions.worktreeConfig to the right place
All config extensions are described in technical/repository-version.txt.
I made a mistake of adding it in config.txt instead. This patch moves
it back to where it belongs.

Since repository-version.txt is not part of officially generated
documents (it's not even part of DOC_HTML target), it's only visible
to developers who read plain .txt files. Let's include it in
gitrepository-layout.5 for more visibility. Some minor asciidoc fixes
are required in repository-version.txt to make this happen.

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-11-16 14:10:31 +09:00
SZEDER Gábor 7eae4a3ac4 Documentation/clone: document ignored configuration variables
Due to limitations in the current implementation, some configuration
variables specified via 'git clone -c var=val' (or 'git -c var=val
clone') are ignored during the initial fetch and checkout.

Let the users know which configuration variables are known to be
ignored ('remote.origin.mirror' and 'remote.origin.tagOpt') under the
documentation of 'git clone -c', along with hints to use the options
'--mirror' and '--no-tags' instead.

Signed-off-by: SZEDER Gábor <szeder.dev@gmail.com>
Reviewed-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-11-16 13:15:21 +09:00
Ævar Arnfjörð Bjarmason 2219c09e23 push doc: document the DWYM behavior pushing to unqualified <dst>
Document the DWYM behavior that kicks in when pushing to an
unqualified <dst> reference.

This behavior was added in f88395ac23 ("Renaming push.", 2005-08-03)
and f8aae12034 ("push: allow unqualified dest refspecs to DWIM",
2008-04-23), and somewhat documented in bb9fca80ce ("git-push: Update
description of refspecs and add examples", 2007-06-09), but has never
been fully documented.

The closest we got to having documented it was the description in the
commit message for f8aae12034, which I've borrowed from in writing
this documentation.

Let's also refer to this new documentation from the existing
documentation we had (added in bb9fca80ce).

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-11-14 15:27:56 +09:00
Ævar Arnfjörð Bjarmason dd8dd300c6 push: add an advice on unqualified <dst> push
Add an advice to the recently improved error message added in
f8aae12034 ("push: allow unqualified dest refspecs to DWIM",
2008-04-23).

Now with advice.pushUnqualifiedRefName=true (on by default) we show a
hint about how to proceed:

    $ ./git-push avar v2.19.0^{commit}:newbranch -n
    error: The destination you provided is not a full refname (i.e.,
    starting with "refs/"). We tried to guess what you meant by:

    - Looking for a ref that matches 'newbranch' on the remote side.
    - Checking if the <src> being pushed ('v2.19.0^{commit}')
      is a ref in "refs/{heads,tags}/". If so we add a corresponding
      refs/{heads,tags}/ prefix on the remote side.

    Neither worked, so we gave up. You must fully qualify the ref.
    hint: The <src> part of the refspec is a commit object.
    hint: Did you mean to create a new branch by pushing to
    hint: 'v2.19.0^{commit}:refs/heads/newbranch'?
    error: failed to push some refs to 'git@github.com:avar/git.git'

When trying to push a tag, tree or a blob we suggest that perhaps the
user meant to push them to refs/tags/ instead.

The if/else duplication for all of OBJ_{COMMIT,TAG,TREE,BLOB} is
unfortunate, but is required to correctly mark the messages for
translation. See the discussion in
<87r2gxebsi.fsf@evledraar.gmail.com> about that.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-11-14 15:27:55 +09:00
Nguyễn Thái Ngọc Duy be4908f103 checkout: disambiguate dwim tracking branches and local files
When checkout dwim is added in [1], it is restricted to only dwim when
certain conditions are met and fall back to default checkout behavior
otherwise. It turns out falling back could be confusing. One of the
conditions to turn

    git checkout frotz

to

    git checkout -b frotz origin/frotz

is that frotz must not exist as a file. But when the user comes to
expect "git checkout frotz" to create the branch "frotz" and there
happens to be a file named "frotz", git's silently reverting "frotz"
file content is not helping. This is reported in Git mailing list [2]
and even used as an example of "Git is bad" elsewhere [3].

We normally try to do the right thing, but when there are multiple
"right things" to do, it's best to leave it to the user to decide.
Check this case, ask the user to to disambiguate:

- "git checkout -- foo" will check out path "foo"
- "git checkout foo --" will dwim and create branch "foo" [4]

For users who do not want dwim, use --no-guess. It's useless in this
particular case because "git checkout --no-guess foo --" will just
fail. But it could be used by scripts.

[1] 70c9ac2f19 (DWIM "git checkout frotz" to "git checkout -b frotz
    origin/frotz" - 2009-10-18)
[2] https://public-inbox.org/git/CACsJy8B2TVr1g+k+eSQ=pBEO3WN4_LtgLo9gpur8X7Z9GOFL_A@mail.gmail.com/
[3] https://news.ycombinator.com/item?id=18230655
[4] a047fafc78 (checkout: allow dwim for branch creation for "git
    checkout $branch --" - 2013-10-18)

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-11-14 15:02:24 +09:00
Junio C Hamano d166e6afe5 Tenth batch for 2.20
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-11-13 22:37:28 +09:00
Junio C Hamano e146cc97be Merge branch 'nd/per-worktree-ref-iteration'
The code to traverse objects for reachability, used to decide what
objects are unreferenced and expendable, have been taught to also
consider per-worktree refs of other worktrees as starting points to
prevent data loss.

* nd/per-worktree-ref-iteration:
  git-worktree.txt: correct linkgit command name
  reflog expire: cover reflog from all worktrees
  fsck: check HEAD and reflog from other worktrees
  fsck: move fsck_head_link() to get_default_heads() to avoid some globals
  revision.c: better error reporting on ref from different worktrees
  revision.c: correct a parameter name
  refs: new ref types to make per-worktree refs visible to all worktrees
  Add a place for (not) sharing stuff between worktrees
  refs.c: indent with tabs, not spaces
2018-11-13 22:37:26 +09:00
Junio C Hamano 6c268fdda9 Merge branch 'js/mingw-perl5lib'
Windows fix.

* js/mingw-perl5lib:
  mingw: unset PERL5LIB by default
  config: move Windows-specific config settings into compat/mingw.c
  config: allow for platform-specific core.* config settings
  config: rename `dummy` parameter to `cb` in git_default_config()
2018-11-13 22:37:20 +09:00
Junio C Hamano 25e4da89ed Merge branch 'nd/wildmatch-double-asterisk'
A pattern with '**' that does not have a slash on either side used
to be an invalid one, but the code now treats such double-asterisks
the same way as two normal asterisks that happen to be adjacent to
each other.

* nd/wildmatch-double-asterisk:
  wildmatch: change behavior of "foo**bar" in WM_PATHNAME mode
2018-11-13 22:37:19 +09:00
Junio C Hamano 8c758f9a67 Merge branch 'nd/per-worktree-config'
A fourth class of configuration files (in addition to the
traditional "system wide", "per user in the $HOME directory" and
"per repository in the $GIT_DIR/config") has been introduced so
that different worktrees that share the same repository (hence the
same $GIT_DIR/config file) can use different customization.

* nd/per-worktree-config:
  worktree: add per-worktree config files
  t1300: extract and use test_cmp_config()
2018-11-13 22:37:18 +09:00
Junio C Hamano fd7761a1cd Merge branch 'nd/config-split'
Split the overly large Documentation/config.txt file into million
little pieces.  This potentially allows each individual piece
included into the manual page of the command it affects more easily.

* nd/config-split: (81 commits)
  config.txt: remove config/dummy.txt
  config.txt: move worktree.* to a separate file
  config.txt: move web.* to a separate file
  config.txt: move versionsort.* to a separate file
  config.txt: move user.* to a separate file
  config.txt: move url.* to a separate file
  config.txt: move uploadpack.* to a separate file
  config.txt: move uploadarchive.* to a separate file
  config.txt: move transfer.* to a separate file
  config.txt: move tag.* to a separate file
  config.txt: move submodule.* to a separate file
  config.txt: move stash.* to a separate file
  config.txt: move status.* to a separate file
  config.txt: move splitIndex.* to a separate file
  config.txt: move showBranch.* to a separate file
  config.txt: move sequencer.* to a separate file
  config.txt: move sendemail-config.txt to config/
  config.txt: move reset.* to a separate file
  config.txt: move rerere.* to a separate file
  config.txt: move repack.* to a separate file
  ...
2018-11-13 22:37:16 +09:00
Ævar Arnfjörð Bjarmason df569c3f31 range-diff doc: add a section about output stability
The range-diff command is already advertised as porcelain, but let's
make it really clear that the output is completely subject to change,
particularly when it comes to diff options such as --stat. Right now
that option doesn't work, but fixing that is the subject of a later
change.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-11-12 12:05:38 +09:00
Force Charlie d73019feb4 http: add support selecting http version
Usually we don't need to set libcurl to choose which version of the
HTTP protocol to use to communicate with a server.
But different versions of libcurl, the default value is not the same.

CURL >= 7.62.0: CURL_HTTP_VERSION_2TLS
CURL < 7.62: CURL_HTTP_VERSION_1_1

In order to give users the freedom to control the HTTP version,
we need to add a setting to choose which HTTP version to use.

Signed-off-by: Force Charlie <charlieio@outlook.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-11-09 13:21:24 +09:00
Junio C Hamano 8858448bb4 Ninth batch for 2.20
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-11-06 15:51:23 +09:00
Junio C Hamano a29b8bcf62 Merge branch 'md/exclude-promisor-objects-fix'
Operations on promisor objects make sense in the context of only a
small subset of the commands that internally use the revisions
machinery, but the "--exclude-promisor-objects" option were taken
and led to nonsense results by commands like "log", to which it
didn't make much sense.  This has been corrected.

* md/exclude-promisor-objects-fix:
  exclude-promisor-objects: declare when option is allowed
  Documentation/git-log.txt: do not show --exclude-promisor-objects
2018-11-06 15:50:21 +09:00
Junio C Hamano 8ac6990b87 Merge branch 'jw/send-email-no-auth'
"git send-email" learned to disable SMTP authentication via the
"--smtp-auth=none" option, even when the smtp username is given
(which turns the authentication on by default).

* jw/send-email-no-auth:
  send-email: explicitly disable authentication
2018-11-06 15:50:20 +09:00
Jeff King 0a8a16ade6 parse-options: drop OPT_DATE()
There are no users of OPT_DATE except for test-parse-options; its
only caller went away in 27ec394a97 (prune: introduce OPT_EXPIRY_DATE()
and use it, 2013-04-25).

It also has a bug: it does not specify PARSE_OPT_NONEG, but its callback
does not respect the "unset" flag, and will feed NULL to approxidate()
and segfault. Probably this should be marked with NONEG, or the callback
should set the timestamp to some sentinel value (e.g,. "0", or
"(time_t)-1").

But since there are no callers, deleting it means we don't even have to
think about what the right behavior should be.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-11-06 12:56:14 +09:00
Nguyễn Thái Ngọc Duy 14f74d5907 git-worktree.txt: correct linkgit command name
Noticed-by: SZEDER Gábor <szeder.dev@gmail.com>
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-11-05 10:22:04 +09:00
Junio C Hamano d7b1859732 Merge branch 'js/mingw-http-ssl'
On platforms with recent cURL library, http.sslBackend configuration
variable can be used to choose a different SSL backend at runtime.
The Windows port uses this mechanism to switch between OpenSSL and
Secure Channel while talking over the HTTPS protocol.

* js/mingw-http-ssl:
  http: when using Secure Channel, ignore sslCAInfo by default
  http: add support for disabling SSL revocation checks in cURL
  http: add support for selecting SSL backends at runtime
2018-11-03 00:53:58 +09:00
Junio C Hamano 11cc180fa5 Merge branch 'mg/gpg-fingerprint'
New "--pretty=format:" placeholders %GF and %GP that show the GPG
key fingerprints have been invented.

* mg/gpg-fingerprint:
  gpg-interface.c: obtain primary key fingerprint as well
  gpg-interface.c: support getting key fingerprint via %GF format
  gpg-interface.c: use flags to determine key/signer info presence
2018-11-03 00:53:58 +09:00
Junio C Hamano d582ea202b Eighth batch for 2.20
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-11-02 11:04:59 +09:00
Junio C Hamano 789b1f7042 Merge branch 'js/rebase-i-break'
"git rebase -i" learned a new insn, 'break', that the user can
insert in the to-do list.  Upon hitting it, the command returns
control back to the user.

* js/rebase-i-break:
  rebase -i: introduce the 'break' command
  rebase -i: clarify what happens on a failed `exec`
2018-11-02 11:04:58 +09:00
Johannes Schindelin 0e218f91c2 mingw: unset PERL5LIB by default
Git for Windows ships with its own Perl interpreter, and insists on
using it, so it will most likely wreak havoc if PERL5LIB is set before
launching Git.

Let's just unset that environment variables when spawning processes.

To make this feature extensible (and overrideable), there is a new
config setting `core.unsetenvvars` that allows specifying a
comma-separated list of names to unset before spawning processes.

Reported by Gabriel Fuhrmann.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-10-31 12:46:32 +09:00
Junio C Hamano 4ede3d42df Seventh batch for 2.20
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-10-30 15:44:45 +09:00
Junio C Hamano 5d8b3e5d8b Merge branch 'uk/merge-subtree-doc-update'
Belated documentation update to adjust to a new world order that
happened a yew years ago.

* uk/merge-subtree-doc-update:
  howto/using-merge-subtree: mention --allow-unrelated-histories
2018-10-30 15:43:49 +09:00
Junio C Hamano 87c15d1ca9 Merge branch 'dl/mergetool-gui-option'
"git mergetool" learned to take the "--[no-]gui" option, just like
"git difftool" does.

* dl/mergetool-gui-option:
  doc: document diff/merge.guitool config keys
  completion: support `git mergetool --[no-]gui`
  mergetool: accept -g/--[no-]gui as arguments
2018-10-30 15:43:49 +09:00
Junio C Hamano 90d228b0d7 Merge branch 'ah/doc-updates'
Doc updates.

* ah/doc-updates:
  doc: fix formatting in git-update-ref
  doc: fix indentation of listing blocks in gitweb.conf.txt
  doc: fix descripion for 'git tag --format'
  doc: fix inappropriate monospace formatting
  doc: fix ASCII art tab spacing
  doc: clarify boundaries of 'git worktree list --porcelain'
2018-10-30 15:43:47 +09:00
Junio C Hamano 4b73fdae97 Merge branch 'sg/doc-show-branch-typofix'
Docfix.

* sg/doc-show-branch-typofix:
  doc: fix small typo in git show-branch
2018-10-30 15:43:44 +09:00
Junio C Hamano 107b9bad95 Merge branch 'tb/filter-alternate-refs'
Test fix.

* tb/filter-alternate-refs:
  t5410: use longer path for sample script
  Documentation/config.txt: fix typo in core.alternateRefsCommand
2018-10-30 15:43:41 +09:00
Junio C Hamano 8a0d060fb1 Merge branch 'rv/send-email-cc-misc-by'
"git send-email" learned to grab address-looking string on any
trailer whose name ends with "-by"; --suppress-cc=misc-by on the
command line, or setting sendemail.suppresscc configuration
variable to "misc-by", can be used to disable this behaviour.

This is a backward-incompatible change that may surprise existing
users.

* rv/send-email-cc-misc-by:
  send-email: also pick up cc addresses from -by trailers
  send-email: only consider lines containing @ or <> for automatic Cc'ing
  Documentation/git-send-email.txt: style fixes
2018-10-30 15:43:40 +09:00
Junio C Hamano 77d503757d Merge branch 'md/filter-trees'
The "rev-list --filter" feature learned to exclude all trees via
"tree:0" filter.

* md/filter-trees:
  list-objects: support for skipping tree traversal
  filter-trees: code clean-up of tests
  list-objects-filter: implement filter tree:0
  list-objects-filter-options: do not over-strbuf_init
  list-objects-filter: use BUG rather than die
  revision: mark non-user-given objects instead
  rev-list: handle missing tree objects properly
  list-objects: always parse trees gently
  list-objects: refactor to process_tree_contents
  list-objects: store common func args in struct
2018-10-30 15:43:39 +09:00
Nguyễn Thái Ngọc Duy e5bbe09e88 wildmatch: change behavior of "foo**bar" in WM_PATHNAME mode
In WM_PATHNAME mode (or FNM_PATHNAME), '*' does not match '/' and '**'
can but only in three patterns:

- '**/' matches zero or more leading directories
- '/**/' matches zero or more directories in between
- '/**' matches zero or more trailing directories/files

When '**' is present but not in one of these patterns, the current
behavior is consider the pattern invalid and stop matching. In other
words, 'foo**bar' never matches anything, whatever you throw at it.

This behavior is arguably a bit confusing partly because we can't
really tell the user their pattern is invalid so that they can fix
it. So instead, tolerate it and make '**' act like two regular '*'s
(which is essentially the same as a single asterisk). This behavior
seems more predictable.

Noticed-by: dana <dana@dana.is>
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-10-29 13:19:22 +09:00
Nguyễn Thái Ngọc Duy 649cf58911 config.txt: move worktree.* to a separate file
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-10-29 10:17:05 +09:00
Nguyễn Thái Ngọc Duy 6053f1ae13 config.txt: remove config/dummy.txt
This file was only needed when config directory was empty. Now that
the directory is fully populated, it can be deleted.

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-10-29 10:17:05 +09:00
Nguyễn Thái Ngọc Duy 07c11a0bd0 config.txt: move web.* to a separate file
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-10-29 10:17:05 +09:00
Nguyễn Thái Ngọc Duy 25268ad5b1 config.txt: move versionsort.* to a separate file
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-10-29 10:17:05 +09:00
Nguyễn Thái Ngọc Duy 18b421d4f6 config.txt: move user.* to a separate file
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-10-29 10:17:05 +09:00
Nguyễn Thái Ngọc Duy e4a7a7b073 config.txt: move url.* to a separate file
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-10-29 10:17:04 +09:00
Nguyễn Thái Ngọc Duy 533fff6ad1 config.txt: move uploadpack.* to a separate file
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-10-29 10:17:04 +09:00
Nguyễn Thái Ngọc Duy c61f5562e6 config.txt: move uploadarchive.* to a separate file
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-10-29 10:17:04 +09:00
Nguyễn Thái Ngọc Duy 4a5bad0704 config.txt: move transfer.* to a separate file
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-10-29 10:17:04 +09:00
Nguyễn Thái Ngọc Duy fb4c06fa4c config.txt: move tag.* to a separate file
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-10-29 10:17:04 +09:00
Nguyễn Thái Ngọc Duy 95c125f2bc config.txt: move submodule.* to a separate file
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-10-29 10:17:04 +09:00
Nguyễn Thái Ngọc Duy 46a8bbb27f config.txt: move stash.* to a separate file
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-10-29 10:17:04 +09:00
Nguyễn Thái Ngọc Duy 54ff5dda44 config.txt: move status.* to a separate file
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-10-29 10:17:04 +09:00
Nguyễn Thái Ngọc Duy 2ef0e469fe config.txt: move splitIndex.* to a separate file
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-10-29 10:17:04 +09:00
Nguyễn Thái Ngọc Duy c52bcbb6c0 config.txt: move showBranch.* to a separate file
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-10-29 10:17:04 +09:00
Nguyễn Thái Ngọc Duy c332419995 config.txt: move sequencer.* to a separate file
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-10-29 10:17:04 +09:00
Nguyễn Thái Ngọc Duy 0ee42c86cf config.txt: move sendemail-config.txt to config/
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-10-29 10:17:04 +09:00
Nguyễn Thái Ngọc Duy e344b8b4c3 config.txt: move reset.* to a separate file
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-10-29 10:17:04 +09:00
Nguyễn Thái Ngọc Duy 72622c2486 config.txt: move rerere.* to a separate file
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-10-29 10:17:04 +09:00
Nguyễn Thái Ngọc Duy be958be236 config.txt: move repack.* to a separate file
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-10-29 10:17:04 +09:00
Nguyễn Thái Ngọc Duy b720a9dbe5 config.txt: move remotes.* to a separate file
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-10-29 10:17:03 +09:00
Nguyễn Thái Ngọc Duy 99fce39734 config.txt: move remote.* to a separate file
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-10-29 10:17:03 +09:00
Nguyễn Thái Ngọc Duy 5f5a5fca54 config.txt: move receive-config.txt to config/
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-10-29 10:17:03 +09:00
Nguyễn Thái Ngọc Duy c72459006d config.txt: move rebase-config.txt to config/
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-10-29 10:17:03 +09:00
Nguyễn Thái Ngọc Duy d15dc43968 config.txt: move push-config.txt to config/
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-10-29 10:17:03 +09:00
Nguyễn Thái Ngọc Duy 7f50a495f6 config.txt: move pull-config.txt to config/
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-10-29 10:17:03 +09:00
Nguyễn Thái Ngọc Duy dd55172c32 config.txt: move protocol.* to a separate file
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-10-29 10:17:03 +09:00
Nguyễn Thái Ngọc Duy cd96754770 config.txt: move pretty.* to a separate file
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-10-29 10:17:03 +09:00
Nguyễn Thái Ngọc Duy 87e1b41a30 config.txt: move pager.* to a separate file
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-10-29 10:17:03 +09:00
Nguyễn Thái Ngọc Duy a168c5a2cd config.txt: move pack.* to a separate file
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-10-29 10:17:03 +09:00
Nguyễn Thái Ngọc Duy e50472d86d config.txt: move notes.* to a separate file
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-10-29 10:17:03 +09:00
Nguyễn Thái Ngọc Duy ea24a76a5e config.txt: move mergetool.* to a separate file
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-10-29 10:17:03 +09:00
Nguyễn Thái Ngọc Duy 7fb5ab4a02 config.txt: move merge-config.txt to config/
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-10-29 10:17:03 +09:00
Nguyễn Thái Ngọc Duy f7ade6c980 config.txt: move man.* to a separate file
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-10-29 10:17:03 +09:00
Nguyễn Thái Ngọc Duy 4a9f0c52cf config.txt: move mailmap.* to a separate file
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-10-29 10:17:03 +09:00
Nguyễn Thái Ngọc Duy 55e51cd741 config.txt: move mailinfo.* to a separate file
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-10-29 10:17:02 +09:00
Nguyễn Thái Ngọc Duy 8300976295 config.txt: move log.* to a separate file
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-10-29 10:17:02 +09:00
Nguyễn Thái Ngọc Duy 630c273846 config.txt: move interactive.* to a separate file
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-10-29 10:17:02 +09:00
Nguyễn Thái Ngọc Duy cef9b95131 config.txt: move instaweb.* to a separate file
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-10-29 10:17:02 +09:00
Nguyễn Thái Ngọc Duy ec335607b7 config.txt: move init.* to a separate file
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-10-29 10:17:02 +09:00
Nguyễn Thái Ngọc Duy c1b342adce config.txt: move index.* to a separate file
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-10-29 10:17:02 +09:00
Nguyễn Thái Ngọc Duy ae461026a4 git-imap-send.txt: move imap.* to a separate file
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-10-29 10:17:02 +09:00
Nguyễn Thái Ngọc Duy 8fc3f75f34 config.txt: move i18n.* to a separate file
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-10-29 10:17:02 +09:00
Nguyễn Thái Ngọc Duy ad308479e3 config.txt: move http.* to a separate file
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-10-29 10:17:02 +09:00
Nguyễn Thái Ngọc Duy 12e602490c config.txt: move ssh.* to a separate file
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-10-29 10:17:02 +09:00
Nguyễn Thái Ngọc Duy d3df42705d config.txt: move help.* to a separate file
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-10-29 10:17:02 +09:00
Nguyễn Thái Ngọc Duy 2c31a83037 config.txt: move guitool.* to a separate file
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-10-29 10:17:02 +09:00
Nguyễn Thái Ngọc Duy d864cf8bf9 config.txt: move gui-config.txt to config/
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-10-29 10:17:02 +09:00
Nguyễn Thái Ngọc Duy ea555d048a config.txt: move gpg.* to a separate file
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-10-29 10:17:02 +09:00
Nguyễn Thái Ngọc Duy 434e6e753f config.txt: move grep.* to a separate file
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-10-29 10:17:01 +09:00
Nguyễn Thái Ngọc Duy 0648b76974 config.txt: move gitweb.* to a separate file
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-10-29 10:17:01 +09:00
Nguyễn Thái Ngọc Duy 996f66eb31 config.txt: move gitcvs-config.txt to config/
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-10-29 10:17:01 +09:00
Nguyễn Thái Ngọc Duy 8daf3271f3 config.txt: move gc.* to a separate file
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-10-29 10:17:01 +09:00
Nguyễn Thái Ngọc Duy f80ccccbc7 config.txt: move fsck.* to a separate file
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-10-29 10:17:01 +09:00
Nguyễn Thái Ngọc Duy 5a06936b60 config.txt: move fmt-merge-msg-config.txt to config/
Note that this file is not directly included in config.txt but through
merge-config.txt and it's in "merge" section instead of a separate
"fmtMergeMsg" section like others.

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-10-29 10:17:01 +09:00
Nguyễn Thái Ngọc Duy ab14f494cf config.txt: move format-config.txt to config/
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-10-29 10:17:01 +09:00
Nguyễn Thái Ngọc Duy 734dfebbf3 config.txt: move filter.* to a separate file
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-10-29 10:17:01 +09:00
Nguyễn Thái Ngọc Duy 561fda20b8 config.txt: move fetch-config.txt to config/
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-10-29 10:17:01 +09:00
Nguyễn Thái Ngọc Duy f2e5824607 config.txt: move fastimport.* to a separate file
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-10-29 10:17:01 +09:00
Nguyễn Thái Ngọc Duy 9155f6f670 config.txt: move difftool.* to a separate file
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-10-29 10:17:01 +09:00
Nguyễn Thái Ngọc Duy fa922d74c5 config.txt: move diff-config.txt to config/
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-10-29 10:17:01 +09:00
Nguyễn Thái Ngọc Duy 2b4b7305d3 config.txt: move completion.* to a separate file
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-10-29 10:17:01 +09:00
Nguyễn Thái Ngọc Duy 3a49be6d5c config.txt: move credential.* to a separate file
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-10-29 10:17:01 +09:00
Nguyễn Thái Ngọc Duy 5453d236dc config.txt: move commit.* to a separate file
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-10-29 10:17:00 +09:00
Nguyễn Thái Ngọc Duy dbfc949f6f config.txt: move column.* to a separate file
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-10-29 10:17:00 +09:00
Nguyễn Thái Ngọc Duy 0a7839e3cc config.txt: move color.* to a separate file
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-10-29 10:17:00 +09:00
Nguyễn Thái Ngọc Duy 328e629c5c config.txt: move clean.* to a separate file
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-10-29 10:17:00 +09:00
Nguyễn Thái Ngọc Duy 9140b410d2 config.txt: move checkout.* to a separate file
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-10-29 10:17:00 +09:00
Nguyễn Thái Ngọc Duy 6b0b974060 config.txt: move browser.* to a separate file
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-10-29 10:17:00 +09:00
Nguyễn Thái Ngọc Duy 7273b95dbb config.txt: move branch.* to a separate file
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-10-29 10:17:00 +09:00
Nguyễn Thái Ngọc Duy d09467b67f config.txt: move blame.* to a separate file
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-10-29 10:17:00 +09:00
Nguyễn Thái Ngọc Duy 696d4796fb config.txt: move apply.* to a separate file
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-10-29 10:17:00 +09:00
Nguyễn Thái Ngọc Duy d293ffefb5 config.txt: move am.* to a separate file
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-10-29 10:17:00 +09:00
Nguyễn Thái Ngọc Duy f740c8f143 config.txt: move alias.* to a separate file
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-10-29 10:17:00 +09:00
Nguyễn Thái Ngọc Duy 29120d8e64 config.txt: move add.* to a separate file
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-10-29 10:17:00 +09:00
Nguyễn Thái Ngọc Duy 1a394fa9ad config.txt: move core.* to a separate file
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-10-29 10:17:00 +09:00
Nguyễn Thái Ngọc Duy 838ef420c3 config.txt: move advice.* to a separate file
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-10-29 10:17:00 +09:00
Nguyễn Thái Ngọc Duy 76b993afd6 Update makefile in preparation for Documentation/config/*.txt
config.txt is going to be broken down in smaller pieces and put under
Documentation/config directory. Update build rules to take these files
into account.

A dummy file is added to make sure wildcard expansion is predictable
(depending on shell setting it could expand to nothing or becomes a
path if config directory is empty). The file will be deleted once the
move is over.

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-10-29 10:16:59 +09:00
Junio C Hamano 89e4fcb0dd Merge branches 'bp/reset-quiet' and 'js/mingw-http-ssl' into nd/config-split
* bp/reset-quiet:
  reset: warn when refresh_index() takes more than 2 seconds
  reset: add new reset.quiet config setting
  reset: don't compute unstaged changes after reset when --quiet

* js/mingw-http-ssl:
  http: when using Secure Channel, ignore sslCAInfo by default
  http: add support for disabling SSL revocation checks in cURL
  http: add support for selecting SSL backends at runtime
2018-10-29 10:15:46 +09:00
Junio C Hamano c670b1f876 Sixth batch for 2.20
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-10-26 14:53:16 +09:00
Junio C Hamano 1e5d454856 Merge branch 'ld/p4-unshelve'
"git p4 unshelve" improvements.

* ld/p4-unshelve:
  git-p4: fully support unshelving changelists
  git-p4: unshelve into refs/remotes/p4-unshelved, not refs/remotes/p4/unshelved
  git-p4: do not fail in verbose mode for missing 'fileSize' key
2018-10-26 14:22:15 +09:00
Junio C Hamano 1fd2ffca7d Merge branch 'ab/gc-doc-update'
The documentation of "git gc" has been updated to mention that it
is no longer limited to "pruning away crufts" but also updates
ancillary files like commit-graph as a part of repository
optimization.

* ab/gc-doc-update:
  gc doc: mention the commit-graph in the intro
2018-10-26 14:22:14 +09:00
Junio C Hamano 7752999cd6 Merge branch 'rv/alias-help'
"git cmd --help" when "cmd" is aliased used to only say "cmd is
aliased to ...".  Now it shows that to the standard error stream
and runs "git $cmd --help" where $cmd is the first word of the
alias expansion.

This could be misleading for those who alias a command with options
(e.g. with "[alias] cpn = cherry-pick -n", "git cpn --help" would
show the manual of "cherry-pick", and the reader would not be told
to pay close attention to the part that describes the "--no-commit"
option until closing the pager that showed the contents of the
manual, if the pager is configured to restore the original screen,
or would not be told at all, if the pager simply makes the message
on the standard error scroll away.

* rv/alias-help:
  git-help.txt: document "git help cmd" vs "git cmd --help" for aliases
  git.c: handle_alias: prepend alias info when first argument is -h
  help: redirect to aliased commands for "git cmd --help"
2018-10-26 14:22:13 +09:00
Junio C Hamano eed56667cd Merge branch 'mm/doc-no-dashed-git'
Doc update.

* mm/doc-no-dashed-git:
  doc: fix a typo and clarify a sentence
2018-10-26 14:22:12 +09:00
Johannes Schindelin b67d40adbb http: when using Secure Channel, ignore sslCAInfo by default
As of cURL v7.60.0, the Secure Channel backend can use the certificate
bundle provided via `http.sslCAInfo`, but that would override the
Windows Certificate Store. Since this is not desirable by default, let's
tell Git to not ask cURL to use that bundle by default when the `schannel`
backend was configured via `http.sslBackend`, unless
`http.schannelUseSSLCAInfo` overrides this behavior.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-10-26 11:15:49 +09:00
Brendan Forster 93aef7c79b http: add support for disabling SSL revocation checks in cURL
This adds support for a new http.schannelCheckRevoke config value.

This config value is only used if http.sslBackend is set to "schannel",
which forces cURL to use the Windows Certificate Store when validating
server certificates associated with a remote server.

This config value should only be set to "false" if you are in an
environment where revocation checks are blocked by the network, with
no alternative options.

This is only supported in cURL 7.44 or later.

Note: originally, we wanted to call the config setting
`http.schannel.checkRevoke`. This, however, does not work: the `http.*`
config settings can be limited to specific URLs via `http.<url>.*`
(and this feature would mistake `schannel` for a URL).

Helped by Agustín Martín Barbero.

Signed-off-by: Brendan Forster <github@brendanforster.com>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-10-26 11:15:49 +09:00
Daniels Umanovskis 0ecb1fc726 branch: introduce --show-current display option
When called with --show-current, git branch will print the current
branch name and terminate. Only the actual name gets printed,
without refs/heads. In detached HEAD state, nothing is output.

Intended both for scripting and interactive/informative use.
Unlike git branch --list, no filtering is needed to just get the
branch name.

Signed-off-by: Daniels Umanovskis <daniels@umanovskis.se>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-10-26 10:35:00 +09:00
Uwe Kleine-König 5e495f8122 howto/using-merge-subtree: mention --allow-unrelated-histories
Without passing --allow-unrelated-histories the command sequence
fails as intended since commit e379fdf34f ("merge: refuse to create
too cool a merge by default"). To setup a subtree merging unrelated
histories is normal, so add the option to the howto document.

Signed-off-by: Uwe Kleine-König <uwe@kleine-koenig.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-10-25 14:45:15 +09:00
Denton Liu c217b9384e doc: document diff/merge.guitool config keys
Signed-off-by: Denton Liu <liu.denton@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-10-25 14:02:41 +09:00
Denton Liu 063f2bdbf7 mergetool: accept -g/--[no-]gui as arguments
In line with how difftool accepts a -g/--[no-]gui option, make mergetool
accept the same option in order to use the `merge.guitool` variable to
find the default mergetool instead of `merge.tool`.

Signed-off-by: Denton Liu <liu.denton@gmail.com>
Signed-off-by: Anmol Mago <anmolmago@gmail.com>
Signed-off-by: Brian Ho <briankyho@gmail.com>
Signed-off-by: David Lu <david.lu97@outlook.com>
Signed-off-by: Ryan Wang <shirui.wang@hotmail.com>
Acked-by: David Aguilar <davvid@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-10-25 14:01:10 +09:00
Ben Peart 649bf3a42f reset: warn when refresh_index() takes more than 2 seconds
refresh_index() is done after a reset command as an optimization.  Because
it can be an expensive call, warn the user if it takes more than 2 seconds
and tell them how to avoid it using the --quiet command line option or
reset.quiet config setting.

Signed-off-by: Ben Peart <benpeart@microsoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-10-24 11:57:08 +09:00
Ben Peart 4c3abd0551 reset: add new reset.quiet config setting
Add a reset.quiet config setting that sets the default value of the --quiet
flag when running the reset command.  This enables users to change the
default behavior to take advantage of the performance advantages of
avoiding the scan for unstaged changes after reset.  Defaults to false.

Signed-off-by: Ben Peart <benpeart@microsoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-10-24 11:57:07 +09:00
Taylor Blau be1e04c379 Documentation/config.txt: fix typo in core.alternateRefsCommand
In [1] Git learned about 'core.alternateRefsCommand', and with it, the
accompanying documentation. However, this documentation included a typo
involving the verb tense of "produced".

Match the tense of the surrounding bits by correcting this typo.

[1]: 89284c1d6c (transport.c: introduce core.alternateRefsCommand,
     2018-10-08)

Signed-off-by: Taylor Blau <me@ttaylorr.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-10-24 10:32:26 +09:00
Matthew DeVore 368a89124c Documentation/git-log.txt: do not show --exclude-promisor-objects
Do not suggest that --exclude-promisor-objects is supported by git-log,
since it currently BUG-crashes and it's not necessary to support it.
Options that control behavior for promisor objects should be limited to
a small number of commands.

Signed-off-by: Matthew DeVore <matvore@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-10-23 13:44:11 +09:00
Joshua Watt 8dd9b3f85a send-email: explicitly disable authentication
It can be necessary to disable SMTP authentication by a mechanism other
than sendemail.smtpuser being undefined. For example, if the user has
sendemail.smtpuser set globally but wants to disable authentication
locally in one repository.

--smtp-auth and sendemail.smtpauth now understand the value 'none' which
means to disable authentication completely, even if an authentication
user is specified.

The value 'none' is lower case to avoid conflicts with any RFC 4422
authentication mechanisms.

The user may also specify the command line argument --no-smtp-auth as a
shorthand for --smtp-auth=none

Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-10-23 13:37:14 +09:00
Andreas Heiduk 081d91618b doc: fix formatting in git-update-ref
Remove the parapgraph numbers from lines explaining the reflog format
and typeset these lines in monospace.

Signed-off-by: Andreas Heiduk <asheiduk@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-10-23 12:23:09 +09:00
Andreas Heiduk 9aab3fcf23 doc: fix indentation of listing blocks in gitweb.conf.txt
'gitweb.conf.txt' uses inconsistent indentation in listing blocks and a mix
of listing blocks and literal paragraphs. Both didn't look pretty in the
rendered HTML page.

Signed-off-by: Andreas Heiduk <asheiduk@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-10-23 12:23:09 +09:00
Andreas Heiduk a5e14ea139 doc: fix descripion for 'git tag --format'
The '--format=<format>' is now listed in the 'OPTIONS' section, not only
the '<format>' string itself. The description moved up a few paragraphs
because '<format>' is not a standalone paramater but a parameter for the
option '--format'.

Signed-off-by: Andreas Heiduk <asheiduk@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-10-23 12:23:09 +09:00
Andreas Heiduk ad471949f4 doc: fix inappropriate monospace formatting
Signed-off-by: Andreas Heiduk <asheiduk@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-10-23 12:23:09 +09:00
Andreas Heiduk 39a36827ac doc: fix ASCII art tab spacing
Followup to 5dd05ebf ("doc: fix merge-base ASCII art tab spacing", 2016-10-21)

Signed-off-by: Andreas Heiduk <asheiduk@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-10-23 12:23:09 +09:00
Andreas Heiduk e44a44aa25 doc: clarify boundaries of 'git worktree list --porcelain'
Defined delimiters for 'git worktree list --porcelain' make the format
easier to parse in scripts. For example

	sed -n '/^worktree ID$/,/^$/p'

extracts only the information for the worktree 'ID'.

The format did not changed since [1], only the guaranty is added.

[1] bb9c03b82a (worktree: add 'list' command, 2015-10-08)

Signed-off-by: Andreas Heiduk <asheiduk@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-10-23 12:23:08 +09:00
Michał Górny 4de9394dcb gpg-interface.c: obtain primary key fingerprint as well
Obtain the primary key fingerprint off VALIDSIG status message,
and expose it via %GP format.

Signed-off-by: Michał Górny <mgorny@gentoo.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-10-23 08:00:43 +09:00
Michał Górny 3daaaabe7e gpg-interface.c: support getting key fingerprint via %GF format
Support processing VALIDSIG status that provides additional information
for valid signatures.  Use this information to propagate signing key
fingerprint and expose it via %GF pretty format.  This format can be
used to build safer key verification systems that verify the key via
complete fingerprint rather than short/long identifier provided by %GK.

Signed-off-by: Michał Górny <mgorny@gentoo.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-10-23 08:00:09 +09:00
Nguyễn Thái Ngọc Duy c9ef0d95eb reflog expire: cover reflog from all worktrees
Reported-by: Jeff King <peff@peff.net>
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-10-22 13:32:54 +09:00
Nguyễn Thái Ngọc Duy 3a3b9d8cde refs: new ref types to make per-worktree refs visible to all worktrees
One of the problems with multiple worktree is accessing per-worktree
refs of one worktree from another worktree. This was sort of solved by
multiple ref store, where the code can open the ref store of another
worktree and has access to the ref space of that worktree.

The problem with this is reporting. "HEAD" in another ref space is
also called "HEAD" like in the current ref space. In order to
differentiate them, all the code must somehow carry the ref store
around and print something like "HEAD from this ref store".

But that is not feasible (or possible with a _lot_ of work). With the
current design, we pass a reference around as a string (so called
"refname"). Extending this design to pass a string _and_ a ref store
is a nightmare, especially when handling extended SHA-1 syntax.

So we do it another way. Instead of entering a separate ref space, we
make refs from other worktrees available in the current ref space. So
"HEAD" is always HEAD of the current worktree, but then we can have
"worktrees/blah/HEAD" to denote HEAD from a worktree named
"blah". This syntax coincidentally matches the underlying directory
structure which makes implementation a bit easier.

The main worktree has to be treated specially because well... it's
special from the beginning. So HEAD from the main worktree is
acccessible via the name "main-worktree/HEAD" instead of
"worktrees/main/HEAD" because "main" could be just another secondary
worktree.

This patch also makes it possible to specify refs from one worktree in
another one, e.g.

    git log worktrees/foo/HEAD

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-10-22 13:32:29 +09:00
Nguyễn Thái Ngọc Duy 58b284a2e9 worktree: add per-worktree config files
A new repo extension is added, worktreeConfig. When it is present:

 - Repository config reading by default includes $GIT_DIR/config _and_
   $GIT_DIR/config.worktree. "config" file remains shared in multiple
   worktree setup.

 - The special treatment for core.bare and core.worktree, to stay
   effective only in main worktree, is gone. These config settings are
   supposed to be in config.worktree.

This extension is most useful in multiple worktree setup because you
now have an option to store per-worktree config (which is either
.git/config.worktree for main worktree, or
.git/worktrees/xx/config.worktree for linked ones).

This extension can be used in single worktree mode, even though it's
pretty much useless (but this can happen after you remove all linked
worktrees and move back to single worktree).

"git config" reads from both "config" and "config.worktree" by default
(i.e. without either --user, --file...) when this extension is
present. Default writes still go to "config", not "config.worktree". A
new option --worktree is added for that (*).

Since a new repo extension is introduced, existing git binaries should
refuse to access to the repo (both from main and linked worktrees). So
they will not misread the config file (i.e. skip the config.worktree
part). They may still accidentally write to the config file anyway if
they use with "git config --file <path>".

This design places a bet on the assumption that the majority of config
variables are shared so it is the default mode. A safer move would be
default writes go to per-worktree file, so that accidental changes are
isolated.

(*) "git config --worktree" points back to "config" file when this
    extension is not present and there is only one worktree so that it
    works in any both single and multiple worktree setups.

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-10-22 13:17:04 +09:00
Junio C Hamano c4df23f792 Fifth batch for 2.20
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-10-19 13:52:51 +09:00
Junio C Hamano 465e73fff3 Merge branch 'tb/filter-alternate-refs'
When pushing into a repository that borrows its objects from an
alternate object store, "git receive-pack" that responds to the
push request on the other side lists the tips of refs in the
alternate to reduce the amount of objects transferred.  This
sometimes is detrimental when the number of refs in the alternate
is absurdly large, in which case the bandwidth saved in potentially
fewer objects transferred is wasted in excessively large ref
advertisement.  The alternate refs that are advertised are now
configurable with a pair of configuration variables.

* tb/filter-alternate-refs:
  transport.c: introduce core.alternateRefsPrefixes
  transport.c: introduce core.alternateRefsCommand
  transport.c: extract 'fill_alternate_refs_command'
  transport: drop refnames from for_each_alternate_ref
2018-10-19 13:34:08 +09:00
Junio C Hamano 9822b8f10d Merge branch 'rs/grep-no-recursive'
Unlike "grep", "git grep" by default recurses to the whole tree.
The command learned "git grep --recursive" option, so that "git
grep --no-recursive" can serve as a synonym to setting the
max-depth to 0.

* rs/grep-no-recursive:
  grep: add -r/--[no-]recursive
2018-10-19 13:34:06 +09:00
Junio C Hamano 54e564e1d6 Merge branch 'nd/help-commands-verbose-by-default'
"git help -a" and "git help -av" give different pieces of
information, and generally the "verbose" version is more friendly
to the new users.  "git help -a" by default now uses the more
verbose output (with "--no-verbose", you can go back to the
original).  Also "git help -av" now lists aliases and external
commands, which it did not used to.

* nd/help-commands-verbose-by-default:
  help -a: improve and make --verbose default
2018-10-19 13:34:05 +09:00
Junio C Hamano 0d4f473a98 Merge branch 'jc/how-to-document-api'
Doc update.

* jc/how-to-document-api:
  CodingGuidelines: document the API in *.h files
2018-10-19 13:34:05 +09:00
Junio C Hamano e27bfaaee3 Merge branch 'bp/read-cache-parallel'
A new extension to the index file has been introduced, which allows
the file to be read in parallel.

* bp/read-cache-parallel:
  read-cache: load cache entries on worker threads
  ieot: add Index Entry Offset Table (IEOT) extension
  read-cache: load cache extensions on a worker thread
  config: add new index.threads config setting
  eoie: add End of Index Entry (EOIE) extension
  read-cache: clean up casting and byte decoding
  read-cache.c: optimize reading index format v4
2018-10-19 13:34:03 +09:00
Junio C Hamano 11877b9ebe Merge branch 'nd/the-index'
Various codepaths in the core-ish part learn to work on an
arbitrary in-core index structure, not necessarily the default
instance "the_index".

* nd/the-index: (23 commits)
  revision.c: reduce implicit dependency the_repository
  revision.c: remove implicit dependency on the_index
  ws.c: remove implicit dependency on the_index
  tree-diff.c: remove implicit dependency on the_index
  submodule.c: remove implicit dependency on the_index
  line-range.c: remove implicit dependency on the_index
  userdiff.c: remove implicit dependency on the_index
  rerere.c: remove implicit dependency on the_index
  sha1-file.c: remove implicit dependency on the_index
  patch-ids.c: remove implicit dependency on the_index
  merge.c: remove implicit dependency on the_index
  merge-blobs.c: remove implicit dependency on the_index
  ll-merge.c: remove implicit dependency on the_index
  diff-lib.c: remove implicit dependency on the_index
  read-cache.c: remove implicit dependency on the_index
  diff.c: remove implicit dependency on the_index
  grep.c: remove implicit dependency on the_index
  diff.c: remove the_index dependency in textconv() functions
  blame.c: rename "repo" argument to "r"
  combine-diff.c: remove implicit dependency on the_index
  ...
2018-10-19 13:34:02 +09:00
Saulius Gurklys c5d844af9c doc: fix small typo in git show-branch
Fix small typo as in document <glob> is used not <globs>.

Signed-off-by: Saulius Gurklys <s4uliu5@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-10-18 12:26:51 +09:00