|
1 | 1 | #!/usr/bin/env bash |
2 | | -# Proof of concept script to use Bash to produce report of file counts from git status. |
| 2 | +# Proof of concept script to use Bash to produce report of file counts from git |
| 3 | +# status. |
3 | 4 | # |
4 | | -# Run this as a standalone report, not as a hook. If you use this as a hook, it will |
5 | | -# print output in the console only not add to commit message |
| 5 | +# Run this as a standalone report, not as a hook. If you use this as a hook, it |
| 6 | +# will print output in the console only not add to commit message |
6 | 7 | # |
7 | 8 | # See simple-hook.sh script for how CHANGES |
8 | 9 | # would get written out to a commit message file. |
9 | 10 | # |
10 | | -# This script will get count of files added, modified, deleted and renamed/moved and output it. |
11 | | -# Note that modified and renamed/moved can both apply to the same file. |
| 11 | +# This script will get count of files added, modified, deleted and renamed/moved |
| 12 | +# and output it. Note that modified and renamed/moved can both apply to the same |
| 13 | +# file. |
12 | 14 | # This does not support C (copied). |
13 | 15 |
|
14 | 16 | # This report uses git status and passes it do the steps below to parse it. |
15 | 17 | # A more flexible approach (for unit tests for example) would be for this |
16 | | -# script to handle the status and call another script to do the parsing and result. Then |
17 | | -# the script could be used separate from git and so accept a filename or stdin. |
| 18 | +# script to handle the status and call another script to do the parsing and |
| 19 | +# result. Then the script could be used separate from git and so accept a |
| 20 | +# filename or stdin. |
18 | 21 |
|
19 | 22 | # Status summary excluding untracked files using a flag. |
20 | 23 | CHANGES=$(git status -s -uno --porcelain) |
|
0 commit comments