Skip to content

Commit

Permalink
x
Browse files Browse the repository at this point in the history
  • Loading branch information
pks-t committed May 27, 2024
1 parent 5c3425a commit 1c70142
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions refs/reftable-backend.c
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,8 @@ static int reftable_be_remove_on_disk(struct ref_store *ref_store,

strbuf_addf(&sb, "%s/HEAD", refs->base.gitdir);
if (unlink(sb.buf) < 0) {
strbuf_addstr(err, "could not delete stub HEAD");
strbuf_addf(err, "could not delete stub HEAD: %s",
strerror(errno));
ret = -1;

fputs(err->buf, stderr);
Expand All @@ -389,7 +390,8 @@ static int reftable_be_remove_on_disk(struct ref_store *ref_store,

strbuf_addf(&sb, "%s/refs/heads", refs->base.gitdir);
if (unlink(sb.buf) < 0) {
strbuf_addstr(err, "could not delete stub heads");
strbuf_addf(err, "could not delete stub heads: %s",
strerror(errno));
ret = -1;

fputs(err->buf, stderr);
Expand All @@ -402,7 +404,8 @@ static int reftable_be_remove_on_disk(struct ref_store *ref_store,

strbuf_addf(&sb, "%s/refs/heads", refs->base.gitdir);
if (rmdir(sb.buf) < 0) {
strbuf_addstr(err, "could not delete stub heads");
strbuf_addf(err, "could not delete stub heads: %s",
strerror(errno));
ret = -1;

fputs(err->buf, stderr);
Expand Down

0 comments on commit 1c70142

Please sign in to comment.