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.