All of lore.kernel.org
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Paul Mackerras <paulus@samba.org>
Cc: Martin von Zweigbergk <martin.von.zweigbergk@gmail.com>,
	git@vger.kernel.org
Subject: Re: [PATCH 8/8] gitk: show modified files with separate work tree
Date: Mon, 11 Apr 2011 12:15:13 -0700	[thread overview]
Message-ID: <7vipukwqf2.fsf@alter.siamese.dyndns.org> (raw)
In-Reply-To: <20110410020318.GB25368@brick.ozlabs.ibm.com> (Paul Mackerras's message of "Sun, 10 Apr 2011 12:03:18 +1000")

Paul Mackerras <paulus@samba.org> writes:

>> Why do git commands that need a work tree not work under .git?
> ...
> Don't know, ask Junio. :)

Whatever the current behaviour is, I am reasonably sure that it is coming
more from "meh -- who cares such a case?" than "it should work like this
when you are in .git because of such and such reasons".

For example, what does it mean to be able to do this?

	$ edit Makefile
        $ git add Makefile
        $ edit Makefile
	$ cd .git
        $ git grep frotz Makefile

Perhaps the last step needs to be

	$ git grep frotz ../Makefile

instead, but a more important point is, how would that be useful?

If you have both GIT_DIR and GIT_WORK_TREE set up to point at the correct
places, I think it is sensible to make the above (the "../Makefile"
version, not the one without dot-dot) work as expected.

I suspect (but would not bother to dig the history myself to find out)
that "we require a working tree" semantics that in fact often means "we
require you to be in the working tree" was a misdesign that did not matter
that came from the days back when GIT_WORK_TREE was not either present or
not widely used.  Now more people seem to be using GIT_WORK_TREE for some
reason, I don't have anything against a patch series that defines and
implements a more desirable behaviour clearly.

Thanks.

  reply	other threads:[~2011-04-11 19:15 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-05  2:14 [PATCH 0/8] make gitk work better in non-top-level directory Martin von Zweigbergk
2011-04-05  2:14 ` [PATCH 1/8] gitk: fix file highlight when run in subdirectory Martin von Zweigbergk
2011-04-10  1:54   ` Paul Mackerras
2011-04-10 18:03     ` Martin von Zweigbergk
2011-04-05  2:14 ` [PATCH 2/8] gitk: fix "show origin of this line" with separate work tree Martin von Zweigbergk
2011-04-05  2:14 ` [PATCH 3/8] gitk: fix "blame parent commit" " Martin von Zweigbergk
2011-04-05  2:14 ` [PATCH 4/8] gitk: fix "External diff" " Martin von Zweigbergk
2011-04-05  2:14 ` [PATCH 5/8] gitk: put temporary directory inside .git Martin von Zweigbergk
2011-04-05  2:14 ` [PATCH 6/8] gitk: run 'git rev-parse --git-dir' only once Martin von Zweigbergk
2011-04-05  2:14 ` [PATCH 7/8] gitk: simplify calculation of gitdir Martin von Zweigbergk
2011-04-05  2:14 ` [PATCH 8/8] gitk: show modified files with separate work tree Martin von Zweigbergk
2011-04-10  2:03   ` Paul Mackerras
2011-04-11 19:15     ` Junio C Hamano [this message]
2011-05-24  2:44   ` [PATCH v2 " Martin von Zweigbergk
2011-04-05 18:48 ` [PATCH 0/8] make gitk work better in non-top-level directory Peter Baumann

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=7vipukwqf2.fsf@alter.siamese.dyndns.org \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=martin.von.zweigbergk@gmail.com \
    --cc=paulus@samba.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.