All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] git branch -D: give a better error message when lockfile creation fails
@ 2009-09-26  0:06 Miklos Vajna
  2009-09-26  3:31 ` Jeff King
  0 siblings, 1 reply; 10+ messages in thread
From: Miklos Vajna @ 2009-09-26  0:06 UTC (permalink / raw)
  To: git

Previously the old error message just told the user that it was not
possible to delete the ref from the packed-refs file. Give instructions
on how to resolve the problem.

Signed-off-by: Miklos Vajna <vmiklos@frugalware.org>
---
 refs.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/refs.c b/refs.c
index 24865cf..221d49c 100644
--- a/refs.c
+++ b/refs.c
@@ -972,8 +972,10 @@ static int repack_without_ref(const char *refname)
 	if (!found)
 		return 0;
 	fd = hold_lock_file_for_update(&packlock, git_path("packed-refs"), 0);
-	if (fd < 0)
+	if (fd < 0) {
+		unable_to_lock_index_die(git_path("packed-refs"), errno);
 		return error("cannot delete '%s' from packed refs", refname);
+	}
 
 	for (list = packed_ref_list; list; list = list->next) {
 		char line[PATH_MAX + 100];
-- 
1.6.5.rc1.44.ga1675.dirty

^ permalink raw reply related	[flat|nested] 10+ messages in thread
* [PATCH] git branch -D: give a better error message when lockfile creation fails
@ 2009-09-25 23:53 Miklos Vajna
  0 siblings, 0 replies; 10+ messages in thread
From: Miklos Vajna @ 2009-09-25 23:53 UTC (permalink / raw)
  To: git

Previously the old error message just told the user that it was not
possible to delete the ref from the packed-refs file. Give instructions
on how to resolve the problem.

Signed-off-by: Miklos Vajna <vmiklos@frugalware.org>
---
 refs.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/refs.c b/refs.c
index 24865cf..221d49c 100644
--- a/refs.c
+++ b/refs.c
@@ -972,8 +972,10 @@ static int repack_without_ref(const char *refname)
 	if (!found)
 		return 0;
 	fd = hold_lock_file_for_update(&packlock, git_path("packed-refs"), 0);
-	if (fd < 0)
+	if (fd < 0) {
+		unable_to_lock_index_die(git_path("packed-refs"), errno);
 		return error("cannot delete '%s' from packed refs", refname);
+	}
 
 	for (list = packed_ref_list; list; list = list->next) {
 		char line[PATH_MAX + 100];
-- 
1.6.5.rc1.44.ga1675.dirty

^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2009-09-27  8:49 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-09-26  0:06 [PATCH] git branch -D: give a better error message when lockfile creation fails Miklos Vajna
2009-09-26  3:31 ` Jeff King
2009-09-26 13:34   ` Miklos Vajna
2009-09-26 19:58     ` Shawn O. Pearce
2009-09-26 20:04       ` Matthieu Moy
2009-09-26 23:15         ` Miklos Vajna
2009-09-27  8:21           ` Jeff King
2009-09-27  8:49             ` Miklos Vajna
2009-09-26 20:12     ` Matthieu Moy
  -- strict thread matches above, loose matches on Subject: below --
2009-09-25 23:53 Miklos Vajna

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.