Skip to content

Fixes #387 #388

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

Merged
merged 3 commits into from
Mar 21, 2015
Merged

Fixes #387 #388

merged 3 commits into from
Mar 21, 2015

Conversation

GeertvanHorrik
Copy link
Contributor

Works on both offline and online repositories. If commit id is not found, it will fall back to latest commit (current behavior). Also includes unit tests.

@@ -11,12 +11,12 @@ public class GitVersionContext
{
readonly Config configuration;

public GitVersionContext(IRepository repository, Config configuration, bool isForTrackingBranchOnly = true)
: this(repository, repository.Head, configuration, isForTrackingBranchOnly)
public GitVersionContext(IRepository repository, Config configuration, bool isForTrackingBranchOnly = true, string commitId = null)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this should be on the config with the branch and such? Otherwise looks good

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To me, Config is something you read from the yaml file. This is not something you want to read from the yaml file (because it's too dynamic). I can easily move it to the config class though, just let me know what you prefer.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you are right actually. Was thinking config included other arguments and such.

@JakeGinnivan
Copy link
Contributor

@SimonCropp is this something that should be on the Task? I can't see it being used but just wanted to check

@JakeGinnivan JakeGinnivan merged commit 4d679ff into GitTools:master Mar 21, 2015
@GeertvanHorrik GeertvanHorrik deleted the pr/specificcommit branch March 21, 2015 15:28
@GeertvanHorrik GeertvanHorrik restored the pr/specificcommit branch May 25, 2015 14:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants