Skip to content

[Question] - Tmp directory for remote repo's - why? #822

Closed

Description

@dazinator

I was just wondering what the reasons gitversion clones remote repositories to the %tmp% directory by default? Would it not be better to just default to using the working directory (which is a command line mandatory argument) - and then if the additional argument is provided to specify a directory to clone to, then use that argument to override the working dir?

The only reason I suggest this is because when using gitversion with a remote repo it's not immediately obvious where the repo has been put, and as the first arg is the working directory, I would have assumed it would end up there :)

Activity

  1. JakeGinnivan commented on Apr 22, 2016

    @JakeGinnivan
    Contributor

    Say you have clean sources on your build server, we would re-clone each time because the clone would get deleted each checkout making things super slow.

    We needed somewhere outside the working directory but still consistent to put the clone so it can be accessed across builds

  2. dazinator commented on Apr 22, 2016

    @dazinator
    ContributorAuthor

    Ahh ok that makes sense. How about we default to a location relative to the working directory, but allow an argument to be passed in to specify the location where repos should be placed on the system, and output a warning when in build server mode if that argument is not specified, saying that if using clean sources consider specifying a repo location so that a fresh clone isn't obtained each time.

    Arguably, if you tick "clean sources" though - doesn't it mean that you want to ensure you get a fresh copy of "everything" i.e you don't want any artifacts hanging around between builds - so the usage of the temp dir in this scenario seems to me like we are bypassing that intent under the guise of an optimisation?

  3. stale commented on Jun 29, 2019

    @stale

    This issue has been automatically marked as stale because it has not had recent activity. After 30 days from now, it will be closed if no further activity occurs. Thank you for your contributions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions