Commit graph

8555 commits

Author SHA1 Message Date
Junio C Hamano 61ca378275 Merge branch 'jk/push-config'
Restructure "git push" codepath to make it easier to add new
configuration bits and then add push.followTags configuration that
turns --follow-tags option on by default.

* jk/push-config:
  push: allow --follow-tags to be set by config push.followTags
  cmd_push: pass "flags" pointer to config callback
  cmd_push: set "atomic" bit directly
  git_push_config: drop cargo-culted wt_status pointer
2015-03-23 11:28:14 -07:00
Junio C Hamano aa65b86025 Merge branch 'nd/config-doc-camelCase'
Documentation updates.

* nd/config-doc-camelCase:
  *config.txt: stick to camelCase naming convention
2015-03-23 11:28:12 -07:00
Junio C Hamano e80e85a52a Post 2.3 cycle (batch #11)
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-03-20 13:53:26 -07:00
Junio C Hamano 5f456b3c26 Merge branch 'jc/decorate-leaky-separator-color'
"git log --decorate" did not reset colors correctly around the
branch names.

* jc/decorate-leaky-separator-color:
  log --decorate: do not leak "commit" color into the next item
  Documentation/config.txt: simplify boolean description in the syntax section
  Documentation/config.txt: describe 'color' value type in the "Values" section
  Documentation/config.txt: have a separate "Values" section
  Documentation/config.txt: describe the structure first and then meaning
  Documentation/config.txt: explain multi-valued variables once
  Documentation/config.txt: avoid unnecessary negation
2015-03-20 13:50:51 -07:00
Junio C Hamano 0a81977239 Merge branch 'km/imap-send-libcurl-options'
"git imap-send" learned to optionally talk with an IMAP server via
libcURL; because there is no other option when Git is built with
NO_OPENSSL option, use that codepath by default under such
configuration.

* km/imap-send-libcurl-options:
  imap-send: use cURL automatically when NO_OPENSSL defined
2015-03-20 13:11:50 -07:00
Junio C Hamano f57610a1ff Merge branch 'nd/versioncmp-prereleases'
The versionsort.prerelease configuration variable can be used to
specify that v1.0-pre1 comes before v1.0.

* nd/versioncmp-prereleases:
  config.txt: update versioncmp.prereleaseSuffix
  versionsort: support reorder prerelease suffixes
2015-03-20 13:11:45 -07:00
Junio C Hamano 9ab698f400 Post 2.3 cyce (batch #10)
Also declare that the next one will be called v2.4 ;-)

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-03-17 16:05:12 -07:00
Junio C Hamano 2a39bdb9a1 Merge branch 'mg/doc-status-color-slot'
Documentation fixes.

* mg/doc-status-color-slot:
  config,completion: add color.status.unmerged
2015-03-17 16:01:34 -07:00
Junio C Hamano 9bb56e4753 Merge branch 'mg/status-v-v'
"git status" now allows the "-v" to be given twice to show the
differences that are left in the working tree not to be committed.

* mg/status-v-v:
  commit/status: show the index-worktree diff with -v -v
  t7508: test git status -v
  t7508: .gitignore 'expect' and 'output' files
2015-03-17 16:01:33 -07:00
Dave Olszewski a8bc269f11 push: allow --follow-tags to be set by config push.followTags
Signed-off-by: Dave Olszewski <cxreg@pobox.com>
Helped-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-03-14 15:08:35 -07:00
Junio C Hamano 52cae643c5 Sync with 2.3.3 2015-03-13 23:11:50 -07:00
Junio C Hamano bb8577532a Git 2.3.3
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-03-13 22:57:25 -07:00
Junio C Hamano 4b23b5d1af Merge branch 'mr/doc-clean-f-f' into maint
Documentation update.

* mr/doc-clean-f-f:
  Documentation/git-clean.txt: document that -f may need to be given twice
2015-03-13 22:56:12 -07:00
Junio C Hamano 3af1bcafff Merge branch 'mg/doc-remote-tags-or-not' into maint
"git remote add" mentioned "--tags" and "--no-tags" and was not
clear that fetch from the remote in the future will use the default
behaviour when neither is given to override it.

* mg/doc-remote-tags-or-not:
  git-remote.txt: describe behavior without --tags and --no-tags
2015-03-13 22:56:05 -07:00
Junio C Hamano 30a52c1dcb Merge branch 'ms/submodule-update-config-doc' into maint
The interaction between "git submodule update" and the
submodule.*.update configuration was not clearly documented.

* ms/submodule-update-config-doc:
  submodule: improve documentation of update subcommand
2015-03-13 22:56:03 -07:00
Junio C Hamano 5244a31039 Merge branch 'jc/apply-beyond-symlink' into maint
"git apply" was not very careful about reading from, removing,
updating and creating paths outside the working tree (under
--index/--cached) or the current directory (when used as a
replacement for GNU patch).

* jc/apply-beyond-symlink:
  apply: do not touch a file beyond a symbolic link
  apply: do not read from beyond a symbolic link
  apply: do not read from the filesystem under --index
  apply: reject input that touches outside the working area
2015-03-13 22:56:02 -07:00
Nguyễn Thái Ngọc Duy da0005b885 *config.txt: stick to camelCase naming convention
This should improve readability. Compare "thislongname" and
"thisLongName". The following keys are left in unchanged. We can
decide what to do with them later.

 - am.keepcr
 - core.autocrlf .safecrlf .trustctime
 - diff.dirstat .noprefix
 - gitcvs.usecrlfattr
 - gui.blamehistoryctx .trustmtime
 - pull.twohead
 - receive.autogc
 - sendemail.signedoffbycc .smtpsslcertpath .suppresscc

Helped-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-03-13 22:13:46 -07:00
Michael J Gruber 0d6accc01d config,completion: add color.status.unmerged
Reported-by: "Mladen B." <mladen074@gmail.com>
Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-03-10 15:27:59 -07:00
Kyle J. McKay dcd01ea187 imap-send: use cURL automatically when NO_OPENSSL defined
If both USE_CURL_FOR_IMAP_SEND and NO_OPENSSL are defined do
not force the user to add --curl to get a working git imap-send
command.

Instead automatically select --curl and warn and ignore the
--no-curl option.  And while we're in there, correct the
warning message when --curl is requested but not supported.

Signed-off-by: Kyle J. McKay <mackyle@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-03-10 15:19:05 -07:00
Junio C Hamano 82b7e65199 Merge branch 'mh/expire-updateref-fixes'
Various issues around "reflog expire", e.g. using --updateref when
expiring a reflog for a symbolic reference, have been corrected
and/or made saner.

* mh/expire-updateref-fixes:
  reflog_expire(): never update a reference to null_sha1
  reflog_expire(): ignore --updateref for symbolic references
  reflog: improve and update documentation
  struct ref_lock: delete the force_write member
  lock_ref_sha1_basic(): do not set force_write for missing references
  write_ref_sha1(): move write elision test to callers
  write_ref_sha1(): remove check for lock == NULL
2015-03-10 13:52:40 -07:00
Nguyễn Thái Ngọc Duy 5751a3d195 config.txt: update versioncmp.prereleaseSuffix
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-03-10 13:51:48 -07:00
Junio C Hamano a11c508d56 Merge branch 'ms/submodule-update-config-doc'
The interaction between "git submodule update" and the
submodule.*.update configuration was not clearly documented.

* ms/submodule-update-config-doc:
  submodule: improve documentation of update subcommand
2015-03-06 15:02:31 -08:00
Junio C Hamano 79de649c0f Merge branch 'mg/doc-remote-tags-or-not'
"git remote add" mentioned "--tags" and "--no-tags" and was not
clear that fetch from the remote in the future will use the default
behaviour when neither is given to override it.

* mg/doc-remote-tags-or-not:
  git-remote.txt: describe behavior without --tags and --no-tags
2015-03-06 15:02:28 -08:00
Junio C Hamano 34e4e05b51 Merge branch 'mr/doc-clean-f-f'
Documentation update.

* mr/doc-clean-f-f:
  Documentation/git-clean.txt: document that -f may need to be given twice
2015-03-06 15:02:26 -08:00
Junio C Hamano 2588882df9 Sync with 2.3.2
* maint:
  Git 2.3.2
2015-03-06 14:59:12 -08:00
Junio C Hamano 1165ae6f3d Git 2.3.2
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-03-06 14:58:14 -08:00
Junio C Hamano d86679fa06 Merge branch 'mm/am-c-doc' into maint
The configuration variable 'mailinfo.scissors' was hard to
discover in the documentation.

* mm/am-c-doc:
  Documentation/git-am.txt: mention mailinfo.scissors config variable
  Documentation/config.txt: document mailinfo.scissors
2015-03-06 14:57:56 -08:00
Michael J Gruber 4055500093 commit/status: show the index-worktree diff with -v -v
git commit and git status in long format show the diff between HEAD
and the index when given -v. This allows previewing a commit to be made.

They also list tracked files with unstaged changes, but without a diff.

Introduce '-v -v' which shows the diff between the index and the
worktree in addition to the HEAD index diff. This allows a review of unstaged
changes which might be missing from the commit.

In the case of '-v -v', additonal header lines

Changes to be committed:

and

Changes not staged for commit:

are inserted before the diffs, which are equal to those in the status
part; the latter preceded by 50*"-" to make it stick out more.

Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-03-06 10:51:48 -08:00
Junio C Hamano 83036f8541 Sync with maint
* maint:
  Prepare for 2.3.2
2015-03-05 13:16:27 -08:00
Junio C Hamano 3ebda3e9f5 Prepare for 2.3.2 2015-03-05 13:15:53 -08:00
Junio C Hamano c11c154f42 Merge branch 'jc/conf-var-doc' into maint
Longstanding configuration variable naming rules has been added to
the documentation.

* jc/conf-var-doc:
  CodingGuidelines: describe naming rules for configuration variables
  config.txt: mark deprecated variables more prominently
  config.txt: clarify that add.ignore-errors is deprecated
2015-03-05 13:13:05 -08:00
Junio C Hamano 069dea89cf Merge branch 'jc/remote-set-url-doc' into maint
Clarify in the documentation that "remote.<nick>.pushURL" and
"remote.<nick>.URL" are there to name the same repository accessed
via different transports, not two separate repositories.

* jc/remote-set-url-doc:
  Documentation/git-remote.txt: stress that set-url is not for triangular
2015-03-05 13:13:03 -08:00
Junio C Hamano fec7b79aa4 Merge branch 'mm/am-c-doc'
The configuration variable 'mailinfo.scissors' was hard to
discover in the documentation.

* mm/am-c-doc:
  Documentation/git-am.txt: mention mailinfo.scissors config variable
  Documentation/config.txt: document mailinfo.scissors
2015-03-05 12:45:40 -08:00
Michael Haggerty 5e6f003ca8 reflog_expire(): ignore --updateref for symbolic references
If we are expiring reflog entries for a symbolic reference, then how
should --updateref be handled if the newest reflog entry is expired?

Option 1: Update the referred-to reference. (This is what the current
code does.) This doesn't make sense, because the referred-to reference
has its own reflog, which hasn't been rewritten.

Option 2: Update the symbolic reference itself (as in, REF_NODEREF).
This would convert the symbolic reference into a non-symbolic
reference (e.g., detaching HEAD), which is surely not what a user
would expect.

Option 3: Error out. This is plausible, but it would make the
following usage impossible:

    git reflog expire ... --updateref --all

Option 4: Ignore --updateref for symbolic references.

We choose to implement option 4.

Note: another problem in this code will be fixed in a moment.

Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Reviewed-by: Stefan Beller <sbeller@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-03-05 12:35:37 -08:00
Michael Haggerty fe2a18165c reflog: improve and update documentation
Revamp the "git reflog" usage documentation in the manpage and the
command help to match the current reality and improve its clarity:

* Add documentation for some options that had been left out.

* Group the subcommands and options more logically and move more
  common subcommands/options higher.

* Improve some explanations.

Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Reviewed-by: Stefan Beller <sbeller@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-03-05 12:35:36 -08:00
Junio C Hamano 5ee875852e log --decorate: do not leak "commit" color into the next item
In "git log --decorate", you would see the commit header like this:

    commit ... (HEAD, jc/decorate-leaky-separator-color)

where "commit ... (" is painted in color.diff.commit, "HEAD" in
color.decorate.head, ", " in color.diff.commit, the branch name in
color.decorate.branch and then closing ")" in color.diff.commit.

If you wanted to paint the HEAD and local branch name in the same
color as the body text (perhaps because cyan and green are too faint
on a black-on-white terminal to be readable), you would not want to
have to say

    [color "decorate"]
        head = black
        branch = black

because that you would not be able to reuse same configuration on a
white-on-black terminal.  You would naively expect

    [color "decorate"]
        head = normal
	branch = normal

to work, but unfortunately it does not.  It paints the string "HEAD"
and the branch name in the same color as the opening parenthesis or
comma between the decoration elements.  This is because the code
forgets to reset the color after printing the "prefix" in its own
color.

It theoretically is possible that some people were expecting and
relying on that the attribute set as the "diff.commit" color, which
is used to draw these opening parenthesis and inter-item comma, is
inherited by the drawing of branch names, but it is not how the
coloring works everywhere else.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-03-04 11:42:35 -08:00
Junio C Hamano 1c448b3b5c Documentation/config.txt: simplify boolean description in the syntax section
The 'true' short-hand doesn't deserve a separate sentence; even our own

    git config --bool foo.bar yes

would not produce it.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-03-04 11:42:34 -08:00
Junio C Hamano b92c1a28f8 Documentation/config.txt: describe 'color' value type in the "Values" section
Instead of describing it for color.branch.<slot> and have everybody
else refer to it, explain how colors are spelled in "Values" section
upfront.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-03-04 11:42:34 -08:00
Junio C Hamano 5f7b91baca Documentation/config.txt: have a separate "Values" section
The various types of values set to the configuration variables
deserve more than a brief footnote mention in the syntax section,
and it will be more so after the later steps of this clean up
effort.

Move the mention of booleans from the syntax section to this new
section, and describe how human-readble integers can be spelled with
scaling there.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-03-04 11:42:34 -08:00
Junio C Hamano ff5507ed2a Documentation/config.txt: describe the structure first and then meaning
A line can be continued via a backquote-LF and can be chomped at a
comment character.  But that is not specific to string-typed values.
It is common to all, just like unquoted leading and trailing
whitespaces are stripped and inter-word spacing are retained.

Move the description around and desribe these structural rules
first, then introduce the double-quote facility as a way to override
them, and finally mention various types of values.

Note that these structural rules only apply to the value part of the
configuration file.  E.g.

    [aSection] \
        name \
	= value

does not work, because the rules kick in only after seeing "name =".
Both the original and the updated text are phrased in an awkward way
by singling out the "value" part of the line because of this.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-03-04 11:42:34 -08:00
Junio C Hamano a5285b6c23 Documentation/config.txt: explain multi-valued variables once
The syntax section repeats what the preamble explained already.
That a variable can have multiple values is more about what a
variable is than the syntax of the file.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-03-04 11:42:34 -08:00
Junio C Hamano 05c3e5c771 Documentation/config.txt: avoid unnecessary negation
Section names and variable names are both case-insensitive, but one
is described as "not case sensitive".  Use "case-insensitive" for
both.

Instead of saying "... have to be escaped" without telling what that
escaping achieves, state it in a more positive way, i.e. "... can be
included by escaping".

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-03-04 11:42:33 -08:00
Junio C Hamano 71f19cce36 Merge branch 'jc/apply-beyond-symlink'
"git apply" was not very careful about reading from, removing,
updating and creating paths outside the working tree (under
--index/--cached) or the current directory (when used as a
replacement for GNU patch).

* jc/apply-beyond-symlink:
  apply: do not touch a file beyond a symbolic link
  apply: do not read from beyond a symbolic link
  apply: do not read from the filesystem under --index
  apply: reject input that touches outside the working area
2015-03-03 14:37:01 -08:00
Michal Sojka 5c31acfbe2 submodule: improve documentation of update subcommand
The documentation of 'git submodule update' has several problems:

1) It mentions that value 'none' of submodule.$name.update can be
   overridden by --checkout, but other combinations of configuration
   values and command line options are not mentioned.

2) The documentation of submodule.$name.update is scattered across three
   places, which is confusing.

3) The documentation of submodule.$name.update in gitmodules.txt is
   incorrect, because the code always uses the value from .git/config
   and never from .gitmodules.

4) Documentation of --force was incomplete, because it is only effective
   in case of checkout method of update.

Fix all these problems by documenting submodule.*.update in
git-submodule.txt and make everybody else refer to it.

Helped-by: Junio C Hamano <gitster@pobox.com>
Helped-by: Jens Lehmann <Jens.Lehmann@web.de>
Signed-off-by: Michal Sojka <sojkam1@fel.cvut.cz>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-03-02 14:59:55 -08:00
Michael J Gruber aaba0ab462 git-remote.txt: describe behavior without --tags and --no-tags
Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-03-02 12:48:23 -08:00
Nguyễn Thái Ngọc Duy d811c8e17c versionsort: support reorder prerelease suffixes
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-02-27 13:38:22 -08:00
Mikko Rapeli bcd57cb9e1 Documentation/git-clean.txt: document that -f may need to be given twice
This is needed in build automation where the tree really needs to
be reset to known state.

Signed-off-by: Mikko Rapeli <mikko.rapeli@iki.fi>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-02-26 13:10:40 -08:00
Junio C Hamano e2a318f796 Merge branch 'jk/strbuf-doc-to-header'
The strbuf API was explained between the API documentation and in
the header file.  Move missing bits to strbuf.h so that programmers
can check only one place for all necessary information.

* jk/strbuf-doc-to-header:
  strbuf.h: group documentation for trim functions
  strbuf.h: drop boilerplate descriptions of strbuf_split_*
  strbuf.h: reorganize api function grouping headers
  strbuf.h: format asciidoc code blocks as 4-space indent
  strbuf.h: drop asciidoc list formatting from API docs
  strbuf.h: unify documentation comments beginnings
  strbuf.h: integrate api-strbuf.txt documentation
2015-02-25 15:40:11 -08:00
Junio C Hamano 32464d36bf Merge branch 'jn/doc-api-errors'
The error handling functions and conventions are now documented in
the API manual.

* jn/doc-api-errors:
  doc: document error handling functions and conventions
2015-02-25 15:40:09 -08:00
Junio C Hamano 11acff121a Sync with 2.3.1 2015-02-24 22:15:49 -08:00