1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-11-01 14:57:52 +01:00
Commit graph

6982 commits

Author SHA1 Message Date
Junio C Hamano
5bf72ed2e7 Merge branch 'maint'
* maint:
  Replace filepattern with pathspec for consistency
2013-02-12 12:23:12 -08:00
Matthieu Moy
d32805dce7 Replace filepattern with pathspec for consistency
pathspec is the most widely used term, and is the one defined in
gitglossary.txt. <filepattern> was used only in the synopsys for git-add
and git-commit, and in git-add.txt. Get rid of it.

This patch is obtained with by running:

  perl -pi -e 's/filepattern/pathspec/' `git grep -l filepattern`

Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-02-12 10:05:38 -08:00
Junio C Hamano
aa3982890f Update draft release notes to 1.8.2
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-02-10 20:47:28 -08:00
Junio C Hamano
e1ebf21237 Merge branch 'maint'
* maint:
  user-manual: Rewrite git-gc section for automatic packing
  user-manual: Fix 'you - Git' -> 'you--Git' typo
  user-manual: Fix 'http' -> 'HTTP' typos
  user-manual: Fix 'both: so' -> 'both; so' typo
2013-02-10 20:40:44 -08:00
W. Trevor King
901fd180c9 user-manual: Rewrite git-gc section for automatic packing
This should have happened back in 2007, when `git gc` learned about
auto (e9831e8, git-gc --auto: add documentation, 2007-09-17).

Signed-off-by: W. Trevor King <wking@tremily.us>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-02-10 20:39:26 -08:00
W. Trevor King
da2c7b3dc5 user-manual: Fix 'you - Git' -> 'you--Git' typo
Use an em-dash, not a hyphen, to join these clauses.

Signed-off-by: W. Trevor King <wking@tremily.us>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-02-10 20:39:25 -08:00
W. Trevor King
de3f2c7b46 user-manual: Fix 'http' -> 'HTTP' typos
HTTP is an acronym which has not (yet) made the transition to word
status (unlike "laser", probably because lasers are inherently cooler
than HTTP ;).

Signed-off-by: W. Trevor King <wking@tremily.us>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-02-10 20:39:20 -08:00
W. Trevor King
ddd2369c5c user-manual: Fix 'both: so' -> 'both; so' typo
The clause "so `git log ...` will return no commits..." is
independent, not a description of "both", so a semicolon is more
appropriate.

Signed-off-by: W. Trevor King <wking@tremily.us>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-02-10 14:18:57 -08:00
Junio C Hamano
a923c314aa Update draft release notes to 1.8.2
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-02-07 15:25:06 -08:00
Junio C Hamano
c86223b272 Sync with 1.8.1.3 2013-02-07 15:21:49 -08:00
Junio C Hamano
f350082525 Git 1.8.1.3
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-02-07 15:21:10 -08:00
Junio C Hamano
39ca1bd882 Merge branch 'da/mergetool-docs'
Build on top of the clean-up done by jk/mergetool and automatically
generate the list of mergetool and difftool backends the build
supports to be included in the documentation.

* da/mergetool-docs:
  doc: generate a list of valid merge tools
  mergetool--lib: list user configured tools in '--tool-help'
  mergetool--lib: add functions for finding available tools
  mergetool--lib: improve the help text in guess_merge_tool()
  mergetool--lib: simplify command expressions
2013-02-07 14:42:16 -08:00
Junio C Hamano
b9a5f6811d Merge branch 'jk/doc-makefile-cleanup'
* jk/doc-makefile-cleanup:
  Documentation/Makefile: clean up MAN*_TXT lists
2013-02-07 14:41:51 -08:00
Junio C Hamano
8e12ab2f33 Merge branch 'jk/remote-helpers-doc'
"git help remote-helpers" did not work; 'remote-helpers' is not
a subcommand name but a concept, so its documentation should have
been in gitremote-helpers, not git-remote-helpers.

* jk/remote-helpers-doc:
  Rename {git- => git}remote-helpers.txt
2013-02-07 14:41:45 -08:00
Junio C Hamano
f507784d2c Merge branch 'nd/branch-error-cases'
Fix various error messages and conditions in "git branch", e.g. we
advertised "branch -d/-D" to remove one or more branches but actually
implemented removal of zero or more branches---request to remove no
branches was not rejected.

* nd/branch-error-cases:
  branch: let branch filters imply --list
  docs: clarify git-branch --list behavior
  branch: mark more strings for translation
  branch: give a more helpful message on redundant arguments
  branch: reject -D/-d without branch name
2013-02-07 14:41:38 -08:00
Junio C Hamano
41e81d2fb9 Merge branch 'jk/python-styles'
* jk/python-styles:
  CodingGuidelines: add Python coding guidelines
2013-02-07 14:41:31 -08:00
Junio C Hamano
2f19ada7f8 Update draft release notes to 1.8.2
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-02-05 16:20:16 -08:00
Junio C Hamano
e34c7e2b51 Merge branch 'ta/doc-no-small-caps'
Update documentation to change "GIT" which was a poor-man's small
caps to "Git".  The latter was the intended spelling.

Also change "git" spelled in all-lowercase to "Git" when it refers
to the system as the whole or the concept it embodies, as opposed to
the command the end users would type.

* ta/doc-no-small-caps:
  Documentation: StGit is the right spelling, not StGIT
  Documentation: describe the "repository" in repository-layout
  Documentation: add a description for 'gitfile' to glossary
  Documentation: do not use undefined terms git-dir and git-file
  Documentation: the name of the system is 'Git', not 'git'
  Documentation: avoid poor-man's small caps GIT
2013-02-05 16:13:32 -08:00
Junio C Hamano
f51a757faf Update draft release notes to 1.8.2
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-02-04 10:44:26 -08:00
Junio C Hamano
4c2c5537c3 Merge branch 'maint'
* maint:
  Start preparing for 1.8.1.3
2013-02-04 10:26:11 -08:00
Junio C Hamano
27d46a7072 Merge branch 'mm/add-u-A-sans-pathspec'
Forbid "git add -u" and "git add -A" without pathspec run from a
subdirectory, to train people to type "." (or ":/") to make the
choice of default does not matter.

* mm/add-u-A-sans-pathspec:
  add: warn when -u or -A is used without pathspec
2013-02-04 10:25:14 -08:00
Junio C Hamano
370855e967 Merge branch 'jc/push-reject-reasons'
Improve error and advice messages given locally when "git push"
refuses when it cannot compute fast-forwardness by separating these
cases from the normal "not a fast-forward; merge first and push
again" case.

* jc/push-reject-reasons:
  push: finishing touches to explain REJECT_ALREADY_EXISTS better
  push: introduce REJECT_FETCH_FIRST and REJECT_NEEDS_FORCE
  push: further simplify the logic to assign rejection reason
  push: further clean up fields of "struct ref"
2013-02-04 10:25:04 -08:00
Junio C Hamano
149a4211a4 Merge branch 'jc/custom-comment-char'
Allow a configuration variable core.commentchar to customize the
character used to comment out the hint lines in the edited text from
the default '#'.

* jc/custom-comment-char:
  Allow custom "comment char"
2013-02-04 10:23:49 -08:00
Junio C Hamano
42f50f8d01 Start preparing for 1.8.1.3
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-02-04 10:21:10 -08:00
Junio C Hamano
3d00a5c148 Merge branch 'jk/cvsimport-does-not-work-with-cvsps3' into maint
* jk/cvsimport-does-not-work-with-cvsps3:
  git-cvsimport.txt: cvsps-2 is deprecated
2013-02-04 10:04:23 -08:00
Junio C Hamano
2173205f5c Merge branch 'jc/doc-maintainer' into maint
* jc/doc-maintainer:
  howto/maintain: document "### match next" convention in jch/pu branch
  howto/maintain: mark titles for asciidoc
  Documentation: update "howto maintain git"
2013-02-04 10:03:35 -08:00
David Aguilar
f35ec54600 doc: generate a list of valid merge tools
Use the show_tool_names() function to build lists of all
the built-in tools supported by difftool and mergetool.
This frees us from needing to update the documentation
whenever a new tool is added.

Signed-off-by: David Aguilar <davvid@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-02-02 21:46:52 -08:00
John Keeping
bd4a3d6168 Rename {git- => git}remote-helpers.txt
When looking up a topic via "git help <topic>", git-help prepends "git-"
to topics that are the names of commands (either builtin or found on the
path) and "git" (no hyphen) to any other topic name.

"git-remote-helpers" is not the name of a command, so "git help
remote-helpers" looks for "gitremote-helpers" and does not find it.

Fix this by renaming "git-remote-helpers.txt" to
"gitremote-helpers.txt".

Signed-off-by: John Keeping <john@keeping.me.uk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-02-01 14:12:34 -08:00
Thomas Ackermann
afeef30c34 Documentation: StGit is the right spelling, not StGIT
They refer themselves as such at https://gna.org/projects/stgit/

Signed-off-by: Thomas Ackermann <th.acker@arcor.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-02-01 13:54:46 -08:00
Junio C Hamano
7a7d05b62e Documentation: describe the "repository" in repository-layout
Update the introductory part and concisely explain how gitfile is
handled, what it is used for and for what effect.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-02-01 13:54:46 -08:00
Thomas Ackermann
19b4d3d4ff Documentation: add a description for 'gitfile' to glossary
Signed-off-by: Thomas Ackermann <th.acker@arcor.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-02-01 13:53:33 -08:00
Thomas Ackermann
0859c969db Documentation: do not use undefined terms git-dir and git-file
We will add gitfile to the glossary in a separate commit.

Signed-off-by: Thomas Ackermann <th.acker@arcor.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-02-01 13:53:33 -08:00
Thomas Ackermann
2de9b71138 Documentation: the name of the system is 'Git', not 'git'
Signed-off-by: Thomas Ackermann <th.acker@arcor.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-02-01 13:53:33 -08:00
Thomas Ackermann
48a8c26c62 Documentation: avoid poor-man's small caps GIT
In the earlier days, we used to spell the name of the system as GIT,
to simulate as if it were typeset with capital G and IT in small
caps.  Later we stopped doing so at around 1.6.5 days.

Let's stop doing so throughout the documentation.  The name to refer
to the whole system (and the concept it embodies) is "Git"; the
command end-users type is "git".  And document this in the coding
guideline.

Signed-off-by: Thomas Ackermann <th.acker@arcor.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-02-01 13:53:25 -08:00
Junio C Hamano
bcd45b4085 Update draft release notes to 1.8.2
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-02-01 12:52:08 -08:00
Junio C Hamano
67d9c41c4a Merge branch 'jk/cvsimport-does-not-work-with-cvsps3'
Warn people that other tools are more recommendable over
cvsimport+cvsps2 combo when doing a one-shot import, and cvsimport
will not work with cvsps3.

* jk/cvsimport-does-not-work-with-cvsps3:
  git-cvsimport.txt: cvsps-2 is deprecated
2013-02-01 12:39:59 -08:00
Junio C Hamano
2532d891a4 Merge branch 'nd/fetch-depth-is-broken'
"git fetch --depth" was broken in at least three ways.  The
resulting history was deeper than specified by one commit, it was
unclear how to wipe the shallowness of the repository with the
command, and documentation was misleading.

* nd/fetch-depth-is-broken:
  fetch: elaborate --depth action
  upload-pack: fix off-by-one depth calculation in shallow clone
  fetch: add --unshallow for turning shallow repo into complete one
2013-02-01 12:39:24 -08:00
Jeff King
a617578d37 Documentation/Makefile: clean up MAN*_TXT lists
We keep a list of the various files that end up as man1,
man5, etc. Let's break these single-line lists into sorted
multi-line lists, which makes diffs that touch them much
easier to read.

Reviewed-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-02-01 12:35:30 -08:00
Jeff King
d040350813 branch: let branch filters imply --list
Currently, a branch filter like `--contains`, `--merged`, or
`--no-merged` is ignored when we are not in listing mode.
For example:

  git branch --contains=foo bar

will create the branch "bar" from the current HEAD, ignoring
the `--contains` argument entirely. This is not very
helpful. There are two reasonable behaviors for git here:

  1. Flag an error; the arguments do not make sense.

  2. Implicitly go into `--list` mode

This patch chooses the latter, as it is more convenient, and
there should not be any ambiguity with attempting to create
a branch; using `--contains` and not wanting to list is
nonsensical.

That leaves the case where an explicit modification option
like `-d` is given.  We already catch the case where
`--list` is given alongside `-d` and flag an error. With
this patch, we will also catch the use of `--contains` and
other filter options alongside `-d`.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-01-31 16:37:24 -08:00
Jeff King
de90ff81f3 docs: clarify git-branch --list behavior
It was not clear from the "description" section of git-branch(1)
that using a <pattern> meant that you _had_ to use the --list
option. Let's clarify that, and while we're at it, reword some
clunky and ambiguous sentences.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-01-31 16:37:16 -08:00
John Keeping
9ef43dd7ad CodingGuidelines: add Python coding guidelines
These are kept short by simply deferring to PEP-8.  Most of the Python
code in Git is already very close to this style (some things in contrib/
are not).

Rationale for version suggestions:

 - Amongst the noise in [1], there isn't any disagreement about using
   2.6 as a base (see also [2]), although Brandon Casey recently added
   support for 2.4 and 2.5 to git-p4 [3].

 - Restricting ourselves to 2.6+ makes aiming for Python 3 compatibility
   significantly easier [4].

 - Advocating Python 3 support in all scripts is currently unrealistic
   because:

     - 'p4 -G' provides output in a format that is very hard to use with
       Python 3 (and its documentation claims Python 3 is unsupported).

     - Mercurial does not support Python 3.

     - Bazaar does not support Python 3.

 - But we should try to make new scripts compatible with Python 3
   because all new Python development is happening on version 3 and the
   Python community will eventually stop supporting Python 2 [5].

 - Python 3.1 is required to support the 'surrogateescape' error handler
   for encoding/decodng filenames to/from Unicode strings and Python 3.0
   is not longer supported.

[1] http://thread.gmane.org/gmane.comp.version-control.git/210329
[2] http://article.gmane.org/gmane.comp.version-control.git/210429
[3] http://thread.gmane.org/gmane.comp.version-control.git/214579
[4] http://docs.python.org/3.3/howto/pyporting.html#try-to-support-python-2-6-and-newer-only
[5] http://www.python.org/dev/peps/pep-0404/

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-01-30 12:49:28 -08:00
Junio C Hamano
070c57df42 Merge branch 'rr/minimal-stat'
Some reimplementations of Git does not write all the stat info back
to the index due to their implementation limitations (e.g. jgit
running on Java).  A configuration option can tell Git to ignore
changes to most of the stat fields and only pay attention to mtime
and size, which these implementations can reliably update.  This
avoids excessive revalidation of contents.

* rr/minimal-stat:
  Enable minimal stat checking
2013-01-30 08:53:02 -08:00
Junio C Hamano
08c0e7fd4a Update draft release notes to 1.8.2
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-01-28 11:19:59 -08:00
Junio C Hamano
0fdd7f5d73 Sync with 1.8.1.2 2013-01-28 11:18:32 -08:00
Junio C Hamano
53cdd4e1b2 Git 1.8.1.2
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-01-28 11:17:54 -08:00
Junio C Hamano
a77133e383 Merge branch 'ss/help-htmlpath-config-doc' into maint
* ss/help-htmlpath-config-doc:
  config.txt: Document help.htmlpath config parameter
2013-01-28 11:13:31 -08:00
Junio C Hamano
a94214b75e Merge branch 'pe/doc-email-env-is-trumped-by-config' into maint
* pe/doc-email-env-is-trumped-by-config:
  git-commit-tree(1): correct description of defaults
2013-01-28 11:12:31 -08:00
Junio C Hamano
3a51e4be9c Merge branch 'er/stop-recommending-parsecvs' into maint
* er/stop-recommending-parsecvs:
  Remove the suggestion to use parsecvs, which is currently broken.
2013-01-28 11:09:37 -08:00
Junio C Hamano
ce956fc48e Merge branch 'mh/ceiling' into maint
An element on GIT_CEILING_DIRECTORIES list that does not name the
real path to a directory (i.e. a symbolic link) could have caused
the GIT_DIR discovery logic to escape the ceiling.

* mh/ceiling:
  string_list_longest_prefix(): remove function
  setup_git_directory_gently_1(): resolve symlinks in ceiling paths
  longest_ancestor_length(): require prefix list entries to be normalized
  longest_ancestor_length(): take a string_list argument for prefixes
  longest_ancestor_length(): use string_list_split()
  Introduce new function real_path_if_valid()
  real_path_internal(): add comment explaining use of cwd
  Introduce new static function real_path_internal()
2013-01-28 11:07:18 -08:00
Matthieu Moy
0fa2eb530f add: warn when -u or -A is used without pathspec
Most Git commands that can be used with or without pathspec operate
tree-wide by default, the pathspec being used to restrict their
scope.  A few exceptions are: 'git grep', 'git clean', 'git add -u'
and 'git add -A'.  When run in a subdirectory without pathspec, they
operate only on paths in the current directory.

The inconsistency of 'git add -u' and 'git add -A' is particularly
problematic since other 'git add' subcommands (namely 'git add -p'
and 'git add -e') are tree-wide by default.  It also means that "git
add -u && git commit" will record a state that is different from
what is recorded with "git commit -a".

Flipping the default now is unacceptable, so let's start training
users to type 'git add -u|-A :/' or 'git add -u|-A .' explicitly, to
prepare for the next steps:

* forbid 'git add -u|-A' without pathspec (like 'git add' without
  option)

* much later, maybe, re-allow 'git add -u|-A' without pathspec, that
  will add all tracked and modified files, or all files, tree-wide.

A nice side effect of this patch is that it makes the :/ magic
pathspec easier to discover for users.

When the command is called from the root of the tree, there is no
ambiguity and no need to change the behavior, hence no need to warn.

Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-01-28 10:31:35 -08:00