[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kwrite-devel
Subject:    Re: Broken Git repos scanning in project plugin
From:       Valentin Rouet <v.rouet () gmail ! com>
Date:       2015-11-02 17:54:55
Message-ID: CACAhqFWyWxEqUGpa5Y4C9mbPaEzsmDWdPQsA5WS3Cg5Xbn1s5g () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


Thanks for the positive feedback,

I've started to work on it, and have already come up with the first part,
which is displaying the new staged files in the list (see patch attached).
Now for the second part, I agree that it would be good to display those
files in some distinctive way (and actually it would also be quite nice to
use the opportunity to have a style for all existing files which are
currently different from HEAD, which the libgit2 function I used also
returns). The problem there is I'm not really familiar with Qt, and don't
really know where to look in order to set the font style of the files in
the list. Can someone provide me with some guidance on this? Also, the way
I see it, it might require the *files* object returned by the Worker to be
something more than a simple QStringList, to be able to associate some
metadata about each file, and not have to check again for each file when
processing the list.

Valentin

On Mon, Nov 2, 2015 at 4:35 PM, Christoph Cullmann <cullmann@absint.com>
wrote:

> Hi,
>
> > Great, thanks for applying my patch.
> thanks for providing it!
>
> >
> > I have another question/suggestion regarding the Git repos in the
> projects
> > plugin: I personally find it slightly annoying that the files that have
> not yet
> > been committed but have been staged for commit are still listed under
> > <untracked>.
> > Though they indeed are not yet in the repo's tree, I'd really like to be
> able to
> > reload after having added all the newly created files and see them in
> their
> > actual pathes instead of in <untracked>.
> >
> > I'd like your feedback on whether you guys thinks it's a good or a bad
> idea. If
> > you think it makes sense, I'd be happy to have a look at how to achieve
> that
> > and offer a patch.
> I think it would be nice, too, if there is some visual indication that
> they are still
> not "tracked" like different font style or icon overlay ;=)
>
> Definitely a good idea, patches welcome ;=)
>
> Greetings
> Christoph
>
> >
> > Cheers,
> >
> > Valentin
> >
> > On Sun, Nov 1, 2015 at 7:23 PM, Christoph Cullmann < cullmann@absint.com
> >
> > wrote:
> >
> >
> > Hi,
> >
> > thanks for the patch, still works fine for me (thought I never had the
> problem).
> >
> > Commited:
> >
> > https://bugs.kde.org/show_bug.cgi?id=354494
> >
> > Christoph Cullmann < cullmann@kde.org > changed:
> >
> > What |Removed |Added
> >
> ----------------------------------------------------------------------------
> > Latest Commit| | http://commits.kde.org/kate
> >| |/1740e4db3aab2d4b0d0fbdaad1
> >| |4f8080d0b5346e
> > Status|UNCONFIRMED |RESOLVED
> > Resolution|--- |FIXED
> >
> > --- Comment #3 from Christoph Cullmann < cullmann@kde.org > ---
> > Git commit 1740e4db3aab2d4b0d0fbdaad14f8080d0b5346e by Christoph
> Cullmann, on
> > behalf of Valentin Rouet.
> > Committed on 01/11/2015 at 18:22.
> > Pushed by cullmann into branch 'master'.
> >
> > fix loading of git projects
> >
> > M +15 -2 addons/project/kateprojectworker.cpp
> >
> > http://commits.kde.org/kate/1740e4db3aab2d4b0d0fbdaad14f8080d0b5346e
> >
> > --
> > You are receiving this mail because:
> > You are watching the assignee of the bug.
> >
> > ----- Am 31. Okt 2015 um 18:29 schrieb Valentin Rouet v.rouet@gmail.com
> :
> >
> >> Here is a patch that fixes the bug and adds some comments to the calls
> of the
> >> libGit2 functions. It should still work for people who didn't have the
> problem.
> >> Can someone try it out and review the code to include it in the repo?
> >>
> >> On Sat, Oct 31, 2015 at 6:28 PM, Valentin Rouet < v.rouet@gmail.com >
> wrote:
> >>
> >>
> >>
> >> OK, I've been investigating the source code, and have narrowed down the
> place
> >> where it happens. It does seem to come from some change in Qt.
> >>
> >> The problem is in file addons/project/kateprojectworker.cpp at line 358:
> >>
> >>
> >> if (relpathUtf8.isEmpty() ) { // git_object_lookup_bypath is not able
> to resolv
> >> "." as path
> >> It seems this line relies on the fact that Qdir::relativeFilePath()
> would return
> >> an empty string when called with the current working dir as argument,
> but what
> >> it actually returns is the string "."
> >>
> >> When replacing that test with the following, the content loads:
> >>
> >>
> >> if (relpathUtf8.isEmpty() || relpathUtf8 == ".") {
> >> But it's not a full solution, because then what you get is this:
> >>
> >> As you can see, there is a "." folder, instead of the files at the
> project's
> >> root being displayed directly. This makes me think that this change of
> Qt
> >> functions from returning an empty string to returning "." is affecting
> other
> >> places of the code. I also wonder if it really is Qt-related or if it
> has to do
> >> with an underlying OS-dependent mechanism... Anyways I haven't been
> able to
> >> find any reference to such change in Qt's changelogs.
> >>
> >> On Sat, Oct 31, 2015 at 6:03 PM, Valentin Rouet < v.rouet@gmail.com >
> wrote:
> >>
> >>
> >>
> >> OK, I've been investigating the source code, and have narrowed down the
> place
> >> where it happens. It does seem to come from some change in Qt.
> >>
> >> The problem is in file addons/project/kateprojectworker.cpp at line 358:
> >>
> >>
> >> if (relpathUtf8.isEmpty() ) { // git_object_lookup_bypath is not able
> to resolv
> >> "." as path
> >> It seems this line relies on the fact that Qdir::relativeFilePath()
> would return
> >> an empty string when called with the current working dir as argument,
> but what
> >> it actually returns is the string "."
> >>
> >> When replacing that test with the following, the content loads:
> >>
> >>
> >> if (relpathUtf8.isEmpty() || relpathUtf8 == ".") {
> >> But it's not a full solution, because then what you get is this:
> >>
> >> As you can see, there is a "." folder, instead of the files at the
> project's
> >> root being displayed directly. This makes me think that this change of
> Qt
> >> functions from returning an empty string to returning "." is affecting
> other
> >> places of the code. I also wonder if it really is Qt-related or if it
> has to do
> >> with an underlying OS-dependent mechanism... Anyways I haven't been
> able to
> >> find any reference to such change in Qt's changelogs.
> >>
> >> On Sat, Oct 31, 2015 at 3:13 PM, Michal Humpula <
> michal.humpula@hudrydum.cz >
> >> wrote:
> >>
> >>
> >> Are you capable of downgrading to Qt5.4, just for the fun of testing?:)
> >>
> >> On Saturday 31 of October 2015 15:11:12 Valentin Rouet wrote:
> >>> Hi,
> >>>
> >>> I'm not completely sure after which update this started to happen, but
> from
> >>> what I see in my packages cache, I was on Qt 5.5.0 since august and it
> was
> >>> working.
> >>>
> >>> 2 updates I see are:
> >>> - Kate 15.08.1 to 15.08.2 on october 13th
> >>> - Qt 5.5.0 to 5.5.1 on october 16th
> >>>
> >>>
> >>> The problem must have been introduced by one of these 2 updates, but I
> >>> don't know which.
> >>>
> >>> On Sat, Oct 31, 2015 at 3:00 PM, Michal Humpula <
> michal.humpula@hudrydum.cz >
> >>> wrote:
> >>> > Hi Valentin,
> >>> >
> >>> > can you pinpoint the time when it started to happen? Could it be
> after
> >>> > upgrade
> >>> > to Qt5.5?:) I have a very similar issue to yours, which is
> reproducible on
> >>> > Qt5.5 but not on Qt5.4:)
> >>> >
> >>> > Cheers
> >>> > Michal
> >>> >
> >>> > On Saturday 31 of October 2015 13:51:07 Valentin Rouet wrote:
> >>> > > Dear Kate developers,
> >>> > >
> >>> > > First of all, before talking about problems, let me thank you for
> the
> >>> >
> >>> > great
> >>> >
> >>> > > pieces of software that Kate/Kwrite are. I've been using them for
> about
> >>> >
> >>> > 10
> >>> >
> >>> > > years, and they've always been fulfilling my text-editing and
> >>> > > programming
> >>> > > needs.
> >>> > >
> >>> > > I have already reported the bug I'm having on the bugtracker (
> >>> > > https://bugs.kde.org/show_bug.cgi?id=354494 ), but didn't get any
> >>> >
> >>> > feedback
> >>> >
> >>> > > from any dev, so I'd just like to be sure you're aware of its
> existence,
> >>> >
> >>> > as
> >>> >
> >>> > > it seems to me that one major feature is involved. Someone did
> confirm
> >>> >
> >>> > thay
> >>> >
> >>> > > had the same problem though, on a different distro but with the
> same
> >>> > > package version.
> >>> > >
> >>> > > The Git repo scanning feature is great and absolutely necessary.
> I've
> >>> >
> >>> > been
> >>> >
> >>> > > working without it for a few days, using the files browser plugin
> >>> >
> >>> > instead,
> >>> >
> >>> > > but it's really not filling the void...
> >>> > >
> >>> > > If you need any additional information to track down the bug,
> please let
> >>> >
> >>> > me
> >>> >
> >>> > > know.
> >>> > >
> >>> > > Thanks in advance,
> >>> > >
> >>> > > Valentin Rouet
> >>
> >>
> >>
> >>
> >>
> >> _______________________________________________
> >> KWrite-Devel mailing list
> >> KWrite-Devel@kde.org
> >> https://mail.kde.org/mailman/listinfo/kwrite-devel
> >
> > --
> > ----------------------------- Dr.-Ing. Christoph Cullmann ---------
> > AbsInt Angewandte Informatik GmbH Email: cullmann@AbsInt.com
> > Science Park 1 Tel: +49-681-38360-22
> > 66123 Saarbrücken Fax: +49-681-38360-20
> > GERMANY WWW: http://www.AbsInt.com
> > --------------------------------------------------------------------
> > Geschäftsführung: Dr.-Ing. Christian Ferdinand
> > Eingetragen im Handelsregister des Amtsgerichts Saarbrücken, HRB 11234
> > _______________________________________________
> > KWrite-Devel mailing list
> > KWrite-Devel@kde.org
> > https://mail.kde.org/mailman/listinfo/kwrite-devel
> >
> >
> >
> > _______________________________________________
> > KWrite-Devel mailing list
> > KWrite-Devel@kde.org
> > https://mail.kde.org/mailman/listinfo/kwrite-devel
>
> --
> ----------------------------- Dr.-Ing. Christoph Cullmann ---------
> AbsInt Angewandte Informatik GmbH      Email: cullmann@AbsInt.com
> Science Park 1                         Tel:   +49-681-38360-22
> 66123 Saarbrücken                      Fax:   +49-681-38360-20
> GERMANY                                WWW:   http://www.AbsInt.com
> --------------------------------------------------------------------
> Geschäftsführung: Dr.-Ing. Christian Ferdinand
> Eingetragen im Handelsregister des Amtsgerichts Saarbrücken, HRB 11234
> _______________________________________________
> KWrite-Devel mailing list
> KWrite-Devel@kde.org
> https://mail.kde.org/mailman/listinfo/kwrite-devel
>

[Attachment #5 (text/html)]

<div dir="ltr"><div><div><div>Thanks for the positive feedback,<br><br></div>I&#39;ve \
started to work on it, and have already come up with the first part, which is \
displaying the new staged files in the list (see patch attached).<br></div>Now for \
the second part, I agree that it would be good to display those files in some \
distinctive way (and actually it would also be quite nice to use the opportunity to \
have a style for all existing files which are currently different from HEAD, which \
the libgit2 function I used also returns). The problem there is I&#39;m not really \
familiar with Qt, and don&#39;t really know where to look in order to set the font \
style of the files in the list. Can someone provide me with some guidance on this? \
Also, the way I see it, it might require the <b>files</b> object returned by the \
Worker to be something more than a simple QStringList, to be able to associate some \
metadata about each file, and not have to check again for each file when processing \
the list.<br><br></div>Valentin<br></div><div class="gmail_extra"><br><div \
class="gmail_quote">On Mon, Nov 2, 2015 at 4:35 PM, Christoph Cullmann <span \
dir="ltr">&lt;<a href="mailto:cullmann@absint.com" \
target="_blank">cullmann@absint.com</a>&gt;</span> wrote:<br><blockquote \
class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
solid;padding-left:1ex">Hi,<br> <span class=""><br>
&gt; Great, thanks for applying my patch.<br>
</span>thanks for providing it!<br>
<span class=""><br>
&gt;<br>
&gt; I have another question/suggestion regarding the Git repos in the projects<br>
&gt; plugin: I personally find it slightly annoying that the files that have not \
yet<br> &gt; been committed but have been staged for commit are still listed \
under<br> &gt; &lt;untracked&gt;.<br>
&gt; Though they indeed are not yet in the repo&#39;s tree, I&#39;d really like to be \
able to<br> &gt; reload after having added all the newly created files and see them \
in their<br> &gt; actual pathes instead of in &lt;untracked&gt;.<br>
&gt;<br>
&gt; I&#39;d like your feedback on whether you guys thinks it&#39;s a good or a bad \
idea. If<br> &gt; you think it makes sense, I&#39;d be happy to have a look at how to \
achieve that<br> &gt; and offer a patch.<br>
</span>I think it would be nice, too, if there is some visual indication that they \
are still<br> not &quot;tracked&quot; like different font style or icon overlay \
;=)<br> <br>
Definitely a good idea, patches welcome ;=)<br>
<br>
Greetings<br>
<span class="HOEnZb"><font color="#888888">Christoph<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
&gt;<br>
&gt; Cheers,<br>
&gt;<br>
&gt; Valentin<br>
&gt;<br>
&gt; On Sun, Nov 1, 2015 at 7:23 PM, Christoph Cullmann &lt; <a \
href="mailto:cullmann@absint.com">cullmann@absint.com</a> &gt;<br> &gt; wrote:<br>
&gt;<br>
&gt;<br>
&gt; Hi,<br>
&gt;<br>
&gt; thanks for the patch, still works fine for me (thought I never had the \
problem).<br> &gt;<br>
&gt; Commited:<br>
&gt;<br>
&gt; <a href="https://bugs.kde.org/show_bug.cgi?id=354494" rel="noreferrer" \
target="_blank">https://bugs.kde.org/show_bug.cgi?id=354494</a><br> &gt;<br>
&gt; Christoph Cullmann &lt; <a href="mailto:cullmann@kde.org">cullmann@kde.org</a> \
&gt; changed:<br> &gt;<br>
&gt; What |Removed |Added<br>
&gt; ----------------------------------------------------------------------------<br>
&gt; Latest Commit| | <a href="http://commits.kde.org/kate" rel="noreferrer" \
target="_blank">http://commits.kde.org/kate</a><br> &gt;| \
|/1740e4db3aab2d4b0d0fbdaad1<br> &gt;| |4f8080d0b5346e<br>
&gt; Status|UNCONFIRMED |RESOLVED<br>
&gt; Resolution|--- |FIXED<br>
&gt;<br>
&gt; --- Comment #3 from Christoph Cullmann &lt; <a \
href="mailto:cullmann@kde.org">cullmann@kde.org</a> &gt; ---<br> &gt; Git commit \
1740e4db3aab2d4b0d0fbdaad14f8080d0b5346e by Christoph Cullmann, on<br> &gt; behalf of \
Valentin Rouet.<br> &gt; Committed on 01/11/2015 at 18:22.<br>
&gt; Pushed by cullmann into branch &#39;master&#39;.<br>
&gt;<br>
&gt; fix loading of git projects<br>
&gt;<br>
&gt; M +15 -2 addons/project/kateprojectworker.cpp<br>
&gt;<br>
&gt; <a href="http://commits.kde.org/kate/1740e4db3aab2d4b0d0fbdaad14f8080d0b5346e" \
rel="noreferrer" target="_blank">http://commits.kde.org/kate/1740e4db3aab2d4b0d0fbdaad14f8080d0b5346e</a><br>
 &gt;<br>
&gt; --<br>
&gt; You are receiving this mail because:<br>
&gt; You are watching the assignee of the bug.<br>
&gt;<br>
&gt; ----- Am 31. Okt 2015 um 18:29 schrieb Valentin Rouet <a \
href="mailto:v.rouet@gmail.com">v.rouet@gmail.com</a> :<br> &gt;<br>
&gt;&gt; Here is a patch that fixes the bug and adds some comments to the calls of \
the<br> &gt;&gt; libGit2 functions. It should still work for people who didn&#39;t \
have the problem.<br> &gt;&gt; Can someone try it out and review the code to include \
it in the repo?<br> &gt;&gt;<br>
&gt;&gt; On Sat, Oct 31, 2015 at 6:28 PM, Valentin Rouet &lt; <a \
href="mailto:v.rouet@gmail.com">v.rouet@gmail.com</a> &gt; wrote:<br> &gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; OK, I&#39;ve been investigating the source code, and have narrowed down the \
place<br> &gt;&gt; where it happens. It does seem to come from some change in Qt.<br>
&gt;&gt;<br>
&gt;&gt; The problem is in file addons/project/kateprojectworker.cpp at line 358:<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; if (relpathUtf8.isEmpty() ) { // git_object_lookup_bypath is not able to \
resolv<br> &gt;&gt; &quot;.&quot; as path<br>
&gt;&gt; It seems this line relies on the fact that Qdir::relativeFilePath() would \
return<br> &gt;&gt; an empty string when called with the current working dir as \
argument, but what<br> &gt;&gt; it actually returns is the string &quot;.&quot;<br>
&gt;&gt;<br>
&gt;&gt; When replacing that test with the following, the content loads:<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; if (relpathUtf8.isEmpty() || relpathUtf8 == &quot;.&quot;) {<br>
&gt;&gt; But it&#39;s not a full solution, because then what you get is this:<br>
&gt;&gt;<br>
&gt;&gt; As you can see, there is a &quot;.&quot; folder, instead of the files at the \
project&#39;s<br> &gt;&gt; root being displayed directly. This makes me think that \
this change of Qt<br> &gt;&gt; functions from returning an empty string to returning \
&quot;.&quot; is affecting other<br> &gt;&gt; places of the code. I also wonder if it \
really is Qt-related or if it has to do<br> &gt;&gt; with an underlying OS-dependent \
mechanism... Anyways I haven&#39;t been able to<br> &gt;&gt; find any reference to \
such change in Qt&#39;s changelogs.<br> &gt;&gt;<br>
&gt;&gt; On Sat, Oct 31, 2015 at 6:03 PM, Valentin Rouet &lt; <a \
href="mailto:v.rouet@gmail.com">v.rouet@gmail.com</a> &gt; wrote:<br> &gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; OK, I&#39;ve been investigating the source code, and have narrowed down the \
place<br> &gt;&gt; where it happens. It does seem to come from some change in Qt.<br>
&gt;&gt;<br>
&gt;&gt; The problem is in file addons/project/kateprojectworker.cpp at line 358:<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; if (relpathUtf8.isEmpty() ) { // git_object_lookup_bypath is not able to \
resolv<br> &gt;&gt; &quot;.&quot; as path<br>
&gt;&gt; It seems this line relies on the fact that Qdir::relativeFilePath() would \
return<br> &gt;&gt; an empty string when called with the current working dir as \
argument, but what<br> &gt;&gt; it actually returns is the string &quot;.&quot;<br>
&gt;&gt;<br>
&gt;&gt; When replacing that test with the following, the content loads:<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; if (relpathUtf8.isEmpty() || relpathUtf8 == &quot;.&quot;) {<br>
&gt;&gt; But it&#39;s not a full solution, because then what you get is this:<br>
&gt;&gt;<br>
&gt;&gt; As you can see, there is a &quot;.&quot; folder, instead of the files at the \
project&#39;s<br> &gt;&gt; root being displayed directly. This makes me think that \
this change of Qt<br> &gt;&gt; functions from returning an empty string to returning \
&quot;.&quot; is affecting other<br> &gt;&gt; places of the code. I also wonder if it \
really is Qt-related or if it has to do<br> &gt;&gt; with an underlying OS-dependent \
mechanism... Anyways I haven&#39;t been able to<br> &gt;&gt; find any reference to \
such change in Qt&#39;s changelogs.<br> &gt;&gt;<br>
&gt;&gt; On Sat, Oct 31, 2015 at 3:13 PM, Michal Humpula &lt; <a \
href="mailto:michal.humpula@hudrydum.cz">michal.humpula@hudrydum.cz</a> &gt;<br> \
&gt;&gt; wrote:<br> &gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; Are you capable of downgrading to Qt5.4, just for the fun of testing?:)<br>
&gt;&gt;<br>
&gt;&gt; On Saturday 31 of October 2015 15:11:12 Valentin Rouet wrote:<br>
&gt;&gt;&gt; Hi,<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; I&#39;m not completely sure after which update this started to happen, \
but from<br> &gt;&gt;&gt; what I see in my packages cache, I was on Qt 5.5.0 since \
august and it was<br> &gt;&gt;&gt; working.<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; 2 updates I see are:<br>
&gt;&gt;&gt; - Kate 15.08.1 to 15.08.2 on october 13th<br>
&gt;&gt;&gt; - Qt 5.5.0 to 5.5.1 on october 16th<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; The problem must have been introduced by one of these 2 updates, but \
I<br> &gt;&gt;&gt; don&#39;t know which.<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; On Sat, Oct 31, 2015 at 3:00 PM, Michal Humpula &lt; <a \
href="mailto:michal.humpula@hudrydum.cz">michal.humpula@hudrydum.cz</a> &gt;<br> \
&gt;&gt;&gt; wrote:<br> &gt;&gt;&gt; &gt; Hi Valentin,<br>
&gt;&gt;&gt; &gt;<br>
&gt;&gt;&gt; &gt; can you pinpoint the time when it started to happen? Could it be \
after<br> &gt;&gt;&gt; &gt; upgrade<br>
&gt;&gt;&gt; &gt; to Qt5.5?:) I have a very similar issue to yours, which is \
reproducible on<br> &gt;&gt;&gt; &gt; Qt5.5 but not on Qt5.4:)<br>
&gt;&gt;&gt; &gt;<br>
&gt;&gt;&gt; &gt; Cheers<br>
&gt;&gt;&gt; &gt; Michal<br>
&gt;&gt;&gt; &gt;<br>
&gt;&gt;&gt; &gt; On Saturday 31 of October 2015 13:51:07 Valentin Rouet wrote:<br>
&gt;&gt;&gt; &gt; &gt; Dear Kate developers,<br>
&gt;&gt;&gt; &gt; &gt;<br>
&gt;&gt;&gt; &gt; &gt; First of all, before talking about problems, let me thank you \
for the<br> &gt;&gt;&gt; &gt;<br>
&gt;&gt;&gt; &gt; great<br>
&gt;&gt;&gt; &gt;<br>
&gt;&gt;&gt; &gt; &gt; pieces of software that Kate/Kwrite are. I&#39;ve been using \
them for about<br> &gt;&gt;&gt; &gt;<br>
&gt;&gt;&gt; &gt; 10<br>
&gt;&gt;&gt; &gt;<br>
&gt;&gt;&gt; &gt; &gt; years, and they&#39;ve always been fulfilling my text-editing \
and<br> &gt;&gt;&gt; &gt; &gt; programming<br>
&gt;&gt;&gt; &gt; &gt; needs.<br>
&gt;&gt;&gt; &gt; &gt;<br>
&gt;&gt;&gt; &gt; &gt; I have already reported the bug I&#39;m having on the \
bugtracker (<br> &gt;&gt;&gt; &gt; &gt; <a \
href="https://bugs.kde.org/show_bug.cgi?id=354494" rel="noreferrer" \
target="_blank">https://bugs.kde.org/show_bug.cgi?id=354494</a> ), but didn&#39;t get \
any<br> &gt;&gt;&gt; &gt;<br>
&gt;&gt;&gt; &gt; feedback<br>
&gt;&gt;&gt; &gt;<br>
&gt;&gt;&gt; &gt; &gt; from any dev, so I&#39;d just like to be sure you&#39;re aware \
of its existence,<br> &gt;&gt;&gt; &gt;<br>
&gt;&gt;&gt; &gt; as<br>
&gt;&gt;&gt; &gt;<br>
&gt;&gt;&gt; &gt; &gt; it seems to me that one major feature is involved. Someone did \
confirm<br> &gt;&gt;&gt; &gt;<br>
&gt;&gt;&gt; &gt; thay<br>
&gt;&gt;&gt; &gt;<br>
&gt;&gt;&gt; &gt; &gt; had the same problem though, on a different distro but with \
the same<br> &gt;&gt;&gt; &gt; &gt; package version.<br>
&gt;&gt;&gt; &gt; &gt;<br>
&gt;&gt;&gt; &gt; &gt; The Git repo scanning feature is great and absolutely \
necessary. I&#39;ve<br> &gt;&gt;&gt; &gt;<br>
&gt;&gt;&gt; &gt; been<br>
&gt;&gt;&gt; &gt;<br>
&gt;&gt;&gt; &gt; &gt; working without it for a few days, using the files browser \
plugin<br> &gt;&gt;&gt; &gt;<br>
&gt;&gt;&gt; &gt; instead,<br>
&gt;&gt;&gt; &gt;<br>
&gt;&gt;&gt; &gt; &gt; but it&#39;s really not filling the void...<br>
&gt;&gt;&gt; &gt; &gt;<br>
&gt;&gt;&gt; &gt; &gt; If you need any additional information to track down the bug, \
please let<br> &gt;&gt;&gt; &gt;<br>
&gt;&gt;&gt; &gt; me<br>
&gt;&gt;&gt; &gt;<br>
&gt;&gt;&gt; &gt; &gt; know.<br>
&gt;&gt;&gt; &gt; &gt;<br>
&gt;&gt;&gt; &gt; &gt; Thanks in advance,<br>
&gt;&gt;&gt; &gt; &gt;<br>
&gt;&gt;&gt; &gt; &gt; Valentin Rouet<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; _______________________________________________<br>
&gt;&gt; KWrite-Devel mailing list<br>
&gt;&gt; <a href="mailto:KWrite-Devel@kde.org">KWrite-Devel@kde.org</a><br>
&gt;&gt; <a href="https://mail.kde.org/mailman/listinfo/kwrite-devel" \
rel="noreferrer" target="_blank">https://mail.kde.org/mailman/listinfo/kwrite-devel</a><br>
 &gt;<br>
&gt; --<br>
&gt; ----------------------------- Dr.-Ing. Christoph Cullmann ---------<br>
&gt; AbsInt Angewandte Informatik GmbH Email: cullmann@AbsInt.com<br>
&gt; Science Park 1 Tel: <a href="tel:%2B49-681-38360-22" \
value="+496813836022">+49-681-38360-22</a><br> &gt; 66123 Saarbrücken Fax: <a \
href="tel:%2B49-681-38360-20" value="+496813836020">+49-681-38360-20</a><br> &gt; \
GERMANY WWW: <a href="http://www.AbsInt.com" rel="noreferrer" \
target="_blank">http://www.AbsInt.com</a><br> &gt; \
--------------------------------------------------------------------<br> &gt; \
Geschäftsführung: Dr.-Ing. Christian Ferdinand<br> &gt; Eingetragen im \
Handelsregister des Amtsgerichts Saarbrücken, HRB 11234<br> &gt; \
_______________________________________________<br> &gt; KWrite-Devel mailing \
list<br> &gt; <a href="mailto:KWrite-Devel@kde.org">KWrite-Devel@kde.org</a><br>
&gt; <a href="https://mail.kde.org/mailman/listinfo/kwrite-devel" rel="noreferrer" \
target="_blank">https://mail.kde.org/mailman/listinfo/kwrite-devel</a><br> &gt;<br>
&gt;<br>
&gt;<br>
&gt; _______________________________________________<br>
&gt; KWrite-Devel mailing list<br>
&gt; <a href="mailto:KWrite-Devel@kde.org">KWrite-Devel@kde.org</a><br>
&gt; <a href="https://mail.kde.org/mailman/listinfo/kwrite-devel" rel="noreferrer" \
target="_blank">https://mail.kde.org/mailman/listinfo/kwrite-devel</a><br> <br>
--<br>
----------------------------- Dr.-Ing. Christoph Cullmann ---------<br>
AbsInt Angewandte Informatik GmbH         Email: cullmann@AbsInt.com<br>
Science Park 1                                      Tel:     <a \
href="tel:%2B49-681-38360-22" value="+496813836022">+49-681-38360-22</a><br> 66123 \
Saarbrücken                                 Fax:     <a \
href="tel:%2B49-681-38360-20" value="+496813836020">+49-681-38360-20</a><br> GERMANY  \
WWW:     <a href="http://www.AbsInt.com" rel="noreferrer" \
                target="_blank">http://www.AbsInt.com</a><br>
--------------------------------------------------------------------<br>
Geschäftsführung: Dr.-Ing. Christian Ferdinand<br>
Eingetragen im Handelsregister des Amtsgerichts Saarbrücken, HRB 11234<br>
_______________________________________________<br>
KWrite-Devel mailing list<br>
<a href="mailto:KWrite-Devel@kde.org">KWrite-Devel@kde.org</a><br>
<a href="https://mail.kde.org/mailman/listinfo/kwrite-devel" rel="noreferrer" \
target="_blank">https://mail.kde.org/mailman/listinfo/kwrite-devel</a><br> \
</div></div></blockquote></div><br></div>


["kate_git_staged.patch" (text/x-patch)]

diff --git a/addons/project/kateprojectworker.cpp b/addons/project/kateprojectworker.cpp
index b053156..47c79bb 100644
--- a/addons/project/kateprojectworker.cpp
+++ b/addons/project/kateprojectworker.cpp
@@ -320,6 +320,30 @@ namespace {
 
         return files;
     }
+
+    int gitStatusListWalker(const char *path, unsigned int status_flags, void *payload)
+    {
+        struct git_walk_payload *data = static_cast<git_walk_payload *>(payload);
+
+        // if the entry is a new file, add it to the list
+        if (status_flags & GIT_STATUS_INDEX_NEW) {
+            QString name = QString::fromUtf8(path);
+            QString filepath = QDir(data->basedir).filePath(name);
+            data->files->append(filepath);
+        }
+
+        return 0;
+    }
+
+    QStringList gitSearchStatusList(git_repository *repo, const QString &basedir)
+    {
+        QStringList files;
+        struct git_walk_payload payload = {&files, false, basedir};
+
+        git_status_foreach(repo, gitStatusListWalker, (void *)&payload);
+
+        return files;
+    }
 }
 
 QStringList KateProjectWorker::filesFromGit(const QDir &dir, bool recursive)
@@ -379,6 +403,8 @@ QStringList KateProjectWorker::filesFromGit(const QDir &dir, bool recursive)
         files.append(gitSearchSubmodules(repo, path));
     }
 
+    files.append(gitSearchStatusList(repo, path));
+
     if (tree != root_tree) {
         git_object_free(tree);
     }

[Attachment #7 (text/plain)]

_______________________________________________
KWrite-Devel mailing list
KWrite-Devel@kde.org
https://mail.kde.org/mailman/listinfo/kwrite-devel


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic