git status just show new directory, find all files in directory like $LKP_SRC/pkg/$program/
Signed-off-by: Wei Jihui weijihuiall@163.com --- lib/job.rb | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/lib/job.rb b/lib/job.rb index 6497f0f1..db3da63d 100755 --- a/lib/job.rb +++ b/lib/job.rb @@ -593,7 +593,15 @@ class Job git_status_line.each do |line| git_file = line.split[-1] git_file = File.join("#{LKP_SRC}", git_file) - git_files_list << git_file if File.exist?(git_file) + next unless File.exist?(git_file) + + if File.directory?(git_file) + Dir.glob(File.join(git_file, '*')).each do |f| + git_files_list << f + end + else + git_files_list << git_file + end end
git_diff = %x(cd #{LKP_SRC} && git diff --name-only origin/master)
On Wed, Oct 14, 2020 at 04:06:40PM +0800, Wei Jihui wrote:
git status just show new directory, find all files in directory like $LKP_SRC/pkg/$program/
how about this option?
man git status
-u[<mode>], --untracked-files[=<mode>] Show untracked files.
The mode parameter is used to specify the handling of untracked files. It is optional: it defaults to all, and if specified, it must be stuck to the option (e.g. -uno, but not -u no).
The possible options are:
• no - Show no untracked files. • normal - Shows untracked files and directories. ==> • all - Also shows individual files in untracked directories.
Thanks, Fengguang