Giter Site home page Giter Site logo

Comments (4)

sisp avatar sisp commented on May 27, 2024 1

I don't think your suggested solution would work because Copier's update algorithm relies on a stable Git ref for replaying a fresh project creation using the old template version. If _commit: HEAD were to be logged, then the Git ref would be ambiguous and the update algorithm wouldn't be able to determine the old template version.

I'm not sure I understand your use case of collocating a template and a project generated by that template in the same Git repo. Is this project the only project that uses the template? If so, why do you need a template at all?

from copier.

yajo avatar yajo commented on May 27, 2024 1

I guess you do that because it's easy for testing, right? I do the same, but I use https://github.com/KyleKing/copier-template-tester, which was made for that and already works around the problem you're talking about.

I'll close this issue because I think this will work for you, but feel free to reopen otherwise.

from copier.

huxuan avatar huxuan commented on May 27, 2024

BTW, HEAD is not a valid branch name, so it will not be a problem as mention here: #184 (comment)

from copier.

huxuan avatar huxuan commented on May 27, 2024

I don't think your suggested solution would work because Copier's update algorithm relies on a stable Git ref for replaying a fresh project creation using the old template version. If _commit: HEAD were to be logged, then the Git ref would be ambiguous and the update algorithm wouldn't be able to determine the old template version.

Thanks for the explanation, I did not think of that problem before.

I'm not sure I understand your use case of collocating a template and a project generated by that template in the same Git repo. Is this project the only project that uses the template? If so, why do you need a template at all?

Actually, I want to use the generated project with default values as a straightforward demo for the template. Maybe that is not a good choice, I may consider split them in the future.

I guess you do that because it's easy for testing, right? I do the same, but I use https://github.com/KyleKing/copier-template-tester, which was made for that and already works around the problem you're talking about.

I'll close this issue because I think this will work for you, but feel free to reopen otherwise.

Thanks for the information, I will look into that. Yes, it is OK to close this issue, since the request is not valid as explained by @sisp.

from copier.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.