All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jason Riedy <ejr@EECS.Berkeley.EDU>
To: git@vger.kernel.org
Subject: [PATCH] Solaris 5.8 returns ENOTDIR for inappropriate renames.
Date: Mon, 15 Jan 2007 17:30:59 -0800	[thread overview]
Message-ID: <17433.1168911059@lotus.CS.Berkeley.EDU> (raw)

The reflog code clears empty directories when rename returns
either EISDIR or ENOTDIR.  Seems to be the only place.

Signed-off-by: Jason Riedy <ejr@cs.berkeley.edu>
---
   Haven't been keeping up with the list, so I apologize if I've
   missed discussions related to these changes.

 refs.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/refs.c b/refs.c
index 689ac50..851b573 100644
--- a/refs.c
+++ b/refs.c
@@ -837,7 +837,7 @@ int rename_ref(const char *oldref, const char *newref, const char *logmsg)
 
  retry:
 	if (log && rename(git_path("tmp-renamed-log"), git_path("logs/%s", newref))) {
-		if (errno==EISDIR) {
+		if (errno==EISDIR || errno==ENOTDIR) {
 			if (remove_empty_directories(git_path("logs/%s", newref))) {
 				error("Directory not empty: logs/%s", newref);
 				goto rollback;
-- 
1.5.0.rc1.gf4b6c

             reply	other threads:[~2007-01-16  1:49 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-01-16  1:30 Jason Riedy [this message]
2007-01-16  2:56 ` [PATCH] Solaris 5.8 returns ENOTDIR for inappropriate renames Junio C Hamano
  -- strict thread matches above, loose matches on Subject: below --
2007-01-16  3:16 Jason Riedy

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=17433.1168911059@lotus.CS.Berkeley.EDU \
    --to=ejr@eecs.berkeley.edu \
    --cc=git@vger.kernel.org \
    /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.
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.