Commit graph

10898 commits

Author SHA1 Message Date
Junio C Hamano c2a499e6c3 Merge branch 'jh/partial-clone'
Hotfix.

* jh/partial-clone:
  upload-pack: disable object filtering when disabled by config
  unpack-trees: release oid_array after use in check_updates()
2018-03-29 15:39:59 -07:00
Jonathan Nieder c7620bd0f3 upload-pack: disable object filtering when disabled by config
When upload-pack gained partial clone support (v2.17.0-rc0~132^2~12,
2017-12-08), it was guarded by the uploadpack.allowFilter config item
to allow server operators to control when they start supporting it.

That config item didn't go far enough, though: it controls whether the
'filter' capability is advertised, but if a (custom) client ignores
the capability advertisement and passes a filter specification anyway,
the server would handle that despite allowFilter being false.

This is particularly significant if a security bug is discovered in
this new experimental partial clone code.  Installations without
uploadpack.allowFilter ought not to be affected since they don't
intend to support partial clone, but they would be swept up into being
vulnerable.

Simplify and limit the attack surface by making uploadpack.allowFilter
disable the feature, not just the advertisement of it.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-03-29 15:39:31 -07:00
Junio C Hamano 72d30c71a3 Merge branch 'tg/stash-doc-typofix'
Hotfix.

* tg/stash-doc-typofix:
  git-stash.txt: remove extra square bracket
2018-03-28 11:04:25 -07:00
Thomas Gummerer 0a790f09c6 git-stash.txt: remove extra square bracket
In 1ada5020b3 ("stash: use stash_push for no verb form", 2017-02-28),
when the pathspec argument was introduced in 'git stash', that was also
documented.  However I forgot to remove an extra square bracket after
the '--message' argument, even though the square bracket should have
been after the pathspec argument (where it was also added).

Remove the extra square bracket after the '--message' argument, to show
that the pathspec argument should be used with the 'push' verb.

While the pathspec argument can be used without the push verb, that's a
special case described later in the man page, and removing the first extra
square bracket instead of the second one makes the synopis easier to
understand.

Signed-off-by: Thomas Gummerer <t.gummerer@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-03-27 19:09:13 -07:00
Junio C Hamano 90bbd502d5 Sync with Git 2.16.3 2018-03-22 14:36:51 -07:00
Junio C Hamano d32eb83c1d Git 2.16.3
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-03-22 14:24:45 -07:00
Junio C Hamano 88595ebceb Merge branch 'ms/non-ascii-ticks' into maint
Doc markup fix.

* ms/non-ascii-ticks:
  Documentation/gitsubmodules.txt: avoid non-ASCII apostrophes
2018-03-22 14:24:26 -07:00
Junio C Hamano 342215be59 Merge branch 'tg/worktree-create-tracking' into maint
Hotfix for a recent topic.

* tg/worktree-create-tracking:
  git-worktree.txt: fix indentation of example and text of 'add' command
  git-worktree.txt: fix missing ")" typo
2018-03-22 14:24:24 -07:00
Junio C Hamano e09224812a Merge branch 'sb/status-doc-fix' into maint
Docfix.

* sb/status-doc-fix:
  Documentation/git-status: clarify status table for porcelain mode
2018-03-22 14:24:23 -07:00
Junio C Hamano 9ea8e0ca81 Merge branch 'rd/typofix' into maint
Typofix.

* rd/typofix:
  Correct mispellings of ".gitmodule" to ".gitmodules"
  t/: correct obvious typo "detahced"
2018-03-22 14:24:22 -07:00
Junio C Hamano 5a03f1d75a Merge branch 'bp/fsmonitor' into maint
Doc update for a recently added feature.

* bp/fsmonitor:
  fsmonitor: update documentation to remove reference to invalid config settings
2018-03-22 14:24:21 -07:00
Junio C Hamano dfc20a5e3c Merge branch 'bc/doc-interpret-trailers-grammofix' into maint
Docfix.

* bc/doc-interpret-trailers-grammofix:
  docs/interpret-trailers: fix agreement error
2018-03-22 14:24:21 -07:00
Junio C Hamano 34f6f0eca2 Merge branch 'nd/ignore-glob-doc-update' into maint
Doc update.

* nd/ignore-glob-doc-update:
  gitignore.txt: elaborate shell glob syntax
2018-03-22 14:24:18 -07:00
Junio C Hamano 9c34129e6b Merge branch 'tz/doc-show-defaults-to-head' into maint
Doc update.

* tz/doc-show-defaults-to-head:
  doc: mention 'git show' defaults to HEAD
2018-03-22 14:24:17 -07:00
Junio C Hamano 60736db161 Merge branch 'ks/submodule-doc-updates' into maint
Doc updates.

* ks/submodule-doc-updates:
  Doc/git-submodule: improve readability and grammar of a sentence
  Doc/gitsubmodules: make some changes to improve readability and syntax
2018-03-22 14:24:14 -07:00
Junio C Hamano 721dce003f Merge branch 'jt/http-redact-cookies' into maint
The http tracing code, often used to debug connection issues,
learned to redact potentially sensitive information from its output
so that it can be more safely sharable.

* jt/http-redact-cookies:
  http: support omitting data from traces
  http: support cookie redaction when tracing
2018-03-22 14:24:09 -07:00
Junio C Hamano 085f5f95a2 Git 2.17-rc1
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-03-21 12:02:04 -07:00
Junio C Hamano d16c37964c Merge branch 'jk/attributes-path-doc'
Doc update.

* jk/attributes-path-doc:
  doc/gitattributes: mention non-recursive behavior
2018-03-21 11:30:15 -07:00
Junio C Hamano e2a37ec2b0 Merge branch 'dp/merge-strategy-doc-fix'
Doc fix.

* dp/merge-strategy-doc-fix:
  Documentation/merge-strategies: typofix
2018-03-21 11:30:13 -07:00
Junio C Hamano bfaab4885a Merge branch 'tz/relnotes-1.7-on-perl'
* tz/relnotes-1.7-on-perl:
  RelNotes: add details on Perl module changes
2018-03-21 11:30:12 -07:00
Junio C Hamano f62452ecfc Merge branch 'jt/transfer-fsck-with-promissor'
The transfer.fsckobjects configuration tells "git fetch" to
validate the data and connected-ness of objects in the received
pack; the code to perform this check has been taught about the
narrow clone's convention that missing objects that are reachable
from objects in a pack that came from a promissor remote is OK.

* jt/transfer-fsck-with-promissor:
  fetch-pack: do not check links for partial fetch
  index-pack: support checking objects but not links
2018-03-21 11:30:11 -07:00
Junio C Hamano 75901dfd52 Merge branch 'ma/config-page-only-in-list-mode'
In a way similar to how "git tag" learned to honor the pager
setting only in the list mode, "git config" learned to ignore the
pager setting when it is used for setting values (i.e. when the
purpose of the operation is not to "show").

* ma/config-page-only-in-list-mode:
  config: change default of `pager.config` to "on"
  config: respect `pager.config` in list/get-mode only
  t7006: add tests for how git config paginates
2018-03-21 11:30:09 -07:00
Jeff King b635ed97a0 doc/gitattributes: mention non-recursive behavior
The gitattributes documentation claims that the pattern
rules are largely the same as for gitignore. However, the
rules for recursion are different.

In an ideal world, we would make them the same (if for
nothing else than consistency and simplicity), but that
would create backwards compatibility issues. For some
discussion, see this thread:

  https://public-inbox.org/git/slrnkldd3g.1l4.jan@majutsushi.net/

But let's at least document the differences instead of
actively misleading the user by claiming that they're the
same.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-03-20 10:01:03 -07:00
David Pursehouse bd9958c358 Documentation/merge-strategies: typofix
It's strategy, not stragegy.

Signed-off-by: David Pursehouse <dpursehouse@collab.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-03-19 09:47:56 -07:00
Todd Zullinger 14f437f338 RelNotes: add details on Perl module changes
Document changes to core and non-core Perl module handling in 2.17.

Signed-off-by: Todd Zullinger <tmz@pobox.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-03-16 16:07:37 -07:00
Junio C Hamano 0afbf6caa5 Git 2.17-rc0
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-03-15 15:01:05 -07:00
Junio C Hamano a8ba07c68a Merge branch 'ab/man-sec-list'
Doc update.

* ab/man-sec-list:
  git manpage: note git-security@googlegroups.com
2018-03-15 15:00:46 -07:00
Junio C Hamano e74737b6a1 Merge branch 'cl/send-email-reply-to'
"git send-email" learned "--reply-to=<address>" option.

* cl/send-email-reply-to:
  send-email: support separate Reply-To address
  send-email: rename variable for clarity
2018-03-15 15:00:45 -07:00
Jonathan Tan ffb2c0fe5c index-pack: support checking objects but not links
The index-pack command currently supports the
--check-self-contained-and-connected argument, for internal use only,
that instructs it to only check for broken links and not broken objects.
For partial clones, we need the inverse, so add a --fsck-objects
argument that checks for broken objects and not broken links, also for
internal use only.

This will be used by fetch-pack in a subsequent patch.

Signed-off-by: Jonathan Tan <jonathantanmy@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-03-15 10:16:24 -07:00
Junio C Hamano 88506cb887 Merge branch 'jk/smart-http-protocol-doc-fix'
A doc update.

* jk/smart-http-protocol-doc-fix:
  smart-http: document flush after "# service" line
2018-03-14 12:01:06 -07:00
Junio C Hamano bd0f794342 Merge branch 'nd/worktree-move'
"git worktree" learned move and remove subcommands.

* nd/worktree-move:
  t2028: fix minor error and issues in newly-added "worktree move" tests
  worktree remove: allow it when $GIT_WORK_TREE is already gone
  worktree remove: new command
  worktree move: refuse to move worktrees with submodules
  worktree move: accept destination as directory
  worktree move: new command
  worktree.c: add update_worktree_location()
  worktree.c: add validate_worktree()
2018-03-14 12:01:05 -07:00
Junio C Hamano 868f7d2338 Merge branch 'nd/diff-stat-with-summary'
"git diff" and friends learned "--compact-summary" that shows the
information usually given with the "--summary" option on the same
line as the diffstat output of the "--stat" option (which saves
vertical space and keeps info on a single path at the same place).

* nd/diff-stat-with-summary:
  diff: add --compact-summary
  diff.c: refactor pprint_rename() to use strbuf
2018-03-14 12:01:02 -07:00
Junio C Hamano d0db9edba0 Eighth batch for 2.17
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-03-08 12:59:17 -08:00
Junio C Hamano 077cde91d2 Merge branch 'ag/userdiff-go-funcname'
"git diff" and friends learned funcname patterns for Go language
source files.

* ag/userdiff-go-funcname:
  userdiff: add built-in pattern for golang
2018-03-08 12:36:30 -08:00
Junio C Hamano cd3d56a962 Merge branch 'mk/doc-pretty-fill'
Docfix.

* mk/doc-pretty-fill:
  docs/pretty-formats: fix typo '% <(<N>)' -> '%<|(<N>)'
2018-03-08 12:36:29 -08:00
Junio C Hamano 4094e47fd2 Merge branch 'jh/status-no-ahead-behind'
"git status" can spend a lot of cycles to compute the relation
between the current branch and its upstream, which can now be
disabled with "--no-ahead-behind" option.

* jh/status-no-ahead-behind:
  status: support --no-ahead-behind in long format
  status: update short status to respect --no-ahead-behind
  status: add --[no-]ahead-behind to status and commit for V2 format.
  stat_tracking_info: return +1 when branches not equal
2018-03-08 12:36:24 -08:00
Ævar Arnfjörð Bjarmason 2caa7b8d27 git manpage: note git-security@googlegroups.com
Add a mention of the security mailing list to the "Reporting Bugs"
section. There's a mention of this list at
https://git-scm.com/community but none in git.git itself.

The copy is pasted from the git-scm.com website. Let's use the same
wording in both places.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-03-08 11:26:19 -08:00
Junio C Hamano c6284da4ff Seventh batch for 2.17
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-03-06 14:59:10 -08:00
Junio C Hamano 327e524d66 Merge branch 'ms/non-ascii-ticks'
Doc markup fix.

* ms/non-ascii-ticks:
  Documentation/gitsubmodules.txt: avoid non-ASCII apostrophes
2018-03-06 14:54:06 -08:00
Junio C Hamano 96608043d9 Merge branch 'bw/doc-submodule-recurse-config-with-clone'
Doc update.

* bw/doc-submodule-recurse-config-with-clone:
  submodule: indicate that 'submodule.recurse' doesn't apply to clone
2018-03-06 14:54:05 -08:00
Junio C Hamano f88590e675 Merge branch 'jc/allow-ff-merging-kept-tags'
Since Git 1.7.9, "git merge" defaulted to --no-ff (i.e. even when
the side branch being merged is a descendant of the current commit,
create a merge commit instead of fast-forwarding) when merging a
tag object.  This was appropriate default for integrators who pull
signed tags from their downstream contributors, but caused an
unnecessary merges when used by downstream contributors who
habitually "catch up" their topic branches with tagged releases
from the upstream.  Update "git merge" to default to --no-ff only
when merging a tag object that does *not* sit at its usual place in
refs/tags/ hierarchy, and allow fast-forwarding otherwise, to
mitigate the problem.

* jc/allow-ff-merging-kept-tags:
  merge: allow fast-forward when merging a tracked tag
2018-03-06 14:54:04 -08:00
Junio C Hamano 9ca488c04b Merge branch 'nd/rebase-show-current-patch'
The new "--show-current-patch" option gives an end-user facing way
to get the diff being applied when "git rebase" (and "git am")
stops with a conflict.

* nd/rebase-show-current-patch:
  rebase: introduce and use pseudo-ref REBASE_HEAD
  rebase: add --show-current-patch
  am: add --show-current-patch
2018-03-06 14:54:02 -08:00
Junio C Hamano c1a7902f9a Merge branch 'ab/fetch-prune'
Clarify how configured fetch refspecs interact with the "--prune"
option of "git fetch", and also add a handy short-hand for getting
rid of stale tags that are locally held.

* ab/fetch-prune:
  fetch: make the --prune-tags work with <url>
  fetch: add a --prune-tags option and fetch.pruneTags config
  fetch tests: add scaffolding for the new fetch.pruneTags
  git-fetch & config doc: link to the new PRUNING section
  git remote doc: correct dangerous lies about what prune does
  git fetch doc: add a new section to explain the ins & outs of pruning
  fetch tests: fetch <url> <spec> as well as fetch [<remote>]
  fetch tests: expand case/esac for later change
  fetch tests: double quote a variable for interpolation
  fetch tests: test --prune and refspec interaction
  fetch tests: add a tag to be deleted to the pruning tests
  fetch tests: re-arrange arguments for future readability
  fetch tests: refactor in preparation for testing tag pruning
  remote: add a macro for "refs/tags/*:refs/tags/*"
  fetch: stop accessing "remote" variable indirectly
  fetch: trivially refactor assignment to ref_nr
  fetch: don't redundantly NULL something calloc() gave us
2018-03-06 14:54:01 -08:00
Junio C Hamano 05d290e1db Merge branch 'nm/tag-edit'
"git tag" learned an explicit "--edit" option that allows the
message given via "-m" and "-F" to be further edited.

* nm/tag-edit:
  tag: add --edit option
2018-03-06 14:53:59 -08:00
Christian Ludwig d11c943c78 send-email: support separate Reply-To address
In some projects contributions from groups are only accepted from a
common group email address. But every individual may want to receive
replies to her own personal address. That's what we have 'Reply-To'
headers for in SMTP. So introduce an optional '--reply-to' command
line option.

This patch re-uses the $reply_to variable. This could break
out-of-tree patches!

Signed-off-by: Christian Ludwig <chrissicool@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-03-06 00:18:00 -08:00
Jeff King 0aa7a78099 smart-http: document flush after "# service" line
The http-protocol.txt spec fails to mention that a flush packet
comes in the smart server response after sending the "service"
header.

Technically the client code is actually ready to receive an
arbitrary number of headers here, but since we haven't
introduced any other headers in the past decade (and the
client would just throw them away), let's not mention it in
the spec.

This fixes both BNF and the example. While we're fixing the
latter, let's also add the missing flush after the ref list.

Reported-by: Dorian Taylor <dorian.taylor.lists@gmail.com>
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-03-05 11:05:19 -08:00
Alban Gruin 1dbf0c0ad6 userdiff: add built-in pattern for golang
This adds xfuncname and word_regex patterns for golang, a quite
popular programming language. It also includes test cases for the
xfuncname regex (t4018) and updated documentation.

The xfuncname regex finds functions, structs and interfaces.  Although
the Go language prohibits the opening brace from being on its own
line, the regex does not makes it mandatory, to be able to match
`func` statements like this:

    func foo(bar int,
    	baz int) {
    }

This is covered by the test case t4018/golang-long-func.

The word_regex pattern finds identifiers, integers, floats, complex
numbers and operators, according to the go specification.

Signed-off-by: Alban Gruin <alban.gruin@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-03-01 13:36:49 -08:00
Junio C Hamano 7e31236f65 Sixth batch for 2.17
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-02-28 13:39:24 -08:00
Junio C Hamano 2c20dc16ec Merge branch 'tg/worktree-create-tracking'
Hotfix for a recent topic.

* tg/worktree-create-tracking:
  git-worktree.txt: fix indentation of example and text of 'add' command
  git-worktree.txt: fix missing ")" typo
2018-02-28 13:37:57 -08:00
Junio C Hamano 7676b86ec2 Merge branch 'sb/status-doc-fix'
Docfix.

* sb/status-doc-fix:
  Documentation/git-status: clarify status table for porcelain mode
2018-02-28 13:37:54 -08:00