Skip to content

Commit c05217b

Browse files
committed
Use from-repository instead of from-repository
This is consistent with the `init` section.
1 parent 893eb78 commit c05217b

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

config/profile.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -349,7 +349,7 @@ type CopySection struct {
349349
GenericSectionWithSchedule `mapstructure:",squash"`
350350
Initialize bool `mapstructure:"initialize" description:"Initialize the secondary repository if missing"`
351351
InitializeCopyChunkerParams maybe.Bool `mapstructure:"initialize-copy-chunker-params" default:"true" description:"Copy chunker parameters when initializing the secondary repository"`
352-
FromRepository ConfidentialValue `mapstructure:"from-repo" argument:"from-repo" description:"Source repository to copy snapshots from"`
352+
FromRepository ConfidentialValue `mapstructure:"from-repository" argument:"from-repo" description:"Source repository to copy snapshots from"`
353353
FromRepositoryFile string `mapstructure:"from-repository-file" argument:"from-repository-file" description:"File from which to read the source repository location to copy snapshots from"`
354354
FromPasswordFile string `mapstructure:"from-password-file" argument:"from-password-file" description:"File to read the source repository password from"`
355355
FromPasswordCommand string `mapstructure:"from-password-command" argument:"from-password-command" description:"Shell command to obtain the source repository password from"`

config/profile_test.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1490,7 +1490,7 @@ func TestGetInitStructFields(t *testing.T) {
14901490
require.NoError(t, profile.SetResticVersion(resticVersion14.Original()))
14911491
assert.Equal(t, map[string][]string{
14921492
"from-key-hint": {"key-hint"},
1493-
"from-repo": {"repo"},
1493+
"from-repository": {"repo"},
14941494
"from-repository-file": {"repo-file"},
14951495
"from-password-file": {"pw-file"},
14961496
"from-password-command": {"pw-command"},
@@ -1566,7 +1566,7 @@ func TestGetCopyStructFields(t *testing.T) {
15661566
// copy
15671567
assert.Equal(t, map[string][]string{
15681568
"from-key-hint": {"src-key-hint"},
1569-
"from-repo": {"src-repo"},
1569+
"from-repository": {"src-repo"},
15701570
"from-repository-file": {"src-repo-file"},
15711571
"from-password-file": {"src-pw-file"},
15721572
"from-password-command": {"src-pw-command"},
@@ -1584,7 +1584,7 @@ func TestGetCopyStructFields(t *testing.T) {
15841584
assert.Equal(t, map[string][]string{
15851585
"copy-chunker-params": {},
15861586
"from-key-hint": {"src-key-hint"},
1587-
"from-repo": {"src-repo"},
1587+
"from-repository": {"src-repo"},
15881588
"from-repository-file": {"src-repo-file"},
15891589
"from-password-file": {"src-pw-file"},
15901590
"from-password-command": {"src-pw-command"},
@@ -1671,7 +1671,7 @@ func TestGetCopyToStructFields(t *testing.T) {
16711671
// copy
16721672
assert.Equal(t, map[string][]string{
16731673
"from-key-hint": {"src-key-hint"},
1674-
"from-repo": {"src-repo"},
1674+
"from-repository": {"src-repo"},
16751675
"from-repository-file": {"src-repo-file"},
16761676
"from-password-file": {"src-pw-file"},
16771677
"from-password-command": {"src-pw-command"},
@@ -1689,7 +1689,7 @@ func TestGetCopyToStructFields(t *testing.T) {
16891689
assert.Equal(t, map[string][]string{
16901690
"copy-chunker-params": {},
16911691
"from-key-hint": {"src-key-hint"},
1692-
"from-repo": {"src-repo"},
1692+
"from-repository": {"src-repo"},
16931693
"from-repository-file": {"src-repo-file"},
16941694
"from-password-file": {"src-pw-file"},
16951695
"from-password-command": {"src-pw-command"},

0 commit comments

Comments
 (0)