From: Jakub Narebski <jnareb@gmail.com>
To: "Burt Culver" <burt@fishpond.co.nz>
Cc: git@vger.kernel.org
Subject: Re: git tree browsing in redmine
Date: Tue, 18 Nov 2008 02:06:19 -0800 (PST) [thread overview]
Message-ID: <m3ej19l57c.fsf@localhost.localdomain> (raw)
In-Reply-To: <b8f2e1780811172034w6828ddc8n62cf85b5fa366e22@mail.gmail.com>
"Burt Culver" <burt@fishpond.co.nz> writes:
> I'm trying to find some ideas for a better way to implement browsing
> of a git repository within the redmine application.
>
> My top level directory in my git repository has 300 files. Redmine
> wants to display each file name, its most recent revision, and the
> comment for that revision. Currently it does a git log -1 on each file
> to find the latest revision. Is there a quicker way of doing this for
> a whole directory? git log runs from .2 seconds to 3 seconds
> depending on the file on my server.
>
> Here is the open issue at redmine.org which has more details:
> http://www.redmine.org/issues/show/1435
>
> A fix for this would help a whole bunch of redmine / git users
> including myself.
First, while it might be common and cheap view (information) for
Subversion, it is not the case for Git. Git is whole project snapshot
based, not per-file snapshot based, or patch based. Take a look at
one of git web interfaces: gitweb, or cgit, or ViewGit to see how
repository browsing is implemented there: it is log-like view, then
tree, not tree, then history of files. Note also that for example
history of two files is more than union of histories of individual
files (history simplification, including merge simplification).
Second, I tried to implement such view (which I named 'tree blame'
view, because it looks a bit like blame/annotate, but for
directories/trees) for gitweb. You can view my attempts in
'gitweb/tree_blame' branch of my git fork:
http://repo.or.cz/w/git/jnareb-git.git?a=shortlog;h=refs/heads/gitweb/tree_blame
But I think the correct solution, if you decide that you absolutely
need so unnatural (and I think not that useful) view, would be to
implement such view in git core, allowing 'git blame' to work for
trees (directories). You would probably need to implement also some
kind of '--porcelain' output for script/Redmine.
Or as suggested add your work to libgit2 library, and make use of it
in Redmine...
--
Jakub Narebski
Poland
ShadeHawk on #git
prev parent reply other threads:[~2008-11-18 10:08 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-11-18 4:34 git tree browsing in redmine Burt Culver
2008-11-18 8:02 ` Andreas Ericsson
2008-11-18 10:06 ` Jakub Narebski [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=m3ej19l57c.fsf@localhost.localdomain \
--to=jnareb@gmail.com \
--cc=burt@fishpond.co.nz \
--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).