Commit Graph

9 Commits

Author SHA1 Message Date
Simon Michael
02b673e516 ;bin: git: tweak help, add commit -n example 2023-02-20 16:25:36 -10:00
Simon Michael
a37da26ee9 ;bin: hledger-git: record: better error output 2023-02-03 19:07:28 -10:00
Simon Michael
ae26ae6294 ;bin: hledger-git: status command also shows diffs 2023-02-02 21:12:16 -10:00
Simon Michael
1e1b26261d ;fix: bin: hledger-git: add short command aliases r, s, l 2023-02-01 13:30:21 -10:00
Simon Michael
e986bdf2d5 ;fix: bin: hledger-git: fix -h; pass unrecognised commands to git 2023-02-01 13:30:21 -10:00
Simon Michael
c477c59247 ;fix: bin: hledger-git: don't forcibly add ignored files 2023-02-01 13:30:21 -10:00
Simon Michael
c8c920cbe0 ;fix: bin: hledger-git: fix status command 2023-02-01 13:30:21 -10:00
Patrick Fiaux
b3de7e59af fix: cli: updates hledger-git record command to use plain git
This fixes the issue in https://github.com/simonmichael/hledger/issues/1942.
Instead of relying on a `git record` alias being present `hledger git record`
uses only vanilla git.

The expected alias for record is:
```
record = ! sh -c '(git add -p -- $@ && git commit) || git reset' --
```

The removed `git record` is in the script is implemented using:
- `git commit` with the given messages (and additional arguments if given)
- `git reset` if the commit fails

`git add -p` isn't needed because the files are added already above. Also
this would be interactive which isn't the goal for this call.

The message still defaults to the date if not given, however I had to add
a check to only shift if arguments were passed in, otherwise shift fails.
2022-11-26 08:51:00 -05:00
Simon Michael
a7d4c3ad1e bin: hledger-git, hledger-pijul 2022-04-20 23:23:36 -10:00