-
Notifications
You must be signed in to change notification settings - Fork 123
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Integrate with core Git subcommand authoring features. #43
base: master
Are you sure you want to change the base?
Conversation
rather than non-portable `/bin/bash`
with POSIX-compatible code.
@tomeon Thanks for updating the tool.Can you add two more features.
|
Hello @iitzrohan -- thanks for your feedback/requests.
This is not possible.
Done. |
e270ba1
to
e694418
Compare
@iitzrohan --
I am unable to reproduce this; for me,
Thanks; should be fixed now. I've updated |
for features like CLI options processing and "am I in a git repo?" sanity-checks.
That is, remove redundant `shift` calls in the `--debug` and `--all` cases.
by conditionally defining a `debug` function based on whether the `-d/--debug` option was provided. If debugging is not enabled, the `debug` function is a NOP; otherwise, it echoes its arguments to stderr.
BREAKING CHANGE: diagnostic output no longer goes to stdout.
rather than custom editor selection code.
BREAKING CHANGE: introduces type-checking of `COMMITS`, `DEBUG`, and friends.
that provides a default value for the `COMMITS` variable. This variable is already guaranteed to be set to a positive integer (or else `git redate` will have exited).
within the body of the loop that applies the redate logic. Instead, conditionally define an `apply_redate` function depending on whether we saw `--all`, then call this function from within the loop.
rather than numbers of commits starting from HEAD (or all commits).
in help text
when generating the interactive commit selection list.
by passing the `-S`/`--gpg-sign` flag through to `commit-tree`.
by loading them via `git -c <name>=<value> --get <name>`.
BREAKING CHANGE: `git redate` exits with nonzero status in case no commits were identified.
e694418
to
96e51ea
Compare
Ping @AaronVasquez @EdmundMai -- this changeset, besides being (IMHO 😉) worthwhile on its own merits, also likely fixes a number of issues. For instance:
It also addresses or obviates several merge requests:
Is there anything I can do to help get this over the finish line? Thanks! |
Thank you for this handy tool!
This PR introduces integration with
git-sh-setup
, a library included with thecore Git distribution. It provides conveniences for authoring shell-based Git
subcommands.
Summary of features:
git redate -h
).git redate
now bails upon unrecognized options).$GIT_EDITOR
/git var GIT_EDITOR
for editing the re-dating specification file. This is a breaking change, though one that's likely to aligngit redate
with the user's already-expressed preference (e.g. whatever they've defined ascore.editor
) rather than prompting them to express a preference interactively.git redate
preferences in the Git client configuration file.Miscellaneous other changes:
$ALL
,$DEBUG
, etc., instead using conditionally-defined functions).shift
any arguments when$@
is already empty.shellcheck
linting issues.shfmt
..git
directory.Thanks for your consideration!