All of lore.kernel.org
 help / color / mirror / Atom feed
From: Matthias Lederhofer <matled@gmx.net>
To: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Cc: git@vger.kernel.org
Subject: Re: finding the right remote branch for a commit
Date: Mon, 16 Jul 2007 11:14:15 +0200	[thread overview]
Message-ID: <20070716091415.GA31186@moooo.ath.cx> (raw)
In-Reply-To: <Pine.LNX.4.64.0707160036160.14781@racer.site>

Johannes Schindelin <Johannes.Schindelin@gmx.de> wrote:
> On Mon, 16 Jul 2007, Matthias Lederhofer wrote:
> 
> > Johannes Schindelin <Johannes.Schindelin@gmx.de> wrote:
> > Use
> > 
> >     $ git --work-tree "$HOME" --git-dir . init
> > 
> > instead.
> 
> Why _should_ that be necessary at all?  I _already_ told git that the 
> working tree is somewhere else.  It makes _no sense at all_ to treat the 
> cwd as anything else than the GIT_DIR, when --work-tree but no --git-dir 
> were specified.
>
> > IMHO the --bare flag did not make much sense before the introduction
> > of GIT_WORK_TREE and doesn't after, at least not with the meaning it
> > has: why should 'git --bare' mean to use the repository from cwd?
> 
> To the contrary, it makes tons of sense.  If you want to initialise a bare 
> repository, what _more_ natural way than to say "git init --bare"?  And 
> what _more_ natural place to pick for GIT_DIR than the cwd, when you did 
> not specify --git-dir?

Ah, for git init it makes sense to have the --bare flag and also to
use the cwd as GIT_DIR when GIT_WORK_TREE is specified.

> > > [descriptions of bugs, that have been largely ignored]

The last paragraphs were for the second and fourth one (git status/add
from outside the working tree): it should be possible to fix this but
it might be a bit complicated.  And if it is done for a few commands
probably all commands should support this.

For the third one (git picks up another git repository even if it is
inside a 'detached working tree') I have no idea how to fix this.  The
working tree cannot be recognized in any way.  Maybe you can/should
use a symlink to the real repository named .git in this case?  But
this only works as long as you checkout only one repository in the
directory.

> > Up to now you are supposed to be in the working tree all the time when 
> > using it.  Therefore I'd call these feature requests rather than bugs :)
> 
> Feature requests? WTF? What reason is there for the _requirement_ to 
> specify a working tree, when git does not make use of it?  Hmm?

Sorry, I don't understand what you mean yet.  Where does git require
you to specify a working tree?

      reply	other threads:[~2007-07-16  9:14 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-07-10 14:49 finding the right remote branch for a commit martin f krafft
2007-07-11 21:26 ` Johannes Schindelin
2007-07-12  7:47   ` martin f krafft
2007-07-12  9:33     ` Jakub Narebski
2007-07-15 22:33   ` Matthias Lederhofer
2007-07-15 23:48     ` Johannes Schindelin
2007-07-16  9:14       ` Matthias Lederhofer [this message]

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=20070716091415.GA31186@moooo.ath.cx \
    --to=matled@gmx.net \
    --cc=Johannes.Schindelin@gmx.de \
    --cc=git@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.