# File lib/git-version-bump.rb, line 10
        def self.version(use_local_git=false)
                if use_local_git
                        unless git_available?
                                raise RuntimeError,
                                      "GVB.version(use_local_git=true) called, but git isn't installed"
                        end

                        sq_git_dir = shell_quoted_string(Dir.pwd)
                else
                        sq_git_dir = shell_quoted_string((File.dirname(caller_file) rescue nil || Dir.pwd))
                end

                git_ver = `git -C #{sq_git_dir} describe --dirty='.1.dirty.#{Time.now.strftime("%Y%m%d.%H%M%S")}' --match='v[0-9]*.[0-9]*.*[0-9]' 2> #{DEVNULL}`.
                            strip.
                            gsub(/^v/, '').
                            gsub('-', '.')

                # If git returned success, then it gave us a described version.
                # Success!
                return git_ver if $? == 0

                # git failed us; we're either not in a git repo or else we've never
                # tagged anything before.

                # Are we in a git repo with no tags?  If so, dump out our
                # super-special version and be done with it, otherwise try to use the
                # gem version.
                system("git -C #{sq_git_dir} status > #{DEVNULL} 2>&1")
                $? == 0 ? "0.0.0.1.ENOTAG" : gem_version(use_local_git)
        end