---
title: "@vltpkg/tar: git-archive-commit — vlt docs"
description: "Documentation for the vlt client and the vlt registry."
url: "https://docs.vlt.io/client/api-reference/tar/git-archive-commit"
image: "https://docs.vlt.io/og/client/api-reference/tar/git-archive-commit"
lang: "en"
---

# git-archive-commit

## Functions

### gitArchiveCommit()

```ts
function gitArchiveCommit(tarData): undefined | string
```

Defined in: tar/src/git-archive-commit.ts:17

The commit a `git archive` tarball was made from: the `comment` of its leading pax global header. Takes a gzipped or raw tarball and inflates only its head. `undefined` when there is none (eg an npm tarball) or the data is not a tarball.

#### Parameters

| Parameter | Type     |
| --------- | -------- |
| `tarData` | `Buffer` |

#### Returns

`undefined` | `string`

---

### gitArchiveSubmodules()

```ts
function gitArchiveSubmodules(tarData): boolean
```

Defined in: tar/src/git-archive-commit.ts:50

Whether a tarball's root dir has a `.gitmodules` file: a `git archive` of a repo with submodules, which it leaves out. Takes a gzipped or raw tarball; `false` if it is not one.

#### Parameters

| Parameter | Type     |
| --------- | -------- |
| `tarData` | `Buffer` |

#### Returns

`boolean`
