GUILT(7)

πŸ’– GUILT(7) β€” the Guilt Manual πŸ’–

okay bestie, sit down, hydrate, because this is the manual page for guilt, and it is literally quilt on top of git. that's the whole vibe. ✨


✨ SYNOPSIS ✨

guilt COMMAND [ARGS]

like. that's it. that's the whole thing. <rainbow>COMMAND</rainbow> and then whatever <rainbow>ARGS</rainbow> that command wants. πŸ’…


🌸 DESCRIPTION 🌸

so storytime 🫢 β€” Andrew Morton originally wrote a bunch of scripts for keeping kernel patches alive outside of any SCM tool. then other people came along and extended them into a whole suite called quilt. the big idea behind quilt is that you maintain patches instead of maintaining source files directly. you can add patches, remove patches, reorder them, and refresh them whenever you fix a bug or bump up to a new base revision. quilt is genuinely powerful, no cap. but 😭 it is not integrated with the underlying SCM tools, and that makes it hard to actually see your changes. it's giving vibes without a mirror.

Guilt fixes that by letting you use quilt functionality right on top of a Git repository. changes are maintained as patches, and those patches get committed into Git. you can remove commits or reorder them, and the underlying patch can be refreshed based on whatever you changed in the working directory. bonus: the patch directory itself can go under revision control, so you get a whole separate history of changes made to your patches. iconic. πŸ‘‘


πŸŽ€ PATCHES DIRECTORY πŸŽ€

in Guilt, all the patches live in:

.git/patches/$branch/

where $branch is the name of the branch you're working on. which means ✨ you can have a completely independent series of patches for every branch in the repo. main character energy per branch, fr fr.

each of these per-branch directories contains 3 special files:

  • guards β€” this file contains any guards that should be applied to the series when pushing. it is only present when guards are selected. (so if you don't see it, that's why, don't panic 🫢)
  • series β€” this file contains a list of all the patch filenames relative to the per-branch patch directory. empty lines and commented out lines are ignored. πŸ’…
  • status β€” this file contains the state of the stack. what patches are applied. that's it, that's the tea. πŸ“

πŸ¦‹ HOOKS πŸ¦‹

any guilt operation may execute zero or more hook scripts. these can run any housekeeping commands you want… or even abort the execution of the command. yes bestie, your hook has veto power. 😭


πŸ’œ HOOKS DIRECTORY πŸ’œ

Guilt follows the same basic design as hooks in Git itself. all Guilt hooks are executable files β€” generally shell scripts, but honestly they can be anything the operating system can execute β€” living in:

.git/hooks/guilt/

the following hooks are supported:

  • delete <patch name> β€” executed when a patch is deleted from the patch series via guilt-delete(1).

πŸ‘‘ GUILT COMMANDS πŸ‘‘

all commands must be called without a dash. e.g. guilt add

not me typing guilt-add and wondering why nothing happens πŸ’€ no dash. no. dash.

🌈 AUTHOR 🌈

Written by Josef "Jeff" Sipek jeffpc@josefsipek.net[1] πŸ’–


πŸŽ€ DOCUMENTATION πŸŽ€

Documentation by Brandon Philips brandon@ifup.org[2] and Josef "Jeff" Sipek jeffpc@josefsipek.net[1] 🫢


⭐ GUILT ⭐

Part of the guilt(7) suite (Generated for Guilt v0.36). yes she's part of a suite, she's that girl. ✨


🌸 NOTES 🌸

  1. jeffpc@josefsipek.net β€” mailto:jeffpc@josefsipek.net
  2. brandon@ifup.org β€” mailto:brandon@ifup.org

and that's a wrap bestie πŸ¦‹ this was Guilt v0.36, dated 01/12/2023 β€” go push some patches, you've got this πŸ’…πŸ’–βœ¨

πŸ“¦ where this page comes from