git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Duy Nguyen <pclouds@gmail.com>
To: Jeff King <peff@peff.net>
Cc: Junio C Hamano <gitster@pobox.com>,
	Danny Sauer <danny@dannysauer.com>,
	Git Mailing List <git@vger.kernel.org>,
	Johannes Schindelin <Johannes.Schindelin@gmx.de>
Subject: Re: [PATCH] Make git log work for git CWD outside of work tree
Date: Wed, 12 Apr 2017 13:30:31 +0700	[thread overview]
Message-ID: <CACsJy8B8osxd-0axJ9giaMYKuict2h1zW8TcYYuRFGXfBbdF0A@mail.gmail.com> (raw)
In-Reply-To: <20170410171352.s7r7tzheadxjlulw@sigill.intra.peff.net>

On Tue, Apr 11, 2017 at 12:13 AM, Jeff King <peff@peff.net> wrote:
> On Mon, Apr 10, 2017 at 07:01:00PM +0700, Duy Nguyen wrote:
>> An alternative is, when you have found out you need to read .mailmap,
>> you call setup_work_tree() then, which prepares the worktree for you
>> (including moving back to cwd) or dies if worktree does not exist, or
>> no-op if worktree has already been asked by somebody. Many commands do
>> lazy worktree initialization this way.
>
> I think this is much more than just .mailmap, though. For instance, I
> have noticed a similar problem with .gitattributes:

Urgh. assuming that we should not read .gitattributes if there's no
worktree to read from (similar to the "defaults to .git" situation),
how about

 - if mailmap stuff is requested, setup worktree, or die trying
 - if worktree is detected, but setup code does not jump to it, do it
 - if no worktree is detected, tell git-log to stop reading .gitattributes

We probablly want some "if no wotktree then die()" in .gitattributes
and .gitignore code, just in case it's incorrectly and accidentally
executed in exotic setup
-- 
Duy

  reply	other threads:[~2017-04-12  6:31 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-09  2:21 [PATCH] Make git log work for git CWD outside of work tree Danny Sauer
2017-04-09 10:54 ` Johannes Schindelin
2017-04-09 14:15   ` Danny Sauer
2017-04-10  0:21     ` Junio C Hamano
2017-04-10 12:01       ` Duy Nguyen
2017-04-10 17:13         ` Jeff King
2017-04-12  6:30           ` Duy Nguyen [this message]
2017-04-12  8:41             ` Junio C Hamano
2017-04-12 11:13               ` Duy Nguyen
2017-04-12 13:01                 ` Jeff King
2017-04-12 13:11                   ` Duy Nguyen
2017-04-13 21:29                     ` Jeff King
2017-04-17  0:41                       ` Junio C Hamano
2017-04-17 10:29                       ` Duy Nguyen
2017-04-12 12:53             ` Jeff King

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

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CACsJy8B8osxd-0axJ9giaMYKuict2h1zW8TcYYuRFGXfBbdF0A@mail.gmail.com \
    --to=pclouds@gmail.com \
    --cc=Johannes.Schindelin@gmx.de \
    --cc=danny@dannysauer.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=peff@peff.net \
    /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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).