# Details on output of pijul diff

**URL:** <https://discourse.pijul.org/t/details-on-output-of-pijul-diff/661>\
**Category:** Question\
**Created:** [December 6, 2020, 10:08pm UTC](https://discourse.pijul.org/t/details-on-output-of-pijul-diff/661 "2020-12-06T22:08:11Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![dlukes](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.pijul.org/dlukes/32/333_2.png) [@dlukes](https://discourse.pijul.org/u/dlukes)\
**Post date:** [December 6, 2020, 10:08pm UTC](https://discourse.pijul.org/t/details-on-output-of-pijul-diff/661/1 "2020-12-06T22:08:12Z")

</div>

Is there somewhere I can read more on how to interpret the output of `pijul diff`? The broad strokes are relatively self-explanatory (good job on that!), but I would appreciate a guide explaining what the various symbols and numbers mean, or at least telling me which ones I don’t really need to care about, because they won’t tell me much if I only ever work with files and not directly with Pijul’s internal format 🙂

(Congratulations on working towards 1.0! I’ve been following Pijul for a while and it already taught me to be much more wary of Git, among other things, so thanks for that 🙂 The next bump seems to be marketing – people often seem to assume Git already works kind of like Pijul, and/or that Git’s issues are unavoidable and any VCS will have them. I realize that must be frustrating. And threading the needle between toy examples that people automatically dismiss, and a theory deep dive that no one will read unless they’re already at least a little bit convinced that Pijul is onto something, is no easy task. Good luck!)

---

<div class="post-metadata">

**Author:** ![boogerlad](https://avatars.discourse-cdn.com/v4/letter/b/b5a626/32.png) [@boogerlad](https://discourse.pijul.org/u/boogerlad)\
**Post date:** [December 7, 2020, 9:28am UTC](https://discourse.pijul.org/t/details-on-output-of-pijul-diff/661/2 "2020-12-07T09:28:08Z")

</div>

You’re talking about

```auto
  B:BD 3.426214 -> 2.0:19/2
  up 3.426214, new 0:19, down 3.426233 

```

specifically right? I’m curious too

---

<div class="post-metadata">

**Author:** ![pmeunier](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.pijul.org/pmeunier/32/4_2.png) [@pmeunier](https://discourse.pijul.org/u/pmeunier)\
**Post date:** [December 7, 2020, 12:47pm UTC](https://discourse.pijul.org/t/details-on-output-of-pijul-diff/661/3 "2020-12-07T12:47:56Z")

</div>

These are specifications of edges and vertices in the graph, in a compressed format (that was the main issue before, and the reason we didn’t have a good text forat):

> [@boogerlad](#):
>
> `B:BD 3.426214 -> 2.0:19/2`

This means: let e be the edge from position `3.426214` to the vertex `2.0:19` that was introduced by change `/2`. Turn the `B` flag of e (`B` meaning it is a “block” or “normal” edge) into a Deleted (BD) flag.

Now, `3.`, `2.` and `/2` refer to the dependencies section of the diff, and `426214`, `0` and `19` are byte positions within these changes, i.e. `3.426214` is position `426214` in the contents of change numbered 3 in the dependencies section.

_Edit_: wait, I forgot the other part, up…new…down. This means insert a new vertex between these positions, and the new vertex has length 19.

---

<div class="post-metadata">

**Author:** ![dlukes](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.pijul.org/dlukes/32/333_2.png) [@dlukes](https://discourse.pijul.org/u/dlukes)\
**Post date:** [December 7, 2020, 1:17pm UTC](https://discourse.pijul.org/t/details-on-output-of-pijul-diff/661/4 "2020-12-07T13:17:29Z")

</div>

Thanks for that! So it sounds like this is mostly related to Pijul’s internal graph structure and I don’t need to pay too close attention to it? Still, it’s good to have a general idea, especially the part about which numbers refer to the dependency list.

Another somewhat intriguing bit of syntax that I came across – consider the diff generated by this script:

```auto
#!/bin/bash

pijul init
echo -e "a\nb\nc" >foo.txt
pijul rec -m abc foo.txt --author jdoe

pijul fork dev
pijul channel switch dev
echo d >>foo.txt
pijul rec -m d --author jdoe
echo -e "e\na\nb\nc\nd" >foo.txt
pijul rec -m e --author jdoe

pijul channel switch main
echo -e "a\nb\nf\nc" >foo.txt
pijul rec -m f --author jdoe

pijul diff --channel dev

```

The diff looks like this:

```auto
timestamp = '2020-12-07T13:08:47.206748540Z'
authors = []

# Dependencies
[2] JJDISJAESXKX7IPXPZ4LA3G3TUYNA32XHMIH7EL7KLHFESJMBEJQC
[3] 5C7CU3NUQ6R5LGPDX67YH6HL2Q7DPHITDXESAEJMLLVVUYTYFW6AC
[4]+FJYDUCF4X4O3L6H42BIUBN3LDYFDEYS5MD35VBXGRSUJJBGCRXCAC
[*] FJYDUCF4X4O3L6H42BIUBN3LDYFDEYS5MD35VBXGRSUJJBGCRXCAC

# Changes

1. Edit in foo.txt:1 4.10
B:BD 4.10 -> 3.0:2/3
- e

2. Edit in foo.txt:3 4.10
  up 4.15, new 0:2, down 4.15
+ f

3. Edit in foo.txt:5 4.10
B:BD 4.17 -> 2.0:2/2
- d

```

Why is the hash for dependency `4` repeated twice, once with a leading `+`, the second time with a `*` in the square brackets? What is that telling me?

---

<div class="post-metadata">

**Author:** ![pmeunier](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.pijul.org/pmeunier/32/4_2.png) [@pmeunier](https://discourse.pijul.org/u/pmeunier)\
**Post date:** [December 7, 2020, 1:22pm UTC](https://discourse.pijul.org/t/details-on-output-of-pijul-diff/661/5 "2020-12-07T13:22:58Z")

</div>

`+` means “transitive dependencies required to write this diff, because [4] is used”. In other words, [4] is a dependency of [2] or [3].

`*` means “known change”, an internal thing to detect one type of conflicts.
