From 61e464e037a7436a2ac050fac8258094ba095514 Mon Sep 17 00:00:00 2001
From: Patrick Spek
Date: Wed, 8 Mar 2023 08:58:54 +0100
Subject: Add diff subcommand
---
lib/subcommands/diff.bash | 11 +++++++++++
lib/subcommands/patch.bash | 15 ---------------
2 files changed, 11 insertions(+), 15 deletions(-)
create mode 100644 lib/subcommands/diff.bash
delete mode 100644 lib/subcommands/patch.bash
(limited to 'lib/subcommands')
diff --git a/lib/subcommands/diff.bash b/lib/subcommands/diff.bash
new file mode 100644
index 0000000..1cb8c71
--- /dev/null
+++ b/lib/subcommands/diff.bash
@@ -0,0 +1,11 @@
+#!/usr/bin/env bash
+
+# SPDX-FileCopyrightText: 2022 Patrick Spek
+#
+# SPDX-License-Identifier: AGPL-3.0-or-later
+
+subcommand()
+{
+ chgdir "$BASHTARD_ETCDIR"
+ git -C "$BASHTARD_ETCDIR" diff
+}
diff --git a/lib/subcommands/patch.bash b/lib/subcommands/patch.bash
deleted file mode 100644
index 72350ef..0000000
--- a/lib/subcommands/patch.bash
+++ /dev/null
@@ -1,15 +0,0 @@
-#!/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