bin/git-ctags

changeset 752
bdbfa576e84f
parent 446
acd0b08d467e
child 753
fadb5356ae65
equal deleted inserted replaced
751:96ce87777789 752:bdbfa576e84f
24 tmp = "#{dir}/.tags.#{$$}~" 24 tmp = "#{dir}/.tags.#{$$}~"
25 opts = File.exists?(conf) ? "--options=#{conf}" : '' 25 opts = File.exists?(conf) ? "--options=#{conf}" : ''
26 26
27 if running_hook 27 if running_hook
28 fork and exit 28 fork and exit
29 [STDIN, STDOUT, STDERR].each(&:close)
29 sleep 5 30 sleep 5
30 end 31 end
31 32
32 open(target, File::RDONLY|File::CREAT, 0644) do |f| 33 open(target, File::RDONLY|File::CREAT, 0644) do |f|
33 if running_hook 34 if running_hook
51 52
52 =head1 SYNOPSIS 53 =head1 SYNOPSIS
53 54
54 git ctags 55 git ctags
55 56
56 echo 'git ctags hook 2>/dev/null' >> .git/hooks/post-checkout 57 echo 'git ctags hook 2>/dev/null' >> .git/hooks/post-checkout &&
58 chmod +x $_
57 59
58 git checkout some/branch 60 git checkout some/branch
59 CTAGS_SKIP=1 git checkout some/branch 61 CTAGS_SKIP=1 git checkout some/branch
60 62
61 =head1 DESCRIPTION 63 =head1 DESCRIPTION

mercurial