Skip to content
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

copier copy didn't copy my uncommit file even though I added -r HEAD option #1887

Open
kamontat opened this issue Dec 12, 2024 · 0 comments
Open
Labels
bug triage Trying to make sure if this is valid or not

Comments

@kamontat
Copy link

kamontat commented Dec 12, 2024

Describe the problem

copy on repository contains uncommit files doesn't works even when added -r HEAD option.

Template

hello {{name}}

To Reproduce

  1. Create empty directory
  2. Create copier.yaml contains content below
_min_copier_version: 9.4.1
_subdirectory: templates
name:
  type: str
  help: What is your name?
  1. Create templates directory and file named message.txt
  2. The file should contains hello {{name}}
$PWD/example:
  copier.yaml: |
    _min_copier_version: 9.4.1
    _subdirectory: templates
    name:
      type: str
      help: What is your name?
  templates/message.txt: |
    hello {{name}}
  1. Run copier copy . .temp and it should works normally
  2. Run git init
  3. Rerun copier copy . .temp again and it doesn't works anymore
  4. Even with copier copy -r HEAD . .temp, it doesn't works as well

CleanShot 2024-12-12 at 17 50 31@2x

Logs

.../copier/9.4.1/venv/lib/python3.12/site-packages/copier/vcs.py:209: DirtyLocalWarning: Dirty template changes included automatically.
  warn(

Copying from template version 0.0.0.post1.dev0+9e08b53

Expected behavior

it copy templates to target directory.

Screenshots/screencasts/logs

No response

Operating system

macOS

Operating system distribution and version

MacOS 15.1.1

Copier version

copier 9.4.1

Python version

Python 3.12.2

Installation method

pip+pypi

Additional context

No response

@kamontat kamontat added bug triage Trying to make sure if this is valid or not labels Dec 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug triage Trying to make sure if this is valid or not
Projects
None yet
Development

No branches or pull requests

1 participant