tool(autocommit): print watched file repo info Just to prevent committing to the wrong repo.
shwarp
Sun, 30 Aug 2026 15:23:54 -0400
1 files changed,
11 insertions(+),
0 deletions(-)
jump to
M
tools/autocommit
→
tools/autocommit
@@ -21,6 +21,17 @@ then
echo "'${DIRECTORY}' must be an initialised GIT directory" fi +echo "Using GIT directory '${DIRECTORY}':" +echo +echo -e "Changes:\t$(git -C "$DIRECTORY" log --oneline|wc -l)" +echo -e "Last commit:\t$(git -C "$DIRECTORY" log -1 --format=format:%s)" +echo -ne "First change:\t$(git -C "$DIRECTORY" log --format=format:%aD | tail -1) " +echo "($(git -C "$DIRECTORY" log --format=format:%ar | tail -1))" +echo -ne "Last change:\t$(git -C "$DIRECTORY" log -1 --format=format:%aD) " +echo "($(git -C "$DIRECTORY" log -1 --format=format:%ar))" +echo +echo "Now watching '${DIRECTORY}/${FILE}' for changes >> " + while true do cd "$DIRECTORY"