Skip to content

Instantly share code, notes, and snippets.

@kosaki
Created August 14, 2014 20:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kosaki/4112af47d3408e3ef6d1 to your computer and use it in GitHub Desktop.
Save kosaki/4112af47d3408e3ef6d1 to your computer and use it in GitHub Desktop.
#!/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