This patch uses a set to return unique file names from git.ls_files in
case there are multiple stages in the index.
Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
args.append('--')
args.extend(files)
try:
args.append('--')
args.extend(files)
try:
- return GRun('ls-files', '--error-unmatch', *args).output_lines()
+ # use a set to avoid file names duplication due to different stages
+ fileset = set(GRun('ls-files', '--error-unmatch', *args).output_lines())
except GitRunException:
# 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'
except GitRunException:
# 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'
def tree_status(files = None, tree_id = 'HEAD', unknown = False,
noexclude = True, verbose = False, diff_flags = []):
def tree_status(files = None, tree_id = 'HEAD', unknown = False,
noexclude = True, verbose = False, diff_flags = []):