1. 25 Feb, 2016 1 commit
  2. 24 Feb, 2013 1 commit
  3. 20 Mar, 2010 1 commit
  4. 09 May, 2009 1 commit
  5. 18 Apr, 2009 1 commit
  6. 04 Mar, 2009 1 commit
  7. 25 Jun, 2008 1 commit
    • Junio C Hamano's avatar
      Ship sample hooks with .sample suffix · f98f8cba
      Junio C Hamano 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: default avatarJunio C Hamano <[email protected]>
  8. 18 Jan, 2008 1 commit
  9. 08 Nov, 2007 2 commits
  10. 14 Sep, 2007 1 commit
  11. 16 Apr, 2007 2 commits
  12. 25 Mar, 2007 1 commit
  13. 22 Mar, 2007 1 commit
  14. 14 Mar, 2007 1 commit
    • Andy Parkins's avatar
      update-hook: fix incorrect use of git-describe and sed for finding previous tag · c47e6a43
      Andy Parkins authored
      Previously git-describe would output lines of the form
      The update hook found the dash and stripped it off using
       sed 's/-g.*//'
      The remainder was then used as the previous tag name.
      However, git-describe has changed format.  The output is now of the form
      The above sed fragment doesn't strip the middle "-23", and so the
      previous tag name used would be "v1.1.1-23".  This is incorrect.
      Since the hook script was written, git-describe now gained support for
      "--abbrev=0", which it uses as a special flag to tell it not to output
      anything other than the nearest tag name.  This patch fixes the problem,
      and prevents any future recurrence by using this new flag rather than
      sed to find the previous tag.
      Signed-off-by: default avatarAndy Parkins <[email protected]>
      Signed-off-by: default avatarJunio C Hamano <[email protected]>
  15. 02 Mar, 2007 2 commits
  16. 14 Feb, 2007 2 commits
    • Andy Parkins's avatar
      The "table-of-contents" in the update hook script should match the body · 9a894e8e
      Andy Parkins authored
      44478d99 introduced a filter using "git-rev-parse --not --all" to the
      log display to prevent the display of revisions already in the
      repository.  However, the table of contents generation didn't get that
      same update.
      This patch fixes that.  The table of contents before the log and the log
      now both display the same list of revisions.
      Signed-off-by: default avatarAndy Parkins <[email protected]>
      Signed-off-by: default avatarJunio C Hamano <[email protected]>
    • Andy Parkins's avatar
      Only show log entries for new revisions in hooks--update · 44478d99
      Andy Parkins authored
      If you were issuing emails for two branches, and one merged the other,
      you would get the same log messages appearing in two separate emails.
      e.g. A working repository, where the last push to central was done at
           the revision marked "B", after which two branches were developed
        * -- B -- 1 -- 1 -- M (branch1)
              \           /
               2 -- 2 -- 2 (branch2)
      Now imagine that branch2 is pushed to the email-generating repository;
      an email containing all the "2" revisions would be sent.  Now, let's say
      branch1 is pushed, the old update hook would run
       git-rev-list $newrev ^$baserev
      Where $newrev would be "M" and $baserev would be "B".  This list
      includes all the "2" revisions as well as all the "1" revisions.
      This patch addresses this problem by using
       git-rev-parse --not --all | git-rev-list --stdin $newrev ^$baserev
      To inhibit the display of all revisions that are already in the
      Signed-off-by: default avatarAndy Parkins <[email protected]>
      Signed-off-by: default avatarJunio C Hamano <[email protected]>
  17. 13 Feb, 2007 1 commit
  18. 04 Feb, 2007 1 commit
  19. 28 Jan, 2007 2 commits
    • Andy Parkins's avatar
      Heavily expanded update hook to send more useful emails than the old hook · 829a686f
      Andy Parkins authored
      I know it's only an example, but having this might save someone else the
      trouble of writing an enhanced version for themselves.
      It basically does the same job as the old update hook, but with these
       * The recipients list is read from the repository config file from
       * Updating unannotated tags can be allowed by setting
       * Announcement emails (via annotated tag creation) can be sent to a
         different mailing list by setting hooks.announcelist
       * Output email is more verbose and generates specific content depending
         on whether the ref is a tag, an annotated tag, a branch, or a
         tracking branch
       * The email is easier to filter; the subject line is prefixed with
         [SCM] and a project description pulled from the "description" file
       * It catches (and displays differently) branch updates that are
         performed with a --force
      Obviously, it's nothing that clever - it's the update hook I use on my
      repositories but I've tried to keep it general, and tried to make the
      output always relevant to the type of update.
      Signed-off-by: default avatarAndy Parkins <[email protected]>
      Signed-off-by: default avatarJunio C Hamano <[email protected]>
    • Andy Parkins's avatar
      UNIX reference time of 1970-01-01 00:00 is UTC timezone, not local time zone · a69aba6a
      Andy Parkins authored
      I got bitten because in the UK (where one would expect 1970-01-01 00:00
      to be UTC 0) some politicians decided to mess around with daylight
      savings time from 1968 to 1971; it was permanently BST (+0100).  That
      means that on my computer the following is true:
      	$ date --date="1970-01-01 00:00" +"%F %T %z (%Z)"
      	1970-01-01 00:00:00 +0100 (BST)
      This of course means that the --date argument to date is specified in
      local time, not UTC.  So when the hooks--update script does this:
      	date=$(date --date="1970-01-01 00:00:00 $ts seconds")
      It's actually saying (in my timezone) "1970-01-01 01:00:00 UTC" + $ts.
      Clearly this is wrong.  The UNIX epoch started at midnight UTC not 1am
      This leads to the tagged time in hooks--update being shown as one hour
      earlier than the true tagged time (in my timezone).  The problem would
      be worse for other timezones.  For a +1300 timezone on 1970-01-01, the
      tagged time would be 13 hours earlier.  Oops.
      The solution is to force the reference time to UTC, which is what this
      patch does.  In my timezone:
      	$ date --date="1970-01-01 00:00 +0000" +"%F %T %z (%Z)"
      	1970-01-01 01:00:00 +0100 (BST)
      Much better.
      Signed-off-by: default avatarAndy Parkins <[email protected]>
  20. 28 Dec, 2006 1 commit
  21. 08 Jul, 2006 1 commit
  22. 25 Jan, 2006 2 commits
    • Junio C Hamano's avatar
      sample update-hook: sanely handle a new branch head. · 41e79c95
      Junio C Hamano authored
      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: default avatarJunio C Hamano <[email protected]>
    • Andreas Ericsson's avatar
      update-hook: Major overhaul (handling tags, mainly). · 8a3ee7c3
      Andreas Ericsson authored
      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: default avatarAndreas Ericsson <[email protected]>
      Signed-off-by: default avatarJunio C Hamano <[email protected]>
  23. 21 Nov, 2005 1 commit
  24. 02 Sep, 2005 1 commit
    • Junio C Hamano's avatar
      scripts: equality test '==' is not portable. · 86b13da4
      Junio C Hamano authored
      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
      Signed-off-by: default avatarJunio C Hamano <[email protected]>
  25. 15 Aug, 2005 1 commit
  26. 03 Aug, 2005 1 commit
    • Junio C Hamano's avatar
      Install sample hooks · 8d5afef0
      Junio C Hamano authored
      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: default avatarJunio C Hamano <[email protected]>