Commit graph

26 commits

Author SHA1 Message Date
Christian Couder a5af0e2c55 Documentation: rename "hooks.txt" to "githooks.txt" and make it a man page
Also now "gitcli(5)" becomes "gitcli(7)".

Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-05-04 17:41:34 -07:00
Christian Couder 47458bb9d1 Documentation: hooks: fix missing verb in pre-applypatch description
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-05-03 13:58:59 -07:00
Miklos Vajna 0b85d92661 Documentation/hooks: add pre-auto-gc hook
Signed-off-by: Miklos Vajna <vmiklos@frugalware.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-04-09 01:31:13 -07:00
Paolo Bonzini 8089c85bcb git-commit: add a prepare-commit-msg hook
The prepare-commit-msg hook is run whenever a "fresh" commit message
is prepared, just before it is shown in the editor (if it is).
Its purpose is to modify the commit message in-place.

It takes one to three parameters.  The first is the name of the file that
the commit log message.  The second is the source of the commit message,
and can be: "message" (if a -m or -F option was given); "template" (if a
-t option was given or the configuration option commit.template is set);
"merge" (if the commit is a merge or a .git/MERGE_MSG file exists);
"squash" (if a .git/SQUASH_MSG file exists); or "commit", followed by
a commit SHA1 as the third parameter (if a -c, -C or --amend option
was given).

If its exit status is non-zero, git-commit will abort.  The hook is
not suppressed by the --no-verify option, so it should not be used
as a replacement for the pre-commit hook.

The sample prepare-commit-msg comments out the `Conflicts:` part of
a merge's commit message; other examples are commented out, including
adding a Signed-off-by line at the bottom of the commit messsage,
that the user can then edit or discard altogether.

Signed-off-by: Paolo Bonzini <bonzini@gnu.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-02-06 02:26:55 -08:00
Paolo Bonzini 406400ce4f git-commit: set GIT_EDITOR=: if editor will not be launched
This is a preparatory patch that provides a simple way for the future
prepare-commit-msg hook to discover if the editor will be launched.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-02-06 02:26:02 -08:00
Josh England 1abbe475ff post-checkout hook, tests, and docs
Updated post-checkout hook to take a flag specifying whether the checkout is
a branch checkout or a file checkout (from the index).

Signed-off-by: Josh England <jjengla@sandia.gov>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-09-29 21:11:21 -07:00
Josh England af6fb4c822 Added example hook script to save/restore permissions/ownership.
Usage info is emebed in the script, but the gist of it is to run the script
from a pre-commit hook to save permissions/ownership data to a file and check
that file into the repository.  Then, a post_merge hook reads the file and
updates working tree permissions/ownership.  All updates are transparent to
the user (although there is a --verbose option).  Merge conflicts are handled
in the "read" phase (in pre-commit), and the script aborts the commit and
tells you how to fix things in the case of a merge conflict in the metadata
file.  This same idea could be extended to handle file ACLs or other file
metadata if desired.

Signed-off-by: Josh England <jjengla@sandia.gov>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-09-18 17:40:24 -07:00
Josh England 46232915d5 Add post-merge hook, related documentation, and tests.
The post-merge hook enables one to hook in for `git pull` operations in order
to check and/or change attributes of a work tree from the hook.  As an example,
it can be used in combination with a pre-commit hook to save/restore file
ownership and permissions data (or file ACLs) within the repository and
transparently update the working tree after a `git pull` operation.

Signed-off-by: Josh England <jjengla@sandia.gov>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-09-18 17:40:24 -07:00
Brian Hetro 027830755d Documentation: Correct various misspellings and typos.
Fix minor typos throughout the documentation.

Signed-off-by: Brian Hetro <whee@smaertness.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-08-24 18:54:37 -07:00
Junio C Hamano 59c8e2cb2a Remove git-applypatch
The previous one removed git-applymbox, which was the sole user
of this tool.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-05-24 21:36:53 -07:00
Petr Baudis d45cc6e267 git-applymbox: Remove command
I believe noone uses git-applymbox, and noone definitely should, since it
is supposed to be completely superseded and everything by its younger
cousin git-am. The only known person in the universe to use it was Linus
and he declared some time ago that he will try to use git-am instead in his
famous dotest script.

The trouble is that git-applymbox existence creates confusing UI. I'm a bit
like a recycled newbie to the git porcelain and *I* was confused by
git-applymbox primitiveness until I've realized a while later that I'm of
course using the wrong command.

Signed-off-by: Petr Baudis <pasky@suse.cz>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-05-24 21:36:53 -07:00
Jan Hudec 24a0d61e51 Minor fixup to documentation of hooks in git-receive-pack.
Small additional changes to the cbb84e5d17
commit, which introduced documentation to pre-receive and post-receive:
 - Mention that stdout and stderr are equivalent.
 - Add one cross-section link and fix one other.
 - Fix information on advantages of post-receive over post-update.

Signed-off-by: Jan Hudec <bulb@ucw.cz>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-05-12 15:46:55 -07:00
Jan Hudec cbb84e5d17 Updated documentation of hooks in git-receive-pack.
Added documentation of pre-receive and post-receive hooks and updated
documentation of update and post-update hooks.

[jc: with minor copy-editing]

Signed-off-by: Jan Hudec <bulb@ucw.cz>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-05-12 11:13:08 -07:00
Andy Parkins 0d18e41e00 doc: hooks.txt said post-commit default sends an email, it doesn't
The default post-commit hook is actually empty; it is the update hook
that sends an email.  This patch corrects hooks.txt to reflect that.

Signed-off-by: Andy Parkins <andyparkins@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-02-02 21:18:59 -08:00
Nicolas Pitre 5c94f87e6b use 'init' instead of 'init-db' for shipped docs and tools
While 'init-db' still is and probably will always remain a valid git
command for obvious backward compatibility reasons, it would be a good
idea to move shipped tools and docs to using 'init' instead.

Signed-off-by: Nicolas Pitre <nico@cam.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-12 13:36:16 -08:00
Junio C Hamano 87a3d29f46 Update documentation for update hook.
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-12-31 00:52:25 -08:00
Jonas Fonseca 45ad9b5096 Fix trivial typos and inconsistencies in hooks documentation
Pointed out by Alan Chandler.

Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-09-20 08:36:12 -07:00
Francis Daly 3742506578 Some doc typo fixes
All should be clear enough, except perhaps committish / commitish.
I just kept the more-used one within the current docs.

[jc: with rephrasing of check-ref-format description later discussed
 on the list]

Signed-off-by: Francis Daly <francis@daoine.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-06-07 11:49:35 -07:00
Horst H. von Brand abda1ef590 Documentation: Spelling fixes
Signed-off-by: Horst H. von Brand <vonbrand@inf.utfsm.cl>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-06-03 23:54:55 -07:00
Jon Loeliger 6250ad1e7a Clarify and expand some hook documentation.
Clarify update and post-update hooks.
Made a few references to the hooks documentation.

Signed-off-by: Jon Loeliger <jdl@jdl.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-03-24 22:24:02 -08:00
Junio C Hamano 3aadad1b32 Documentation: stdout of update-hook is connected to /dev/null
Mention that update-hook does not emit its stdout to the sender.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-12-19 16:38:16 -08:00
Christian Meder 72e9340cfd Convert usage of GIT and Git into git
Convert usage of GIT and Git into git.

Signed-off-by: Christian Meder <chris@absolutegiganten.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-10-10 16:01:31 -07:00
Junio C Hamano 98438bd0e8 Remove the version tags from the manpages
Signed-off-by: Christian Meder <chris@absolutegiganten.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-10-10 14:49:52 -07:00
Yasushi SHOJI e1ccf53a60 [PATCH] Escape asciidoc's built-in em-dash replacement
AsciiDoc replace '--' with em-dash (&#8212) by default. em-dash
looks a lot like a single long dash and it's very confusing when
we are talking about command options.

Section 21.2.8 'Replacements' of AsciiDoc's User Guide says that a
backslash in front of double dash prevent the replacement.  This
patch does just that.

Signed-off-by: Yasushi SHOJI <yashi@atmark-techno.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-09-11 10:51:36 -07:00
Junio C Hamano 215a7ad1ef Big tool rename.
As promised, this is the "big tool rename" patch.  The primary differences
since 0.99.6 are:

  (1) git-*-script are no more.  The commands installed do not
      have any such suffix so users do not have to remember if
      something is implemented as a shell script or not.

  (2) Many command names with 'cache' in them are renamed with
      'index' if that is what they mean.

There are backward compatibility symblic links so that you and
Porcelains can keep using the old names, but the backward
compatibility support  is expected to be removed in the near
future.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-09-07 17:45:20 -07:00
Junio C Hamano 6d35cc7690 Document hooks.
Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-09-02 22:38:30 -07:00