Closed scunz closed 9 years ago
Hmm, thinking shortly about this: From a functional point of view, i agree that this would be what's mostly keeping a 0.1 release in the shaddows...
However, if we allow to commit the index
then we should really ask ourselves first: how should the user be able to add something to the index? Or in longer words: Yes, I think that we need to be able make a new commit out of the index. But we first need to implement adding files (or even hunks) to the index.
So, in a first roundtrip, I'd suggest the following:
QListWidget
, a QPlainTextEdit
and a buttonBox.git diff-tree
.diff_xxx_to_yyy
methods - But instead of using the PatchConsumer
we would have to use the ChangeListConsumer
. From therein we just put all the data that is given to the ChangeListConsumer
into a flat QList< Change >
With change being a struct Change{ QString oldFile, newFile; ... };
.commit
. When pressed, we use a Git::TreeBuilder
to mix the existing index with the selection in the list widget. With the resulting tree, the message in the plain text edit and the signature data from the config-subsystem, we then can create a new commit.I've been distracted quite a bit (again) recently. I'm not sure as to when I will actually be working on mgv again...
Not a problem. I send a PR (well, maybe next week or so :smile:) and we discuss it when it is available.
Would be cool.
Hi. Thaught the time is right to do it :smile:. So I set up another branch topic/IndexView
and added a simple stupid dialog there. Found it to be simpler to start off this way, than a PR. Could you review please? It is not much - basically the UI right now. I just like to know, if the QListView for the "Diff" is going in the right direction.
Yeah, I think this is going in the right direction. I've thought several times about creating a view to the index, but always dismissed it.
Just two nitpicks:
Ya got me, I copied the module as a template. Thanks for the hint :+1: - I will fix that. Btw.: The commit dialog UI is made similar to the GitX one (see https://github.com/rowanj/gitx).
Got a quick preview implementation of the ´diffIndexToWorkingTree` thingy. Far from really usable, but shows it generally works! Well, kind of :smile:
Closing this one as we have implemented it, addressed in Redmine. The basic commit mechanism with staging/unstaging files and creation a commit with message. There's no linewise staging yet, but we really need to cleanly bring that one into our Roadmap in the project system.
Do you mean the
stage/index
here? In my oppinion this is one of the main features blocking us from getting theGenesis
version ready.