git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alexandre Julliard <julliard@winehq.org>
To: git@vger.kernel.org
Subject: [PATCH 1/5] fetch-pack: Properly remove the shallow file when it becomes empty.
Date: Fri, 24 Nov 2006 15:58:04 +0100	[thread overview]
Message-ID: <871wnsvqmb.fsf@wine.dyndns.org> (raw)

The code was unlinking the lock file instead.

Signed-off-by: Alexandre Julliard <julliard@winehq.org>
---
 fetch-pack.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/fetch-pack.c b/fetch-pack.c
index d00573d..bb310b6 100644
--- a/fetch-pack.c
+++ b/fetch-pack.c
@@ -700,7 +700,7 @@ int main(int argc, char **argv)
 
 		fd = hold_lock_file_for_update(&lock, shallow, 1);
 		if (!write_shallow_commits(fd, 0)) {
-			unlink(lock.filename);
+			unlink(shallow);
 			rollback_lock_file(&lock);
 		} else {
 			close(fd);
-- 
1.4.4.1.ga335e

-- 
Alexandre Julliard

                 reply	other threads:[~2006-11-24 14:58 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=871wnsvqmb.fsf@wine.dyndns.org \
    --to=julliard@winehq.org \
    --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 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 NNTP newsgroup(s).