Skip to content

Commit

Permalink
Merge pull request #84 from lordi/master
Browse files Browse the repository at this point in the history
Improve performance in big repos by adding files to stage explicitly
  • Loading branch information
ViscousPot authored Jan 2, 2025
2 parents 110ca20 + 92cda92 commit 3b18fbb
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions app/src/main/java/com/viscouspot/gitsync/util/GitManager.kt
Original file line number Diff line number Diff line change
Expand Up @@ -266,11 +266,13 @@ class GitManager(private val context: Context, private val settingsManager: Sett
log(LogType.PushToRepo, "Adding Files to Stage")

git.add().apply {
addFilepattern(".")
status.uncommittedChanges.forEach { addFilepattern(it) }
status.untracked.forEach { addFilepattern(it) }
}.call()

git.add().apply {
addFilepattern(".")
status.uncommittedChanges.forEach { addFilepattern(it) }
status.untracked.forEach { addFilepattern(it) }
isUpdate = true
}.call()

Expand Down Expand Up @@ -598,4 +600,4 @@ class GitManager(private val context: Context, private val settingsManager: Sett
val lockFile = File(repo.directory, context.getString(R.string.git_lock_path))
if (lockFile.exists()) lockFile.delete()
}
}
}

0 comments on commit 3b18fbb

Please sign in to comment.