aboutsummaryrefslogtreecommitdiff
path: root/templates
Commit message (Collapse)AuthorAge
* update hook: redirect _both_ diagnostic lines to stderr upon tag failureJim Meyering2006-12-28
| | | | | | | | Otherwise, sending the diagnostic to stdout would provoke a protocol failure. Signed-off-by: Jim Meyering <jim@meyering.net> Signed-off-by: Junio C Hamano <junkio@cox.net>
* hooks/commit-msg: add example to add Signed-off-by line to messageAndy Parkins2006-12-26
| | | | | | | | | | | | | | | | | | | After checking to see if the commit message already has the target signed-off-by (for example in --amend commits), this patch generates a signed off by line from the repository owner and adds it to the commit message. Based on Johannes Schindelin's earlier patch to perform the same function. Originally, this was done in the pre-commit hook but Junio pointed out that the commit-msg hook allows the message to be edited. This has the aditional advantage that the commit-msg hook gets passed the name of the message file as a parameter, so it doesn't have to figure out GIT_DIR for itself. Signed-off-by: Andy Parkins <andyparkins@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
* Do not create $GIT_DIR/remotes/ directory anymore.Junio C Hamano2006-12-19
| | | | | | | | | | | Because we do not use --no-separate-remote anymore, there is no reason to create that directory from the template. t5510 test is updated to test both $GIT_DIR/remotes/ based configuration and $GIT_DIR/config variable (credits to Johannes). Signed-off-by: Junio C Hamano <junkio@cox.net>
* sample commit-msg hook: no silent exit on duplicate Signed-off-by linesLuben Tuikov2006-08-13
| | | | | | | | | | | git-commit would silently exit if duplicate Signed-off-by lines were found. Users of git-commit would not know it, unless they checked '$?'. This patch makes git-commit actually print out a message that nothing was commited since duplicate Signed-off-lines were found. Signed-off-by: Luben Tuikov <ltuikov@yahoo.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
* Fix regex pattern in commit-msgLuben Tuikov2006-08-13
| | | | | | | | | Between the count and the line output, some uniq(1) versions put a TAB character, not a space. Make sure both are handled. Signed-off-by: Luben Tuikov <ltuikov@yahoo.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
* Fix installation of templates on ancient systems.Ramsay Allan Jones2006-08-02
| | | | | | | | | | | Do not use $(call) for 'shell quoting' paths, and pass DESTDIR down to the templates makefile. [jc: we have fixed the main Makefile long time ago, but somehow forgot to apply the same fix to templates Makefile.] Signed-off-by: Ramsay Allan Jones <ramsay@ramsay1.demon.co.uk> Signed-off-by: Junio C Hamano <junkio@cox.net>
* templates/hooks--update: replace diffstat calls with git diff --statEric Wong2006-07-08
| | | | | Signed-off-by: Eric Wong <normalperson@yhbt.net> Signed-off-by: Junio C Hamano <junkio@cox.net>
* pre-commit hook: complain about conflict markers.Junio C Hamano2006-04-19
| | | | | | | | | | | | Several <<< or === or >>> characters at the beginning of a line is very likely to be leftover conflict markers from a failed automerge the user resolved incorrectly, so detect them. As usual, this can be defeated with "git commit --no-verify" if you really do want to have those files, just like changes that introduce trailing whitespaces. Signed-off-by: Junio C Hamano <junkio@cox.net>
* Merge branch 'maint'Junio C Hamano2006-02-26
|\ | | | | | | | | * maint: sample hooks template.
| * sample hooks template.Junio C Hamano2006-02-26
| | | | | | | | | | | | | | | | These two sample hooks try to detect and use the corresponding commit hook from the same repository. However, they forgot to set up GIT_DIR for their own use, so was not in effect. Signed-off-by: Junio C Hamano <junkio@cox.net>
* | rebase: allow a hook to refuse rebasing.Junio C Hamano2006-02-13
|/ | | | | | | | | This lets a hook to interfere a rebase and help prevent certain branches from being rebased by mistake. A sample hook to show how to prevent a topic branch that has already been merged into publish branch. Signed-off-by: Junio C Hamano <junkio@cox.net>
* Merge fixes up to GIT 1.1.6Junio C Hamano2006-01-29
|\
| * [PATCH] pre-commit sample hook: do not barf on the initial importJunio C Hamano2006-01-29
| | | | | | | | | | | | | | | | | | | | | | The example hook barfs on the initial import. Ideally it should produce a diff from an empty tree, but for now let's stop at squelching the bogus error message. Often an initial import involves tons of badly formatted files from foreign SCM, so not complaining about them like this patch does might actually be a better idea than enforcing the "Perfect Patch" format on them. Signed-off-by: Junio C Hamano <junkio@cox.net>
* | sample update-hook: sanely handle a new branch head.Junio C Hamano2006-01-24
| | | | | | | | | | | | | | | | | | | | Instead of showing all the history since the beginning of time leading to the the branch head, show only the changes this new branch brings to the world. This originally came from Linus and tested by Andreas Ericsson. Signed-off-by: Junio C Hamano <junkio@cox.net>
* | update-hook: Major overhaul (handling tags, mainly).Andreas Ericsson2006-01-24
|/ | | | | | | | | | | | | | | | | | | This is the update hook we use in all our git-repos. It has some improvements over the original version, namely: * Don't send every commit since dawn of time when adding a new tag. * When updating an annotated tag, just send the diffs since the last tag. * Add diffstat output for 'normal' commits (top) and annotated tags (bottom). * Block un-annotated tags in shared repos. I'm a bit uncertain about that last one, but it demonstrates how to disallow updates of a ref which we use, so I kept it. Note that git-describe is needed for the "changes since last annotated tag" thing to work. Signed-off-by: Andreas Ericsson <ae@op5.se> Signed-off-by: Junio C Hamano <junkio@cox.net>
* Fix hooks/update template.Junio C Hamano2005-11-21
| | | | | | | | | Make the example address RFC2606 (aka BCP0032) compliant. Also fix a couple of shell script errors. Noted and fixed by Matthew Wilcox and Andreas Ericsson. Signed-off-by: Junio C Hamano <junkio@cox.net>
* Clean build annoyance.Junio C Hamano2005-11-08
| | | | | | | | | As Pasky pointed out, building in templates directory showed list of built template files which was unneeded. This commit also fixes another build annoyance I recently left in by accident. Signed-off-by: Junio C Hamano <junkio@cox.net>
* Add new programs and stamp file to .gitignore.Tom Prince2005-10-14
| | | | | Signed-off-by: Tom Prince <tom.prince@ualberta.net> Signed-off-by: Junio C Hamano <junkio@cox.net>
* Deal with $(bindir) and friends with whitespaces.Junio C Hamano2005-10-10
| | | | | | ... using HPA's shellquote macro. Signed-off-by: Junio C Hamano <junkio@cox.net>
* Make sure 'make install' does not have to rebuild templates.Junio C Hamano2005-10-09
| | | | | | | | | | The dependency rule in templates directory forced 'make install' that immediately followed 'make all' to rebuild boilerplates. This was problematic for a workflow that built first as yourself and then installed as root, from a working tree that is on an NFS mounted filesystem that is unwritable by root. Signed-off-by: Junio C Hamano <junkio@cox.net>
* Solaris: give a bit more built-in defaults.Junio C Hamano2005-09-24
| | | | | | | Taking the make command line Peter Eriksen uses, give defaults to SHELL_PATH, TAR, CURLDIR, NO_STRCASESTR, and INSTALL. Signed-off-by: Junio C Hamano <junkio@cox.net>
* Big tool rename.Junio C Hamano2005-09-07
| | | | | | | | | | | | | | | | | | | 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>
* scripts: equality test '==' is not portable.Junio C Hamano2005-09-02
| | | | | | | | | | | | | | | | On NetBSD 3 we trigger an error: [: ==: unexpected operator Double-equal is accepted by bash built-in '[' and bash(1) suggests using '=' for strict POSIX compliance (test(1) from coreutils does not mention '=='). Eradicate their uses everywhere. [jc: Somebody with a pseudonym kindly sent a message to let me know about the problem privately; I do not have access to a NetBSD box.] Signed-off-by: Junio C Hamano <junkio@cox.net>
* [PATCH] git bugfixes and cleanups, mainly Debian thingsTommi Virtanen2005-08-26
| | | | | | | Ignore generated files. Signed-off-by: Tommi Virtanen <tv@debian.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
* [PATCH] Use .git/remote/origin, not .git/branches/origin.Junio C Hamano2005-08-24
| | | | | | | | | | | Now multi-head fetch is complete, let's migrate the default configuration for new repositories created with the "git clone" command. The original $GIT_DIR/branches is not deprecated yet, but create remotes directory by default from the templates as well. Signed-off-by: Junio C Hamano <junkio@cox.net>
* [PATCH] Fix git-commit-script to output on stderr when -v failsMarco Costalba2005-08-20
| | | | | | | | | | | | | | When git-commit-script is called with -v option and verify test fails result is print on stdout instead of stderr. [jc: The original patch from Marco updated git-commit-script that still had the piece of code in question, which has been moved to an example hook script on its own, so I transplanted the patch to that new file instead.] Signed-off-by: Marco Costalba <mcostalba@yahoo.it> Signed-off-by: Junio C Hamano <junkio@cox.net>
* Make sample pre-commit hook output Emacs friendly.Junio C Hamano2005-08-20
| | | | | | | | Use the common error message format, "filename:lineno: body"; this way, problematic lines can be jumped to from the Emacs compilation buffer by C-x `. Signed-off-by: Junio C Hamano <junkio@cox.net>
* Add hooks to tools/git-applypatch.Junio C Hamano2005-08-19
| | | | | | | This teachs git-applypatch, which is used from git-applymbox, three hooks, similar to what git-commit-script uses. Signed-off-by: Junio C Hamano <junkio@cox.net>
* Add commit hook and make the verification customizable.Junio C Hamano2005-08-19
| | | | | | | | | | | | | | | | | | | | There are three hooks: - 'pre-commit' is given an opportunity to inspect what is being committed, before we invoke the EDITOR for the commit message; - 'commit-msg' is invoked on the commit log message after the user prepares it; - 'post-commit' is run after a successful commit is made. The first two can interfere to stop the commit. The last one is for after-the-fact notification. The earlier built-in commit checker is now moved to pre-commit. Signed-off-by: Junio C Hamano <junkio@cox.net>
* [PATCH] Fixed/Extended example for update hookJosef Weidendorfer2005-08-15
| | | | | | | | Add sample code to distinguish --force rebased head and simple fast-forward. At the same time fixes a real bug; the "new ref" path was using a wrong parameter. Signed-off-by: Junio C Hamano <junkio@cox.net>
* [PATCH] Use $DESTDIR instead of $destPetr Baudis2005-08-12
| | | | | | | | $DESTDIR is more usual during the build than $dest and is what is usually used in the makefiles, so let's use it too. Signed-off-by: Petr Baudis <pasky@ucw.cz> Signed-off-by: Junio C Hamano <junkio@cox.net>
* Redo the templates generation and installation.Junio C Hamano2005-08-06
| | | | | | | | | | | Per discussion with people interested in binary packaging, change the default template location from /etc/git-core to /usr/share/git-core hierarchy. If a user wants to run git before installing for whatever reason, in addition to adding $src to the PATH environment variable, git-init-db can be run with --template=$src/templates/blt/ parameter. Signed-off-by: Junio C Hamano <junkio@cox.net>
* Install sample hooksJunio C Hamano2005-08-03
A template mechanism to populate newly initialized repository with default set of files is introduced. Use it to ship example hooks that can be used for update and post update checks, as Josef Weidendorfer suggests. Signed-off-by: Junio C Hamano <junkio@cox.net>