Junio C Hamano venit, vidit, dixit 26.09.2012 06:21:
> Nguyen Thai Ngoc Duy <pclo...@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).

Yeah, but doing the above from an alias or help script should be fine
and can be tailored to your use case. Say, a script like

cd $(dirname "$arg1")
git "$@" $(basename "$args1")

should cover a couple of use cases already. (Error checking is for the
faint of heart only.)

> 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 ;-).

Don't we all just walk on the line?

To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to