git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Nguyen Thai Ngoc Duy" <pclouds@gmail.com>
To: "Junio C Hamano" <gitster@pobox.com>
Cc: "Jeff King" <peff@peff.net>,
	"René Scharfe" <rene.scharfe@lsrfire.ath.cx>,
	git@vger.kernel.org
Subject: Re: git-shortlog hangs on bare repo without --bare option
Date: Thu, 28 Aug 2008 14:16:07 +0700	[thread overview]
Message-ID: <fcaeb9bf0808280016k7378cc0ev985f90b270f615e5@mail.gmail.com> (raw)
In-Reply-To: <7v8wuim4kv.fsf@gitster.siamese.dyndns.org>

On 8/28/08, Junio C Hamano <gitster@pobox.com> wrote:
>  This may be repeating what Jeff said earlier in another thread, but I
>  think we should rethink the start-up sequence carefully.  Ideally (I am
>  thinking aloud)...
>
>   * Have a single function "git_setup()" that notices --bare and --git-dir
>    from the command line and GIT_DIR environment, and does the discovery
>    of git_dir (if not told with the command line or environment
>    explicitly); if we do not find it, do *NOT* barf.  Just record the
>    facts it finds somewhere (e.g. the location of git_dir, absense of
>    git_dir, if the repository is explicitly bare, etc.).
>
>   * As the next step, still in this single function, if we have git_dir,
>    find out where the work_tree is, paying attention to --work-tree from
>    the command line and GIT_WORK_TREE environment if exists.  If we do not
>    have work tree, do *NOT* barf.  Again, just record the facts it finds.
>    If we do not have --work-tree from the command line and if we are not
>    told that it is --bare from the command line, then we may need to open
>    the config to see where core.worktree points at.

Part of worktree issues comes from the fact that worktree setup is
spread over many functions, starting at setup_git_dir*() and ending at
setup_work_tree().
So setting it up in a single function and turning setup_work_tree()
into "check and die()" logic sounds great.
-- 
Duy

      parent reply	other threads:[~2008-08-28  7:17 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-27 19:52 git-shortlog hangs on bare repo without --bare option Garry Dolley
2008-08-27 20:32 ` Junio C Hamano
2008-08-27 21:21   ` Garry Dolley
2008-08-27 21:40 ` René Scharfe
2008-08-27 22:15   ` Garry Dolley
2008-08-27 22:19   ` Junio C Hamano
2008-08-27 22:41     ` Junio C Hamano
2008-08-27 23:09       ` Junio C Hamano
2008-08-27 23:16       ` Junio C Hamano
2008-08-27 23:30         ` Jeff King
2008-08-28  4:56           ` Junio C Hamano
2008-08-28  7:16         ` Nguyen Thai Ngoc Duy [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=fcaeb9bf0808280016k7378cc0ev985f90b270f615e5@mail.gmail.com \
    --to=pclouds@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=peff@peff.net \
    --cc=rene.scharfe@lsrfire.ath.cx \
    /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;
as well as URLs for NNTP newsgroup(s).