# org.tangled.git.defs

> Published by [tangled.org](https://lexicon.garden/identity/did:plc:wshs7t2adsemcrrd4snkeqli)

✓ This is the authoritative definition for this NSID.

## Links

- [View on Lexicon Garden](https://lexicon.garden/lexicon/did:plc:wshs7t2adsemcrrd4snkeqli/org.tangled.git.defs)
- [Documentation](https://lexicon.garden/lexicon/did:plc:wshs7t2adsemcrrd4snkeqli/org.tangled.git.defs/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:wshs7t2adsemcrrd4snkeqli/org.tangled.git.defs/examples)

## Definitions

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

**Type**: `object`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `lhs` | `integer` | Yes |  |
| `rhs` | `integer` | Yes |  |

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

**Type**: `object`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `author` | `ref` → `#signature` | Yes |  |
| `committer` | `ref` → `#signature` | Yes |  |
| `hash` | `string` | Yes | Commit Object ID |
| `message` | `string` | Yes |  |
| `tree` | `string` | Yes | Tree Object ID |

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

**Type**: `object`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `lines` | `array` | Yes |  |
| `novelLhs` | `array` | Yes | 0-based line numbers holding novel content on the left side |
| `novelRhs` | `array` | Yes | 0-based line numbers holding novel content on the right side |

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

**Type**: `object`

One side of a file diff.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `content` | `string` | No | Inlined content. Used on interdiff's LHS. |
| `isBinary` | `boolean` | Yes |  |
| `isSubmodule` | `boolean` | Yes |  |
| `oid` | `string` | Yes | Blob oid, or the commit oid for a submodule |
| `path` | `string` | Yes |  |
| `size` | `integer` | Yes |  |

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

**Type**: `object`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `deletions` | `integer` | Yes |  |
| `filesChanged` | `integer` | Yes |  |
| `insertions` | `integer` | Yes |  |

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

**Type**: `object`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `hasByteChanges` | `ref` → `#byteChanges` | No | Byte count per side, present only when the two sides differ |
| `hasSyntacticChanges` | `boolean` | Yes |  |
| `hunks` | `array` | Yes |  |
| `lhsSrc` | `ref` → `#diffSrc` | Yes |  |
| `rhsSrc` | `ref` → `#diffSrc` | Yes |  |

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

**Type**: `object`

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

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `lhs` | `integer` | No |  |
| `rhs` | `integer` | No |  |

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

**Type**: `object`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `email` | `string` | Yes | Person email |
| `name` | `string` | Yes | Person name |
| `when` | `string` (datetime) | Yes | Timestamp of the signature |

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

**Type**: `object`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `branch` | `string` | No | Branch to track in the submodule |
| `name` | `string` | Yes | Submodule name |
| `url` | `string` | Yes | Submodule repository URL |

## Raw 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
}
```
