Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Commits on Nov 16, 2009
  1. @gitster

    Merge branch 'bs/maint-pre-commit-hook-sample'

    gitster authored
    * bs/maint-pre-commit-hook-sample:
      pre-commit.sample: Diff against the empty tree when HEAD is invalid
Commits on Nov 7, 2009
  1. @dotdash @gitster

    pre-commit.sample: Diff against the empty tree when HEAD is invalid

    dotdash authored gitster committed
    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>
Commits on Oct 31, 2009
  1. @gitster

    Revert "Don't create the $GIT_DIR/branches directory on init"

    gitster authored
    This reverts commit 0cc5691.
    
    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.
Commits on Oct 30, 2009
  1. @robinrosenberg @gitster

    Don't create the $GIT_DIR/branches directory on init

    robinrosenberg authored gitster committed
    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>
Commits on Oct 24, 2009
  1. @andreas-schwab @gitster

    Work around option parsing bug in the busybox tar implementation

    andreas-schwab authored gitster committed
    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>
Commits on Sep 29, 2009
  1. @icwiener @spearce

    Correct minor typo in post-receive hook template

    icwiener authored spearce committed
    Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Commits on Sep 22, 2009
  1. @gitster

    pre-commit.sample: add comment re tr portability; fix grammar

    Jim Meyering authored gitster committed
    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>
Commits on May 23, 2009
  1. @gitster

    Merge branch 'hv/sample-update'

    gitster authored
    * hv/sample-update:
      Extend sample update hook, disable modifying of existing tags
Commits on May 20, 2009
  1. @gitster

    Extend sample pre-commit hook to check for non ascii filenames

    Heiko Voigt authored gitster committed
    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>
Commits on May 16, 2009
  1. @meyering @gitster

    pre-commit.sample: don't print incidental SHA1

    meyering authored gitster committed
    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>
Commits on May 9, 2009
  1. @gitster

    Extend sample update hook, disable modifying of existing tags

    Heiko Voigt authored gitster committed
    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>
Commits on Apr 18, 2009
  1. @MadCoder @gitster

    hook/update: example of how to prevent branch creation

    MadCoder authored gitster committed
    Since git doesn't provide a receive.denyBranchCreation or similar, here is
    an example of how to be sure users cannot create branches remotely by
    pushing a new reference.
    
    This setup has been proven useful to prevent creation of spurious branches
    because of users having their remote.origin.push set to HEAD, when they
    use `git push` while being on a local topic branch of theirs instead of
    the proper one.
    
    Signed-off-by: Pierre Habouzit <madcoder@debian.org>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Mar 4, 2009
  1. @johnflux @gitster

    Modify description file to say what this file is

    johnflux authored gitster committed
    A lot of people see this message for the first time on the gitweb
    interface, where there is no clue as to what 'this file' means.
    
    Signed-off-by: John Tapsell <johnflux@gmail.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Sep 9, 2008
  1. @gitster

    Fix permission bits on sources checked out with an overtight umask

    gitster authored
    Two patches 9907721 (templates/Makefile: don't depend on local umask
    setting, 2008-02-28) and 96cda0b (templates/Makefile: install is
    unnecessary, just use mkdir -p, 2008-08-21) tried to prevent an overtight
    umask the builder/installer might have from screwing over the installation
    procedure, but we forgot there was another source of trouble.  If the
    person who checked out the source tree had an overtight umask, it will
    leak out to the built products, which is propagated to the installation
    destination.
    
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Aug 20, 2008
  1. @gitster

    Install templates with the user and group of the installing personality

    Johannes Sixt authored gitster committed
    If 'make install' was run with sufficient privileges, then the installed
    templates, which are copied using 'tar', would receive the user and group
    of whoever built git. This instructs 'tar' to ignore the user and group
    that are recorded in the archive.
    
    Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Jul 3, 2008
  1. @gitster

    Merge branch 'j6t/mingw'

    gitster authored
    * j6t/mingw: (38 commits)
      compat/pread.c: Add a forward declaration to fix a warning
      Windows: Fix ntohl() related warnings about printf formatting
      Windows: TMP and TEMP environment variables specify a temporary directory.
      Windows: Make 'git help -a' work.
      Windows: Work around an oddity when a pipe with no reader is written to.
      Windows: Make the pager work.
      When installing, be prepared that template_dir may be relative.
      Windows: Use a relative default template_dir and ETC_GITCONFIG
      Windows: Compute the fallback for exec_path from the program invocation.
      Turn builtin_exec_path into a function.
      Windows: Use a customized struct stat that also has the st_blocks member.
      Windows: Add a custom implementation for utime().
      Windows: Add a new lstat and fstat implementation based on Win32 API.
      Windows: Implement a custom spawnve().
      Windows: Implement wrappers for gethostbyname(), socket(), and connect().
      Windows: Work around incompatible sort and find.
      Windows: Implement asynchronous functions as threads.
      Windows: Disambiguate DOS style paths from SSH URLs.
      Windows: A rudimentary poll() emulation.
      Windows: Implement start_command().
      ...
Commits on Jun 27, 2008
  1. @gitster

    Update sample pre-commit hook to use "diff --check"

    gitster authored
    Now "diff --check" can detect not just whitespace errors but also notices
    leftover conflict marker lines, we can use it in the sample pre-commit
    hook script.
    
    These days the object layer knows about the empty tree object without
    actually having one in the repository, so we can run the test even for the
    initial commit.
    
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Jun 26, 2008
  1. When installing, be prepared that template_dir may be relative.

    Johannes Sixt authored
    Since the Makefile in the template/ subdirectory is only used to install
    the templates, we do not simply pass down the setting of template_dir
    when it is relative, but construct the intended destination in a new
    variable: A relative template_dir is relative to gitexecdir.
    
    Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at>
  2. @raalkml @gitster

    Fix use of "perl -i" on Windows

    raalkml authored gitster committed
    The perldiag(1) has following to say about this:
    
        "Can't do inplace edit without backup"
    
    	(F) You're on a system such as MS-DOS that gets confused if
    	you try reading from a deleted (but still opened) file. You
    	have to say -i.bak, or some such.
    
    Signed-off-by: Alex Riesen <raa.lkml@gmail.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Jun 25, 2008
  1. @gitster

    Ship sample hooks with .sample suffix

    gitster authored
    We used to mark hooks we ship as samples by making them unexecutable, but
    some filesystems cannot tell what is executable and what is not.
    
    This makes it much more explicit.  The hooks are suffixed with .sample
    (but now are made executable), so enabling it is still one step operation
    (instead of "chmod +x $hook", you would do "mv $hook.sample $hook") but
    now they won't get accidentally enabled on systems without executable bit.
    
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
  2. @gitster

    pre-rebase hook update

    gitster authored
    This hook is what I have been using to manage topic branches in git.git,
    but have not been updated to the Real Thing for a while.
    
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on May 21, 2008
  1. @gitster

    Fix prepare-commit-msg hook and replace in-place sed

    Marcel Koeppen authored gitster committed
    The patterns to the case statement could never be matched, so the hook
    was a noop. This patch also replaces the non-portable use of in-place sed.
    
    Signed-off-by: Marcel Koeppen <git-dev@marzelpan.de>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Feb 29, 2008
  1. @gitster

    Merge branch 'maint'

    gitster authored
    * maint:
      templates/Makefile: don't depend on local umask setting
      Correct name of diff_flush() in API documentation
      Start preparing for 1.5.4.4
    
    Conflicts:
    
    	RelNotes
Commits on Feb 28, 2008
  1. @gitster

    templates/Makefile: don't depend on local umask setting

    Gerrit Pape authored gitster committed
    Don't take the local umask setting into account when installing the
    templates/* files and directories, running 'make install' with umask set
    to 077 resulted in template/* installed with permissions 700 and 600.
    
    The problem was discovered by Florian Zumbiehl, reported through
     http://bugs.debian.org/467518
    
    Signed-off-by: Gerrit Pape <pape@smarden.org>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Feb 6, 2008
  1. @bonzini @gitster

    git-commit: add a prepare-commit-msg hook

    bonzini authored gitster committed
    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>
Commits on Jan 18, 2008
  1. @gitster

    Officially deprecate repo-config.

    gitster authored
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Jan 14, 2008
  1. @jlherren @gitster

    Make default pre-commit hook less noisy

    jlherren authored gitster committed
    This hook thought to have found a conflict marker any time it saw
    a 7-character combination of any of the characters '<>=' at the
    beginning of a line, whereas it should only look for the *same*
    character to appear repeatedly.
    
    Also, restrict it to match exactly 7 times, to avoid matching the
    underlining with '='-characters often used in documentation.
    
    Signed-off-by: Jean-Luc Herren <jlh@gmx.ch>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Dec 4, 2007
  1. @schiele @gitster

    install-sh from automake does not like -m without delimiting space

    schiele authored gitster committed
    The install-sh script as shipped with automake requires a space between
    the -m switch and its argument.  Since this is also the regular way of
    doing it with other install implementations this change inserts the
    missing space in all makefiles.
    
    Signed-off-by: Robert Schiele <rschiele@gmail.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Nov 23, 2007
  1. @gitster

    Merge branch 'maint'

    gitster authored
    * maint:
      Fix sample pre-commit hook
  2. @gitster

    Fix sample pre-commit hook

    gitster authored
    If the worktree happened to have a file called HEAD, "diff-index --cached HEAD"
    would complain about the ambiguity between revision and path.  Avoid it by
    using an explicit "--" for disambiguation.
    
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Nov 8, 2007
  1. @gitster

    hooks--update: decline deleting tags or branches by default, add conf…

    Gerrit Pape authored gitster committed
    …ig options
    
    Decline deleting tags or branches through git push <remote> :<ref> by
    default, support config options hooks.allowdeletetag, hooks.allowdeletebranch
    to override this per repository.
    
    Before this patch the update hook interpreted deleting a tag, no matter if
    annotated or not, through git push <remote> :<tag> as unannotated tag, and
    declined it by default, but with an unappropriate error message:
    
     $ git push origin :atag
     deleting 'refs/tags/atag'
     *** The un-annotated tag, atag, is not allowed in this repository
     *** Use 'git tag [ -a | -s ]' for tags you want to propagate.
     ng refs/tags/atag hook declined
     error: hooks/update exited with error code 1
     error: hook declined to update refs/tags/atag
     error: failed to push to 'monolith:/git/qm/test-repo'
    
    Signed-off-by: Gerrit Pape <pape@smarden.org>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
  2. @gitster

    hooks--update: fix test for properly set up project description file

    Gerrit Pape authored gitster committed
    The update hook template intends to abort if the project description file
    hasn't been adjusted or is empty.  This patch fixes the check for 'being
    adjusted'.
    
    Signed-off-by: Gerrit Pape <pape@smarden.org>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Oct 27, 2007
  1. @meyering @gitster

    hooks-pre-commit: use \t, rather than a literal TAB in regexp

    meyering authored gitster committed
    Signed-off-by: Jim Meyering <meyering@redhat.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Sep 14, 2007
  1. @julliard @gitster

    hooks--update: Explicitly check for all zeros for a deleted ref.

    julliard authored gitster committed
    The previous check caused the hook to reject as unannotated any tag
    whose SHA1 starts with a zero.
    
    Signed-off-by: Alexandre Julliard <julliard@winehq.org>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Jul 15, 2007
  1. @gitster

    Use $(RM) in Makefiles instead of 'rm -f'

    Emil Medve authored gitster committed
    Signed-off-by: Emil Medve <Emilian.Medve@Freescale.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Something went wrong with that request. Please try again.