# Limit the Scope of Git Diff

DevFeed: [Limit the Scope of Git Diff](<https://devfeed.tech/articles/limit-the-scope-of-git-diff-11136.md>)

Original publisher: [Read original article](<https://blog.ipspace.net/2025/02/limit-scope-git-diff/>)

Published: 2025-02-17T06:41:00Z

Content type: tutorial

Language: en

Sources: [ipSpace.net blog](<https://devfeed.tech/sources/ipspace-net-blog.md>)

Topics: [Git](<https://devfeed.tech/topics/git.md>), [YAML](<https://devfeed.tech/topics/yaml.md>), [Regular expression](<https://devfeed.tech/topics/regular-expression.md>), [BGP](<https://devfeed.tech/topics/bgp.md>)

Tags: [display](<https://devfeed.tech/tags/display.md>), [expression](<https://devfeed.tech/tags/expression.md>), [files](<https://devfeed.tech/tags/files.md>), [flag](<https://devfeed.tech/tags/flag.md>), [git](<https://devfeed.tech/tags/git.md>), [netlab](<https://devfeed.tech/tags/netlab.md>), [parameter](<https://devfeed.tech/tags/parameter.md>), [tests](<https://devfeed.tech/tags/tests.md>), [time](<https://devfeed.tech/tags/time.md>), [worth-reading](<https://devfeed.tech/tags/worth-reading.md>), [yaml](<https://devfeed.tech/tags/yaml.md>)

## AI overview

This article explains how to use Git diff options to identify meaningful changes in YAML-based netlab integration test results when timestamps and version metadata make ordinary diffs noisy. It discusses filtering diffs with a regular expression and limiting output to files or test suites containing relevant changes.

## Source excerpt

The results of netlab integration tests are stored in YAML files, making it easy to track changes improvements with Git. However, once I added the time of test and netlab version to the test results, I could no longer use git diff to figure out which test results changed after a test run - everything changed. For example, these are partial test results from the OSPFv2 tests: Read more ...