chiark / gitweb /
Allow StGIT commands to run correctly in subdirectories
authorCatalin Marinas <catalin.marinas@gmail.com>
Tue, 23 Oct 2007 21:20:53 +0000 (22:20 +0100)
committerCatalin Marinas <catalin.marinas@gmail.com>
Tue, 23 Oct 2007 22:30:53 +0000 (23:30 +0100)
commitd4356ac6143757131b58c95ca5c6a7b386cc6087
tree81cc520a5561f23cfbe9f030c85232b9da55242d
parentb029e3cca0ccda94c9256a4b86efc8d679235a1d
Allow StGIT commands to run correctly in subdirectories

This is mainly achieved by checking the file arguments with
git-ls-files. The patch solves two main issues - the refresh/diff/st
can run properly in subdirectories and commands like diff and status
may no longer get nonexistent files as arguments without complaining.

If one wants to check the status/diff or refresh the files in a
subdirectory, the command arguments should be "." and this is expanded
by git-ls-files to the subdirectory content (recursively).

The patch removes some asserts as they are no longer needed since
checks are performed by git-ls-files.

Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
stgit/commands/diff.py
stgit/commands/patches.py
stgit/commands/refresh.py
stgit/commands/status.py
stgit/git.py
t/t0002-status.sh
t/t2300-refresh-subdir.sh