f605c18baf0565c1ba850e4f7670a652f61c098c,PyInstaller/utils/git.py,,get_repo_revision,#,24

Before Change


            pass
        return ""
    try:
        rev = exec_command("git", "rev-parse", "--short", "HEAD", cwd=cwd).strip()
        if rev:
            // need to update index first to get reliable state
            exec_command_rc("git", "update-index", "-q", "--refresh", cwd=cwd)
            changed = exec_command_rc("git", "diff-index", "--quiet", "HEAD", cwd=cwd)
            if changed:
                rev += ".mod"
            // According to pep440 local version identifier starts with "+".
            return "+" + rev
    except (FileNotFoundError, WindowsError):
        // Be silent when git command is not found.
        pass
    return ""

After Change


        // need to update index first to get reliable state
        exec_command_rc("git", "update-index", "-q", "--refresh", cwd=cwd)
        recent = exec_command("git", "describe", "--long", "--dirty", cwd=cwd).strip()
        tag, changes, rev = recent.rsplit("-", 2)
        if changes == "0":
            return ""
        if rev == "dirty":
            rev = changes + ".mod"
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: pyinstaller/pyinstaller
Commit Name: f605c18baf0565c1ba850e4f7670a652f61c098c
Time: 2016-01-21
Author: h.goebel@crazy-compilers.com
File Name: PyInstaller/utils/git.py
Class Name:
Method Name: get_repo_revision


Project Name: GoogleCloudPlatform/PerfKitBenchmarker
Commit Name: df71840db408be17d18e1570fd4281e596e6429b
Time: 2015-05-27
Author: ehankland@google.com
File Name: perfkitbenchmarker/virtual_machine.py
Class Name: BaseVirtualMachine
Method Name: RemoteCopy


Project Name: pyinstaller/pyinstaller
Commit Name: 62c5df5761a64f22a4e6b797fd832db54d48c000
Time: 2016-01-21
Author: h.goebel@crazy-compilers.com
File Name: PyInstaller/utils/git.py
Class Name:
Method Name: get_repo_revision