Skip to content

Faulty message when trying to drag and drop git repo folder with dubious ownership #397

Closed

Description

@UchiTesting

Good evening.
I was adding some of my repositories by drag and drop until one did not want to add up.

As the image shows this is an GIT initialised folder as the .git is present.

image

From CLI it gives a specific reason to that. This is because I reinstalled Windows yet the folder was already created.

image

SourceGit should display a specific message too.

Moreover, init the folder is not a good option neither. Instead it should propose to add the folder to safe repos. Then open the repo if added to the list.

It of course works should I do what CLI output proposes.

git config --global --add safe.directory 'D:/Users/djjax/Desktop/repos/C#/UT-EventUp-Trials'

Activity

  1. self-assigned this
    on Aug 23, 2024
  2. added
    suggestionWe are still considering whether it is necessary to add this feature
    on Aug 23, 2024
  3. love-linger commented on Aug 23, 2024

    @love-linger
    Collaborator

    It's because when you drop a folder, this program will try to find the real git dir (for submodules and worktrees the real git dir is not just under the repository root) via command git rev-parse --git-dir. Then it can open repository and setup filesystem watchers with these paths (The filesystem watchers helps us to determine what's changed and then refresh the UI).

  4. love-linger commented on Aug 23, 2024

    @love-linger
    Collaborator

    Duplicated #276

  5. love-linger commented on Aug 27, 2024

    @love-linger
    Collaborator

    I've pushed a commit to show git errors in this popup.
    image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

suggestionWe are still considering whether it is necessary to add this feature

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions