ecl-logo Documentation

GitCommitHash

GitCommitHash[directory]hash

returns the SHA1 hash for the HEAD of the git repository given by directory.

GitCommitHash[directory]$Failed

returns $Failed if the given directory is not a valid directory (or git repository).

Details

    Input
    Output
    Messages
  • InvalidDirectory`1` is not a valid directory.
    InvalidRepository`1` is not a valid git repository.

Examples

Basic Examples  (1)

Returns SHA1 for the current commit of the git repository specified by the given directory:

Messages  (2)

InvalidDirectory  (1)

Returns $Failed if input is not a valid directory:

InvalidRepository  (1)

Returns $Failed if directory is not a git repository: