Re: What is the idea for bare repositories?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



David Kastrup wrote:

> Bruno Cesar Ribas <ribas@xxxxxxxxxxxx> writes:
> 
>> 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.
[...]
> 
> 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.
> 
>> On Mon, Nov 12, 2007 at 02:11:58PM +0100, David Kastrup wrote:
>>> 
>>> 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.

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.

-- 
Jakub Narebski
Warsaw, Poland
ShadeHawk on #git


-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux