# 使用 Homebrew, apt, dnf, MacPorts, Nix, pacman, zypper 安装 diffstat

查看 diffstat 的安装路径、可执行文件、元数据以及面向 AI 代理工作流的安全说明。

## 安装

```sh
sudo av install brew:diffstat
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install diffstat
```

  证据: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install diffstat
```

  证据: MacPorts ports tree: devel/diffstat/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1

### Linux

- Debian apt (92%):

```sh
sudo apt install diffstat
```

  证据: Debian stable package indexes: diffstat from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz

- dnf (92%):

```sh
sudo dnf install diffstat
```

  证据: Fedora Rawhide package metadata: diffstat from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/07190dc5ae9f35ae73866675fed6d95fe6e8d9fe22c9d7cdf85862cb2ed24a4c-primary.xml.zst

- Nix (92%):

```sh
nix profile install nixpkgs#diffstat
```

  证据: nixpkgs package indexes: pkgs/by-name/di/diffstat/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1

- pacman (92%):

```sh
sudo pacman -S diffstat
```

  证据: Arch Linux sync databases: diffstat from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz

- zypper (92%):

```sh
sudo zypper install diffstat
```

  证据: openSUSE Tumbleweed package metadata: diffstat from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst

## 软件包事实

- **软件包键:** brew:diffstat
- **软件包管理器:** Homebrew
- **版本:** 1.69
- **来源摘要:** Produce graph of changes introduced by a diff file
- **主页:** <https://invisible-island.net/diffstat/>
- **已生成:** 2026-08-03T19:37:03+00:00

## 可执行文件

- diffstat (别名)

## 安装行为

- Bottle: 不可用

## 版本和新鲜度

- 页面生成时间: 2026-08-03
- 管理器版本: 1.69
## 项目历史与用法

diffstat reads diff output and produces per-file histograms of insertions, deletions, and modifications. It is a compact review aid for large patch sets.

### 项目历史

Thomas E. Dickey's official history says he originally wrote diffstat in 1992, alongside rcshist, to trace changes in collections of files. He later found it most useful for summarizing source patches.

### 采用历史

The official history says broader attention arrived in early 1996 when developers on XFree86 and ncurses mailing lists started using it. It also notes Linux kernel patch-process visibility through BitKeeper-era workflows and Git's later built-in ability to generate diffstat-style summaries.

### 使用方式

diffstat sits after `diff` in a pipeline and turns patch text into a size-and-shape summary. That makes it useful in email review, release notes, package deltas, and quick scans of large changes before reading detailed hunks.

### 为什么软件包爱好者会关心

Package maintainers care about diffstat because it is one of the small classic tools that made patch exchange readable at scale. The output compresses a patch into a reviewable map: which files changed and roughly how much.

### 时间线

- 1992: Thomas E. Dickey wrote diffstat.
- 1996: XFree86 and ncurses developers began using it more visibly.
- 2002: Linux kernel BitKeeper patch workflow documentation referenced diffstat-style summaries.
- 2026: diffstat 1.69 released with compiler-warning fixes.

### Related projects

- diffstat depends culturally and practically on diff and patch workflows; Git later incorporated diffstat-style output for repository changes.

### 来源

- <https://invisible-island.net/diffstat/diffstat.html>
- <https://invisible-island.net/diffstat/CHANGES>


## 安全说明

narrow executable package without higher-risk signals.

- **Geiger 风险:** 绿色 / 低
- narrow executable package without higher-risk signals

## 其他软件包管理器记录

- Debian apt - diffstat - 1.67-1: normalized package name match | Debian stable package indexes: diffstat from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | produces graph of changes introduced by a diff file | https://invisible-island.net/diffstat/
- Nix - diffstat: normalized package name match | nixpkgs package indexes: pkgs/by-name/di/diffstat/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- Ubuntu apt - diffstat - 1.66-1build1: normalized package name match | Ubuntu 24.04 LTS package indexes: diffstat from https://archive.ubuntu.com/ubuntu/dists/noble/main/binary-amd64/Packages.gz | produces graph of changes introduced by a diff file | https://invisible-island.net/diffstat/
- dnf - diffstat - 1.69-2.fc45: normalized package name match | Fedora Rawhide package metadata: diffstat from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/07190dc5ae9f35ae73866675fed6d95fe6e8d9fe22c9d7cdf85862cb2ed24a4c-primary.xml.zst | A utility which provides statistics based on the output of diff | https://invisible-island.net/diffstat
- pacman - diffstat - 1.69-1: normalized package name match | Arch Linux sync databases: diffstat from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz | Display a histogram of diff changes | https://invisible-island.net/diffstat
- zypper - diffstat - 1.69-1.3: normalized package name match | openSUSE Tumbleweed package metadata: diffstat from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst | Utility That Provides Statistics Based on the Output of diff | https://invisible-island.net/diffstat/
- MacPorts - diffstat: normalized package name match | MacPorts ports tree: devel/diffstat/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1


## Combined YAML source

View the package source record on GitHub. [combined/diffstat.yml](https://github.com/mxcl/pkgdb/blob/main/combined/diffstat.yml)


## 来源

- pkg.so package database
- Geiger risk classifier
- curated package history
- pkgdb category and tag curation
- external package-manager database matches
- cross-ecosystem install command graph
