Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
#!/usr/bin/ruby
# usage : gtags-git-update commit-id
commit = ARGV.shift
git_show = `git show --stat #{commit}`
# match like this " include/linux/memblock.h |"
git_show.scan(/^ (.*\.[ch]) +\|/) { |ary|
path = ary[0]
`global -u --single-update #{path}`
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment