From b1142d827bb5036b50041ecff05782d8836d5874 Mon Sep 17 00:00:00 2001 From: Clement Verna Date: Sep 01 2016 20:30:17 +0000 Subject: Fixed Hook so that we dont ignore the files committed in the first commit --- diff --git a/pagure/hooks/files/pagure_hook_tickets.py b/pagure/hooks/files/pagure_hook_tickets.py index 1f5dec0..b07292e 100755 --- a/pagure/hooks/files/pagure_hook_tickets.py +++ b/pagure/hooks/files/pagure_hook_tickets.py @@ -30,9 +30,14 @@ def get_files_to_load(new_commits_list): file_list = [] new_commits_list.reverse() for commit in new_commits_list: - filenames = pagure.lib.git.read_git_lines( - ['diff-tree', '--no-commit-id', '--name-only', '-r', commit], - abspath) + if commit == new_commits_list[0]: + filenames = pagure.lib.git.read_git_lines( + ['diff-tree', '--no-commit-id', '--name-only', '-r', '--root', + commit], abspath) + else: + filenames = pagure.lib.git.read_git_lines( + ['diff-tree', '--no-commit-id', '--name-only', '-r', commit], + abspath) for line in filenames: if line.strip(): file_list.append(line.strip())