summaryrefslogtreecommitdiff
path: root/templates
Commit message (Collapse)AuthorAgeFilesLines
* Update shell scripts to compute empty tree object IDbrian m. carlson2018-05-021-1/+1
| | | | | | | | | | Several of our shell scripts hard-code the object ID of the empty tree. To avoid any problems when changing hashes, compute this value on startup of the script. For performance, store the value in a variable and reuse it throughout the life of the script. Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* fsmonitor: simplify determining the git worktree under Windowsav/fsmonitorBen Peart2017-11-131-10/+3
| | | | | | | | | | Simplify and speed up the process of finding the git worktree when running on Windows by keeping it in perl and avoiding spawning helper processes. Signed-off-by: Ben Peart <benpeart@microsoft.com> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* fsmonitor: read from getcwd(), not the PWD environment variableAlex Vandiver2017-11-101-1/+2
| | | | | | | | | | | | | | | | | Though the process has chdir'd to the root of the working tree, the PWD environment variable is only guaranteed to be updated accordingly if a shell is involved -- which is not guaranteed to be the case. That is, if `/usr/bin/perl` is a binary, $ENV{PWD} is unchanged from whatever spawned `git` -- if `/usr/bin/perl` is a trivial shell wrapper to the real `perl`, `$ENV{PWD}` will have been updated to the root of the working copy. Update to read from the Cwd module using the `getcwd` syscall, not the PWD environment variable. The Cygwin case is left unchanged, as it necessarily _does_ go through a shell. Signed-off-by: Alex Vandiver <alexmv@dropbox.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* fsmonitor: don't bother pretty-printing JSON from watchmanAlex Vandiver2017-10-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This provides modest performance savings. Benchmarking with the following program, with and without `--no-pretty`, we find savings of 23% (0.316s -> 0.242s) in the git repository, and savings of 8% (5.24s -> 4.86s) on a large repository with 580k files in the working copy. #!/usr/bin/perl use strict; use warnings; use IPC::Open2; use JSON::XS; my $pid = open2(\*CHLD_OUT, \*CHLD_IN, "watchman -j @ARGV") or die "open2() failed: $!\n" . "Falling back to scanning...\n"; my $query = qq|["query", "$ENV{PWD}", {}]|; print CHLD_IN $query; close CHLD_IN; my $response = do {local $/; <CHLD_OUT>}; JSON::XS->new->utf8->decode($response); Signed-off-by: Alex Vandiver <alexmv@dropbox.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* fsmonitor: read entirety of watchman outputAlex Vandiver2017-10-041-4/+2
| | | | | | | | | | | | | | | | | In Perl, setting $/ sets the string that is used as the "record separator," which sets the boundary that the `<>` construct reads to. Setting `local $/ = 0666;` evaluates the octal, getting 438, and stringifies it. Thus, the later read from `<CHLD_OUT>` stops as soon as it encounters the string "438" in the watchman output, yielding invalid JSON; repositories containing filenames with SHA1 hashes are able to trip this easily. Set `$/` to undefined, thus slurping all output from watchman. Also close STDIN which is provided to watchman, to better guarantee that we cannot deadlock with watchman while both attempting to read. Signed-off-by: Alex Vandiver <alexmv@dropbox.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* fsmonitor: MINGW support for watchman integrationBen Peart2017-10-041-1/+1
| | | | | | | | | Instead of just taking $ENV{'PWD'}, use the same logic that converts PWD to $git_work_tree on MSYS_NT in the watchman integration hook script also on MINGW. Signed-off-by: Ben Peart <benpeart@microsoft.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* fsmonitor: add a sample integration script for WatchmanBen Peart2017-10-011-0/+122
| | | | | | | | | | | | | | | | | | | This script integrates the new fsmonitor capabilities of git with the cross platform Watchman file watching service. To use the script: Download and install Watchman from https://facebook.github.io/watchman/. Rename the sample integration hook from fsmonitor-watchman.sample to fsmonitor-watchman. Configure git to use the extension: git config core.fsmonitor .git/hooks/fsmonitor-watchman Optionally turn on the untracked cache for optimal performance. Signed-off-by: Ben Peart <benpeart@microsoft.com> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Christian Couder <christian.couder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* Merge branch 'ma/up-to-date'Junio C Hamano2017-09-101-1/+1
|\ | | | | | | | | | | | | | | Message and doc updates. * ma/up-to-date: treewide: correct several "up-to-date" to "up to date" Documentation/user-manual: update outdated example output
| * treewide: correct several "up-to-date" to "up to date"ma/up-to-dateMartin Ågren2017-08-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Follow the Oxford style, which says to use "up-to-date" before the noun, but "up to date" after it. Don't change plumbing (specifically send-pack.c, but transport.c (git push) also has the same string). This was produced by grepping for "up-to-date" and "up to date". It turned out we only had to edit in one direction, removing the hyphens. Fix a typo in Documentation/git-diff-index.txt while we're there. Reported-by: Jeffrey Manian <jeffrey.manian@gmail.com> Reported-by: STEVEN WHITE <stevencharleswhitevoices@gmail.com> Signed-off-by: Martin Ågren <martin.agren@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | Merge branch 'ks/prepare-commit-msg-sample-fix'Junio C Hamano2017-08-231-1/+1
|\ \ | | | | | | | | | | | | | | | | | | An "oops" fix to a topic that is already in 'master'. * ks/prepare-commit-msg-sample-fix: hook: use correct logical variable
| * | hook: use correct logical variableks/prepare-commit-msg-sample-fixKaartic Sivaraam2017-08-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Sign-off added should be that of the "committer", not that of the "commit's author"; that is how the rest of Git adds sign-off using sequencer.c::append_signoff(). Use the correct logical variable that identifies the committer. Signed-off-by: Kaartic Sivaraam <kaarticsivaraam91196@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | Merge branch 'ks/prepare-commit-msg-sample'Junio C Hamano2017-08-111-12/+18
|\ \ \ | |/ / | | / | |/ |/| | | | | | | | | | | | | | | Remove an example that is now obsolete from a sample hook, and improve an old example in it that added a sign-off manually to use the interpret-trailers command. * ks/prepare-commit-msg-sample: hook: add a simple first example hook: add sign-off using "interpret-trailers" hook: name the positional variables hook: cleanup script
| * hook: add a simple first exampleks/prepare-commit-msg-sampleKaartic Sivaraam2017-07-121-3/+6
| | | | | | | | | | | | | | | | | | | | | | | | Add a simple example that replaces an outdated example that was removed. This ensures that there's at the least a simple example that illustrates what could be done using the hook just by enabling it. Also, update the documentation. Signed-off-by: Kaartic Sivaraam <kaarticsivaraam91196@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * hook: add sign-off using "interpret-trailers"Kaartic Sivaraam2017-07-121-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The sample hook to prepare the commit message before a commit allows users to opt-in to add the sign-off to the commit message. The sign-off is added at a place that isn't consistent with the "-s" option of "git commit". Further, it could go out of view in certain cases. Add the sign-off in a way similar to "-s" option of "git commit" using git's interpret-trailers command. It works well in all cases except when the user invokes "git commit" without any arguments. In that case manually add a new line after the first line to ensure it's consistent with the output of "-s" option. Signed-off-by: Kaartic Sivaraam <kaarticsivaraam91196@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * hook: name the positional variablesKaartic Sivaraam2017-07-121-3/+6
| | | | | | | | | | | | | | | | | | | | | | | | It's always nice to have named variables instead of positional variables as they communicate their purpose well. Appropriately name the positional variables of the hook to make it easier to see what's going on. Signed-off-by: Kaartic Sivaraam <kaarticsivaraam91196@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * hook: cleanup scriptKaartic Sivaraam2017-07-121-14/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Prepare the 'preare-commit-msg' sample script for upcoming changes. Preparation includes removal of an example that has outlived it's purpose. The example is the one that comments the "Conflicts:" part of a merge commit message. It isn't relevant anymore as it's done by default since 261f315b ("merge & sequencer: turn "Conflicts:" hint into a comment", 2014-08-28). Further update the relevant comments from the sample script and update the documentation. Signed-off-by: Kaartic Sivaraam <kaarticsivaraam91196@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | pre-rebase hook: capture documentation in a <<here documentjn/hooks-pre-rebase-sample-fixJonathan Nieder2017-07-111-3/+3
|/ | | | | | | | | | | | | Without this change, the sample hook does not pass a syntax check (sh -n): $ sh -n hooks--pre-rebase.sample hooks--pre-rebase.sample: line 101: syntax error near unexpected token `(' hooks--pre-rebase.sample: line 101: ` merged into it again (either directly or indirectly).' Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Stefan Beller <sbeller@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* pre-receive.sample: mark it executableak/pre-receive-hook-template-modefixAnders Kaseorg2016-10-281-0/+0
| | | | | | | For consistency with other hooks, make the sample hook executable. Signed-off-by: Anders Kaseorg <andersk@mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* push options: {pre,post}-receive hook learns about push optionsStefan Beller2016-07-141-0/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The environment variable GIT_PUSH_OPTION_COUNT is set to the number of push options sent, and GIT_PUSH_OPTION_{0,1,..} is set to the transmitted option. The code is not executed as the push options are set to NULL, nor is the new capability advertised. There was some discussion back and forth how to present these push options to the user as there are some ways to do it: Keep all options in one environment variable ============================================ + easiest way to implement in Git - This would make things hard to parse correctly in the hook. Put the options in files instead, filenames are in GIT_PUSH_OPTION_FILES ====================================== + After a discussion about environment variables and shells, we may not want to put user data into an environment variable (see [1] for example). + We could transmit binaries, i.e. we're not bound to C strings as we are when using environment variables to the user. + Maybe easier to parse than constructing environment variable names GIT_PUSH_OPTION_{0,1,..} yourself - cleanup of the temporary files is hard to do reliably - we have race conditions with multiple clients pushing, hence we'd need to use mkstemp. That's not too bad, but still. Use environment variables, but restrict to key/value pairs ========================================================== (When the user pushes a push option `foo=bar`, we'd GIT_PUSH_OPTION_foo=bar) + very easy to parse for a simple model of push options - it's not sufficient for more elaborate models, e.g. it doesn't allow doubles (e.g. cc=reviewer@email) Present the options in different environment variables ====================================================== (This is implemented) * harder to parse as a user, but we have a sample hook for that. - doesn't allow binary files + allows the same option twice, i.e. is not restrictive about options, except for binary files. + doesn't clutter a remote directory with (possibly stale) temporary files As we first want to focus on getting simple strings to work reliably, we go with the last option for now. If we want to do transmission of binaries later, we can just attach a 'side-channel', e.g. "any push option that contains a '\0' is put into a file instead of the environment variable and we'd have new GIT_PUSH_OPTION_FILES, GIT_PUSH_OPTION_FILENAME_{0,1,..} environment variables". [1] 'Shellshock' https://lwn.net/Articles/614218/ Signed-off-by: Stefan Beller <sbeller@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* Merge branch 'ma/update-hooks-sample-typofix'Junio C Hamano2016-02-261-1/+1
|\ | | | | | | | | * ma/update-hooks-sample-typofix: templates/hooks: fix minor typo in the sample update-hook
| * templates/hooks: fix minor typo in the sample update-hookma/update-hooks-sample-typofixMartin Amdisen2016-02-251-1/+1
| | | | | | | | | | Signed-off-by: Martin Mosegaard Amdisen <martin.amdisen@praqma.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | Merge branch 'nd/multiple-work-trees'Junio C Hamano2015-05-112-4/+4
|\ \ | |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A replacement for contrib/workdir/git-new-workdir that does not rely on symbolic links and make sharing of objects and refs safer by making the borrowee and borrowers aware of each other. * nd/multiple-work-trees: (41 commits) prune --worktrees: fix expire vs worktree existence condition t1501: fix test with split index t2026: fix broken &&-chain t2026 needs procondition SANITY git-checkout.txt: a note about multiple checkout support for submodules checkout: add --ignore-other-wortrees checkout: pass whole struct to parse_branchname_arg instead of individual flags git-common-dir: make "modules/" per-working-directory directory checkout: do not fail if target is an empty directory t2025: add a test to make sure grafts is working from a linked checkout checkout: don't require a work tree when checking out into a new one git_path(): keep "info/sparse-checkout" per work-tree count-objects: report unused files in $GIT_DIR/worktrees/... gc: support prune --worktrees gc: factor out gc.pruneexpire parsing code gc: style change -- no SP before closing parenthesis checkout: clean up half-prepared directories in --to mode checkout: reject if the branch is already checked out elsewhere prune: strategies for linked checkouts checkout: support checking out into a new working directory ...
| * *.sh: avoid hardcoding $GIT_DIR/hooks/...Nguyễn Thái Ngọc Duy2014-12-012-4/+4
| | | | | | | | | | | | | | | | If $GIT_COMMON_DIR is set, it should be $GIT_COMMON_DIR/hooks/, not $GIT_DIR/hooks/. Just let rev-parse --git-path handle it. Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | pre-push.sample: remove unnecessary and misleading IFS=' 'jh/pre-push-sample-no-custom-ifsJim Hill2014-12-221-1/+0
|/ | | | | | | | | | | | | | | | | | | | The sample hook explicitly sets IFS to SP and nothing else so that the "read" used in the per-ref while loop that iterates over "<localref> SP <localsha1> SP <remoteref> SP <remotesha>" records, where we know refs and sha1s will not have SPs, would split them correctly. While this is not wrong per-se, it is not necessary; because we know these fields do not contain HT or LF, either, we can simply leave IFS the default. This will also prevent those who cut and paste from this sample from getting bitten when they write things in the per-ref loop that need splitting with the default $IFS (e.g. use $(git rev-list ...) to produce one-record-per-line output). Signed-off-by: Jim Hill <gjthill@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* pre-push.sample: Write error message to stderrwk/pre-push-sample-hookW. Trevor King2014-09-111-1/+1
| | | | | | | | | | | | githooks(5) suggests: Information about why the push is rejected may be sent to the user by writing to standard error. So follow that advice in the sample. Signed-off-by: W. Trevor King <wking@tremily.us> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* sample pre-commit hook: use --bool when retrieving config varJohan Herland2013-09-241-1/+1
| | | | | | | | | | | | | | | Currently if you set [hooks] allowNonAscii (or allownonascii = 1, or = yes) in your .git/config then the sample pre-commit misinterprets the value as "false" and rejects non-ASCII filenames. Use "git config --bool" to get the usual nicer boolean handling. Signed-off-by: Johan Herland <johan@herland.net> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
* Merge branch 'maint-1.8.3' into maintJunio C Hamano2013-09-031-0/+1
|\ | | | | | | | | * maint-1.8.3: fix shell syntax error in template
| * fix shell syntax error in templateThorsten Glaser2013-08-301-0/+1
| | | | | | | | | | | | | | An if clause must not be empty; add a "colon" command. Signed-off-by: Thorsten Glaser <t.glaser@tarent.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | templates: spell ASCII in uppercase in pre-commit hookrh/template-updatesRichard Hartmann2013-07-151-3/+3
| | | | | | | | | | | | | | The name of the encoding is ASCII, not ascii. Signed-off-by: Richard Hartmann <richih.mailinglist@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | templates: Reformat pre-commit hook's messageRichard Hartmann2013-07-151-4/+2
| | | | | | | | | | | | | | Now that we're using heredoc, the message can span the full 80 chars. Signed-off-by: Richard Hartmann <richih.mailinglist@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | templates: Use heredoc in pre-commit hookRichard Hartmann2013-07-151-12/+13
|/ | | | | | | | | This way, it is easier to see how the text we give the end users would look like, and it will allow us to use (near) full width of the source file. Signed-off-by: Richard Hartmann <richih.mailinglist@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* pre-push.sample: Make the script executableWieland Hoffmann2013-06-111-0/+0
| | | | | | | | githooks(5) says that "[...]the .sample files are executable by default" which was not true. Signed-off-by: Wieland Hoffmann <themineo@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* templates/hooks--update.sample: use a lowercase "usage:" stringDavid Aguilar2013-02-241-1/+1
| | | | | | | | Make the usage string consistent with Git. Reviewed-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: David Aguilar <davvid@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* Add sample pre-push hook scriptAaron Schrab2013-01-181-0/+53
| | | | | | | | | | Create a sample of a script for a pre-push hook. The main purpose is to illustrate how a script may parse the information which is supplied to such a hook. The script may also be useful to some people as-is for avoiding to push commits which are marked as a work in progress. Signed-off-by: Aaron Schrab <aaron@schrab.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* Merge branch 'maint-1.7.6' into maintJunio C Hamano2011-10-261-2/+6
|\ | | | | | | | | | | | | | | | | | | | | * maint-1.7.6: make the sample pre-commit hook script reject names with newlines, too git-read-tree.txt: update sparse checkout examples git-read-tree.txt: correct sparse-checkout and skip-worktree description git-read-tree.txt: language and typography fixes unpack-trees: print "Aborting" to stderr Documentation/git-update-index: refer to 'ls-files' Documentation: basic configuration of notes.rewriteRef
| * make the sample pre-commit hook script reject names with newlines, tooJim Meyering2011-10-261-2/+6
| | | | | | | | | | | | | | | | | | | | The sample pre-commit hook script would fail to reject a file name like "a\nb" because of the way newlines are handled in "$(...)". Adjust the test to count filtered bytes and require there be 0. Also print all diagnostics to standard error, not stdout, so they will actually be seen. Signed-off-by: Jim Meyering <meyering@redhat.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | templates/hooks--*: remove sample hooks without any functionalityGerrit Pape2011-09-272-23/+0
|/ | | | | | | | | | | | | Remove the sample post-commit and post-receive hooks. The sample post-commit doesn't contain any sample functionality and the comments do not provide more information than already found in the documentation. The sample post-receive hooks doesn't provide any sample functionality either and refers in the comments to a contrib hook that might be installed in different locations on different systems, which isn't that helpful. Signed-off-by: Gerrit Pape <pape@smarden.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* Modernize git calling conventions in hook templatesBen Walton2010-03-207-17/+17
| | | | | | | | | The hook templates were still using/referencing 'git-foo' instead of 'git foo.' This patch updates the sample hooks to use the modern conventions instead. Signed-off-by: Ben Walton <bwalton@artsci.utoronto.ca> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* Make templates honour SHELL_PATH and PERL_PATHBen Walton2010-03-203-5/+18
| | | | | | | | | | | | | The hook script templates were hard coded to use /bin/sh and perl. This patch ensures that they use the same tools specified for the rest of the suite. The impetus for the change was noticing that, as shipped, some of the hooks used shell constructs that wouldn't work under Solaris' /bin/sh (eg: $(cmd...) substitutions). Signed-off-by: Ben Walton <bwalton@artsci.utoronto.ca> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* Merge branch 'bs/maint-pre-commit-hook-sample'Junio C Hamano2009-11-151-9/+9
|\ | | | | | | | | * bs/maint-pre-commit-hook-sample: pre-commit.sample: Diff against the empty tree when HEAD is invalid
| * pre-commit.sample: Diff against the empty tree when HEAD is invalidBjörn Steinbrink2009-11-061-9/+9
| | | | | | | | | | | | | | | | | | This was already the case for the old "diff --check" call, but the new one that checks whether there are any non-ascii file names was missing it, making that check fail for root commits. Signed-off-by: Björn Steinbrink <B.Steinbrink@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | Revert "Don't create the $GIT_DIR/branches directory on init"Junio C Hamano2009-10-311-0/+1
| | | | | | | | | | | | | | | | | | | | This reverts commit 0cc5691a8b05a7eabdeef520c94b1bb3bcac7874. There is not enough justification for doing this. We do not update things in .git/branches and .git/remotes anymore, but still do read information from there and will keep doing so. Besides, this breaks quite a lot of tests in t55?? series.
* | Don't create the $GIT_DIR/branches directory on initRobin Rosenberg2009-10-301-1/+0
| | | | | | | | | | | | | | | | Git itself does not even look at this directory. Any tools that actually needs it should create it itself. Signed-off-by: Robin Rosenberg <robin.rosenberg@dewire.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | Work around option parsing bug in the busybox tar implementationAndreas Schwab2009-10-241-1/+1
|/ | | | | | | | | | | | The first argument of the tar command is interpreted as a bundle of letters specifying the mode of operation and additional options, with any option arguments taken from subsequent words on the command line as needed. The implementation of tar in busybox treats this bundle as if preceded by a dash and then parses it by getopt rules, which mishandles 'tar xfo -'. Use 'tar xof -' instead to work this around. Signed-off-by: Andreas Schwab <schwab@linux-m68k.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* Correct minor typo in post-receive hook templateFrederik Schwarzer2009-09-291-1/+1
| | | | Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
* pre-commit.sample: add comment re tr portability; fix grammarJim Meyering2009-09-221-4/+7
| | | | | | | | | Add a comment explaining why square brackets around a tr range are not only ok, but actually required in this case. Correct spelling and grammar. Signed-off-by: Jim Meyering <meyering@redhat.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* Merge branch 'hv/sample-update'Junio C Hamano2009-05-231-0/+10
|\ | | | | | | | | * hv/sample-update: Extend sample update hook, disable modifying of existing tags
| * Extend sample update hook, disable modifying of existing tagsHeiko Voigt2009-05-091-0/+10
| | | | | | | | | | | | | | Because no special rule for this existed it was allowed by default Signed-off-by: Heiko Voigt <heiko.voigt@mahr.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | Extend sample pre-commit hook to check for non ascii filenamesHeiko Voigt2009-05-201-0/+25
| | | | | | | | | | | | | | | | | | | | At the moment non-ascii encodings of filenames are not portably converted between different filesystems by git. This will most likely change in the future but to allow repositories to be portable among different file/operating systems this check is enabled by default. Signed-off-by: Heiko Voigt <hvoigt@hvoigt.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | pre-commit.sample: don't print incidental SHA1Jim Meyering2009-05-161-1/+1
|/ | | | | | | | | Make the sample pre-commit hook script discard all git-rev-parse output, not just stderr. Otherwise, it would print an SHA1. Signed-off-by: Jim Meyering <meyering@redhat.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>