D5014: Add support for git worktrees

Sven Brauch noreply at phabricator.kde.org
Sat Mar 11 14:01:22 UTC 2017


brauch added a comment.


  Looks good except what is noted below, thanks!

INLINE COMMENTS

> gitplugin.cpp:281
> +    // if .git is a file, we may be in a git worktree
> +    if (dotGitPotentialFile.exists()) {
> +        QString gitWorktreeFileContent;

I think you need to check !f.isDir() too, no?

> gitplugin.cpp:286
> +            // the content should be gitdir: /path/to/the/.git/worktree
> +            while (!content.atEnd()) {
> +                gitWorktreeFileContent = content.readLine();

I'd just call readAll() here

> gitplugin.cpp:295
> +        if (items.size() == 2 && items.at(0) == "gitdir:") {
> +            qCWarning(PLUGIN_GIT) << "we are in a git worktree" << items.at(1);
> +            return true;

not a warning

REPOSITORY
  R33 KDevPlatform

REVISION DETAIL
  https://phabricator.kde.org/D5014

To: tnorth, #kdevelop
Cc: brauch, kdevelop-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20170311/5c8b0a89/attachment-0001.html>


More information about the KDevelop-devel mailing list