unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
* [PATCH] nmbug: mark repository as bare on clone
@ 2014-04-12 16:30 David Bremner
  2014-04-12 16:39 ` Tomi Ollila
  2014-04-15 17:23 ` W. Trevor King
  0 siblings, 2 replies; 5+ messages in thread
From: David Bremner @ 2014-04-12 16:30 UTC (permalink / raw)
  To: notmuch

As far as I can figure out, if a git repository is non-bare, then it
should either have core.worktree set, or the parent directory should
be the worktree. Since the parent directory is usually the user's home
directory, we don't want that. Although unlikely to be typed by
mistake

% cd $HOME && ln -s .nmbug .git && git reset --hard

would delete a bunch of files.
---

Hah, I managed to escalate a documentation quibble into a
sortof-security issue.

 devel/nmbug/nmbug | 1 +
 1 file changed, 1 insertion(+)

diff --git a/devel/nmbug/nmbug b/devel/nmbug/nmbug
index d6f5213..b18ded7 100755
--- a/devel/nmbug/nmbug
+++ b/devel/nmbug/nmbug
@@ -134,6 +134,7 @@ sub do_clone {
           $repository, $tempwork) == 0
     or die "'git clone' exited with nonzero value\n";
   git ('config', '--unset', 'core.worktree');
+  git ('config', 'core.bare', 'true');
 }
 
 sub is_committed {
-- 
1.9.1

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

end of thread, other threads:[~2014-04-15 20:33 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-04-12 16:30 [PATCH] nmbug: mark repository as bare on clone David Bremner
2014-04-12 16:39 ` Tomi Ollila
2014-04-12 17:09   ` David Bremner
2014-04-15 17:23 ` W. Trevor King
2014-04-15 20:33   ` David Bremner

Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

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 read-only IMAP folder(s) and NNTP newsgroup(s).