Use git diff instead of git diff-index.

In the manage projects script git will sometimes report that there is a
difference between old and new acl files when there isn't one. This
causes the script to fail on those files when trying to commit them. Use
git diff instead of git diff-index to resolve this problem.

Change-Id: I9f2d7b3066a9bfe6e64282e9e7c009d4008e133e
Reviewed-on: https://review.openstack.org/26172
Reviewed-by: Jeremy Stanley <fungi@yuggoth.org>
Reviewed-by: James E. Blair <corvus@inaugust.com>
Reviewed-by: Monty Taylor <mordred@inaugust.com>
Approved: James E. Blair <corvus@inaugust.com>
Tested-by: Jenkins
This commit is contained in:
Clark Boylan
2013-04-04 16:55:01 -07:00
committed by Jenkins
parent 18e8256ad5
commit 333f4cb335

View File

@@ -146,7 +146,7 @@ def copy_acl_config(project, repo_path, acl_config):
status, _ = run_command("cp %s %s" %
(acl_config, acl_dest), status=True)
if status == 0:
status = git_command(repo_path, "diff-index --quiet HEAD --")
status = git_command(repo_path, "diff --quiet")
if status != 0:
return True
return False