Grence

Diff

Compare two Graph files and show the semantic differences between them.

The diff command compares two Graph files and displays the semantic differences between them. This command is integrated with Git's difftool mechanism to provide a clear, human-readable comparison of Graph files.

The diff command is used internally by Git Graph and is not intended to be used directly by users.

Usage

$ git graph diff [options] <local> <remote>

Description

Run the diff command by providing paths to the local and remote Graph files. The command compares the files and outputs a summary of modifications, including changes to nodes and edges. This makes it easier to understand differences in Graph data structures, such as property changes or label modifications, in a semantic context.

Note that the output is formatted to highlight key changes, such as modified nodes and edges along with added or removed properties and labels.

Arguments

  • local

    The path to the local Graph file.

  • remote

    The path to the remote Graph file.

Options

  • -h, --help

    Display help for the command.

Examples

Diff local files

Compare two Graph files and display the differences:

$ git graph diff graph.jsonl modified_graph.jsonl
 
Modified Nodes:
  ~ node_101
    Property Modified: country: ["United States"] -> ["Peru"]
 
Modified Edges:
  ~ edge_101_103_directed
    Labels Added: ["loves"]
    Labels Removed: ["likes"]

This example shows that the node with key node_101 has had its country property changed, and the edge edge_101_103_directed has a label modification where "loves" was added and "likes" was removed.

Help

$ git graph diff -h
 
Usage: git-graph diff [options] <local> <remote>
 
Compare two Graph files and show the semantic differences between them.
This command is used internally by Git's difftool mechanism.
 
Arguments:
  local       Path to the local file
  remote      Path to the remote file
 
Options:
  -h, --help  display help for command
 
Examples
--------
 
* Compare two graph files and show the differences:
 
  git graph diff graph.jsonl modified_graph.jsonl
 
  Modified Nodes:
    ~ node_101
      Property Modified: country: ["United States"] -> ["Peru"]
 
  Modified Edges:
    ~ edge_101_103_directed
      Labels Added: ["loves"]
      Labels Removed: ["likes"]

How is this guide?

On this page