From 36cfd6b9fa8d729172f90e8fdd507349905d4f11 Mon Sep 17 00:00:00 2001 From: tv Date: Fri, 13 Nov 2026 14:01:19 +0000 Subject: populate: follow branches and tags of git sources A ref that consists of 4 to 40 hex digits is a commit, which populate fetches only if the work tree lacks it, unless fetchAlways is set. Any other ref is a branch or tag, which populate fetches on every run, resetting the work tree to the commit fetched. Resetting to the name itself resolves to a local branch, which fetching doesn't move. --- README.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'README.md') diff --git a/README.md b/README.md index d88f4e1..2784a9d 100644 --- a/README.md +++ b/README.md @@ -560,7 +560,11 @@ Supported attributes: URL of the Git repository that should be fetched. * `ref` - - Branch / tag / commit that should be fetched. + Branch / tag / commit that should be fetched. A branch or tag gets fetched + on every run, so the work tree follows it. A commit, given by its hash or a + prefix thereof of at least four hex digits, only gets fetched if the work + tree lacks it, unless `fetchAlways` is set. So a branch or tag whose name + consists of hex digits only counts as a commit. * `clean.exclude` - List of patterns that should be excluded from Git cleaning. -- cgit v1.3.1