From: Stefan Beller <stefanbeller@googlemail.com>
To: gitster@pobox.com, git@vger.kernel.org
Cc: Stefan Beller <stefanbeller@googlemail.com>
Subject: [PATCH 3/3] repack: improve warnings about failure of renaming and removing files
Date: Sun, 15 Sep 2013 17:33:22 +0200 [thread overview]
Message-ID: <1379259202-5042-3-git-send-email-stefanbeller@googlemail.com> (raw)
In-Reply-To: <1379259202-5042-1-git-send-email-stefanbeller@googlemail.com>
Signed-off-by: Stefan Beller <stefanbeller@googlemail.com>
---
builtin/repack.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/builtin/repack.c b/builtin/repack.c
index d345d16..f7e91bf 100644
--- a/builtin/repack.c
+++ b/builtin/repack.c
@@ -327,7 +327,7 @@ int cmd_repack(int argc, const char **argv, const char *prefix)
chmod(fname_old, statbuffer.st_mode);
}
if (rename(fname_old, fname))
- exit(errno);
+ die_errno(_("renaming '%s' failed"), fname_old);
free(fname);
free(fname_old);
}
@@ -341,7 +341,8 @@ int cmd_repack(int argc, const char **argv, const char *prefix)
packdir,
item->string,
exts[ext]);
- remove_path(fname);
+ if (remove_path(fname))
+ warning(_("removing '%s' failed"), fname);
}
}
--
1.8.4.273.ga194ead
next prev parent reply other threads:[~2013-09-15 15:33 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-15 15:33 [PATCH 1/3] repack: rewrite the shell script in C Stefan Beller
2013-09-15 15:33 ` [PATCH 2/3] repack: retain the return value of pack-objects Stefan Beller
2013-09-15 15:33 ` Stefan Beller [this message]
2013-09-15 17:54 ` [PATCH 1/3] repack: rewrite the shell script in C Ramkumar Ramachandra
2013-09-17 16:42 ` Junio C Hamano
2013-09-17 18:17 ` Junio C Hamano
2013-09-17 20:13 ` Stefan Beller
2013-09-17 20:25 ` Junio C Hamano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1379259202-5042-3-git-send-email-stefanbeller@googlemail.com \
--to=stefanbeller@googlemail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).