[
https://issues.apache.org/jira/browse/BUILDR-222?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12654926#action_12654926
]
Assaf Arkin commented on BUILDR-222:
------------------------------------
Awesome. A few comments:
When you call Git.commit, it supers into a "common" commit (but only for SVN
and Git, not Hg) which then subs through a bin method to perform the actual
command, which doesn't mean the same thing in all VCS. In terms of readability,
there's more code to deal with than if the commit method was never shared.
Git.commit is sometimes commit, but sometimes it's pushes, which happens to be
closer in spirit to an SVN commit, which just means the method name is not
self-describing.
Vcs::Base.execute requires 8 lines (!) to deal with the :nofail option, which
in turn is only used once by Git's uncommitted_files method. Everybody gets to
share that code path, though. Much simpler is to have uncommited_files deal
with its own personal issues, changing its first line to:
status = `git status`
Git.applies_to? should look for .git (or .git/config) in the current directory
instead of running git branch. As a result of this change, you'll only be able
to make a release from a buildfile at the root of the project, a good
restriction to have.
Are both vcs and guess_vcs method necessary?
> Support Git as a version control system
> ---------------------------------------
>
> Key: BUILDR-222
> URL: https://issues.apache.org/jira/browse/BUILDR-222
> Project: Buildr
> Issue Type: Improvement
> Components: Core features
> Reporter: Alexis Midon
> Attachments: BUILDR-222-0001-git-support-for-release.txt
>
>
> The Release task uses Subversion to check for uncommitted files and tag the
> source repository.
> Of course this fails when your project does not use Subversion but Git for
> instance.
> The improvement could be to provide a VCS abstraction with 2 implementations:
> Subversion and Git.
> A method could instantiate the proper implementation.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.