(self)
return self._patch
Get the change patch for the commit.
Get the change patch for the commit.
Get the change patch for the commit .
def patch(self) -> str:
        """Get the change patch for the commit."""
        if self._patch is None:
            if self.sha:
                self._patch = shell([GIT_PATH, "show", self.sha])
            else:
                self._patch = shell([GIT_PATH, "diff", "--cached"])

        return self._patch
def patch ( self ) -> str : if self . _patch is None : if self . sha : self . _patch = shell ( [ GIT_PATH , "show" , self . sha ] ) else : self . _patch = shell ( [ GIT_PATH , "diff" , "--cached" ] ) return self . _patch