From 4cbfefd5046747b2364167aae53f3f25c7a1c51b Mon Sep 17 00:00:00 2001 From: Steven Walter Date: Thu, 16 Oct 2008 15:45:05 -0400 Subject: [PATCH] Replace usage of diff-files + apply with "git add -u" Yay, performance increases --- yap/yap.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/yap/yap.py b/yap/yap.py index d4e3889..e065598 100644 --- a/yap/yap.py +++ b/yap/yap.py @@ -255,7 +255,7 @@ class YapCore(object): if '-a' not in flags and self._get_staged_files(): raise YapError("Staged and unstaged changes present. Specify what to commit") cdup = self._get_cdup() - os.system("git diff-files -p | (cd %s; git apply --cached)" % cdup) + run_command("(cd %s; git add -u)" % cdup) for f in self._get_new_files(): self._stage_one(f) @@ -593,9 +593,9 @@ editing each file again. "(-a | )" self._check_git() if '-a' in flags: - self._unstage_all() cdup = self._get_cdup() - run_safely("(cd %s; git checkout-index -u -f -a)" % cdup) + run_command("(cd %s; git add -u)" % cdup) + os.system("git read-tree -v --aggressive -u -m HEAD") self._clear_state() self.cmd_status() return @@ -783,7 +783,7 @@ of history. staged = bool(self._get_staged_files()) cdup = self._get_cdup() - run_command("git diff-files -p | (cd %s; git apply --cached)" % cdup) + run_command("(cd %s; git add -u)" % cdup) for f in self._get_new_files(): self._stage_one(f) -- 2.11.4.GIT