Skip to content

Commit 8ef9b54

Browse files
committed
llb: document fragment parameter in llb.Git
Signed-off-by: Tonis Tiigi <[email protected]>
1 parent 1ef2851 commit 8ef9b54

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

client/llb/source.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -247,6 +247,10 @@ const (
247247
// Formats that utilize SSH may need to supply credentials as a [GitOption].
248248
// You may need to check the source code for a full list of supported formats.
249249
//
250+
// Fragment can be used to pass ref:subdir format that can set in (old-style)
251+
// Docker Git URL format after # . This is provided for backwards compatibility.
252+
// It is recommended to leave it empty and call GitRef(), GitSubdir() options instead.
253+
//
250254
// By default the git repository is cloned with `--depth=1` to reduce the amount of data downloaded.
251255
// Additionally the ".git" directory is removed after the clone, you can keep ith with the [KeepGitDir] [GitOption].
252256
func Git(url, fragment string, opts ...GitOption) State {

frontend/dockerfile/dockerfile_addgit_test.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -522,7 +522,6 @@ ADD %s /repo/
522522
require.Equal(t, tc.expectOut, string(dt))
523523
})
524524
}
525-
526525
}
527526

528527
func applyTemplate(tmpl string, x any) (string, error) {

0 commit comments

Comments
 (0)