Community
Participate
Working Groups
If I have a project with a specific commit comment template ( Mylyn preference ) and stage a change using the 'staging view' - drag and drop a file to the 'staged changes' widget the commit message template follows the workspace commit template preference, not the project-specific one. Using the commit dialog brings up the correct message.
I've just tested this with the nightly build and it seems to work as I expect it. Can you test with that?
Actually, I think I have seen the issue now. If you switch to a new task the staging view retains the old task's commit message whereas the commit dialog will show the new task's.
(In reply to comment #2) > Actually, I think I have seen the issue now. If you switch to a new task the > staging view retains the old task's commit message whereas the commit dialog > will show the new task's. This is another problem which I have noticed, but I was too lazy to report it as well. I think that the root cause is the one reported in bug 349763 ; since my staging view is hidden when the task is activated it is unable to find a project and therefore does not read the project-specific bug template. Please try activating a task with the staging view minimised . The project-specific template will not get selected. Instead, the global one will be used.
Pushed a minor change to track changes to the commit message so it can be reset if it hasn't changed (perhaps a 'Update commit message?' dialog could be used in some places). http://egit.eclipse.org/r/3858 The core issue with mylyn based commit messages is that egit does not track task activation so it won't update automatically to task activation. With this patch the current commit message would be updated if you stage or unstage a resource (or otherwise refresh the staging view) if the commit messages is unmodified.
*** Bug 387388 has been marked as a duplicate of this bug. ***
*** Bug 394056 has been marked as a duplicate of this bug. ***
*** Bug 412714 has been marked as a duplicate of this bug. ***
The issue here is that when using the staging view, the project-specific commit message template is *never* used. Instead, the gloabl commit message template is used. The commit dialog uses the correct template; the staging view should use the same one.
(In reply to Bernard Leach from comment #4) > http://egit.eclipse.org/r/3858 This link doesn't seem to work anymore. Is somebody considering to fix this problem?
What template should be used if multiple projects are involved in the commit?
(In reply to Eike Stepper from comment #9) > (In reply to Bernard Leach from comment #4) > > http://egit.eclipse.org/r/3858 > > This link doesn't seem to work anymore. Is somebody considering to fix this > problem? this link points to the old gerrit server egit was using before webmaster did setup the shared server. This link translates to https://git.eclipse.org/r/#/c/3858 on the shared server. I'll have a look into this patch which obviously slipped through.
Looking at that patch, it might be a needed step towards addressing an important issue for the Mylyn integration, but it has nothing to do with the description/summary of this bug.
(In reply to Sam Davis from comment #10) > What template should be used if multiple projects are involved in the commit? There seem to be some options. I'd probably just add them all (ordered by relevance?). In the end this case is not so frequent. (In reply to Sam Davis from comment #12) > [...] but it has nothing to do with the description/summary of this bug. Do you want me to submit a new bugzilla? Against what component?
(In reply to Eike Stepper from comment #13) > (In reply to Sam Davis from comment #10) > > What template should be used if multiple projects are involved in the commit? > > There seem to be some options. I'd probably just add them all (ordered by > relevance?). In the end this case is not so frequent. We have a repo that has multiple projects in the same repo[1] and it's standard practice here to commit to multiple projects at once, so I have to deal with this often. What would make this nicer is if there was an option to ignore any lines that already exist in the message. i.e.: If each project had a template of the form: > ${task.key} ${task.description} > Project X: > - It would not repeat the "${task.key} ${task.description}" line but if you included content from projects X, Y and Z it would give you a template like: > ${task.key} ${task.description} > Project X: > - > Project Y: > Project Z: Alternately. A way to specify a command line to to pipe the template through would allow more flexibility. [1] It's actually an svn repo that I access via git svn.
Oh yes, I think I was a bit unclear. I suspect that most people (like myself) would use the same, per-repo comment template for all the projects that come from that repo. And of course they'd commit changes to multiple such projects at once. So I meant (but didn't say) that the templates for these projects, if they're really identical, should result in only one commit message. In the end this commit is task-specific and not project-related. Would that be right?
(In reply to comment #13) > > Do you want me to submit a new bugzilla? Against what component? I think it's worth opening a bug against EGit/Mylyn (if there isn't already one) that the commit message is not refreshed when the active task changes. That's a major annoyance for me. (In reply to comment #15) > once. So I meant (but didn't say) that the templates for these projects, if > they're really identical, should result in only one commit message. In the end > this commit is task-specific and not project-related. Would that be right? I think that's right. In fact it might be fine to just use the commit template of the first project. Perhaps that's what the commit dialog does already. This is sounding like an easy fix.
*** Bug 439389 has been marked as a duplicate of this bug. ***
(In reply to Sam Davis from comment #16) > I think it's worth opening a bug against EGit/Mylyn (if there isn't already > one) that the commit message is not refreshed when the active task changes. > That's a major annoyance for me. Same for me. That's why I contributed a patch two years ago: http://bugs.eclipse.org/393118
Thanks for the bug. I would love to see it fixed.
Maybe it is a good idea to revive this issue as Eclipse Neon has disabled the Git commit dialog by default.
New Gerrit change created: https://git.eclipse.org/r/81047
Gerrit change https://git.eclipse.org/r/81047 was merged to [master]. Commit: http://git.eclipse.org/c/egit/egit.git/commit/?id=5652cb7ba8ce14c25a21657c345336f383edc064
merged