Commit graph

9022 commits

Author SHA1 Message Date
Junio C Hamano 684fea3794 Merge branch 'xf/user-manual-ff' into maint
* xf/user-manual-ff:
  user-manual: fix the description of fast-forward
2015-11-04 14:20:49 -08:00
Junio C Hamano 6c66686e0b Merge branch 'xf/user-manual-markup' into maint
AsciiDoc markup fixes.

* xf/user-manual-markup:
  Documentation: match undefline with the text in old release notes
  Documentation: match underline with the text
  Documentation: fix header markup
2015-11-04 14:20:47 -08:00
Junio C Hamano 7974b3fd75 Merge branch 'jc/everyday-markup' into maint
AsciiDoc markup fixes.

* jc/everyday-markup:
  Documentation/everyday: match undefline with the text
2015-11-04 14:20:46 -08:00
Junio C Hamano bc1e0481bf Merge branch 'jc/em-dash-in-doc' into maint
AsciiDoc markup fixes.

* jc/em-dash-in-doc:
  Documentation: AsciiDoc spells em-dash as double-dashes, not triple
2015-11-04 14:20:45 -08:00
Junio C Hamano 5c15ca0b3c Merge branch 'jk/merge-file-exit-code' into maint
"git merge-file" tried to signal how many conflicts it found, which
obviously would not work well when there are too many of them.

* jk/merge-file-exit-code:
  merge-file: clamp exit code to maximum 127
2015-11-03 15:32:41 -08:00
Junio C Hamano f5f7684596 Merge branch 'jc/usage-stdin' into maint
The synopsis text and the usage string of subcommands that read
list of things from the standard input are often shown as if they
only take input from a file on a filesystem, which was misleading.

* jc/usage-stdin:
  usage: do not insist that standard input must come from a file
2015-11-03 15:32:38 -08:00
Junio C Hamano f89baca1b9 Merge branch 'jk/repository-extension' into maint
Prepare for Git on-disk repository representation to undergo
backward incompatible changes by introducing a new repository
format version "1", with an extension mechanism.

* jk/repository-extension:
  introduce "preciousObjects" repository extension
  introduce "extensions" form of core.repositoryformatversion
2015-11-03 15:32:25 -08:00
Jeff King e34f80278e merge-file: clamp exit code to maximum 127
Git-merge-file is documented to return one of three exit
codes:

  - zero means the merge was successful

  - a negative number means an error occurred

  - a positive number indicates the number of conflicts

Unfortunately, this all gets stuffed into an 8-bit return
code. Which means that if you have 256 conflicts, this wraps
to zero, and the merge appears to succeed (and commits a
blob full of conflict-marker cruft!).

This patch clamps the return value to a maximum of 127,
which we should be able to safely represent everywhere. This
also leaves 128-255 for other values. Shells (and some parts
of git) will typically represent signal death as 128 plus
the signal number. And negative values are typically coerced
to an 8-bit unsigned value (so "return -1" ends up as 255).

Technically negative returns have the same problem (e.g.,
"-256" wraps back to 0), but this is not a problem in
practice, as the only negative value we use is "-1".

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-10-29 12:10:23 -07:00
Xue Fuqiao b2af4829cc user-manual: fix the description of fast-forward
The "Fast-forward merges" section of user-manual.txt incorrectly
says if the current branch is a descendant of the other, Git will
perform a fast-forward merge, but it should the other way around.

Signed-off-by: Xue Fuqiao <xfq.free@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-10-26 13:03:44 -07:00
Junio C Hamano 3b19dba703 Documentation: AsciiDoc spells em-dash as double-dashes, not triple
Again, we do not usually process release notes with AsciiDoc, but it
is better to be consistent.

This incidentally reveals breakages left by an ancient 5e00439f
(Documentation: build html for all files in technical and howto,
2012-10-23).  The index-format documentation was originally written
to be read as straight text without formatting and when the commit
forced everything in Documentation/ to go through AsciiDoc, it did
not do any adjustment--hence the double-dashes will be seen in the
resulting text that is rendered as preformatted fixed-width without
converted into em-dashes.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-10-22 13:02:33 -07:00
Junio C Hamano 77d5f715c2 Documentation: match undefline with the text in old release notes
These are not processed with AsciiDoc, but it is better to be
consistent.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-10-22 10:16:17 -07:00
Junio C Hamano 142d035a02 Documentation: match underline with the text
Even though AsciiDoc is more lenient when deciding if an underline
is for the contents on the previous line to find section headers, we
should match the length of them for other formatters to help them.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-10-22 10:16:12 -07:00
Junio C Hamano f3f38c7d9b Documentation/everyday: match undefline with the text
Even though AsciiDoc is more lenient when deciding if an underline
is for the contents on the previous line to find section headers, we
should match the length of them for other formatters to help them.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-10-22 10:14:44 -07:00
Xue Fuqiao a3e1fa97bc Documentation: fix header markup
Asciidoctor is stricter than AsciiDoc when deciding if underlining
is a section title or the start of preformatted text.  Make the
length of the underlining match the text to ensure that it renders
correctly in all implementations.

Signed-off-by: Xue Fuqiao <xfq.free@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-10-22 09:35:36 -07:00
Junio C Hamano ce555f3842 Merge branch 'jc/doc-gc-prune-now' into maint
"git gc" is safe to run anytime only because it has the built-in
grace period to protect young objects.  In order to run with no
grace period, the user must make sure that the repository is
quiescent.

* jc/doc-gc-prune-now:
  Documentation/gc: warn against --prune=<now>
2015-10-20 15:22:40 -07:00
Junio C Hamano 33e8fc8740 usage: do not insist that standard input must come from a file
The synopsys text and the usage string of subcommands that read list
of things from the standard input are often shown like this:

	git gostak [--distim] < <list-of-doshes>

This is problematic in a number of ways:

 * The way to use these commands is more often to feed them the
   output from another command, not feed them from a file.

 * Manual pages outside Git, commands that operate on the data read
   from the standard input, e.g "sort", "grep", "sed", etc., are not
   described with such a "< redirection-from-file" in their synopsys
   text.  Our doing so introduces inconsistency.

 * We do not insist on where the output should go, by saying

	git gostak [--distim] < <list-of-doshes> > <output>

 * As it is our convention to enclose placeholders inside <braket>,
   the redirection operator followed by a placeholder filename
   becomes very hard to read, both in the documentation and in the
   help text.

Let's clean them all up, after making sure that the documentation
clearly describes the modes that take information from the standard
input and what kind of things are expected on the input.

[jc: stole example for fmt-merge-msg from Jonathan]

Helped-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-10-16 15:27:52 -07:00
Junio C Hamano 3c3d3f629a Git 2.6.2
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-10-16 14:40:05 -07:00
Junio C Hamano 0dd9e571e8 Merge branch 'tk/doc-interpret-trailers-grammo' into maint
* tk/doc-interpret-trailers-grammo:
  Documentation/interpret-trailers: Grammar fix
2015-10-16 14:32:56 -07:00
Junio C Hamano aa8f64dead Merge branch 'jk/asciidoctor-section-heading-markup-fix' into maint
* jk/asciidoctor-section-heading-markup-fix:
  Documentation: fix section header mark-up
2015-10-16 14:32:53 -07:00
Junio C Hamano 22f4b15e88 Merge branch 'nd/ls-remote-does-not-have-u-option' into maint
* nd/ls-remote-does-not-have-u-option:
  ls-remote.txt: delete unsupported option
2015-10-16 14:32:52 -07:00
Junio C Hamano d5fea2418e Merge branch 'dt/log-follow-config' into maint
Description of the "log.follow" configuration variable in "git log"
documentation is now also copied to "git config" documentation.

* dt/log-follow-config:
  log: Update log.follow doc and add to config.txt
2015-10-16 14:32:42 -07:00
Junio C Hamano f4892a3c28 Merge branch 'jk/notes-dwim-doc' into maint
The way how --ref/--notes to specify the notes tree reference are
DWIMmed was not clearly documented.

* jk/notes-dwim-doc:
  notes: correct documentation of DWIMery for notes references
2015-10-16 14:32:40 -07:00
Junio C Hamano be4d6f4c7f Merge branch 'mm/keyid-docs' into maint
Very small number of options take a parameter that is optional
(which is not a great UI element as they can only appear at the end
of the command line).  Add notice to documentation of each and
every one of them.

* mm/keyid-docs:
  Documentation: explain optional arguments better
  Documentation/grep: fix documentation of -O
  Documentation: use 'keyid' consistently, not 'key-id'
2015-10-16 14:32:33 -07:00
Junio C Hamano fae1a901ec Documentation/gc: warn against --prune=<now>
"git gc" is safe to run anytime only because it has the built-in
grace period to protect objects that are created by other processes
that are waiting for ref updates to anchor them to the history.  In
order to run with no grace period, the user must make sure that the
repository is quiescent.

Reviewed-by: Matthieu Moy <Matthieu.Moy@grenoble-inp.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-10-14 13:48:39 -07:00
Tobias Klauser a43eb67e65 Documentation/interpret-trailers: Grammar fix
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-10-07 10:53:34 -07:00
Eric N. Vander Weele fd8d07efda log: Update log.follow doc and add to config.txt
Documentation/config.txt does not include the documentation for
log.follow that is in Documentation/git-log.txt.  This commit adds the
log.follow documentation to config.txt and also updates the wording to
be consistent with the format that is followed by other boolean
configuration variables.

Signed-off-by: Eric N. Vander Weele <ericvw@gmail.com>
Acked-by: David Turner <dturner@twopensource.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-10-07 10:37:48 -07:00
Junio C Hamano 22f698cb18 Git 2.6.1
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-09-28 19:19:34 -07:00
Junio C Hamano 3adc4ec7b9 Sync with v2.5.4 2015-09-28 19:16:54 -07:00
Junio C Hamano 24358560c3 Git 2.5.4
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-09-28 15:34:28 -07:00
Junio C Hamano 11a458befc Sync with 2.4.10 2015-09-28 15:33:56 -07:00
Junio C Hamano a2558fb8e1 Git 2.4.10
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-09-28 15:30:30 -07:00
Junio C Hamano 6343e2f6f2 Sync with 2.3.10 2015-09-28 15:28:31 -07:00
Junio C Hamano 18b58f707f Git 2.3.10
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-09-28 15:26:52 -07:00
Junio C Hamano be08dee973 Git 2.6
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-09-28 13:18:19 -07:00
Nguyễn Thái Ngọc Duy 29bc480aa1 ls-remote.txt: delete unsupported option
-u <exec> has never been supported, but it was mentioned since
0a2bb55 (git ls-remote: make usage string match manpage -
2008-11-11). Nobody has complained about it for seven years, it's
probably safe to say nobody cares. So let's remove "-u" in documents
instead of adding code to support it.

While at there, fix --upload-pack syntax too.

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-09-28 11:07:04 -07:00
Blake Burkhart f4113cac0c http: limit redirection to protocol-whitelist
Previously, libcurl would follow redirection to any protocol
it was compiled for support with. This is desirable to allow
redirection from HTTP to HTTPS. However, it would even
successfully allow redirection from HTTP to SFTP, a protocol
that git does not otherwise support at all. Furthermore
git's new protocol-whitelisting could be bypassed by
following a redirect within the remote helper, as it was
only enforced at transport selection time.

This patch limits redirects within libcurl to HTTP, HTTPS,
FTP and FTPS. If there is a protocol-whitelist present, this
list is limited to those also allowed by the whitelist. As
redirection happens from within libcurl, it is impossible
for an HTTP redirect to a protocol implemented within
another remote helper.

When the curl version git was compiled with is too old to
support restrictions on protocol redirection, we warn the
user if GIT_ALLOW_PROTOCOL restrictions were requested. This
is a little inaccurate, as even without that variable in the
environment, we would still restrict SFTP, etc, and we do
not warn in that case. But anything else means we would
literally warn every time git accesses an http remote.

This commit includes a test, but it is not as robust as we
would hope. It redirects an http request to ftp, and checks
that curl complained about the protocol, which means that we
are relying on curl's specific error message to know what
happened. Ideally we would redirect to a working ftp server
and confirm that we can clone without protocol restrictions,
and not with them. But we do not have a portable way of
providing an ftp server, nor any other protocol that curl
supports (https is the closest, but we would have to deal
with certificates).

[jk: added test and version warning]

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-09-25 15:30:39 -07:00
John Keeping be510e0105 Documentation: fix section header mark-up
Asciidoctor is stricter than AsciiDoc when deciding if underlining
is a section title or the start of preformatted text.  Make the
length of the underlining match the text to ensure that it renders
correctly in all implementations.

Signed-off-by: John Keeping <john@keeping.me.uk>
[jc: squashed in git-bisect one noticed by Michael J Gruber]
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-09-25 10:47:06 -07:00
Jeff King a5adaced2e transport: add a protocol-whitelist environment variable
If we are cloning an untrusted remote repository into a
sandbox, we may also want to fetch remote submodules in
order to get the complete view as intended by the other
side. However, that opens us up to attacks where a malicious
user gets us to clone something they would not otherwise
have access to (this is not necessarily a problem by itself,
but we may then act on the cloned contents in a way that
exposes them to the attacker).

Ideally such a setup would sandbox git entirely away from
high-value items, but this is not always practical or easy
to set up (e.g., OS network controls may block multiple
protocols, and we would want to enable some but not others).

We can help this case by providing a way to restrict
particular protocols. We use a whitelist in the environment.
This is more annoying to set up than a blacklist, but
defaults to safety if the set of protocols git supports
grows). If no whitelist is specified, we continue to default
to allowing all protocols (this is an "unsafe" default, but
since the minority of users will want this sandboxing
effect, it is the only sensible one).

A note on the tests: ideally these would all be in a single
test file, but the git-daemon and httpd test infrastructure
is an all-or-nothing proposition rather than a test-by-test
prerequisite. By putting them all together, we would be
unable to test the file-local code on machines without
apache.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-09-23 11:35:48 -07:00
Jacob Keller e14c92e841 notes: correct documentation of DWIMery for notes references
expand_notes_ref is used by --ref from git-notes(1) and --notes from the
git log to find the full refname of a notes reference. Previously the
documentation of these options was not clear about what sorts of
expansions would be performed. Fix the documentation to clearly and
accurately describe the behavior of the expansions.

Add a test for this expansion when using git notes get-ref in order to
prevent future patches from changing this behavior.

Signed-off-by: Jacob Keller <jacob.keller@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-09-22 15:24:01 -07:00
Matthieu Moy 2b594bf90d Documentation: explain optional arguments better
Improve the documentation of commands taking optional arguments in two
ways:

* Documents the behavior of '-O' (for grep) and '-S' (for commands
  creating commits) when used without the optional argument.

* Document the syntax of these options.

For the second point, the behavior is documented in gitcli(7), but it is
easy for users to miss, and hard for the same user to understand why e.g.
"git status -u no" does not work.

Document this explicitly in the documentation of each short option having
an optional argument: they are the most error prone since there is no '='
sign between the option and its argument.

Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Reviewed-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-09-21 10:48:23 -07:00
Matthieu Moy 318ca61531 Documentation/grep: fix documentation of -O
Since the argument of -O, --open-file-in-pager is optional, it must be
stuck to the command. Reflect this in the documentation.

Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Reviewed-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-09-21 10:48:21 -07:00
Matthieu Moy 340f2c5e63 Documentation: use 'keyid' consistently, not 'key-id'
Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Reviewed-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-09-21 10:48:17 -07:00
Junio C Hamano 0e5767991b Update RelNotes to 2.6
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-09-17 12:33:24 -07:00
Junio C Hamano 4d8002429f Sync with 2.5.3
* maint:
  Git 2.5.3
2015-09-17 12:29:49 -07:00
Junio C Hamano a2654356d4 Merge branch 'po/doc-branch-desc'
The branch descriptions that are set with "git branch --edit-description"
option were used in many places but they weren't clearly documented.

* po/doc-branch-desc:
  doc: show usage of branch description
2015-09-17 12:29:03 -07:00
Junio C Hamano 1c1fee746e Merge branch 'as/config-doc-markup-fix'
* as/config-doc-markup-fix:
  Documentation/config: fix formatting for branch.*.rebase and pull.rebase
2015-09-17 12:29:01 -07:00
Junio C Hamano ee6ad5f4d5 Git 2.5.3
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-09-17 12:16:17 -07:00
Junio C Hamano d6579d9436 Merge branch 'br/svn-doc-include-paths-config' into maint
* br/svn-doc-include-paths-config:
  git-svn doc: mention "svn-remote.<name>.include-paths"
2015-09-17 12:11:46 -07:00
Junio C Hamano f4d9753a89 Update RelNotes to 2.6 to describe leftover bits since -rc2
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-09-14 15:00:41 -07:00
Junio C Hamano 45733fa93f Git 2.6-rc2
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-09-14 13:17:56 -07:00