Show More
@@ -511,15 +511,14 b' def git_pre_receive(unused_repo_path, re' | |||
|
511 | 511 | |
|
512 | 512 | type_ = push_ref['type'] |
|
513 | 513 | new_branch = push_ref['old_rev'] == empty_commit_id |
|
514 | if type_ == 'heads' and not new_branch: | |
|
514 | delete_branch = push_ref['new_rev'] == empty_commit_id | |
|
515 | if type_ == 'heads' and not (new_branch or delete_branch): | |
|
515 | 516 | old_rev = push_ref['old_rev'] |
|
516 | 517 | new_rev = push_ref['new_rev'] |
|
517 | cmd = [settings.GIT_EXECUTABLE, 'rev-list', | |
|
518 | old_rev, '^{}'.format(new_rev)] | |
|
518 | cmd = [settings.GIT_EXECUTABLE, 'rev-list', old_rev, '^{}'.format(new_rev)] | |
|
519 | 519 | stdout, stderr = subprocessio.run_command( |
|
520 | 520 | cmd, env=os.environ.copy()) |
|
521 | # means we're having some non-reachable objects, this forced push | |
|
522 | # was used | |
|
521 | # means we're having some non-reachable objects, this forced push was used | |
|
523 | 522 | if stdout: |
|
524 | 523 | push_ref['pruned_sha'] = stdout.splitlines() |
|
525 | 524 |
General Comments 0
You need to be logged in to leave comments.
Login now