Git development
 help / color / mirror / Atom feed
From: Matthias Lederhofer <matled@gmx.net>
To: Junio C Hamano <junkio@cox.net>
Cc: git@vger.kernel.org
Subject: Re: git diff in subdirectories
Date: Mon, 17 Jul 2006 16:44:13 +0200	[thread overview]
Message-ID: <E1G2UKT-0004ks-RW@moooo.ath.cx> (raw)
In-Reply-To: <7vhd1ghbwo.fsf@assigned-by-dhcp.cox.net>

Junio C Hamano <junkio@cox.net> wrote:
> I noticed that "git diff" from subdirectories does not seem to
> pick up the configuration from $GIT_DIR/config properly.  I
> suspect that fixing this breakage properly would help us later,
> as more and more commands learn to use the configuration
> mechanism to store user preferences, and the same fix would be
> applicable to them.  If somebody can fix this while we are away
> this week, that would be wonderful ;-).
I can think of these ways to fix this:
- Allow git_config() to work in subdirectories.
  - It can either change the working directory using
    setup_git_directory_gently() and go back to the subdirectory
    later.
  - Or we add a function to get the full path to the repository.  This
    could perhaps also be used in setup_git_env() to initialize
    git_dir?  Otherwise I would just add another function similar to
    git_path pointing to the full path instead of .git/.  (This is the
    way I'd prefer.)
- Fix the it in builtin-diff: change the directory before calling
  git_config().  Then we would either need to change the directory
  back or add a parameter to init_revisions to get the prefix without
  calling setup_git_directory itself.  (I think this will change the
  least code but wont help other commands.)

Any comments?

      reply	other threads:[~2006-07-17 14:44 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-07-17  8:29 What's in git.git Junio C Hamano
2006-07-17 14:44 ` Matthias Lederhofer [this message]

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=E1G2UKT-0004ks-RW@moooo.ath.cx \
    --to=matled@gmx.net \
    --cc=git@vger.kernel.org \
    --cc=junkio@cox.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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox