vdiff(1)

✨ vdiff(1) ✨ β€” the ShapeTools era's very own diff, but make it version-control πŸ’…

okay so bestie, buckle up, because vdiff is literally the glow-up of diff that nobody told you about πŸ¦‹


🌸 NAME 🌸

vdiff β€” shows you the line-by-line differences between versions of files, one line at a time, no cap πŸ”₯


πŸŽ€ SYNOPSIS πŸŽ€

vdiff [ diff-options ] [ -base path ] [ -P ] files ..

πŸ’– DESCRIPTION πŸ’–

so, vdiff is a differential comparator for file versions that live in shapeTools' object base, AtFS. it does basically what your host's diff command does β€” same energy, same vibe check β€” and every single option and switch that diff recognizes? yeah, you can pass those to vdiff too. periodt. ✨

the arguments you hand over can be either:

  • a single filename, or
  • a pair of version identifiers

and here's the tea on how that plays out β˜•

  • if you give it only a filename, vdiff prints the differences between that file and the most recent version of it that's chilling in the AtFS object base.
  • you can compare a file to any stored version by putting the version first and the filename second.
  • if both arguments are version identifiers, you get the difference between those two versions. slay.

and the style? any style your local diff program supports, bestie. we're not picky, we're just iconic πŸ‘‘

version identifiers are made of the filename plus a version number or an alias name for a version, all wrapped up in brackets. like:

retrieve.c[4.22]    or    retrieve.c[Rel-4.1]

under the hood, vdiff makes temporary copies of the versions it's about to compare, calls up diff to do the actual work, and then cleans up after itself by removing those temporary copies. it's giving responsible roommate 🧹✨


πŸ’… OPTIONS πŸ’…

  • -base path β€” if vdiff has been told to produce a context diff, this one mangles the filenames of the compared objects so that the path you specify replaces the path of the current directory inside the full pathnames that show up in the diff header. super handy for swapping an absolute pathname out for a relative one, and it makes the resulting context diff way easier for the patch program to digest. πŸ“
  • -P β€” with the -P switch turned on, vdiff will not give up if one of the two objects it's supposed to compare doesn't exist. instead it substitutes an empty object for the missing one, which means the diff ends up being the complete contents of the object that does exist. this is the move when you're producing complex patches that upgrade one release of a software system to a new release, and the system has structurally changed β€” i.e. new files have been added to the system. 🫢

πŸ” SEE ALSO πŸ”

diff(1), vcat(1)


πŸ‘‘ AUTHOR πŸ‘‘

Axel.Mahler@cs.tu-berlin.de


ok so like, quick reminder bestie: the missing-object thing under -P means you're knowingly diffing against nothing, so if you didn't mean to do that, that's on you 😭 it's useful, it's also a choice.

and that's the whole page!! πŸ’œ this one shipped as part of vc_scripts-2.5, dated Tue Jun 29 16:42:06 1993 β€” yes, 1993, she's vintage, she's an heirloom, she ate and left no crumbs 🌈⭐

πŸ“¦ where this page comes from