Some fixes to 'annotatedTag' and 'commit'
See original GitHub issuehttps://github.com/isomorphic-git/isomorphic-git/pull/621#issuecomment-446284927
I just noticed this in the code:
tagger.timestamp !== undefined && tagger.timestamp !== null
That’s functionally equivalent to:
tagger.timestamp != null
There’s no reason to check for exactly null and undefined.
https://github.com/isomorphic-git/isomorphic-git/pull/621#issuecomment-446286045
I also noticed that if the tagger object passed in is missing name or email, the object is modified directly. I don’t think a function should have side effects.
And one more thing. I think the message should default to the tag name (i.e., ref) instead of being blank. That’s a pretty typical git practice.
Thanks @mojavelinux! And sorry I didn’t notice these viewpoints.
Issue Analytics
- State:
- Created 5 years ago
- Comments:6 (6 by maintainers)
Top Results From Across the Web
Git - Tagging - Git SCM
Annotated Tags The -m specifies a tagging message, which is stored with the tag. If you don't specify a message for an...
Read more >Fix git tagging? - Stack Overflow
If the name already points to a commit, it does nothing. If the name somehow points to a tree or blob, it produces...
Read more >Git Tagging Explained - Initial Commit
There are two different types of git tags - lightweight and annotated. Lightweight tags are a simple reference to a specific commit.
Read more >fix(bug): Using annotated tags now returns the correct commit ...
A customer was experiencing an issue when trying to specify commits using an annotated tag. The find_matching_rev function was returning the SHA of...
Read more >Git Create Tag Guide {Annotated and Lightweight}
Git create tag guide (lightweight and annotated) explains how can you create and view tags in a Git project.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
The reason I know this is because I went on exactly the same journey not that long ago.
@mojavelinux
Hahaha yes there IS a reason! I’ll see if you can think of the edge case. 😉 @yuhr you’ll have to put these checks back.
Hmm. Yeah we can change that.