MCPcopy Create free account
hub / github.com/github/gh-aw / RollbackAllFiles

Method RollbackAllFiles

pkg/cli/file_tracker.go:183–199  ·  view source on GitHub ↗

RollbackAllFiles rolls back both created and modified files

(verbose bool)

Source from the content-addressed store, hash-verified

181
182// RollbackAllFiles rolls back both created and modified files
183func (ft *FileTracker) RollbackAllFiles(verbose bool) error {
184 var errors []string
185
186 if err := ft.RollbackCreatedFiles(verbose); err != nil {
187 errors = append(errors, fmt.Sprintf("created files rollback: %v", err))
188 }
189
190 if err := ft.RollbackModifiedFiles(verbose); err != nil {
191 errors = append(errors, fmt.Sprintf("modified files rollback: %v", err))
192 }
193
194 if len(errors) > 0 {
195 return fmt.Errorf("rollback errors: %s", strings.Join(errors, "; "))
196 }
197
198 return nil
199}

Callers 2

addWorkflowsWithPRFunction · 0.95

Calls 3

RollbackCreatedFilesMethod · 0.95
RollbackModifiedFilesMethod · 0.95
ErrorfMethod · 0.45

Tested by 1