Hi list, Currently, receive-pack runs the pre-receive, update, post-receive and post-update hooks during a push to delete corrupt or non-existent refs, eg: git push origin :refs/heads/foo where refs/heads/foo is missing from the remote origin. The issue is reported here [1] This is a patch series which teaches receive-pack not to run update hook for corrupt or non existent refs during a push. Patch 1/2 isn't really relevant to the topic. It's just something I stumbled across while reading the code. It removes a redundant assignment in the is_url function. Patch 2/2 teaches receive-pack not to run update hook for corrupt or non existent refs. In summary, I reordered the statements in the update function so that the update hook is not run for corrupt / non existent refs. Perhaps this isn't a good enough solution since the pre-receive, post-receive and post-update hooks are still run. Also the tests aren't exactly good looking. Any advice is highly appreciated. Thanks! [1] http://thread.gmane.org/gmane.comp.version-control.git/181942 Pang Yan Han (2): is_url: Remove redundant assignment receive-pack: Don't run update hook for corrupt or nonexistent ref builtin/receive-pack.c | 50 +++++++++++++++++++++++++++-------------------- t/t5516-fetch-push.sh | 33 +++++++++++++++++++++++++++++++ url.c | 1 - 3 files changed, 62 insertions(+), 22 deletions(-) -- 1.7.7.rc3.2.g29f2e6 -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html