fix: remote git taskfile cloning and directory includes by vmaerten · Pull Request #2602 · go-task/task

added 2 commits

December 23, 2025 19:56
…xplicit ref

When no ref is specified in a remote Taskfile URL, go-getter was being
passed ref=HEAD which git interprets as a literal branch name, causing
"Remote branch HEAD not found" errors.

Now we omit the ref parameter entirely when not specified, letting git
clone the remote's default branch.
When a remote Taskfile includes another Taskfile using a directory path
(e.g., `taskfile: ./website`), use fsext.SearchPath to properly resolve
it by searching for Taskfile.yml inside the directory.

This also simplifies the logic by delegating all path resolution to
SearchPath, which handles both file and directory paths.

@vmaerten vmaerten changed the title fix(taskfile): omit ref param when cloning remote git repos without e… fix: remote git taskfile cloning and directory includes

Dec 23, 2025

@vmaerten vmaerten marked this pull request as ready for review

December 23, 2025 19:25

@vmaerten vmaerten deleted the fix/remote-git-default-branch branch

January 14, 2026 18:43

vmaerten added a commit that referenced this pull request

Jan 14, 2026

Copilot AI pushed a commit to libor-m/task that referenced this pull request

Mar 27, 2026
Co-authored-by: libor-m <1497769+libor-m@users.noreply.github.com>

Copilot AI pushed a commit to libor-m/task that referenced this pull request

Mar 27, 2026
Co-authored-by: libor-m <1497769+libor-m@users.noreply.github.com>