add -u arg for fetch

This commit is contained in:
Stephanie You
2023-09-15 10:49:21 -07:00
parent ae27cd3cd8
commit 140f25a8d7
2 changed files with 9 additions and 0 deletions

View File

@@ -143,6 +143,11 @@ func constructInterpolatedDoltFetchQuery(apr *argparser.ArgParseResults) (string
if apr.Contains(cli.PruneFlag) {
writeToBuffer("'--prune'")
}
if user, hasUser := apr.GetValue(cli.UserFlag); hasUser {
writeToBuffer("'--user'")
writeToBuffer("?")
params = append(params, user)
}
for _, arg := range apr.Args {
writeToBuffer("?")
params = append(params, arg)

View File

@@ -162,6 +162,8 @@ SQL
}
@test "sql-server-remotesrv: clone/fetch/pull from remotesapi port with authentication" {
skip "only support authenticating fetch with dolthub for now."
mkdir remote
cd remote
dolt init
@@ -234,6 +236,8 @@ SQL
}
@test "sql-server-remotesrv: clone/fetch/pull from remotesapi port with clone_admin authentication" {
skip "only support authenticating fetch with dolthub for now."
mkdir remote
cd remote
dolt init