Re: Git repository browsers, drag'n'drop and backlinks



On Sa, 09.01.2010 20:28, Jesse van den Kieboom wrote:

>Also it supports 3 selection targets:
>
>x-gitg/treeish: <path>\n<sha1>: <subject>
>text: <sha1>: <subject>\n\n<body>
>uri: gitg://<path>:<sha1>

I am not entirely sure that this is a good solution. I know that you
can't select more than one commit at a time in gitg, but I don't really
see why this restriction should be reflected in the dnd target. If
there's no real reason to do otherwise, I'd keep it analogous to other
dnd targets, which often work on lists.

Also, a single commit might have (and often has) more "treeish" names
associated to it, e.g. the commit representing the current head of a
branch has both a branch-name and a sha1. Depending on what it wants to
do, a dnd receiver might care for one or the other.

Offering the subject or even the body might be convenient for the
receiver, but given a repository path and a treeish, it can gather this
information itself. It might, for example, care more about the author
than the subject.

The proof-of-concept Tomboy receiver side, for example, set the link
text to the result of "git log --oneline treeish^..treeish".

>> 2. Make gitg recognise a --select command line option, which takes a
>> sha1, and selects this one after the repo has been loaded completely
>>   
>I implemented this too (I modified a few things here). gitg now accepts 
>uris in the form of gitg://<path>[:<sha1>] and installs itself as the 
>default uri handler (for gnome at least). Additionally it also adds the 
>--select option like you proposed (it's implemented is a bit more 
>efficient and accepts partial hashes).

Nice! Ideally, it would accept every treeish notation (e.g. everything
that "git checkout" understands), but your implementation sounds great
already, and would fit my needs as it is, so thank you for that.

>Currently the tree view does not allow selecting multiple revisions, so 
>it just exports one revision at the moment.

See above about multiple treeish objects associated to a single
commit, and not limiting the dnd target definition to the current
state of the gitg UI.

Thanks a lot (also to Guilhem, of course!) for your comments and
efforts!

Holger


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