diff options
-rw-r--r-- | .whenwasit | 11 | ||||
-rwxr-xr-x | pre-commit | 4 | ||||
-rw-r--r-- | readme.md | 5 |
3 files changed, 20 insertions, 0 deletions
diff --git a/.whenwasit b/.whenwasit new file mode 100644 index 0000000..4fcc904 --- /dev/null +++ b/.whenwasit @@ -0,0 +1,11 @@ +,1692916976,1692931791,1692931622 +Cargo.toml,1692916976,1692927476,1692931525 +.whenwasit-ignore,1692930937,1692931474,1692931525 +Cargo.lock,1692916991,1692927476,1692931525 +readme.md,1692917240,1692931776,1692931776 +.whenwasit,1692931791,1692931791,1692931791 +.gitignore,1692916976,1692916976,1692919305 +.rustfmt.toml,1692917231,1692917231,1692919305 +pre-commit,1692931609,1692931684,1692931684 +src,1692916976,1692916976,1692917221 +src/main.rs,1692916976,1692931320,1692931525 diff --git a/pre-commit b/pre-commit new file mode 100755 index 0000000..2867963 --- /dev/null +++ b/pre-commit @@ -0,0 +1,4 @@ +#!/bin/bash +# example of how it might be used in a git hook +whenwasit --ignore .whenwasit-ignore . > .whenwasit +git add .whenwasit \ No newline at end of file diff --git a/readme.md b/readme.md index 734e81f..b49a9eb 100644 --- a/readme.md +++ b/readme.md @@ -9,6 +9,11 @@ dumps csv output on stdout, errors abort with a panic. You can use the flag `--ignore` to stop it from descending into directories. The flag takes a path to a file that contains a list of directory to ignore, relative to the path given to whenwasit. +See [.whenwasit-ignore](/.whenwasit-ignore) as an example. + +For an example on how you might use whenwasit as a git hook, see +[pre-commit](/pre-commit). It runs whenwasit before commit, +makes the file [.whenwasit](/.whenwasit), and adds it to the commit. **CSV Output Defintion:** data is output on `stdout` in a CSV format. because there are |