Last change
on this file since 5327 was
4773,
checked in by idelkadi, 11 months ago
|
- Update of Ecrad in LMDZ
The same organization of the Ecrad offline version is retained in order to facilitate the updating of Ecrad in LMDZ and the comparison between online and offline results.
version 1.6.1 of Ecrad (https://github.com/lguez/ecrad.git)
- Implementation of the double call of Ecrad in LMDZ
|
-
Property svn:executable set to
*
|
File size:
1.3 KB
|
Rev | Line | |
---|
[4773] | 1 | #!/bin/sh |
---|
| 2 | |
---|
| 3 | # An example hook script to verify what is about to be pushed. Called by "git |
---|
| 4 | # push" after it has checked the remote status, but before anything has been |
---|
| 5 | # pushed. If this script exits with a non-zero status nothing will be pushed. |
---|
| 6 | # |
---|
| 7 | # This hook is called with the following parameters: |
---|
| 8 | # |
---|
| 9 | # $1 -- Name of the remote to which the push is being done |
---|
| 10 | # $2 -- URL to which the push is being done |
---|
| 11 | # |
---|
| 12 | # If pushing without using a named remote those arguments will be equal. |
---|
| 13 | # |
---|
| 14 | # Information about the commits which are being pushed is supplied as lines to |
---|
| 15 | # the standard input in the form: |
---|
| 16 | # |
---|
| 17 | # <local ref> <local sha1> <remote ref> <remote sha1> |
---|
| 18 | # |
---|
| 19 | # This sample shows how to prevent push of commits where the log message starts |
---|
| 20 | # with "WIP" (work in progress). |
---|
| 21 | |
---|
| 22 | remote="$1" |
---|
| 23 | url="$2" |
---|
| 24 | |
---|
| 25 | z40=0000000000000000000000000000000000000000 |
---|
| 26 | |
---|
| 27 | while read local_ref local_sha remote_ref remote_sha |
---|
| 28 | do |
---|
| 29 | if [ "$local_sha" = $z40 ] |
---|
| 30 | then |
---|
| 31 | # Handle delete |
---|
| 32 | : |
---|
| 33 | else |
---|
| 34 | if [ "$remote_sha" = $z40 ] |
---|
| 35 | then |
---|
| 36 | # New branch, examine all commits |
---|
| 37 | range="$local_sha" |
---|
| 38 | else |
---|
| 39 | # Update to existing branch, examine new commits |
---|
| 40 | range="$remote_sha..$local_sha" |
---|
| 41 | fi |
---|
| 42 | |
---|
| 43 | # Check for WIP commit |
---|
| 44 | commit=`git rev-list -n 1 --grep '^WIP' "$range"` |
---|
| 45 | if [ -n "$commit" ] |
---|
| 46 | then |
---|
| 47 | echo >&2 "Found WIP commit in $local_ref, not pushing" |
---|
| 48 | exit 1 |
---|
| 49 | fi |
---|
| 50 | fi |
---|
| 51 | done |
---|
| 52 | |
---|
| 53 | exit 0 |
---|
Note: See
TracBrowser
for help on using the repository browser.