fix handling of sub modules in git rely on ls-files --recurse-submodules, there since end of 2016
ClosedPublic

Authored by cullmann on Apr 7 2019, 11:40 AM.

Details

Summary

before this fix, submodules lead to duplicate files in the file tree for a project

Test Plan

test e.g.

https://github.com/christoph-cullmann/cullmann.io

without patch: duplicated files, missing sub-modules

with patch: no duplicates + sub-module files are there

Diff Detail

Repository
R40 Kate
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
cullmann created this revision.Apr 7 2019, 11:40 AM
Restricted Application added a project: Kate. · View Herald TranscriptApr 7 2019, 11:40 AM
Restricted Application added a subscriber: kwrite-devel. · View Herald Transcript
cullmann requested review of this revision.Apr 7 2019, 11:40 AM
cullmann added a reviewer: loh.tar.
loh.tar accepted this revision.Apr 7 2019, 1:15 PM
loh.tar added inline comments.
addons/project/kateprojectworker.cpp
251
  • query files via "git ls-files" and make...
  • query files from git and make...
272

This hint may better placed in the commit log. The submodule handling is gone now, right?
A note, why --recurse-submodules is there, is of cause nice

This revision is now accepted and ready to land.Apr 7 2019, 1:15 PM
This revision was automatically updated to reflect the committed changes.

Thanks for this fix, looks good to me. There is another place in KTextEditor git that uses the -z option to auto reload in case the file is in git. But i guess this does not need a change ?!

Fix this Bug 398240 - Files appear twice in project view for some git projects ?
https://bugs.kde.org/show_bug.cgi?id=398240

Yes, I cherry-picked the change to 19.04, will mark bug as done.