Open Ithilias opened 5 years ago
Can't ungit use local repo user?
Ungit uses "nearest" config. If local config is set it will use local config. If not it will use global.
Are you asking for more specific way using ungit's config rather than git's config?
On command line you can set an author like this:
git commit -m "foo bar" --author="Foo Bar <foo.bar@bar.foo>"
I'm asking for a similar function in ungit.
This might help understanding my issue:
Other thought that comes to my mind is to specify several authors in the ungit config and replace the author input with a dropdown or suggest an author on input.
Hmm, I'm little reluctant to implement what is described as it would mean one would have to input non default email every time one commits if one wants different email per commit.
What I think it might be more tangible is an option to provide commit email in .ungitrc
. Now, this implies that for the shared environments you might want to run multiple instances of ungit running but commit email is configured per ungit.
I guess I'm not yet convinced that committer email should be a config that needs to be altered adhoc
It seems the underlying issue is whether ungit should work more like a desktop app or like a web app. Ungit is currently not used as a desktop app (i.e. electron app) but running as a web server. That's inviting to let many users use the same ungit instance. (Running several just for the author would also increase maintenance and be wasteful). IMHO there should a local user config where the last used author and/or committer is saved. If it isn't saved, it is read like you described from the config. Local Storage is a candidate for local user config.
hmm you are right, it is bit wasteful to have multiple process just for the sake of author.
I do agree that local storage is better and would have to implement something on the UI side to fix this.
It would be very nice to optionally set an author for a commit. So if several people are working with the same ungit environment, they don't have to change the global git settings.