Skip to content

Commit

Permalink
Fix bug with restic 0.15 change
Browse files Browse the repository at this point in the history
  • Loading branch information
CGamesPlay committed Jan 18, 2023
1 parent f4339f1 commit fa42e17
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ bins:
gox -osarch "$(OSARCHS)" -output "bin/{{.OS}}_{{.Arch}}/git-remote-restic" $(GOFLAGS_release) $(PKG)/cmd/git-remote-restic

.PHONY: release
release: $(patsubst %,bin/%.tar.gz,$(subst /,_,$(OSARCHS)))
release: test $(patsubst %,bin/%.tar.gz,$(subst /,_,$(OSARCHS)))

define ruletemp
$(patsubst %,bin/%.tar.gz,$(subst /,_,$(1))): $(patsubst %,bin/%/git-remote-restic,$(subst /,_,$(1)))
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.1.14
1.1.15
2 changes: 1 addition & 1 deletion cmd/git-remote-restic/repo.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ func (r *Repository) Git(allowInit bool) (*git.Repository, error) {
if r.fs == nil {
var parentSnapshot *restic.ID
sn, err := restic.FindFilteredSnapshot(context.Background(), r.restic.Backend(), r.restic, nil, nil, nil, nil, "latest")
if err != nil && err != restic.ErrNoSnapshotFound {
if err != nil && !errors.Is(err, restic.ErrNoSnapshotFound) {
return nil, err
}
if err == nil {
Expand Down
7 changes: 4 additions & 3 deletions doc/MAINTENANCE.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
- If the patch fails, use `diff -u restic/cmd/restic/global.go cmd/git-remote-restic/restic.go > scripts/update-cmd.patch` to update it.
5. Use `make test` to verify everything still works.
- Use `git log -pG <pattern>` to identify commits that changed APIs that are now broken.
6. Make a commit.
7. Use `make release` to compile a new release.
8. Push everything to Github, and make a new release there.
6. Update `VERSION` to the correct version.
7. Make a commit.
8. Use `make release` to compile a new release.
9. Push everything to Github, and make a new release there.
1 change: 1 addition & 0 deletions fixtures/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ export GIT_AUTHOR_DATE=2006-01-02T15:04:05-0700
export GIT_COMMITTER_NAME=git-restic-remote
export [email protected]
export GIT_COMMITTER_DATE=2006-01-02T15:04:05-0700
rm -rf restic workdir
mkdir restic
tar xzf restic.tar.gz
git init workdir
Expand Down

0 comments on commit fa42e17

Please sign in to comment.