code: def update_git_devstr(version, path=None):
      
  
      try:
          # Quick way to determine if we're in git or not - returns '' if not
          devstr = get_git_devstr(sha=True, show_warning=False, path=path)
      except OSError:
          return version
  
      if not devstr:
          # Probably not in git so just pass silently
          return version
  
      if 'dev' in version:  # update to the current git revision
          version_base = version.split('.dev', 1)[0]
          devstr = get_git_devstr(sha=False, show_warning=False, path=path)
  
          return version_base + '.dev' + devstr
      else:
          # otherwise it's already the true/release version
          return version
docs: Updates the git revision string if and only if the path is being imported
      directly from a git working copy.  This ensures that the revision number in
      the version string is accurate.