git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff King <peff@peff.net>
To: Al Haraka <alharaka@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: Gitweb 1.7.5 and Textconv Configuration
Date: Sat, 2 Jul 2011 14:57:24 -0400	[thread overview]
Message-ID: <20110702185724.GA14390@sigill.intra.peff.net> (raw)
In-Reply-To: <CALWDD1woB0ytL6T-DwD92f824dnpz0mek=SYgz5jwqR0efnkpw@mail.gmail.com>

On Sat, Jul 02, 2011 at 02:14:30PM +0300, Al Haraka wrote:

> # Enable textconv
> push @diff_opts, '--textconv';
> 
> Reloaded the webpage; still does *not* show text diffs.  Any way to
> debug what is going wrong?

You could try setting "$ENV{GIT_TRACE} = 1", which will dump all of the
git commands being called to stderr (and presumaby your log). That would
double-check that the option is being passed.

I think what might be happening, though, is that git does not do a good
job checking .gitattributes files inside trees; it only checks the
.gitattributes in the working tree, even if you are diffing a tree. But
in the case of a bare repository, we don't even have a working tree at
all.

You can try working around it like this:

  cd /path/to/bare/repo.git
  git show HEAD:.gitattributes >info/attributes

which will make the repository-wide non-version-controlled gitattributes
the same as the last committed version. The problem is that it won't be
automatically updated as you commit and push changes to .gitattributes.

So I think it's a bug in git. It seems like the tree being diffed is an
obvious place for git to load gitattributes from. Though I'm not sure of
the precedence rules for interacting with the version of .gitattributes
in the worktree (if any). In a situation like this:

  $ git checkout master
  $ git show master~50

You would probably want the more recent worktree attributes to take
precedence over the ones in the older tree.

But in this:

  $ git checkout master~50
  $ git show master

you would probably want the more recent tree attributes to take
precedence over what's in the working tree.

-Peff

  reply	other threads:[~2011-07-02 19:00 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-02  9:50 Gitweb 1.7.5 and Textconv Configuration Al Haraka
2011-07-02 10:43 ` Jeff King
2011-07-02 10:44   ` Jeff King
2011-07-02 11:14     ` Al Haraka
2011-07-02 18:57       ` Jeff King [this message]
2011-07-02 19:18         ` Al Haraka
2011-07-02 19:57           ` Jeff King
2011-07-02 20:23             ` Jakub Narebski
2011-07-02 21:10               ` Jeff King
2011-07-02 21:22                 ` Jakub Narebski
2011-07-02 21:10               ` Al Haraka
2011-07-06 13:59   ` Jakub Narebski
2011-07-06 15:13     ` [PATCH] docs: document --textconv diff option 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

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

  git send-email \
    --in-reply-to=20110702185724.GA14390@sigill.intra.peff.net \
    --to=peff@peff.net \
    --cc=alharaka@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).