Re: Gitweb 1.7.5 and Textconv Configuration

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]