-
Notifications
You must be signed in to change notification settings - Fork 534
add support for directories on git add (was: git add . doesn't seem to work) #456
Comments
Worktree.Add only works with files, directories are not handled, but PRs are welcome. |
@jucardi What's the current status of your PR? |
I've been doing this, but it's pretty slow.
|
Yes, it really TOO slow. |
The complexity of the |
I have about 500 modified files. Each file about 22KB size. Not so big.
Console
works about 3 minutes. |
Looks like problem is here: https://github.com/src-d/go-git/blob/master/worktree_status.go#L248 Calling |
I tried to use dirty hack and cache Worktree status inside Add. Now adding 500 files take about 20 seconds. Not so fast as console command. But much better than 3 minutes. |
git client is always multi-threaded go-git, itsn't it. |
Even if git client is multi-threaded I don't think it rereads working tree status for every added file. |
@Labutin Maybe you can send a PR with your changes? A 9x performance improvement sounds pretty good to me :) |
Uh oh!
There was an error while loading. Please reload this page.
I'm trying to add all contents in a cloned repo. Normally I would do this with the command line by doing a
I'm trying to do it by running
But that actually returns an error saying
Do I need to add file by file by hand?
The text was updated successfully, but these errors were encountered: