Releases: stufield/gitr
Releases · stufield/gitr
gitr 0.1.0
Breaking Changes ⚠️
- Major naming convention change to package function infrastructure (#18)
- most function names that began with
git_*()are nowgitr_*() - functions that previously were
get_*()
are now unified towardsgitr_*() - this involves renaming prefix
*.Rfiles with"gitr_*.R" - renamed
'test-*.R' suite of files - many BREAKING changes! Please bear with me and be aware
- this results in a minor version increment
to indicate that the API has changed but without
committing to a full major version increment
indicating an API lock.
- most function names that began with
Bugs 🐛
- Fixed
git_version()unit test for CRAN checks- edge-case for Apple/Mac systems with non-standard
git version strings gitregex needed to be more robust and is now fixed
- edge-case for Apple/Mac systems with non-standard
gitr 0.0.2
Features 🚀
- Feature upgrade for
git_checkout()(#2)- you can now checkout either a "branch"
or a "file". File checkout is commonly
used to revert local changes to that file
to the most recent commit state. - improved edge-case catches and unit testing
- you can now checkout either a "branch"
New Functions ✨
-
git_current_sha()- self explanatory, gets current commit sha
-
git_local_br()- gets all the local branches
-
is_sha()- logical, does it look like a SHA-1 hex?
Unit tests (#5) 🦺
-
Set up special
gitrunit testing fixtures- new:
local_create_worktree() - see:
https://testthat.r-lib.org/articles/test-fixtures.html - special worktree for unit testing
- cleans up when finished each
test-*.Rfile - does the following:
- sets
gitr_echo_cmd = FALSE - creates git worktree for testing
- sets working directory to that worktree
- returns to testing working directory when complete
- deletes git worktree when complete
- sets
- new:
-
New unit tests for:
get_commit_msgs()get_recent_tag()git_checkout()git_tag_info()git_recent_tag()git_checkout()git_current_br()git_defaults_br()git_current_sha()git_version()
-
Updated
git()unit tests- now more meaningful
- previously didn't return anything (very bare bones)
- now actually tests something and uses
testthat::snapshotframework
Breaking changes! ⚠️
gclean()- parameter to
gclean()is nowdry_run(notdry.run) - note the move away from
.dot notation;
now underscore to better fit with package convention
- parameter to
Documentation 📖
- Major documentation cleanup
- updated syntax and spacing of roxygen docs
- expanded examples
- collated docs by group
Bug Fixes 🐛
-
Make
git_recent_tag()more robust (@malcook; #16)- allow for asynchronous date tagging, aka
the most "recent" tag, rather than the
alpha-numeric sorting - thanks @malcook!
git_recent_tag()no longer echos command by default- small, possibly breaking, change depending on unit tests
- mostly a UI change at the console
- allow for asynchronous date tagging, aka
-
Fixed a bug in
git_diffcommits()- indexing is now correct (
x - 1)
- indexing is now correct (
-
Fix bug in
get_pr_sha()(@stu.g.field; #10, #11)- index the
stdoutproperly in theif-else
so that the function returnsNULL
rather than""if there is no SHA to find - the presence/absence of
NULLcan then
be tested for in downstream code
- index the
Improvements 🚧
-
New
gitr_echo_cmdglobal option feature (#14)- the
echo_cmdparameter is now additionally
controlled by a global option,gitr_echo_cmd - this option defaults to
TRUE - note: the global option is takes precedence over
passed theecho_cmd =parameter insidegit()call - added color (blue) to the echoed
command whenecho_cmd = TRUE
- the
-
No longer print full diff-commit to the console
- much too verbose
- more streamlined now and user friendly
-
Fixed pipe
|escapes in README- some ZSH aliases had '|' in the definition,
messing up the table tabs in markdown syntax
- some ZSH aliases had '|' in the definition,
-
Upgrades to the pkgdown 'Git Started' in the navbar
- for the
gitrvignette introduction - more vignettes/articles to come
- for the
-
Minor tweak to
trim_sha()(#9)- returns
char(7)if a sha - otherwise no trim occurs (orig string)
- overall:
is_sha()must beTRUE
for any trimming - now vectorized;
character(1)->character(n)
- returns
gitr 0.0.1
-
Now released on CRAN! 🥳
-
The package repository was restructured
- now functions should be easier to find
- new
pkgdownwebsite was added - documentation was improved
- preparations were made for package release on CRAN
-
Samples and templates
- sample git hooks were added to package
inst/ - new sample templates include:
_gitignore_global_gitconfigcommit-msg-template
- sample git hooks were added to package