[PATCH 0/3] show alias definitions in help
From: Jeff King <hidden>
Date: 2016-06-15 22:44:16
This was requested during the freeze period, and I posted a "like this?"
patch with a promise to follow-up post-1.5.4. So here is the follow-up.
The objections to my quick patch were:
- (Dscho) the parsing code was ugly and needed cleanup; the first
patch refactors cmd_help to use parseopt
- (Duy) help lookup should respect the usual "commands before alias"
rule that we use for execution; the third patch takes this into
account
1/3: help: use parseopt
This is parseopt plus general cleanup.
2/3: make alias lookup a public, procedural function
Another cleanup to factor out alias lookup from git.c (which
we will also need in help now).
help: respect aliases
The actual patch.
Makefile | 3 +-
alias.c | 22 +++++++++
cache.h | 2 +
git.c | 17 +------
help.c | 152 ++++++++++++++++++++++++++++++++++++--------------------------
5 files changed, 118 insertions(+), 78 deletions(-)
create mode 100644 alias.c