From: Jonathan Nieder <jrnieder@gmail.com>
To: Roberto Eduardo Decurnex Gorosito <decurnex.roberto@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: `git log relative_path_to_object` does not respect the --work-tree path
Date: Mon, 29 Sep 2014 13:56:12 -0700 [thread overview]
Message-ID: <20140929205612.GQ1175@google.com> (raw)
In-Reply-To: <CABj5xzc0bVfyzR5PD5K3STSvdvWEOYeMkayB=GTfKbfij+G5Zw@mail.gmail.com>
Hi Roberto,
Roberto Eduardo Decurnex Gorosito wrote:
> When passing objects to the `git log`, by just naming them or using
> the `--objects` option, relative paths are evaluated using the current
> working directory instead of the current working tree path.
Why should they be relative to the worktree root? When you use
relative paths within a worktree, they are not relative to the
worktree root. For example, the following works within a clone of
git.git:
$ cd Documentation
$ git log git.txt
You might be looking for 'git -C <directory>', which chdirs to the
named directory so paths are relative to there.
Hope that helps,
Jonathan
next prev parent reply other threads:[~2014-09-29 20:56 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-29 16:40 `git log relative_path_to_object` does not respect the --work-tree path Roberto Eduardo Decurnex Gorosito
2014-09-29 18:06 ` Junio C Hamano
2014-09-29 18:11 ` Roberto Eduardo Decurnex Gorosito
2014-09-29 20:56 ` Jonathan Nieder [this message]
2014-09-30 12:42 ` Roberto Eduardo Decurnex Gorosito
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=20140929205612.GQ1175@google.com \
--to=jrnieder@gmail.com \
--cc=decurnex.roberto@gmail.com \
--cc=git@vger.kernel.org \
/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).