From: Junio C Hamano <gitster@pobox.com>
To: Nguyen Thai Ngoc Duy <pclouds@gmail.com>
Cc: Git Mailing List <git@vger.kernel.org>
Subject: Re: DWIM .git repository discovery
Date: Tue, 25 Sep 2012 21:21:57 -0700 [thread overview]
Message-ID: <7v7grhv2fu.fsf@alter.siamese.dyndns.org> (raw)
In-Reply-To: <CACsJy8DOtPWgkq=KSHCb=J3qg4o1aPaLo4aj7U5f_qa+kCCipQ@mail.gmail.com> (Nguyen Thai Ngoc Duy's message of "Wed, 26 Sep 2012 08:49:42 +0700")
Nguyen Thai Ngoc Duy <pclouds@gmail.com> writes:
> I often find myself attempting to examine another repository,
> especially in projects that are closely related but put in different
> git repos. It's usually just a diff or log command
>
> git log --patch ../path/to/another/repo/path/to/file.c
I personally do not think it is _too_ bad to internally do
(cd ../path/to/another/repo/path/to &&
git log --patch file.c)
but I doubt it is worth the numerous implications (I am not talking
about implementation complexity at all, but the conceptual burden).
For example, where in the working tree of the other project should
the command run? The output from "log -p" happens to be always
relative to the top of the working tree, but that does not
necessarily hold true for other subcommands.
A worse thing is that there is an oddball case "diff[ --no-index]"
that changes behaviour depending on the pathspec points at inside or
outside the repository.
I think that this is a road to insanity; anybody who thinks along
this line is already on the other side of the line, I would have to
say ;-).
next prev parent reply other threads:[~2012-09-26 4:22 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-26 1:49 DWIM .git repository discovery Nguyen Thai Ngoc Duy
2012-09-26 4:21 ` Junio C Hamano [this message]
2012-09-26 7:28 ` Michael J Gruber
2012-09-26 11:02 ` Nguyen Thai Ngoc Duy
2012-09-27 12:22 ` Drew Northup
2012-09-27 12:38 ` Nguyen Thai Ngoc Duy
2012-09-27 18:20 ` Junio C Hamano
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=7v7grhv2fu.fsf@alter.siamese.dyndns.org \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=pclouds@gmail.com \
/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).