]> git.madduck.net Git - code/myrepos.git/commitdiff

madduck's git repository

Every one of the projects in this repository is available at the canonical URL git://git.madduck.net/madduck/pub/<projectpath> — see each project's metadata for the exact URL.

All patches and comments are welcome. Please squash your changes to logical commits before using git-format-patch and git-send-email to patches@git.madduck.net. If you'd read over the Git project's submission guidelines and adhered to them, I'd be especially grateful.

SSH access, as well as push access can be individually arranged.

If you use my repositories frequently, consider adding the following snippet to ~/.gitconfig and using the third clone URL listed for each project:

[url "git://git.madduck.net/madduck/"]
  insteadOf = madduck:

Patch to correctly handle fake bare repositories with core.bare not set
authorJulien Rebetez <julien.rebetez@gmail.com>
Thu, 15 Sep 2011 13:12:21 +0000 (15:12 +0200)
committerJoey Hess <joey@kitenet.net>
Fri, 23 Sep 2011 17:19:57 +0000 (13:19 -0400)
--20cf300513b2820cbe04acfaa084
Content-Type: text/plain; charset=ISO-8859-1

Hello,
First, thanks for writing mr, I love it !

I was trying to setup mr to handle a detached worktree git repository and
found out it was unable to determine the repository type.
It turned out my config only had "core.worktree=../../" set but no
"core.bare" and therefore, 'git_fake_bare_test' was unable to determine
it's a detached worktree dir.

So the attached patch fix this problem by checking for core.worktree instead
of core.bare in the config file.

Best regards,
Julien

Hello,<div>First, thanks for writing mr, I love it !</div><div><br><div>I was trying to setup mr to handle a detached worktree git repository and found out it was unable to determine the repository type. </div><div>It turned out my config only had &quot;core.worktree=../../&quot; set but no &quot;core.bare&quot; and therefore, &#39;git_fake_bare_test&#39; was unable to determine</div>
<div>it&#39;s a detached worktree dir.</div><div><br></div><div>So the attached patch fix this problem by checking for core.worktree instead of core.bare in the config file.</div><div><br></div></div><div>Best regards,</div>
<div>Julien</div>

From b1c62a06c6c3668c52dd90014325d0c831a45ae7 Mon Sep 17 00:00:00 2001
From: Julien Rebetez <julien@fhtagn.net>
Date: Thu, 15 Sep 2011 14:59:47 +0200
Subject: [PATCH] Modify git_fake_bare_test to check core.worktree instead of
 core.bare to determine if a given repository is a detached
 worktree ('fake bar').

This allow mr to correctly handle the case where core.bare is missing
from the config file (implicitely false) and only core.worktree is set.

Signed-off-by: Julien Rebetez <julien@fhtagn.net>
lib/git-fake-bare

index aec9b665f32f25b16390c32dac30f0d8368b006d..398478e4f47b807f4d7e6debe9202518da5cfa86 100644 (file)
@@ -45,7 +45,7 @@ lib =
 git_fake_bare_test = 
        test -d "$MR_REPO"/refs/heads && test -d "$MR_REPO"/refs/tags &&
        test -d "$MR_REPO"/objects && test -f "$MR_REPO"/config &&
 git_fake_bare_test = 
        test -d "$MR_REPO"/refs/heads && test -d "$MR_REPO"/refs/tags &&
        test -d "$MR_REPO"/objects && test -f "$MR_REPO"/config &&
-       test "$(GIT_DIR="$MR_REPO" git config --get core.bare)" = false
+       test `GIT_DIR="$MR_REPO" git config --get core.worktree`
 
 git_fake_bare_update =
        args="$@"
 
 git_fake_bare_update =
        args="$@"