Shallow returns a file pointer for read to the shallow file
()
| 198 | |
| 199 | // Shallow returns a file pointer for read to the shallow file |
| 200 | func (d *DotGit) Shallow() (billy.File, error) { |
| 201 | f, err := d.fs.Open(shallowPath) |
| 202 | if err != nil { |
| 203 | if os.IsNotExist(err) { |
| 204 | return nil, nil |
| 205 | } |
| 206 | |
| 207 | return nil, err |
| 208 | } |
| 209 | |
| 210 | return f, nil |
| 211 | } |
| 212 | |
| 213 | // NewObjectPack return a writer for a new packfile, it saves the packfile to |
| 214 | // disk and also generates and save the index for the given packfile. |