From 912181cc393769ecec1e17336d4476b1ebe142e3 Mon Sep 17 00:00:00 2001 From: Patrick Spek Date: Mon, 25 Apr 2022 13:51:24 +0200 Subject: Try out a simple patch command --- lib/subcommands/patch.bash | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 lib/subcommands/patch.bash diff --git a/lib/subcommands/patch.bash b/lib/subcommands/patch.bash new file mode 100644 index 0000000..72350ef --- /dev/null +++ b/lib/subcommands/patch.bash @@ -0,0 +1,15 @@ +#!/usr/bin/env bash + +# SPDX-FileCopyrightText: 2022 Patrick Spek +# +# SPDX-License-Identifier: AGPL-3.0-or-later + +subcommand() +{ + chgdir "$BASHTARD_ETCDIR" + git add . \ + && git diff --cached \ + && git reset \ + && git restore . \ + && git clean -fd +} -- cgit v1.1