starting to write the commit functions
This commit is contained in:
@@ -105,7 +105,6 @@ func (m *Manager) AddFileToRepo(relFilePath string) error {
|
||||
// f := NewFileManager()
|
||||
//DELAYED: this feature affects only large files and user experience. It can wait.
|
||||
relFilePath = strings.TrimSpace(relFilePath) //purging any odd spaces TODO: Make sure not needed
|
||||
fmt.Println("Checking for file: ", relFilePath)
|
||||
var tmpFile database.File
|
||||
filename := filepath.Base(relFilePath)
|
||||
var hash [16]byte
|
||||
@@ -160,3 +159,12 @@ func (m *Manager) prepareDatabaseForFile(tmpFile database.File) (int, error) {
|
||||
return fileID, nil
|
||||
|
||||
}
|
||||
|
||||
// FetchTrackedFiles just grabbes all the files currently tracked in the repo
|
||||
func (m *Manager) FetchTrackedFiles() ([]database.File, error) {
|
||||
files, err := m.dB.RetrieveTrackedFiles()
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("unable to retrieve tracked files: %s", err)
|
||||
}
|
||||
return files, nil
|
||||
}
|
||||
|
Reference in New Issue
Block a user