# org.tangled.git.defs

- Kind: defs
- Authority: git.tangled.org
- Lexicon: 1
- Published by [tangled.org](https://lexicon.garden/identity/did:plc:wshs7t2adsemcrrd4snkeqli), the NSID's authority

## Links

- [Documentation](https://lexicon.garden/lexicon/did:plc:wshs7t2adsemcrrd4snkeqli/org.tangled.git.defs)
- [Schema JSON](https://lexicon.garden/lexicon/did:plc:wshs7t2adsemcrrd4snkeqli/org.tangled.git.defs/schema.json)
- [Analytics](https://lexicon.garden/lexicon/did:plc:wshs7t2adsemcrrd4snkeqli/org.tangled.git.defs/analytics)

## #byteChanges (`org.tangled.git.defs#byteChanges`)

Type: object

### Properties

- `lhs` (integer, required)
  - Constraints: minimum: 0
- `rhs` (integer, required)
  - Constraints: minimum: 0

## #commit (`org.tangled.git.defs#commit`)

Type: object

### Properties

- `author` (ref, required)
  - Reference: `#signature`
- `committer` (ref, required)
  - Reference: `#signature`
- `hash` (string, required): Commit Object ID
- `message` (string, required)
- `tree` (string, required): Tree Object ID

## #diffHunk (`org.tangled.git.defs#diffHunk`)

Type: object

### Properties

- `lines` (array, required)
  - `items` (ref)
    - Reference: `#linePair`
- `novelLhs` (array, required): 0-based line numbers holding novel content on the left side
  - `items` (integer)
    - Constraints: minimum: 0
- `novelRhs` (array, required): 0-based line numbers holding novel content on the right side
  - `items` (integer)
    - Constraints: minimum: 0

## #diffSrc (`org.tangled.git.defs#diffSrc`)

Type: object

One side of a file diff.

### Properties

- `content` (string): Inlined content. Used on interdiff's LHS.
- `isBinary` (boolean, required)
- `isSubmodule` (boolean, required)
- `oid` (string, required): Blob oid, or the commit oid for a submodule
- `path` (string, required)
- `size` (integer, required)
  - Constraints: minimum: 0

## #diffStat (`org.tangled.git.defs#diffStat`)

Type: object

### Properties

- `deletions` (integer, required)
  - Constraints: minimum: 0
- `filesChanged` (integer, required)
  - Constraints: minimum: 0
- `insertions` (integer, required)
  - Constraints: minimum: 0

## #fileDiff (`org.tangled.git.defs#fileDiff`)

Type: object

### Properties

- `hasByteChanges` (ref): Byte count per side, present only when the two sides differ
  - Reference: `#byteChanges`
- `hasSyntacticChanges` (boolean, required)
- `hunks` (array, required)
  - `items` (ref)
    - Reference: `#diffHunk`
- `lhsSrc` (ref, required)
  - Reference: `#diffSrc`
- `rhsSrc` (ref, required)
  - Reference: `#diffSrc`

## #linePair (`org.tangled.git.defs#linePair`)

Type: object

One aligned line pair; a side is absent when that side has no line.

### Properties

- `lhs` (integer)
  - Constraints: minimum: 0
- `rhs` (integer)
  - Constraints: minimum: 0

## #signature (`org.tangled.git.defs#signature`)

Type: object

### Properties

- `email` (string, required): Person email
- `name` (string, required): Person name
- `when` (string · datetime, required): Timestamp of the signature

## #submodule (`org.tangled.git.defs#submodule`)

Type: object

### Properties

- `branch` (string): Branch to track in the submodule
- `name` (string, required): Submodule name
- `url` (string, required): Submodule repository URL

## Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "byteChanges": {
      "properties": {
        "lhs": {
          "minimum": 0,
          "type": "integer"
        },
        "rhs": {
          "minimum": 0,
          "type": "integer"
        }
      },
      "required": [
        "lhs",
        "rhs"
      ],
      "type": "object"
    },
    "commit": {
      "properties": {
        "author": {
          "ref": "#signature",
          "type": "ref"
        },
        "committer": {
          "ref": "#signature",
          "type": "ref"
        },
        "hash": {
          "description": "Commit Object ID",
          "type": "string"
        },
        "message": {
          "type": "string"
        },
        "tree": {
          "description": "Tree Object ID",
          "type": "string"
        }
      },
      "required": [
        "hash",
        "author",
        "committer",
        "message",
        "tree"
      ],
      "type": "object"
    },
    "diffHunk": {
      "properties": {
        "lines": {
          "items": {
            "ref": "#linePair",
            "type": "ref"
          },
          "type": "array"
        },
        "novelLhs": {
          "description": "0-based line numbers holding novel content on the left side",
          "items": {
            "minimum": 0,
            "type": "integer"
          },
          "type": "array"
        },
        "novelRhs": {
          "description": "0-based line numbers holding novel content on the right side",
          "items": {
            "minimum": 0,
            "type": "integer"
          },
          "type": "array"
        }
      },
      "required": [
        "novelLhs",
        "novelRhs",
        "lines"
      ],
      "type": "object"
    },
    "diffSrc": {
      "description": "One side of a file diff.",
      "properties": {
        "content": {
          "description": "Inlined content. Used on interdiff's LHS.",
          "type": "string"
        },
        "isBinary": {
          "type": "boolean"
        },
        "isSubmodule": {
          "type": "boolean"
        },
        "oid": {
          "description": "Blob oid, or the commit oid for a submodule",
          "type": "string"
        },
        "path": {
          "type": "string"
        },
        "size": {
          "minimum": 0,
          "type": "integer"
        }
      },
      "required": [
        "path",
        "oid",
        "size",
        "isBinary",
        "isSubmodule"
      ],
      "type": "object"
    },
    "diffStat": {
      "properties": {
        "deletions": {
          "minimum": 0,
          "type": "integer"
        },
        "filesChanged": {
          "minimum": 0,
          "type": "integer"
        },
        "insertions": {
          "minimum": 0,
          "type": "integer"
        }
      },
      "required": [
        "insertions",
        "deletions",
        "filesChanged"
      ],
      "type": "object"
    },
    "fileDiff": {
      "properties": {
        "hasByteChanges": {
          "description": "Byte count per side, present only when the two sides differ",
          "ref": "#byteChanges",
          "type": "ref"
        },
        "hasSyntacticChanges": {
          "type": "boolean"
        },
        "hunks": {
          "items": {
            "ref": "#diffHunk",
            "type": "ref"
          },
          "type": "array"
        },
        "lhsSrc": {
          "ref": "#diffSrc",
          "type": "ref"
        },
        "rhsSrc": {
          "ref": "#diffSrc",
          "type": "ref"
        }
      },
      "required": [
        "lhsSrc",
        "rhsSrc",
        "hunks",
        "hasSyntacticChanges"
      ],
      "type": "object"
    },
    "linePair": {
      "description": "One aligned line pair; a side is absent when that side has no line.",
      "properties": {
        "lhs": {
          "minimum": 0,
          "type": "integer"
        },
        "rhs": {
          "minimum": 0,
          "type": "integer"
        }
      },
      "type": "object"
    },
    "signature": {
      "properties": {
        "email": {
          "description": "Person email",
          "type": "string"
        },
        "name": {
          "description": "Person name",
          "type": "string"
        },
        "when": {
          "description": "Timestamp of the signature",
          "format": "datetime",
          "type": "string"
        }
      },
      "required": [
        "name",
        "email",
        "when"
      ],
      "type": "object"
    },
    "submodule": {
      "properties": {
        "branch": {
          "description": "Branch to track in the submodule",
          "type": "string"
        },
        "name": {
          "description": "Submodule name",
          "type": "string"
        },
        "url": {
          "description": "Submodule repository URL",
          "type": "string"
        }
      },
      "required": [
        "name",
        "url"
      ],
      "type": "object"
    }
  },
  "id": "org.tangled.git.defs",
  "lexicon": 1
}
```
