Commit Graph

2464 Commits

Author SHA1 Message Date
Brandon Casey
d6cf61bfd4 close_lock_file(): new function in the lockfile API
The lockfile API is a handy way to obtain a file that is cleaned
up if you die().  But sometimes you would need this sequence to
work:

 1. hold_lock_file_for_update() to get a file descriptor for
    writing;

 2. write the contents out, without being able to decide if the
    results should be committed or rolled back;

 3. do something else that makes the decision --- and this
    "something else" needs the lockfile not to have an open file
    descriptor for writing (e.g. Windows do not want a open file
    to be renamed);

 4. call commit_lock_file() or rollback_lock_file() as
    appropriately.

This adds close_lock_file() you can call between step 2 and 3 in
the above sequence.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-01-16 15:35:03 -08:00
Junio C Hamano
0c0478cac8 Document lockfile API
We have nice set of placeholders, but nobody stepped in to fill
the gap in the API documentation, so I am doing it myself.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-01-16 12:42:37 -08:00
Dave Peticolas
b98525e4bf Documentation: fix and clarify grammar in git-merge docs.
Signed-off-by: Dave Peticolas <dave@krondo.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-01-16 11:37:57 -08:00
Miklos Vajna
471a5ce5dd Add using merge subtree How-To
Signed-off-by: Miklos Vajna <vmiklos@frugalware.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-01-14 18:04:51 -08:00
Junio C Hamano
11c57e6a9a Fix git-rerere documentation
rerere.enabled is _not_ on by default.  The command is enabled if rr-cache
exists even when rerere.enabled is missing, and enabled or disabled by
explicitly setting the rerere.enabled variable.
2008-01-14 16:14:29 -08:00
Junio C Hamano
145d08248e GIT 1.5.4-rc3
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-01-11 21:40:55 -08:00
Brandon Casey
d3c2d9e5ff git-relink.txt: describe more clearly how hard linking occurs
Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-01-11 18:06:55 -08:00
Michele Ballabio
80cd9cf9fa Document some default values in config.txt
This documents the default values of gc.auto, gc.autopacklimit
fetch.unpacklimit, receive.unpacklimit and transfer.unpacklimit.

Signed-off-by: Michele Ballabio <barra_cuda@katamail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-01-11 16:06:43 -08:00
Florian La Roche
fe2128a826 Change git-gc documentation to reflect gc.packrefs implementation.
56752391a8 (Make "git gc" pack all
refs by default) changed the default of gc.packrefs to true, to
pack all refs by default in any repository.  IOW, the users need
to disable it explicitly if they want to by setting the config
variable, since 1.5.3.

However, we forgot to update the documentation.  This fixes it.

Signed-off-by: Florian La Roche <laroche@redhat.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-01-09 12:25:24 -08:00
Junio C Hamano
e708af6e58 Merge in GIT 1.5.3.8
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-01-08 00:58:33 -08:00
Junio C Hamano
aadd4efa71 GIT 1.5.3.8
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-01-07 22:41:43 -08:00
Christian Couder
983a9eebdc Documentation: config: add 'help.*' and 'instaweb.*' variables.
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-01-07 22:23:58 -08:00
Ralf Wildenhues
f1cdcc70dc Documentation: typofix
Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-01-07 14:02:00 -08:00
Junio C Hamano
b2e62a7dc6 Update draft release notes for 1.5.4
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-01-06 22:46:13 -08:00
Jeff King
47ee06f122 Document the color.interactive semantics
There are two possible confusions with the color.interactive
description:

  1. the short name "interactive" implies that it covers all
     interactive commands; let's explicitly make it so, even
     though there are no other interactive commands which
     currently use it

  2. Not all parts of "git add --interactive" are controlled
     by color.interactive (specifically, the diffs require
     tweaking color.diff). So let's clarify that it applies
     only to displays and prompts.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-01-06 18:41:44 -08:00
Dan McGee
5162e69732 Documentation: rename gitlink macro to linkgit
Between AsciiDoc 8.2.2 and 8.2.3, the following change was made to the stock
Asciidoc configuration:

@@ -149,7 +153,10 @@
 # Inline macros.
 # Backslash prefix required for escape processing.
 # (?s) re flag for line spanning.
-(?su)[\\]?(?P<name>\w(\w|-)*?):(?P<target>\S*?)(\[(?P<attrlist>.*?)\])=
+
+# Explicit so they can be nested.
+(?su)[\\]?(?P<name>(http|https|ftp|file|mailto|callto|image|link)):(?P<target>\S*?)(\[(?P<attrlist>.*?)\])=
+
 # Anchor: [[[id]]]. Bibliographic anchor.
 (?su)[\\]?\[\[\[(?P<attrlist>[\w][\w-]*?)\]\]\]=anchor3
 # Anchor: [[id,xreflabel]]

This default regex now matches explicit values, and unfortunately in this
case gitlink was being matched by just 'link', causing the wrong inline
macro template to be applied. By renaming the macro, we can avoid being
matched by the wrong regex.

Signed-off-by: Dan McGee <dpmcgee@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-01-06 18:41:44 -08:00
Junio C Hamano
5f8bee5859 Documentation: fix "gitlink::foobar[s]"
They should be spelled with a single colon.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-01-06 18:41:43 -08:00
Junio C Hamano
4c785e50de Documentation: remove gitman.info with "make clean"
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-01-06 18:41:43 -08:00
Mark Levedahl
5682694a3c Documentation/Makefile - honor $DESTDIR for quick-install target
Signed-off-by: Mark Levedahl <mdl123@verizon.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-01-06 18:41:43 -08:00
Junio C Hamano
a6d97d49e2 git-rev-parse --symbolic-full-name
The plumbing level can understand that the user meant
"refs/heads/master" when the user says "master" or
"heads/master", but there is no easy way for the scripts to
figure it out without duplicating the dwim_ref() logic.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-01-06 18:41:43 -08:00
Junio C Hamano
d6da3cdeb7 Update draft release notes for 1.5.4
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-01-05 00:08:49 -08:00
Marco Costalba
cf9d58e4f3 Document git-reset defaults to HEAD if no commit is given
Signed-off by: Marco Costalba <mcostalba@gmail.com>

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-01-04 22:01:28 -08:00
Jim Meyering
790296fd88 Fix grammar nits in documentation and in code comments.
Signed-off-by: Jim Meyering <meyering@redhat.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-01-03 09:15:17 -08:00
Junio C Hamano
c477553b2f Merge branch 'maint' of git://linux-nfs.org/~bfields/git
* 'maint' of git://linux-nfs.org/~bfields/git:
  Documentation/user-manual.txt: fix typo
  Documentation: fix remote.<name>.skipDefaultUpdate description
2007-12-31 09:23:55 -08:00
Gustaf Hendeby
57283291b5 Documentation/user-manual.txt: fix typo
Signed-off-by: Gustaf Hendeby <hendeby@isy.liu.se>
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
2007-12-31 11:27:15 -05:00
J. Bruce Fields
f18b1c55e5 Documentation: fix remote.<name>.skipDefaultUpdate description
Fix the subcommand name.

Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
2007-12-31 11:27:15 -05:00
Miklos Vajna
3f4bc3e048 git-sh-setup: document git_editor() and get_author_ident_from_commit()
These 2 functions were missing from the manpage.

Signed-off-by: Miklos Vajna <vmiklos@frugalware.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-12-28 16:11:29 -08:00
Junio C Hamano
c45857019c Documentation/git-submodule.txt: typofix
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-12-27 23:29:53 -08:00
Junio C Hamano
bbff2dce2b GIT 1.5.4-rc2
Although everybody was quiet during the Christmas holiday, it's been
a week since -rc1, so here is -rc2.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-12-26 18:16:52 -08:00
Junio C Hamano
97d0c52980 Merge branch 'ar/commit-cleanup'
* ar/commit-cleanup:
  Allow selection of different cleanup modes for commit messages
  builtin-commit: avoid double-negation in the code.
  builtin-commit: fix amending of the initial commit
  t7005: do not exit inside test.
2007-12-26 17:35:38 -08:00
Junio C Hamano
25db465a34 Fix documentation of --first-parent in git-log and copy it to git-rev-list
Credit goes to Avi Kivity for noticing the lack of description in
rev-list manual page.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-12-26 16:05:54 -08:00
Gustaf Hendeby
ba4c32bdd5 shortlog manpage documentation: work around asciidoc markup issues
We wanted to have a list in which one (and the sole, as it happen to
be) item in it is ".mailmap", but do not seem to be able to convince
AsciiDoc to format it correctly for manpages.  Reformat it into a
paragraph that describes the said file to work around the issue.

Signed-off-by: Gustaf Hendeby <hendeby@isy.liu.se>
Acked-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-12-23 10:40:25 -08:00
Junio C Hamano
0e545f7516 Documentation: describe 'union' low-level merge driver
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-12-22 23:14:59 -08:00
Alex Riesen
5f06573743 Allow selection of different cleanup modes for commit messages
Although we traditionally stripped away excess blank lines, trailing
whitespaces and lines that begin with "#" from the commit log message,
sometimes the message just has to be the way user wants it.

For instance, a commit message template can contain lines that begin with
"#", the message must be kept as close to its original source as possible
if you are converting from a foreign SCM, or maybe the message has a shell
script including its comments for future reference.

The cleanup modes are default, verbatim, whitespace and strip. The
default mode depends on if the message is being edited and will either
strip whitespace and comments (if editor active) or just strip the
whitespace (for where the message is given explicitely).

Signed-off-by: Alex Riesen <raa.lkml@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-12-22 19:55:07 -08:00
Pierre Habouzit
2f7ee089df parse-options: Add a gitcli(5) man page.
This page should hold every information about the git ways to parse command
lines, and best practices to be used for scripting.

Signed-off-by: Pierre Habouzit <madcoder@debian.org>
2007-12-22 10:26:08 -08:00
Junio C Hamano
56c3eb1732 Documentation: ls-files -v is about "assume unchanged".
And refer the reader to update-index documentation.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-12-21 13:50:58 -08:00
Miklos Vajna
8a82b13354 everyday: replace 'prune' and 'repack' with 'gc'
In everyday tasks, "repack -a -d -f" won't be used, so there
is not much point mentioning "repack".  By showing the --prune
option to "gc", we can do without mentioning "git prune", too.

Signed-off-by: Miklos Vajna <vmiklos@frugalware.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-12-20 17:11:20 -08:00
Jeff King
6a7f14c465 clean up 1.5.4 release notes
Mostly typo and small grammatical fixes with one or two rewordings for
clarity.  But note the important fix for status.relativepaths.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-12-20 17:04:58 -08:00
Johannes Schindelin
cdd859159e Mention git-shell's "cvs" substitution in the RelNotes
git shell became much more powerful for existing CVS setups.
We should not hide from those people who only read release
notes.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-12-20 17:00:27 -08:00
Johannes Schindelin
eab9a40b6d Teach diff machinery to display other prefixes than "a/" and "b/"
With the new options "--src-prefix=<prefix>", "--dst-prefix=<prefix>"
and "--no-prefix", you can now control the path prefixes of the diff
machinery.  These used to by hardwired to "a/" for the source prefix
and "b/" for the destination prefix.

Initial patch by Pascal Obry.  Sane option names suggested by Linus.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Acked-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-12-20 01:10:39 -08:00
Junio C Hamano
74f6b03c5c GIT 1.5.4-rc1
It's been a week since -rc0, and we have quite a lot of fixes,
so here it is.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-12-19 17:24:04 -08:00
Ralf Wildenhues
02ff62504e Fix some documentation typos.
Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-12-18 12:00:18 -08:00
Johannes Schindelin
77680caadb Document diff.external and mergetool.<tool>.path
There was no documentation for the config variables diff.external
and mergetool.<tool>.path.

Noticed by Sebastian Schuberth.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-12-17 20:49:18 -08:00
Johannes Sixt
f029427259 Clean up documentation that references deprecated 'git peek-remote'.
Now that 'git peek-remote' is deprecated and only an alias for
'git ls-remote', it should not be referenced from other manual pages.

This also removes the description of the --exec option, which is no
longer present.

Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-12-17 20:49:18 -08:00
Junio C Hamano
6fbe42c7ee Documentation/git-submodule: refer to gitmodules(5)
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-12-16 22:03:21 -08:00
J. Bruce Fields
127f72e689 whitespace: fix config.txt description of indent-with-non-tab
Fix garbled description.

Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-12-16 13:08:03 -08:00
Jeff King
d7e522cffb rename git-browse--help to git-help--browse
The convention for helper scripts has been
git-$TOOL--$HELPER. Since this is a "browse" helper for the
"help" tool, git-help--browse is a more sensible name.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-12-16 12:52:40 -08:00
Junio C Hamano
7680087e7c Update draft release notes for 1.5.4
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-12-14 22:30:38 -08:00
Junio C Hamano
530e741c72 Start preparing the API documents.
Most of them are still stubs, but the procedure to build the HTML
documentation, maintaining the index and installing the end product are
there.

I placed names of people who are likely to know the most about the topic
in the stub files, so that volunteers will know whom to ask questions as
needed.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-12-14 22:29:38 -08:00
Junio C Hamano
fa4701601a Retire git-runstatus for real.
The command was removed from the builtin command list and there was no
way to invoke it, but the code was still there.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-12-14 22:08:25 -08:00
Junio C Hamano
5b4617c749 Rename git-browse-help helper to git-browse--help
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-12-14 22:04:43 -08:00
Christian Couder
70087cdbd3 git-help: add "help.format" config variable.
This config variable makes it possible to choose the default format
used to display help. This format will be used only if no option
like -a|--all|-i|--info|-m|--man|-w|--web is passed to "git-help".

The following values are possible for this variable:

	- "man"  --> "man" program is used
	- "info" --> "info" program is used
	- "web"  --> "git-browse-help" is used

By default we still show help using "man".

This patch also adds -m|--man command line option to use "man"
to allow overriding the "help.format" configuration variable.

Note that this patch also revert some recent changes in
"git-browse-help" because they prevented to look for config
variables in the global configuration file.

Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-12-14 21:58:35 -08:00
Junio C Hamano
dfaf75b469 Merge branch 'wc/diff'
* wc/diff:
  Test interaction between diff --check and --exit-code
  Use shorter error messages for whitespace problems
  Add tests for "git diff --check" with core.whitespace options
  Make "diff --check" output match "git apply"
  Unify whitespace checking
  diff --check: minor fixups
  "diff --check" should affect exit status
2007-12-14 21:42:53 -08:00
linux@horizon.com
71362bd552 Documentation: describe pack idx v2
Lifted from the log message of c553ca25bd
(pack-objects: learn about pack index version 2).

Acked-by: Nicolas Pitre <nico@cam.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-12-14 12:03:12 -08:00
Wincent Colaiuta
62c64895cf "diff --check" should affect exit status
"git diff" has a --check option that can be used to check for whitespace
problems but it only reported by printing warnings to the
console.

Now when the --check option is used we give a non-zero exit status,
making "git diff --check" nicer to use in scripts and hooks.

Signed-off-by: Wincent Colaiuta <win@wincent.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-12-13 23:05:42 -08:00
Nicolas Pitre
792c1583c8 provide advance warning of some future pack default changes
Signed-off-by: Nicolas Pitre <nico@cam.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-12-13 21:19:26 -08:00
Shawn Bohrer
9e5d87d490 Fix spelling mistakes in user manual
Signed-off-by: Shawn Bohrer <shawn.bohrer@gmail.com>
Acked-by: J. Bruce Fields <bfields@citi.umich.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-12-13 09:46:52 -08:00
Junio C Hamano
1e8df762b3 GIT 1.5.4-rc0
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-12-12 17:48:21 -08:00
Junio C Hamano
467f42cfa1 Merge branch 'cc/help'
* cc/help:
  RPM spec: Adjust htmldir
  git-help -w: do not require to be in git repository
  git.spec.in: remove python_path
  Documentation: rename git.texi to user-manual.texi
  Add git-browse-help to .gitignore
  git-help -i: show info documentation from matching version of git
  git-help -i: invoke info with document and node name
  Documentation: add gitman.info target
  Documentation: describe -w/--web option to "git-help".
  Use {web,instaweb,help}.browser config options.
  git-help: add -w|--web option to display html man page in a browser.
  Documentation: describe -i/--info option to "git-help"
  git-help: add -i|--info option to display info page.
2007-12-12 17:46:16 -08:00
Junio C Hamano
cd1bea918b Merge branch 'jc/shortlog-e'
* jc/shortlog-e:
  shortlog: default to HEAD when the standard input is a tty
  Invert numbers and names in the git-shortlog summary mode.
  shortlog: document -e option
  git-shortlog -e: show e-mail address as well
2007-12-12 17:07:03 -08:00
Junio C Hamano
50b3555c48 Documentation: rename git.texi to user-manual.texi
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-12-12 13:31:02 -08:00
Junio C Hamano
f604652e05 git-diff --numstat -z: make it machine readable
The "-z" format is all about machine parsability, but showing renamed
paths as "common/{a => b}/suffix" makes it impossible.  The scripts would
never have successfully parsed "--numstat -z -M" in the old format.

This fixes the output format in a (hopefully minimally) backward
incompatible way.

 * The output without -z is not changed.  This has given a good way for
   humans to view added and deleted lines separately, and showing the
   path in combined, shorter way would preserve readability.

 * The output with -z is unchanged for paths that do not involve renames.
   Existing scripts that do not pass -M/-C are not affected at all.

 * The output with -z for a renamed path is shown in a format that can
   easily be distinguished from an unrenamed path.

This is based on Jakub Narebski's patch.  Bugs and documentation typos
are mine.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-12-12 10:59:22 -08:00
Wincent Colaiuta
71a9883db2 Documentation: minor grammar fix for "git apply"
Signed-off-by: Wincent Colaiuta <win@wincent.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-12-12 10:59:22 -08:00
Wincent Colaiuta
0ac7903ee3 Use "whitespace" consistently
For consistency, change "white space" and "whitespaces" to
"whitespace", fixing a couple of adjacent grammar problems in the
docs.

Signed-off-by: Wincent Colaiuta <win@wincent.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-12-12 10:59:22 -08:00
Jeff King
6508bb75f6 shortlog: document -e option
This shows e-mail address in addition to author's name.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-12-11 09:56:27 -08:00
Eyvind Bernhardsen
e306be5cd0 Fix mis-markup of the -p, --patch option in git-add(1)
An item in a bulletted list in AsciiDoc is followed with two colons,
not just one.

Signed-off-by: Eyvind Bernhardsen <eyvind-git@orakel.ntnu.no>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-12-10 10:58:09 -08:00
Junio C Hamano
5cefc33bff Documentation: add gitman.info target
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-12-10 01:36:13 -08:00
Junio C Hamano
7be2b6e02b Merge branch 'master' into cc/help
This is to primarily pull in MANPATH tweak and help.txt formatting fix
from the master branch.
2007-12-10 01:22:42 -08:00
Junio C Hamano
591aa2536f Update draft Release Notes for 1.5.4
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-12-10 00:08:05 -08:00
Jeff King
cc2d6b88f9 don't mention index refreshing side effect in git-status docs
The tip about speeding up subsequent operations is now
obsolete; since aecbf914, git-diff now squelches empty diffs
and performs an automatic refresh.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-12-09 02:39:53 -08:00
Junio C Hamano
4eb39e9bcc Merge branch 'jc/spht'
* jc/spht:
  Use gitattributes to define per-path whitespace rule
  core.whitespace: documentation updates.
  builtin-apply: teach whitespace_rules
  builtin-apply: rename "whitespace" variables and fix styles
  core.whitespace: add test for diff whitespace error highlighting
  git-diff: complain about >=8 consecutive spaces in initial indent
  War on whitespace: first, a bit of retreat.

Conflicts:

	cache.h
	config.c
	diff.c
2007-12-09 01:23:48 -08:00
Christian Couder
c07a07c588 Documentation: describe -w/--web option to "git-help".
Also explain that "git instaweb" may use "web.browser" config
variable.

Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-12-09 01:19:54 -08:00
Christian Couder
5d6491c7c7 git-help: add -w|--web option to display html man page in a browser.
Now when using "git help -w cmd", we will try to show the HTML man
page "git-cmd.html" in your prefered web browser.

To do that "help.c" code will call a new shell script
"git-browse-help".

This currently works only if the HTML versions of the man page
have been installed in $(htmldir) (typically "/usr/share/doc/git-doc"),
so new target to do that is added to "Documentation/Makefile".

The browser to use can be configured using the "web.browser"
config variable.

We try to open a new tab in an existing web browser, if possible.

The code in "git-browse-help" is heavily stolen from "git-mergetool"
by Theodore Y. Ts'o. Thanks.

Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-12-09 01:19:44 -08:00
Wincent Colaiuta
aa6da6cddb Documentation: fix --no-verify documentation for "git commit"
The documentation for the --no-verify switch should mention the
commit-msg hook, not just the pre-commit hook.

Signed-off-by: Wincent Colaiuta <win@wincent.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-12-09 00:55:54 -08:00
Jeff King
2099bca9ed git-status: documentation improvements
This patch is the result of reading over git-status with an
editorial eye:

  - fix a few typo/grammatical errors
  - mention untracked output
  - present output types in the order they appear from the
    command

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-12-08 03:33:24 -08:00
Jeff King
46f721c8fe add status.relativePaths config variable
The output of git-status was recently changed to output relative
paths. Setting this variable to false restores the old behavior for
any old-timers that prefer it.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-12-08 03:33:24 -08:00
Junio C Hamano
235997c90f git-bisect visualize: work in non-windowed environments better
This teaches "git bisect visualize" to be more useful in non-windowed
environments.

 (1) When no option is given, and $DISPLAY is set, it continues to
     spawn gitk as before;

 (2) When no option is given, and $DISPLAY is unset, "git log" is run
     to show the range of commits between the bad one and the good ones;

 (3) If only "-flag" options are given, "git log <options>" is run.
     E.g. "git bisect visualize --stat"

 (4) Otherwise, all of the given options are taken as the initial part
     of the command line and the commit range expression is given to
     that command.  E.g. "git bisect visualize tig" will run "tig"
     history viewer to show between the bad one and the good ones.

As "visualize" is a bit too long to type, we also give it a shorter
synonym "view".

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-12-08 02:58:26 -08:00
Junio C Hamano
9758ecde9a Update draft release notes to 1.5.4
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-12-07 01:28:05 -08:00
Junio C Hamano
c1f238698b Merge branch 'jc/git-log-doc'
* jc/git-log-doc:
  Include diff options in the git-log manpage
2007-12-06 23:43:54 -08:00
Junio C Hamano
ca7325621a Merge branch 'jc/addi-color'
* jc/addi-color:
  config --get-colorbool: diff.color is a deprecated synonym to color.diff
  Color support for "git-add -i"
  git config --get-colorbool
2007-12-06 23:43:47 -08:00
Junio C Hamano
9539a56e23 Merge branch 'jc/docmake-perl'
* jc/docmake-perl:
  Run the specified perl in Documentation/
2007-12-06 23:43:42 -08:00
Junio C Hamano
08e1812db1 Merge branch 'maint'
* maint:
  Change from using email.com to example.com as example domain, as per RFC 2606.
2007-12-06 23:20:18 -08:00
David Symonds
8e7425da78 Change from using email.com to example.com as example domain, as per RFC 2606.
Signed-off-by: David Symonds <dsymonds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-12-06 23:20:11 -08:00
Junio C Hamano
c7860507f0 git-status documentation: mention subdirectory behaviour
Consistently with all other diff oriented commands, we have given paths
relative to the work tree root in git-status output for a long time.
This documents the recent behaviour change, as people's eyes (and worse
yet, scripts, although scripts should not parse "git status" output) may
depend on the old behaviour.

In the longer run, giving a --full-name option to git-diff Porcelain
similar to what ls-files has, and change the default for git-diff
Porcelain to show relative paths may be a good thing to do, in order to
hide the oddballness of this git-status behaviour, but that would have a
rather large impact to established expectation by existing users.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-12-06 09:15:39 -08:00
Junio C Hamano
cf1b7869f0 Use gitattributes to define per-path whitespace rule
The `core.whitespace` configuration variable allows you to define what
`diff` and `apply` should consider whitespace errors for all paths in
the project (See gitlink:git-config[1]).  This attribute gives you finer
control per path.

For example, if you have these in the .gitattributes:

    frotz   whitespace
    nitfol  -whitespace
    xyzzy   whitespace=-trailing

all types of whitespace problems known to git are noticed in path 'frotz'
(i.e. diff shows them in diff.whitespace color, and apply warns about
them), no whitespace problem is noticed in path 'nitfol', and the
default types of whitespace problems except "trailing whitespace" are
noticed for path 'xyzzy'.  A project with mixed Python and C might want
to have:

    *.c    whitespace
    *.py   whitespace=-indent-with-non-tab

in its toplevel .gitattributes file.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-12-06 00:45:30 -08:00
Junio C Hamano
b4c61ed6d3 Color support for "git-add -i"
This is mostly lifted from earlier series by Dan Zwell, but updated to
use "git config --get-color" and "git config --get-colorbool" to make it
simpler and more consistent with commands written in C.

A new configuration color.interactive variable is like color.diff and
color.status, and controls if "git-add -i" uses color.

A set of configuration variables, color.interactive.<slot>, are used to
define what color is used for the prompt, header, and help text.

For perl scripts, Git.pm provides $repo->get_color() method, which takes
the slot name and the default color, and returns the terminal escape
sequence to color the output text.  $repo->get_colorbool() method can be
used to check if color is set to be used for a given operation.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-12-05 17:57:11 -08:00
Junio C Hamano
0f6f5a4022 git config --get-colorbool
This adds an option to help scripts find out color settings from
the configuration file.

    git config --get-colorbool color.diff

inspects color.diff variable, and exits with status 0 (i.e. success) if
color is to be used.  It exits with status 1 otherwise.

If a script wants "true"/"false" answer to the standard output of the
command, it can pass an additional boolean parameter to its command
line, telling if its standard output is a terminal, like this:

    git config --get-colorbool color.diff true

When called like this, the command outputs "true" to its standard output
if color is to be used (i.e. "color.diff" says "always", "auto", or
"true"), and "false" otherwise.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-12-05 17:57:11 -08:00
Junio C Hamano
cec99d8cef Documentation: color.* = true means "auto"
We forgot to document the earlier sanity-fix.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-12-05 17:50:53 -08:00
Matthias Kestenholz
21640376a5 Documentation: add --patch option to synopsis of git-add
Signed-off-by: Matthias Kestenholz <matthias@spinlock.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-12-05 11:08:00 -08:00
Miklos Vajna
272bd3cfd0 Include diff options in the git-log manpage
[jc: with quite a few fixups]

Signed-off-by: Miklos Vajna <vmiklos@frugalware.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-12-05 01:57:40 -08:00
Junio C Hamano
ab7d707669 Merge branch 'wc/add-i'
* wc/add-i:
  git-add -i: add help text for list-and-choose UI
  add -i: allow prefix highlighting for "Add untracked" as well.
  Highlight keyboard shortcuts in git-add--interactive
  Document all help keys in "git add -i" patch mode.
  Add "--patch" option to git-add--interactive
  add -i: Fix running from a subdirectory
  builtin-add: fix command line building to call interactive
  git-add -i: allow multiple selection in patch subcommand
  Add path-limiting to git-add--interactive
  Teach builtin-add to pass multiple paths to git-add--interactive
2007-12-04 21:38:28 -08:00
Junio C Hamano
9bbe6db85f Merge branch 'sp/refspec-match'
* sp/refspec-match:
  refactor fetch's ref matching to use refname_match()
  push: use same rules as git-rev-parse to resolve refspecs
  add refname_match()
  push: support pushing HEAD to real branch name
2007-12-04 17:07:10 -08:00
Junio C Hamano
0240e21aae Documentation/git.txt: typofix
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-12-04 00:47:04 -08:00
Junio C Hamano
4f57147938 Documentation: rerere is enabled by default these days.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-12-04 00:40:55 -08:00
Junio C Hamano
dada0c1212 Formatting fix for Documentation/git-help.txt
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-12-04 00:29:32 -08:00
Junio C Hamano
c680dd8341 Run the specified perl in Documentation/
Makefile uses $(PERL_PATH) but Documentation/Makefile uses "perl"; that
means the two Makefiles can use two different Perl installations.

Teach Documentation/Makefile to use PERL_PATH that is exported from the
toplevel Makefile, and give a sane fallback for people who run "make"
from Documentation directory.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-12-03 23:48:09 -08:00
Junio C Hamano
afc67036de Update draft release notes for 1.5.4
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-12-03 23:43:07 -08:00
Johannes Schindelin
ee4bc3715f fast-export: rename the signed tag mode 'ignore' to 'verbatim'
The name 'verbatim' describes much better what this mode does with
signed tags.  While at it, fix the documentation what it actually
does.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-12-03 23:43:07 -08:00
Sam Vilain
14c9821884 Add remote.<name>.proxy
As well as allowing a default http.proxy option, allow it to be set
per-remote.

Signed-off-by: Sam Vilain <sam.vilain@catalyst.net.nz>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-12-03 23:43:07 -08:00
Christian Couder
45533d2694 Documentation: describe -i/--info option to "git-help"
Option -i|--info for "git-help" is documented only in the new
"git-help.txt" man page, but this new man page is referenced
from the "--help" option documentation in the "git.txt" man page.

Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-12-03 22:16:54 -08:00