# Fresh clone of pijul sources contains conflicts (or conflict markers)

**URL:** <https://discourse.pijul.org/t/fresh-clone-of-pijul-sources-contains-conflicts-or-conflict-markers/944>\
**Category:** Question\
**Created:** [August 7, 2022, 9:46pm UTC](https://discourse.pijul.org/t/fresh-clone-of-pijul-sources-contains-conflicts-or-conflict-markers/944 "2022-08-07T21:46:25Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![laumann](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.pijul.org/laumann/32/8_2.png) [@laumann](https://discourse.pijul.org/u/laumann)\
**Post date:** [August 7, 2022, 9:46pm UTC](https://discourse.pijul.org/t/fresh-clone-of-pijul-sources-contains-conflicts-or-conflict-markers/944/1 "2022-08-07T21:46:25Z")

</div>

Today I realised that my clone of [pijul/pijul](http://nest.pijul.org/pijul/pijul) contains a conflict (or just a conflict marker). I nuked the folder and cloned again:

```auto
$ pijul --version
pijul 1.0.0-beta.2
$ pijul clone https://nest.pijul.com/pijul/pijul 
Downloading changes [==================================================] 807/807                                                       
           Applying [==================================================] 807/807                                                       
 Completing changes [] 0/0                                                         
$ cd pijul 
$ grep -r "^>>>>>>>" 
libpijul/src/tests/mod.rs:>>>>>>> 0 [SHSJ3Y53]
libpijul/src/record.rs:>>>>>>> 0 [PDTUHOMV]

```

How do I tell if it’s a conflict marker that’s become part of a patch or an actual conflict (that I can squash)?

EDIT: I should’ve maybe mentioned (although it could also be obvious to some) that libpijul doesn’t build in this state.

---

<div class="post-metadata">

**Author:** ![joyously](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.pijul.org/joyously/32/266_2.png) [@joyously](https://discourse.pijul.org/u/joyously)\
**Post date:** [August 8, 2022, 1:56pm UTC](https://discourse.pijul.org/t/fresh-clone-of-pijul-sources-contains-conflicts-or-conflict-markers/944/2 "2022-08-08T13:56:33Z")

</div>

Are you sure that’s not the part of the code that outputs the conflict marker?

---

<div class="post-metadata">

**Author:** ![laumann](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.pijul.org/laumann/32/8_2.png) [@laumann](https://discourse.pijul.org/u/laumann)\
**Post date:** [August 8, 2022, 2:34pm UTC](https://discourse.pijul.org/t/fresh-clone-of-pijul-sources-contains-conflicts-or-conflict-markers/944/3 "2022-08-08T14:34:30Z")

</div>

Pretty sure, here are the lines I see in `record.rs`:

```auto
            contents.push(0);
            if end > start {
>>>>>>> 0 [PDTUHOMV]
<<<<<<< 0
                (

```

Also checked on [the nest](https://nest.pijul.org/pijul/pijul:main/SXEYMYF7P4RZM.WB2QO) and it’s not showing there.

---

<div class="post-metadata">

**Author:** ![laumann](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.pijul.org/laumann/32/8_2.png) [@laumann](https://discourse.pijul.org/u/laumann)\
**Post date:** [August 8, 2022, 2:46pm UTC](https://discourse.pijul.org/t/fresh-clone-of-pijul-sources-contains-conflicts-or-conflict-markers/944/4 "2022-08-08T14:46:06Z")

</div>

Just did another pull - it appeared to grab two new patches (although I don’t know which).

But @pmeunier pushed a [change today](https://nest.pijul.org/pijul/pijul/changes/3UZ65KYC2YLFXRQAL7ADPXZJHVSOSJUR44FXKQN2WKBIXAMALMGAC) that I suspect fixed it in record.rs.

@pmeunier If you’re reading this, thanks! I’m still seeing another conflict in `libpijul/src/tests/mod.rs`:

```auto
fn record_all<T: MutTxnT, R: WorkingCopy, P: ChangeStore>(
    repo: &R,
    store: &P,
    txn: &ArcTxn<T>,
    channel: &ChannelRef<T>,
    prefix: &str,
) -> Result<Hash, anyhow::Error>
where
>>>>>>> 0 [SHSJ3Y53]
    T: MutTxnT + Send + Sync + 'static,
    R: WorkingCopy + Clone + Send + Sync + 'static,
    P: ChangeStore + Clone + Send + 'static,
<<<<<<< 0
    R::Error: Send + Sync + 'static,
{
    let (hash, _) = record_all_change(repo, store, txn, channel, prefix)?;
    Ok(hash)
}

```

---

<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:** [August 8, 2022, 3:02pm UTC](https://discourse.pijul.org/t/fresh-clone-of-pijul-sources-contains-conflicts-or-conflict-markers/944/5 "2022-08-08T15:02:55Z")

</div>

Yes, I should reactivate CI. As soon as I’m done with my current big “day job” projects (hopefully in 2022), I’ll start spending time on Pijul again.

---

<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:** [August 8, 2022, 3:03pm UTC](https://discourse.pijul.org/t/fresh-clone-of-pijul-sources-contains-conflicts-or-conflict-markers/944/6 "2022-08-08T15:03:54Z")

</div>

These conflicts come from a patch that was made right during a change in how conflicts were detected, so I won’t count it as a bug.

---

<div class="post-metadata">

**Author:** ![laumann](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.pijul.org/laumann/32/8_2.png) [@laumann](https://discourse.pijul.org/u/laumann)\
**Post date:** [August 8, 2022, 3:19pm UTC](https://discourse.pijul.org/t/fresh-clone-of-pijul-sources-contains-conflicts-or-conflict-markers/944/7 "2022-08-08T15:19:24Z")

</div>

Thanks! I’m not counting bugs 🙂 just started digging around the codebase again and wanted to report my findings.

I think my underlying question is: if there’s a conflict, how do I tell? The textual representation of a conflict could conceivably be just part of a file, so I’m wondering if there’s a way to get a list of all “current” conflicts (for a given tag/channel “checkout”). Grepping for `^>>>>>>` seems like a poor man’s conflict detection 🙂

(Apologies if I use words like “commit”, “checkout”, etc - heavy git user here and am used to those words, but I do understand and appreciate that pijul is conceptually different with different terminology.)
