Bug 374478 - Kate project plugin ignores git worktrees
Summary: Kate project plugin ignores git worktrees
Status: RESOLVED FIXED
Alias: None
Product: kate
Classification: Applications
Component: general (other bugs)
Version First Reported In: unspecified
Platform: Other Linux
: NOR minor
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-01-03 03:15 UTC by Denis Lisov
Modified: 2017-12-20 20:48 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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