Bug 374478

Summary: Kate project plugin ignores git worktrees
Product: [Applications] kate Reporter: Denis Lisov <dennis.lissov>
Component: generalAssignee: KWrite Developers <kwrite-bugs-null>
Status: RESOLVED FIXED    
Severity: minor CC: christoph
Priority: NOR    
Version First Reported In: unspecified   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Denis Lisov 2017-01-03 03:15:11 UTC
Kate project plugin detects a Git-based project by checking whether `.git` exists and is a directory.

However, if the git checkout is a separate worktree attached to an external repository[0], `.git` is actually a file with contents like
```
gitdir: /home/username/path/to/.git/worktrees/worktree-name
```
and thus the directory is not detected as a git-based project. Would be very nice if it did work with git worktrees.


[0]: https://git-scm.com/docs/git-worktree
Comment 1 Christoph Cullmann 2017-06-25 11:49:28 UTC
Reasonable wish!
Comment 2 Christoph Cullmann 2017-12-20 20:48:51 UTC
Git commit 49648b92693dbaebd7ed95e57022a0211d35c474 by Christoph Cullmann.
Committed on 20/12/2017 at 20:48.
Pushed by cullmann into branch 'master'.

support git worktree checkouts

CHANGELOG: Auto-detect git worktree checkouts by allowing .git to be a file, too

M  +2    -2    addons/project/kateprojectplugin.cpp

https://commits.kde.org/kate/49648b92693dbaebd7ed95e57022a0211d35c474