This forum has been archived. All content is frozen. Please use KDE Discuss instead.

git commit and opening all commited files

Tags: None
(comma "," separated)
piotrm
Registered Member
Posts
13
Karma
0
OS
Hi

I'm going to commit all changed files in project, so I'm clicking right mouse button on top of tree in Project view and choosing git -> Commit. Second way is click on "Code -> Commit area" on tool bar. Tested here as well. The issue is that in moment of click, KDevelop opens all files what can be committed in "Code" context. So I have a lot opened files which ones I don't need in this moment. In opened "Review" perspective I can see only "Overview" tab containing diff result. In "Patch review" view I have in "Changes" list all files. All of these files git showing in list: "Changes not staged for commit:" and in "Changes to be committed:".
I'm not sure if this is some bug or feature.
Closing all not required files is not the pleasure and other way is using "Close other files" and again open only interesting files.

I'm using:
Mageia 5 beta 2 with kernel: 3.18.3-server-2.mga5
and: KDevelop 4.7.0; KDE 4.14.3; Qt 4.8.6

---
best regards
patrickperonny
Registered Member
Posts
3
Karma
0
Hello,

I think I have the same issue but with subversion. Kdevelop open all commited files even images files (png, jpg, ...).
This is annoying.

This bug/feature appeared in 4.7.x series because in 4.6.x committed files appeared only in Patch review view.
User avatar
apol
Registered Member
Posts
61
Karma
0
OS
piotrm wrote:Hi
The issue is that in moment of click, KDevelop opens all files what can be committed in "Code" context. So I have a lot opened files which ones I don't need in this moment. In opened "Review" perspective I can see only "Overview" tab containing diff result. In "Patch review" view I have in "Changes" list all files. All of these files git showing in list: "Changes not staged for commit:" and in "Changes to be committed:".


All modified files get opened, isn't that what you'd expect?
piotrm
Registered Member
Posts
13
Karma
0
OS
Yes it is what I expect, because sometime I would like to change something in commit files.
The thing is that sometimes there is opened too much files than I expect. Especially these ones which I have closed before I invoked commit and there were some changes inside. These ones I don't need, only opened before commit. The example situation could be that I have changed 20 files (in some long coding session), I closed 15 (in mean time), left 5, I invoked commit and confirm it - execute it (clicking "Commit" button in "Patch Review" view) and after that I have opened all 20 changed files. Unfortunately it doesn't happen always when I do commit and execute it. For sure after long coding session, where I open, close, build, run, checking difference, etc. In this moment I don't know exactly the steps to reproduce it. When I found out then I request a bug.

BTW. Recently I found the situation where KDevelop open file(s), which one closed before invoke commit.
The steps to reproduce:
1. Run KDevelop with some session where is opened 3 files: file_0, file_1 and file_2
2. Open one more file: file_3 (using "Projects" view)
3. Change three files (file_1, file_2, file_3)
4. Close file_3
5. Invoke commit (I'm clicking right mouse button on top of the tree in the "Projects" view and choose "git -> Commit")
6. In "Patch Review" view I can see all 3 changed files (In editor I case additional "Overview" tab)
7. I choose file_3 in editor and I modify it and save it. Please note I'm in "Review" context (sometimes this button is not displayed. I don't know why)
8. I press "Cancel review" in "Patch Review" then KDevelop change context (back) to "Code"
9. I can see opened file_3, which one I closed before I invoked commit. I didn't expect it

I found also the issue with "Git -> Show Differences" and unwanted closing files, but I will request bug for this.
I like a lot this IDE, and I use it quite often, hence I meet bugs.


Bookmarks



Who is online

Registered users: abc72656, Bing [Bot], daret, Google [Bot], lockheed, Sogou [Bot], Yahoo [Bot]