Commit graph

10361 commits

Author SHA1 Message Date
Jeff King 18fb7ffc3d pretty: respect color settings for %C placeholders
The color placeholders have traditionally been
unconditional, showing colors even when git is not otherwise
configured to do so. This was not so bad for their original
use, which was on the command-line (and the user could
decide at that moment whether to add colors or not). But
these days we have configured formats via pretty.*, and
those should operate correctly in multiple contexts.

In 3082517 (log --format: teach %C(auto,black) to respect
color config, 2012-12-17), we gave an extended placeholder
that could be used to accomplish this. But it's rather
clunky to use, because you have to specify it individually
for each color (and their matching resets) in the format.
We shied away from just switching the default to auto,
because it is technically breaking backwards compatibility.

However, there's not really a use case for unconditional
colors. The most plausible reason you would want them is to
redirect "git log" output to a file. But there, the right
answer is --color=always, as it does the right thing both
with custom user-format colors and git-generated colors.

So let's switch to the more useful default. In the
off-chance that somebody really does find a use for
unconditional colors without wanting to enable the rest of
git's colors, we provide a new %C(always,...) to enable the
old behavior. And we can remind them of --color=always in
the documentation.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-07-13 12:42:51 -07:00
Jeff King 5d3d0681ab docs/for-each-ref: update pointer to color syntax
The documentation for the %(color) placeholder refers to the
color.branch.* config for more details. But those details
moved to their own section in b92c1a28f
(Documentation/config.txt: describe 'color' value type in
the "Values" section, 2015-03-03).  Let's update our
pointer. We can steal the text from 30cfe72d3 (pretty: fix
document link for color specification, 2016-10-11), which
fixed the same problem in a different place.

While we're at it, let's give an example, which makes the
syntax much more clear than just the text.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-07-13 12:42:50 -07:00
Junio C Hamano 80145b1e41 Sync with v2.13.3 2017-07-12 15:25:14 -07:00
Junio C Hamano 08f9c32463 Git 2.13.3
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-07-12 15:24:15 -07:00
Junio C Hamano 8ba1d6616f Hopefully the last batch before -rc0
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-07-12 15:19:27 -07:00
Junio C Hamano a5a3c5afcd Merge branch 'ks/fix-rebase-doc-picture'
Doc update.

* ks/fix-rebase-doc-picture:
  doc: correct a mistake in an illustration
2017-07-12 15:18:24 -07:00
Junio C Hamano b5fe65fe93 Merge branch 'sb/submodule-doc'
Doc update.

* sb/submodule-doc:
  submodules: overhaul documentation
2017-07-12 15:18:21 -07:00
Junio C Hamano 117ddefdb4 Sync with maint 2017-07-10 14:06:21 -07:00
Junio C Hamano 699d47e1d2 Prepare for 2.13.3 2017-07-10 14:02:07 -07:00
Junio C Hamano 76de71b487 Merge branch 'ah/doc-pretty-color-auto-prefix' into maint
Doc update.

* ah/doc-pretty-color-auto-prefix:
  doc: clarify syntax for %C(auto,...) in pretty formats
2017-07-10 13:59:05 -07:00
Junio C Hamano 86d51bbe1a Merge branch 'ah/doc-gitattributes-empty-index' into maint
An example in documentation that does not work in multi worktree
configuration has been corrected.

* ah/doc-gitattributes-empty-index:
  doc: do not use `rm .git/index` when normalizing line endings
2017-07-10 13:58:56 -07:00
Junio C Hamano 5e5a7cd932 Sixteenth batch for 2.14
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-07-10 13:44:30 -07:00
Kaartic Sivaraam 01826066b0 doc: correct a mistake in an illustration
The first illustration of the "RECOVERING FROM UPSTREAM REBASE"
section in the 'git-rebase' documentation meant to depict that
there are number of commits on the 'master' branch, but it is
longer than the 'master' branch in the following illustrations
by one commit, even though there is no resetting of 'master' to
lose that commit.

Correct it.

Signed-off-by: Kaartic Sivaraam <kaarticsivaraam91196@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-07-10 09:50:36 -07:00
Junio C Hamano 8b2efe2a0f Fifteenth batch for 2.14
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-07-06 18:26:13 -07:00
Junio C Hamano eb37527ab0 Merge branch 'xz/send-email-batch-size'
"git send-email" learned to overcome some SMTP server limitation
that does not allow many pieces of e-mails to be sent over a single
session.

* xz/send-email-batch-size:
  send-email: --batch-size to work around some SMTP server limit
2017-07-06 18:14:46 -07:00
Junio C Hamano 50ff9ea4a0 Fourteenth batch for 2.14
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-07-05 13:33:51 -07:00
xiaoqiang zhao 5453b83bdf send-email: --batch-size to work around some SMTP server limit
Some email servers (e.g. smtp.163.com) limit the number emails to be
sent per session (connection) and this will lead to a faliure when
sending many messages.

Teach send-email to disconnect after sending a number of messages
(configurable via the --batch-size=<num> option), wait for a few
seconds (configurable via the --relogin-delay=<seconds> option) and
reconnect, to work around such a limit.

Also add two configuration variables to give these options the default.

Note:

  We will use this as a band-aid for now, but in the longer term, we
  should look at and react to the SMTP error code from the server;
  Xianqiang reports that 450 and 451 are returned by problematic
  servers.

  cf. https://public-inbox.org/git/7993e188.d18d.15c3560bcaf.Coremail.zxq_yx_007@163.com/

Signed-off-by: xiaoqiang zhao <zxq_yx_007@163.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-07-05 09:09:45 -07:00
Junio C Hamano 5116f791c1 Thirteenth batch for 2.14
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-06-30 13:47:49 -07:00
Junio C Hamano 748cffc22b Merge branch 'vs/typofixes'
Many typofixes.

* vs/typofixes:
  Spelling fixes
2017-06-30 13:45:25 -07:00
Junio C Hamano 9bab852f65 Merge branch 'ah/doc-pretty-color-auto-prefix'
Doc update.

* ah/doc-pretty-color-auto-prefix:
  doc: clarify syntax for %C(auto,...) in pretty formats
2017-06-30 13:45:23 -07:00
Junio C Hamano d5d6a44099 Merge branch 'ks/submodule-add-doc'
Doc update.

* ks/submodule-add-doc:
  Documentation/git-submodule: cleanup "add" section
2017-06-30 13:45:22 -07:00
Ville Skyttä 6412757514 Spelling fixes
Signed-off-by: Ville Skyttä <ville.skytta@iki.fi>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-06-27 10:35:49 -07:00
Junio C Hamano e0aaa1b653 Twelfth batch for 2.14
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-06-26 14:12:46 -07:00
Junio C Hamano e25a76721c Merge branch 'dt/raise-core-packed-git-limit'
Doc update for a topic already in 'master'.

* dt/raise-core-packed-git-limit:
  docs: update 64-bit core.packedGitLimit default
2017-06-26 14:09:30 -07:00
Junio C Hamano 849b44cdf1 Merge branch 'lb/status-stash-count'
"git status" learned to optionally give how many stash entries the
user has in its output.

* lb/status-stash-count:
  glossary: define 'stash entry'
  status: add optional stash count information
  stash: update documentation to use 'stash entry'
2017-06-26 14:09:29 -07:00
Junio C Hamano e629a7d28a Sync with 2.13.2
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-06-24 15:34:14 -07:00
Junio C Hamano 8c8e978f57 Git 2.13.2
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-06-24 15:31:36 -07:00
Junio C Hamano 8992def6b3 Merge branch 'sn/reset-doc-typofix' into maint
Doc update.

* sn/reset-doc-typofix:
  doc: git-reset: fix a trivial typo
2017-06-24 15:29:35 -07:00
Junio C Hamano 74567ac001 Merge branch 'sg/doc-pretty-formats' into maint
Doc update.

* sg/doc-pretty-formats:
  docs/pretty-formats: stress that %- removes all preceding line-feeds
2017-06-24 15:29:35 -07:00
Junio C Hamano 4f7132a9be Merge branch 'sb/submodule-rm-absorb' into maint
Doc update to a recently graduated topic.

* sb/submodule-rm-absorb:
  Documentation/git-rm: correct submodule description
2017-06-24 15:29:32 -07:00
Junio C Hamano a2ba37c57b Eleventh batch for 2.14
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-06-24 14:34:11 -07:00
Junio C Hamano cda4ba30b1 Merge branch 'jk/warn-add-gitlink'
Using "git add d/i/r" when d/i/r is the top of the working tree of
a separate repository would create a gitlink in the index, which
would appear as a not-quite-initialized submodule to others.  We
learned to give warnings when this happens.

* jk/warn-add-gitlink:
  t: move "git add submodule" into test blocks
  add: warn when adding an embedded repository
2017-06-24 14:28:41 -07:00
Junio C Hamano 9bca0e5513 Merge branch 'sn/reset-doc-typofix'
Doc update.

* sn/reset-doc-typofix:
  doc: git-reset: fix a trivial typo
2017-06-24 14:28:39 -07:00
Junio C Hamano f3c9c8501d Merge branch 'sg/doc-pretty-formats'
Doc update.

* sg/doc-pretty-formats:
  docs/pretty-formats: stress that %- removes all preceding line-feeds
2017-06-24 14:28:39 -07:00
Junio C Hamano 2bc81f2a83 Merge branch 'ah/doc-gitattributes-empty-index'
An example in documentation that does not work in multi worktree
configuration has been corrected.

* ah/doc-gitattributes-empty-index:
  doc: do not use `rm .git/index` when normalizing line endings
2017-06-24 14:28:37 -07:00
Andreas Heiduk 8592c95cdf doc: clarify syntax for %C(auto,...) in pretty formats
The manual correctly describes the syntax with `auto,` but the
trailing `,` is hard to spot in a terminal.  The HTML format does not
have this problem.  Adding an example helps both worlds.

Signed-off-by: Andreas Heiduk <asheiduk@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-06-24 11:23:55 -07:00
Stefan Beller d48034551a submodules: overhaul documentation
This patch aims to detangle (a) the usage of `git-submodule`
from (b) the concept of submodules and (c) how the actual
implementation looks like, such as where they are configured
and (d) what the best practices are.

To do so, move the conceptual parts of the 'git-submodule'
man page to a new man page gitsubmodules(7). This new page
is just like gitmodules(5), gitattributes(5), gitcredentials(7),
gitnamespaces(7), gittutorial(7), which introduce a concept
rather than explaining a specific command.

Signed-off-by: Stefan Beller <sbeller@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-06-22 15:25:25 -07:00
Junio C Hamano 5402b1352f Tenth batch for 2.14
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-06-22 14:18:05 -07:00
Junio C Hamano 9eafe86d58 Merge branch 'rs/strbuf-addftime-zZ'
As there is no portable way to pass timezone information to
strftime, some output format from "git log" and friends are
impossible to produce.  Teach our own strbuf_addftime to replace %z
and %Z with caller-supplied values to help working around this.

* rs/strbuf-addftime-zZ:
  date: use localtime() for "-local" time formats
  t0006: check --date=format zone offsets
  strbuf: let strbuf_addftime handle %z and %Z itself
2017-06-22 14:15:25 -07:00
Junio C Hamano f77149c2fb Merge branch 'mh/fast-import-raise-default-depth'
"fast-import" uses a default pack chain depth that is consistent
with other parts of the system.

* mh/fast-import-raise-default-depth:
  fast-import: increase the default pack depth to 50
2017-06-22 14:15:23 -07:00
Junio C Hamano 5779a4aa0e Merge branch 'ah/filter-branch-setup'
"filter-branch" learned a pseudo filter "--setup" that can be used
to define a common function/variable that can be used by other
filters.

* ah/filter-branch-setup:
  filter-branch: add [--] to usage
  filter-branch: add `--setup` step
2017-06-22 14:15:21 -07:00
Kaartic Sivaraam beebc6df4c Documentation/git-submodule: cleanup "add" section
The "add" section for 'git-submodule' is redundant in its
description and the short synopsis line. Fix it.

Remove the redundant mentioning of the 'repository' argument
being mandatory.

The text is hard to read because of back-references, so remove
those.

Replace the word "humanish" by "canonical" as that conveys better
what we do to guess the path.

While at it, quote all occurrences of '.gitmodules' as that is an
important file in the submodule context, also link to it on its
first mention.

Helped-by: Stefan Beller <sbeller@google.com>
Signed-off-by: Kaartic Sivaraam <kaarticsivaraam91196@gmail.com>
Reviewed-by: Stefan Beller <sbeller@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-06-22 12:38:52 -07:00
Jeff King b24a8db14a docs: update 64-bit core.packedGitLimit default
We bumped the default in be4ca2905 (Increase
core.packedGitLimit, 2017-04-20) but never adjusted the
documentation to match.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-06-21 09:39:57 -07:00
Junio C Hamano 05ec6e13aa Ninth batch for 2.14
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-06-19 12:41:12 -07:00
Junio C Hamano d04787e645 Merge branch 'sb/submodule-rm-absorb'
Doc update to a recently graduated topic.

* sb/submodule-rm-absorb:
  Documentation/git-rm: correct submodule description
2017-06-19 12:38:44 -07:00
Junio C Hamano ae7e4d4fed Merge branch 'ab/pcre-v2'
Update "perl-compatible regular expression" support to enable JIT
and also allow linking with the newer PCRE v2 library.

* ab/pcre-v2:
  grep: add support for PCRE v2
  grep: un-break building with PCRE >= 8.32 without --enable-jit
  grep: un-break building with PCRE < 8.20
  grep: un-break building with PCRE < 8.32
  grep: add support for the PCRE v1 JIT API
  log: add -P as a synonym for --perl-regexp
  grep: skip pthreads overhead when using one thread
  grep: don't redundantly compile throwaway patterns under threading
2017-06-19 12:38:43 -07:00
Liam Beguin 90f64f1cf5 glossary: define 'stash entry'
Signed-off-by: Liam Beguin <liambeguin@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-06-18 22:18:15 -07:00
Liam Beguin c1b5d0194b status: add optional stash count information
Introduce '--show-stash' and its configuration option 'status.showStash'
to allow git-status to show information about currently stashed entries.

Signed-off-by: Liam Beguin <liambeguin@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-06-18 22:17:47 -07:00
Liam Beguin e01db917d8 stash: update documentation to use 'stash entry'
Most of the time, a 'stash entry' is called a 'stash'. Lets try to make
this more consistent and use 'stash entry' instead.

Signed-off-by: Liam Beguin <liambeguin@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-06-18 22:16:36 -07:00
SZEDER Gábor 8abc09c0e3 docs/pretty-formats: stress that %- removes all preceding line-feeds
Signed-off-by: SZEDER Gábor <szeder.dev@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-06-15 14:45:28 -07:00