Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix unwanted autosync on recipients save #848

Merged
merged 1 commit into from
Jun 5, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions pkg/store/sub/move.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ func (s *Store) delete(ctx context.Context, name string, recurse bool) error {
return errors.Wrapf(err, "failed to commit changes to git")
}

// abort if auto sync is not set
if !IsAutoSync(ctx) {
return nil
}
Expand Down
5 changes: 5 additions & 0 deletions pkg/store/sub/recipients.go
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,11 @@ func (s *Store) saveRecipients(ctx context.Context, rs []string, msg string, exp
}
}

// return if autosync is not enabled
if !IsAutoSync(ctx) {
return nil
}

// push to remote repo
if err := s.rcs.Push(ctx, "", ""); err != nil {
if errors.Cause(err) == store.ErrGitNotInit {
Expand Down
1 change: 1 addition & 0 deletions pkg/store/sub/write.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ func (s *Store) gitCommitAndPush(ctx context.Context, name string) error {
return errors.Wrapf(err, "failed to commit changes to git")
}

// abort if autosync is not set
if !IsAutoSync(ctx) {
return nil
}
Expand Down