Skip to content

Conversation

@JakeGinnivan
Copy link
Contributor

Replaces #269

This is #269 rebased plus fixed the test so it runs all the time and not against remote repo

@dazinator
Copy link
Contributor

@JakeGinnivan
When I ran this, after the clone occurred:
image

I checked the _dynamicrepository directory expecting to see a .git repo.

Instead I see an empty folder:

image

Is this correct? I was kind of expecting to see my git repo located there!

@JakeGinnivan
Copy link
Contributor Author

@GeertvanHorrik help! :)

@JakeGinnivan
Copy link
Contributor Author

@dazinator do you have hidden folders turned on? the .git folder could be hidden. The code says not to check anything out

@dazinator
Copy link
Contributor

Ah gees - I am using a new laptop today - and yes.. do not show hidden files is turned on.

Damn you Windows!

Hits self on head with large object

image

@dazinator
Copy link
Contributor

Cool - this seems to be running well based on my own local testing. I have not tried plugging it in to a team city build yet, I'm curious to know if it will allow the checkout on agent scenario. I will try that next. Cheers Guys!

@GeertvanHorrik
Copy link
Contributor

We do a bare clone (not a checkout since we don't need that). That means that you only have the hidden .git folder. For another project, GitLink, I have created this:

https://github.com/CatenaLogic/GitLink/blob/develop/src/GitLink/TemporaryFilesContext.cs

Maybe good to copy/paste to ensure the removing of temporary files? Or are they already being deleted? (I am not sure, done so many projects I simply forgot).

@dazinator
Copy link
Contributor

I found a problem :(

Because we don't checkout the repo - the files don't exist on disk. This includes the "NextVersion.txt" file which GitVersion expects to be on disk in the repo directory - so it won't ever find that file at the moment!

I'm not that familiar with libgit2sharp - would it be possible to query the git repo to see if has such a file and then if it does, check it out? I think that's the only bit that's missing.

@SimonCropp
Copy link
Contributor

ok going merge this. @dazinator can u raise a new issue for the nextversion issue and we will work on that separately.

SimonCropp added a commit that referenced this pull request Jan 17, 2015
@SimonCropp SimonCropp merged commit ca002ed into GitTools:master Jan 17, 2015
@GeertvanHorrik
Copy link
Contributor

@dazinator
Copy link
Contributor

Thanks @GeertvanHorrik - from looking at that code - it seems that nextversion txt checkout only happens if you pass in a targetbranch argument - which I'm not doing so that may explain it. I'll raise a seperate issue #351

@SimonCropp
Copy link
Contributor

@dazinator thanks

1 similar comment
@SimonCropp
Copy link
Contributor

@dazinator thanks

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.

4 participants