-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
update git.listfiles to list files in .insomnia directory #5683
update git.listfiles to list files in .insomnia directory #5683
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@PatrickMurrell thanks for contributing this.
This change seems to cause a side-effect - where some changes, like deleting a unit test, are not reflected when preparing a commit:
@filfreire So looking at the source code of isomorphic git that function doesn't actually do the filtering of the git repository for you. It just results in the git repo returning nothing. I added a new commit that will filter the results manually and it seems to account for the scenario you brought up when deleting requests |
2491111
to
7ae1160
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@PatrickMurrell your last change seems to do the trick, LGTM
637673a
to
3ffd944
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left a cleanup suggestion to make it easier to reason on the types of files returned.
Note: This will come back when we revisit the git sync filesystem
e81bb6d
to
7557e5f
Compare
…ions Co-authored-by: James Gatz <jamesgatzos@gmail.com>
7557e5f
to
26f3c25
Compare
@PatrickMurrell if you haven't already, you can claim a free tshirt for this PR contribution - find more at https://konghq.com/community/open-source-contribution |
changelog(Fixes): Fixed an issue where insomnia would take longer to calculate file changes on Git Sync depending on the size of the Git repository
I noticed in my own working with Insomnia git sync that the git.listfiles method seems to pull all the files in the entire git repository. and runs them through a for loop in the getGitChanges function. This makes the repository I am trying to use insomnia with take 3 minutes to calculate what files were changed and can be committed. Limiting the git.listfiles to the .insomnia directory seems to speed up the load time of this part of the program dramatically. This should address the following open issues #5551 #3269
Closes #5551
Closes #3269