Thread (1 message) 1 message, 1 author, 2016-06-15

Re: What is the idea for bare repositories?

From: David Kastrup <hidden>
Date: 2016-06-15 22:43:50

Jakub Narebski [off-list ref] writes:
David Kastrup wrote:
quoted
Bruno Cesar Ribas [off-list ref] writes:
quoted
A bare repository is the way to publish your changes to the public.
git-daemon  and http-clones use a bare repository that only contains
adminsitrative files.
[...]
quoted
Fine.  So why don't the following commands complain?  Apart from
git-reset without arguments (which could probably get along without a
working dir), they are supposed to employ a working directory.
quoted
On Mon, Nov 12, 2007 at 02:11:58PM +0100, David Kastrup wrote:
quoted
I have a repository declared as bare.  Some commands treat it as such,
other's don't.  For example, I get

git-diff [no complaint]
git-reset [no complaint]
git-reset --hard
HEAD is now at db862c1... installmanager.sh: setze GIT_WORK_TREE
git-diff can compare tree and tree, or tree and index; only for
comparing tree and files of index and files it needs working dir.
Well, if called without arguments (as above), it compares tree and
index.  So it should complain about not having a tree.  It doesn't.
git-reset resets only refs and index. git-reset --hard resets also
files, so it needs working directory. Perhaps it should fail
completely and not only after doing mixed (non-hard) reset if we are
in bare repository.
Please reread the above: it does not fail at all.  Neither before nor
after the mixed reset.

-- 
David Kastrup
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help