大佬教程收集整理的这篇文章主要介绍了perl – 不允许在git中删除Master分支,大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。
提前致谢.
#! /usr/bin/perl # create: 00000... 51b8d... refs/heads/topic/gBACon # delete: 51b8d... 00000... refs/heads/topic/gBACon # update: 51b8d... d5e14... refs/heads/topic/gBACon my $errors = 0; while (<>) { chomp; next unless m[ ^ ([0-9a-f]+) # old SHA-1 \s+ ([0-9a-f]+) # new SHA-1 \s+ refs/heads/(\S+) # ref \s* $ ]x; my($old,$new,$ref) = ($1,$2,$3); next unless $ref =~ /^(master|alpha|beta)$/; die "$0: deleting $ref not permitted!\n" if $new =~ /^0+$/; } exit $errors == 0 ? 0 : 1;
以上是大佬教程为你收集整理的perl – 不允许在git中删除Master分支全部内容,希望文章能够帮你解决perl – 不允许在git中删除Master分支所遇到的程序开发问题。
如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。