Re: Trivial enhancement: All commands which require an author should accept --author
- From
Johannes Schindelin <johannes.schindelin@gmx.de>
- Date
- Aug 29, 2018, 16:14 UTC
- Message-ID
- <nycvar.QRO.7.76.6.1808291653190.71@tvgsbejvaqbjf.bet>
- In-Reply-To
- <201808282305.29407.ulrich.gemkow@ikr.uni-stuttgart.de>
Hi Ulrich,
On Tue, 28 Aug 2018, Ulrich Gemkow wrote:
Show 7 quoted lines
> A trivial enhancement request: > > All commands which require that the author is set (and complain if > it is not set) should accept the option --author. > > At least the command stash does not accept this option. We are using > git version 2.17.1 (Ubuntu 18.04).
The `stash` command only incidentally requires that the author is set, as it calls `git commit` internally (which records the author). As stashes are intended to be local only, that author information was never meant to be a vital part of the `stash`.
I could imagine that an even better enhancement request would ask for `git stash` to work even if `user.name` is not configured.
However, to get you unblocked: what you ask for exists already, in some form:
git \ -c user.name="Ulrich Gemkow" \ -c user.email=ulrich.gemkow@ikr.uni-stuttgart.de \ stash
Granted, this is not the nicest way to specify it, but you are probably scripting things for environments where you do not really want to configure an author, right?
Ciao, Johannes