OSTREE-DIFF(1)

πŸ’… OSTREE-DIFF β€” bestie edition πŸ¦‹

okay so real talk, ostree-diff is the page for comparing stuff in ostree and honestly it's giving detective energy πŸ” β€” you point it at two things and it tells you exactly what changed. It lives in the ostree diff manual, and I'm gonna walk you through every last detail, no cap πŸ’–


✨ NAME ✨

ostree-diff β€” compare a directory against a revision πŸŽ€


🌸 SYNOPSIS 🌸

ostree diff [OPTIONS...] {REV_OR_DIR} {REV_OR_DIR}

πŸ¦‹ DESCRIPTION πŸ¦‹

So what it does is: it compares a directory or a revision against another directory or revision. Two things go in, the differences come out πŸ’…

Here's the rule for how it reads each REV_OR_DIR argument β€” if REV_OR_DIR starts with / or ./, it gets interpreted as a directory. Otherwise? It's a revision. Simple as that ✨

Then it shows you the files and directories that were modified, added, and deleted. Let's break down the letters, because iykyk:

  • If there's a file in the second REV_OR_DIR that isn't in the first, it shows up with an "A" for "added" πŸŽ€
  • If a file in the first REV_OR_DIR isn't in the second, it shows "D" for "deleted" πŸ’€
  • And "M" for "modified" will also show, obviously πŸ‘‘

πŸ”₯ OPTIONS πŸ”₯

  • --stats β€” prints various statistics πŸ“Š
  • --fs-diff β€” prints the filesystem diff πŸ—‚οΈ
  • --owner-uid β€” use the file ownership user id for local files 🫢
  • --owner-gid β€” use the file ownership group id for local files 🫢

🌈 EXAMPLE 🌈

okay so watch this, first one β€” comparing my-branch^ against my-branch:

$ ostree diff my-branch^ my-branch

            A   /testdirectory
            M   /helloworld.txt

see that? A for the added directory, M for the modified file. slay πŸ’…

and then flipping it around, my-branch against my-branch^:

$ ostree diff my-branch my-branch^

            D   /testdirectory
            M   /helloworld.txt

same vibes, opposite direction β€” now it's a D because from this angle the directory got deleted. iconic behavior honestly 🌟


ngl the whole thing is just: two inputs, three letters, zero drama πŸŽ€

and that's the whole page bestie!! this was OSTree, like, the manual for OSTREE DIFF(1), and it's coming at you from the ostree source/version with its date β€” mwah, love that for us πŸ’–πŸ«Άβœ¨

πŸ“¦ where this page comes from