-
-
Notifications
You must be signed in to change notification settings - Fork 1
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
Git commit throws error when no user.name/user.email is known in Git repo #15
Comments
Interesting. Yes there is great potential for git errors and they should be handled better. I don't know if it's best to wait for #11 though. I thought I had coded the commit wrapper to use the logged in email/name as fallback, or perhaps I just thought it or added a TODO comment.
Agree, or is there some equivalent of database rollback available in PHP? That is, encapsulating statements into a "transaction". |
The username/email will have to be added to the config of the local Git first. Can the current lib do that?
I'm afraid that as long as Git doesn't provide it, it would be impossible for any language to implement a language construct for it... I'm also afraid that another library will not provide such action. It will probably remain a manual action inside the catch. Does the current lib provide a method to remove staged items? |
I'm not seeing the original problem reported here. My client made a commit through Pushy that was correctly attributed to her name and email, even though git is configured to use something else on that server.
Actually it uses it first with a TODO to "add a fallback".
I don't know and the library needs replacing anyway. Perhaps I will add the author configured for the repo as a further setup requirement to the docs. I am unsure about the plugin going too far into repository metadata. I guess because I don't want it to be going into dangerous territory, or being perceived that way. It's kind of about building trust (I don't know). |
That's probably right. I hoped one might emulate a rollback using some magic with PHP. |
Replying to myself, I thought just earlier that I really should be setting up a test site for working on this plugin so I can properly try to reproduce issues and generally work in safety. I have been working very carefully in a real repo which is sure to bite me one day :/ |
When committing pages to the Git repo (
PushyRepo::commit()
) , the Git library complains that user.name and user.email are unknown. They are however available at the global level.--author
from execute command does not solve the issuename <email>
hardcoded in the commit statement does not helpA side effect of this is that changes have been staged and will no longer be visible in the list of pages in Admin. Manual unstaging is needed.
Suggestion:
The text was updated successfully, but these errors were encountered: