question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error when committing without "author"

See original GitHub issue

In the documentation author doesn’t appear as required for commit but this error is thrown:

models.js:440 Uncaught (in promise) TypeError: Cannot read property '_named' of undefined
    at isNamedSection (models.js:440)
    at GitConfig.get (models.js:460)
    at config (commands.js:135)

The error goes away if I specify author.

My guess is that all commits must have an author so it should be marked as required.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:6 (5 by maintainers)

github_iconTop GitHub Comments

3reactions
wmhiltoncommented, Mar 21, 2018

I guess it’s not required because you can also set it using config.

That’s exactly it. I think the fix will actually be to throw a better error. I’m guessing it’s throwing that error because it can’t find a “user” section in the config. @TomasHubelbauer actually has a PR to fix a problem in the config parser, so once I merge that, I’ll fix this, and then the config should just return undefined instead of throwing an error, and then I’ll add a check to make sure that author.name && author.email are not undefined, and if THAT is the case, throw a nice “Author name and email must be specified as an argument or in the .git/config file” error.

1reaction
wmhiltoncommented, Apr 3, 2018

Yeah, I’ve noticed that on my laptop, but not on my desktop. (I develop on Windows 10 as my primary OS.) I think it just “happens” to work in Git Bash because it creates a virtual link from /tmp to %TEMP%.

I’ll drop a PR at https://github.com/Thinkmill/jest-fixtures/pull/4

@TomasHubelbauer temporarily you can try npm install https://github.com/wmhilton-contrib/jest-fixtures#win32 If that works, then we can switch the devDependency to point at the fork, or if the PR gets merged and published then we can just update the version.

edit: I ran into one more problem running the tests on my laptop, so I finally made PR #119 which should fix these issues

Read more comments on GitHub >

github_iconTop Results From Across the Web

fatal: No existing author found with 'XXX' - git commit
When I run git commit --author "bob" , I got an error fatal: No existing author found with 'bob' . How can I...
Read more >
invalid author - gerrit-review
If pushing to Gerrit fails with the error message "invalid author" and somebody else is author of the commit for which the push...
Read more >
Fix git commit author - Waylon Walker
Running the following command will reset the author on the current commit. Double check with a quick git log that the author was...
Read more >
Git Github Author Identity Unknown Commit Error ... - YouTube
Git Github Author Identity Unknown Please tell me who you are error Build Your own landing page ...
Read more >
PyCharm + Git problem: "no existing author found with ..."
"Error: fatal: No existing author found with 'MYNAME' during executing git commit ... The name used for this commit is the same name, ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found