Nakul V S's patch notes that in a clone made with --depth=1, the boundary commit is recorded in .git/shallow and its parent links are rewritten through the graft mechanism, so it appears as a root commit. Reverting it would delete all tracked files, which the author calls almost always unintended. The patch adds a check in do_pick_commit() that detects a shallow boundary and refuses by default, with a new '--allow-shallow-boundary' flag for the rare intentional case.
Phillip Wood called it a useful and timely improvement, saying the behavior of Git around shallow boundaries was discussed at the recent Git merge conference. He asked whether Git should also refuse to cherry-pick and rebase a boundary commit, and whether there is a sensible use for reverting one or whether the option was added out of caution. He suggested leaving the flag out of the synopsis, since other rarely used options are omitted too. He also asked to move the detection into a helper rather than copying the code.
Junio C Hamano agreed with Wood's point and asked whether do_pick_commit() is the right place to protect boundaries from revert, cherry-pick, rebase and possibly 'commit --amend'. If not, he suggested a helper that the different code paths can call, with the first call placed where this patch adds its check.
The author has not yet replied in the excerpts. Open questions are the scope of the protection, where the check belongs, and whether the opt-out flag is needed.