Git development
 help / color / mirror / Atom feed
From: Theodore Tso <tytso@mit.edu>
To: Shawn Pearce <spearce@spearce.org>
Cc: git@vger.kernel.org
Subject: Re: What commands can and can not be used with bare repositories?
Date: Sat, 30 Dec 2006 21:12:49 -0500	[thread overview]
Message-ID: <20061231021248.GA26067@thunk.org> (raw)
In-Reply-To: <20061231015732.GB5082@spearce.org>

On Sat, Dec 30, 2006 at 08:57:32PM -0500, Shawn Pearce wrote:
> Try "git --bare log".  Or "git --git-dir=/path/to log".
>
> Actually most commands work on a bare repository.
> Very few don't: the ones that require a working directory.
> E.g. status/revert/cherry-pick/commit/am/merge/pull.  (You can
> pull from a bare repository, but you cannot run pull *in* a bare
> repository.)

Ah, right.  Thanks, I missed the --bare option.  It should probably be
mentioned in the git-clone man page, instead of only in the top-level
git manpage.

> > confused, but maybe we could fix that.  What if we were to change "git
> > clone --bare" to create the .git -> . symlink, and then add a check to
> > commands that require a working directory to see if ".git" is a symlink
> > to ., and if so, give an error message, "operation not supported on bare
> > repository"?
> 
> No.  Better would be to make git's repository setup logic
> automatically detect if "." is a Git repository, and if so let the
> commands that work without a working directory run.

That makes sense, although the hueristic for determining whether or
not "." is a Git repository might be a little interesting.  Say, if
there is no containing directory which has a .git directory, and the
directories "objects", "info", and "refs" are present?

						- Ted

  reply	other threads:[~2006-12-31  2:13 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-12-31  1:48 What commands can and can not be used with bare repositories? Theodore Ts'o
2006-12-31  1:57 ` J. Bruce Fields
2006-12-31  1:57 ` Shawn Pearce
2006-12-31  2:12   ` Theodore Tso [this message]
2006-12-31  5:32     ` Michael S. Tsirkin
2006-12-31  5:52     ` Junio C Hamano

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=20061231021248.GA26067@thunk.org \
    --to=tytso@mit.edu \
    --cc=git@vger.kernel.org \
    --cc=spearce@spearce.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