git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] builtin-merge: release the lockfile in try_merge_strategy()

From
Miklos Vajna <vmiklos@frugalware.org>
Date
Sep 6, 2008, 16:29 UTC
Message-ID
<1220718589-12424-1-git-send-email-vmiklos@frugalware.org>
In-Reply-To
<20080906021222.GY16514@genesis.frugalware.org>

Once we committed the locked index, we should release the lockfile. In most cases this is done automatically when the process ends, but this is not true in this case.

Signed-off-by: Miklos Vajna <vmiklos@frugalware.org>
---
On Sat, Sep 06, 2008 at 04:12:23AM +0200, Miklos Vajna <vmiklos@frugalware.org> wrote:
Show 6 quoted lines
> > Try reverting 18668f5 (builtin-merge: avoid run_command_v_opt() for
> > recursive and subtree, 2008-08-28).  That patch seems to be
> > seriously broken.
>
> Yes, that works around the problem. I'll try to send a fix later
> today.
Here is - I think - the proper prefix.
 builtin-merge.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/builtin-merge.c b/builtin-merge.c
index b857cf6..bb09e6f 100644
--- a/builtin-merge.c
+++ b/builtin-merge.c
@@ -576,6 +576,7 @@ static int try_merge_strategy(const char *strategy, struct commit_list *common,
 				(write_cache(index_fd, active_cache, active_nr) ||
 				 commit_locked_index(lock)))
 			die ("unable to write %s", get_index_file());
+		rollback_lock_file(lock);
 		return clean ? 0 : 1;
 	} else {
 		args = xmalloc((4 + commit_list_count(common) +
-- 
1.6.0.1
Previous: Miklos VajnaNext: Junio C Hamano
Message 6 of 7 in “Bug? - Unexpected lock file error”
  1. Eric RaibleSep 5, 2008
  2. Junio C HamanoSep 5, 2008
  3. Eric RaibleSep 6, 2008
  4. Junio C HamanoSep 6, 2008
  5. Miklos VajnaSep 6, 2008
  6. builtin-merge: release the lockfile in try_merge_strategy()Miklos Vajna, Sep 6, 2008
  7. Junio C HamanoSep 7, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.