Re: git-shortlog hangs on bare repo without --bare option

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

 



On 8/28/08, Junio C Hamano <gitster@xxxxxxxxx> 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
--
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