summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDaniil Baturin <daniil@vyos.io>2025-12-19 21:49:06 +0000
committerGitHub <noreply@github.com>2025-12-19 21:49:06 +0000
commitdcc1a2bb0a6d6182bc758c630f842c2bec1020eb (patch)
tree8f0ba50de058660f99f20bddca1945b1e098eb8e /src
parent008fefbe2c7dc1681d968ac0582087cd429d6796 (diff)
parent3e2eb92c1c931220cc43eccdb52889435d208ec4 (diff)
downloadvyos1x-config-dcc1a2bb0a6d6182bc758c630f842c2bec1020eb.tar.gz
vyos1x-config-dcc1a2bb0a6d6182bc758c630f842c2bec1020eb.zip
Merge pull request #60 from jestabro/fix-show-leaf
T8109: fix show command on leaf path
Diffstat (limited to 'src')
-rw-r--r--src/config_diff.ml8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/config_diff.ml b/src/config_diff.ml
index b69440d..25c393f 100644
--- a/src/config_diff.ml
+++ b/src/config_diff.ml
@@ -699,7 +699,13 @@ let diff_show rt path left right =
else
let (left, right) =
if not (Util.is_empty path) then
- (Config_tree.get_subtree left path, Config_tree.get_subtree right path)
+ let with_node =
+ match Reference_tree.get_path_type rt path with
+ | `Leaf -> true
+ | _ -> false
+ in
+ (Config_tree.get_subtree ~with_node left path,
+ Config_tree.get_subtree ~with_node right path)
else (left, right)
in
let config_show = make_diff_show left right path in