Skip to content

Index is refreshed when chunks and files are staged -- is this neccessary? #428

@dbrnz

Description

@dbrnz

I've been trying to understand why gitx wheel spins, sometimes for a few seconds, with Refreshing index... whenever something is staged, and have found:

  1. Index refresh is done by spawning an external task: git update-index -q --unmerged --ignore-missing --refresh.
  2. The refresh is invoked in PBGitCommitController when it sees repository updated events of type WorkingDir and Index. In this case it is the Index event that is responsible for the refresh.
  3. These events are sent by PBGitRepositoryWatcher.
  4. The Index event is generated when the index directory's modification time is changed.

Given that gitx should be able to determine if all of an un-staged file has been staged (and vice-versa) and so update the appropriate lists, is there a need to then refresh the index?

#181 is related.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions