From: Karl Hasselström Date: Tue, 8 Jul 2008 18:24:43 +0000 (+0200) Subject: Merge branch 'stable' X-Git-Tag: v0.15-rc1~203 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~mdw/git/stgit/commitdiff_plain/7a6a45b5f1379466bd23b33a7feed47d0b8331b7 Merge branch 'stable' Conflicts: stgit/commands/status.py --- 7a6a45b5f1379466bd23b33a7feed47d0b8331b7 diff --cc stgit/commands/status.py index a5b2f88,94d0b57..a84ff6c --- a/stgit/commands/status.py +++ b/stgit/commands/status.py @@@ -61,12 -61,11 +61,10 @@@ options = [make_option('-m', '--modifie action = 'store_true'), make_option('--reset', help = 'reset the current tree changes', - action = 'store_true') - ] + make_diff_opts_option() + action = 'store_true')] - def status(files, modified, new, deleted, conflict, unknown, noexclude, - diff_flags): -def status(files = None, modified = False, new = False, deleted = False, - conflict = False, unknown = False, noexclude = False): ++def status(files, modified, new, deleted, conflict, unknown, noexclude): """Show the tree status """ cache_files = git.tree_status(files, diff --cc stgit/git.py index 0955be7,35579d4..ee31ecd --- a/stgit/git.py +++ b/stgit/git.py @@@ -188,9 -190,11 +188,12 @@@ def ls_files(files, tree = 'HEAD', full # just hide the details of the 'git ls-files' command we use raise GitException, \ 'Some of the given paths are either missing or not known to GIT' + return list(fileset) def parse_git_ls(output): + """Parse the output of git diff-index, diff-files, etc. Doesn't handle + rename/copy output, so don't feed it output generated with the -M + or -C flags.""" t = None for line in output.split('\0'): if not line: diff --cc t/t0002-status.sh index 4364709,a030739..5e1e8ca --- a/t/t0002-status.sh +++ b/t/t0002-status.sh @@@ -169,10 -165,21 +169,21 @@@ EO test_expect_success 'Status of disappeared newborn' ' stg refresh && touch foo/bar && - stg add foo/bar && + git add foo/bar && rm foo/bar && stg status > output.txt && - diff -u expected.txt output.txt + test_cmp expected.txt output.txt ' + cat > expected.txt < output.txt && - diff -u expected.txt output.txt ++ test_cmp expected.txt output.txt + ' + test_done