iankelling.org
/
git
/
distro-setup
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
d46dd555d2c896a319c0ac4b96d5fe7ccef75ed2
[distro-setup]
/
auto-commit-changes
1
#!/bin/bash
2
3
commit
() {
4
if
!
git
diff
--quiet
||
!
git
diff
--cached --quiet
;
then
5
# even with -q, it emits a newline into stderr
6
git commit
-qam
autocommit
2
>/
dev
/
null
7
fi
8
}
9
10
11
12
if
[[
$1
]];
then
13
for
dir
;
do
14
cd
$dir
15
commit
16
done
17
else
18
commit
19
fi