[PATCH] nmbug: mark repository as bare on clone
W. Trevor King
wking at tremily.us
Tue Apr 15 10:23:19 PDT 2014
On Sat, Apr 12, 2014 at 01:30:32PM -0300, David Bremner wrote:
> 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.
If this works in your testing, then +1 from me ;). However, the
default is the current working directory, not the repo's parent
directory [1]:
core.worktree
…
If --git-dir or GIT_DIR is specified but none of --work-tree,
GIT_WORK_TREE and core.worktree is specified, the current working
directory is regarded as the top level of your working tree.
> % cd $HOME && ln -s .nmbug .git && git reset --hard
>
> would delete a bunch of files.
Actually, that would just clobber existing ~/tags/{message-id}/{tag}
files, which the user likely doesn't have. To remove files, you'd
need something like:
$ cd $HOME && ln -s .nmbug .git && git clean -f
Still, these are just quibbles with the commit message. I'm +1 on the
code change. My initial bare-resistance [2] was because I didn't
realize that an explicit GIT_WORK_TREE would override the core.bare
setting.
Cheers,
Trevor
[1]: https://www.kernel.org/pub/software/scm/git/docs/git-config.html
[2]: http://article.gmane.org/gmane.mail.notmuch.general/17817
--
This email may be signed or encrypted with GnuPG (http://www.gnupg.org).
For more information, see http://en.wikipedia.org/wiki/Pretty_Good_Privacy
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: OpenPGP digital signature
URL: <http://notmuchmail.org/pipermail/notmuch/attachments/20140415/a1fa4d2e/attachment.pgp>
More information about the notmuch
mailing list