Skip to content

git branchless sync --pull not pulling main branch #355

@tp-woven

Description

@tp-woven

Description of the bug

When I run git branchless sync --pull, it fetches the "main" branch from the remote and pulls it into my "feature" branches, but it does not update the "main" branch itself.

For example: (irrelevant branches and logs were removed for simplicity)

❯ git sl
⋮
◆ f6217c4 1d (remote origin/main, ᐅ main) Merge pull request #XXX from XXXXXXX
❯ git branchless sync --pull
...
branchless: running command: git checkout main
Switched to branch 'main'
Your branch is behind 'origin/main' by 39 commits, and can be fast-forwarded.
  (use "git pull" to update your local branch)
...
❯ git sl
⋮
◆ f6217c4 1d (ᐅ main) Merge pull request #XXX from XXXXXXX
⋮
◇ 3aafdf4 39m (remote origin/main) Merge pull request #YYY from YYYYYYY

Expected behavior

The main branch should be "pulled" and updated to reference the latest remote ref. In the example above, I would have expected main to also be moved to 3aafdf4 (same as origin/main).

Actual behavior

The main branch is unaffected by sync and needs to be pulled manually.

Version of git-branchless

git-branchless 0.3.12

Version of git

git version 2.25.1

Version of rustc

rustc 1.60.0-nightly (bd3cb5256 2022-01-16)

Automated bug report

Software version

git-branchless 0.3.12

Operating system

Linux 5.4.0-1045-aws

Command-line

/home/devec2/.cargo/bin/git-branchless bug-report

Environment variables

SHELL=/usr/bin/zsh
EDITOR=<not set>

Git version

> git version
git version 2.25.1

Events

Show 5 events
Event ID: 179, transaction ID: 188
  1. RefUpdateEvent { timestamp: 1649820518.0892587, event_tx_id: EventTransactionId(188), ref_name: "refs/heads/redacted-ref-0", old_oid: a1ac01f8528c336b64f41e54baeb3d430f6f5dc5, new_oid: 0602d383e956d811831245264a8d3c13a755ffc3, message: None }
  2. RewriteEvent { timestamp: 1649820518.1151667, event_tx_id: EventTransactionId(188), old_commit_oid: a1ac01f8528c336b64f41e54baeb3d430f6f5dc5, new_commit_oid: 0602d383e956d811831245264a8d3c13a755ffc3 }
  3. RefUpdateEvent { timestamp: 1649820518.1572192, event_tx_id: EventTransactionId(188), ref_name: "HEAD", old_oid: f6217c426cf6693939cee29e4e8e993201b0d901, new_oid: f6217c426cf6693939cee29e4e8e993201b0d901, message: None }
:
O 296b6d3 71d xxxxx xxxx xxxxxxx xxxx xxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
|\
: o 1893dd7 71d xxxxxxxx xxxxxxxxxxxxxx
: |
: o 18d0f41 71d (redacted-ref-1) xxxxxx xxxxxxxxxxxxx
:
O 7a9211a 64d xxxxx xxxx xxxxxxx xxxx xxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
|\
: o 76292f6 64d xxx
: |
: o 0883d75 63d (redacted-ref-2) xxx
:
O 5b7a8c0 39d (redacted-ref-3) xxxxx xxxx xxxxxxx xxxx xxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
:
@ f6217c4 1d (redacted-ref-4) xxxxx xxxx xxxxxxx xxxx xxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
:
O 3aafdf4 46m (remote origin/main) xxxxxxx xxxxxxxxxx xx xxxxxxx xxxxx xxxxxx xx xxxxxxxxxxx xxxxxx
|
o 0602d38 6m (redacted-ref-0) xxx
Event ID: 178, transaction ID: 186
  1. CommitEvent { timestamp: 1649719008.0, event_tx_id: EventTransactionId(186), commit_oid: NonZeroOid(f6217c426cf6693939cee29e4e8e993201b0d901) }
:
O 296b6d3 71d xxxxx xxxx xxxxxxx xxxx xxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
|\
: o 1893dd7 71d xxxxxxxx xxxxxxxxxxxxxx
: |
: o 18d0f41 71d (redacted-ref-1) xxxxxx xxxxxxxxxxxxx
:
O 7a9211a 64d xxxxx xxxx xxxxxxx xxxx xxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
|\
: o 76292f6 64d xxx
: |
: o 0883d75 63d (redacted-ref-2) xxx
:
O 5b7a8c0 39d (redacted-ref-3) xxxxx xxxx xxxxxxx xxxx xxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
:
@ f6217c4 1d (redacted-ref-4) xxxxx xxxx xxxxxxx xxxx xxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
:
O 3aafdf4 46m (remote origin/main) xxxxxxx xxxxxxxxxx xx xxxxxxx xxxxx xxxxxx xx xxxxxxxxxxx xxxxxx
|
o 0602d38 6m (redacted-ref-0) xxx
Event ID: 177, transaction ID: 185
  1. RefUpdateEvent { timestamp: 1649720107.489089, event_tx_id: EventTransactionId(185), ref_name: "HEAD", old_oid: 5b7a8c03ebbfff54b2189b1f0d65f1c33b7e574a, new_oid: 5b7a8c03ebbfff54b2189b1f0d65f1c33b7e574a, message: None }
:
O 296b6d3 71d xxxxx xxxx xxxxxxx xxxx xxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
|\
: o 1893dd7 71d xxxxxxxx xxxxxxxxxxxxxx
: |
: o 18d0f41 71d (redacted-ref-1) xxxxxx xxxxxxxxxxxxx
:
O 7a9211a 64d xxxxx xxxx xxxxxxx xxxx xxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
|\
: o 76292f6 64d xxx
: |
: o 0883d75 63d (redacted-ref-2) xxx
:
O 5b7a8c0 39d (redacted-ref-3) xxxxx xxxx xxxxxxx xxxx xxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
:
@ f6217c4 1d (redacted-ref-4) xxxxx xxxx xxxxxxx xxxx xxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
:
O 3aafdf4 46m (remote origin/main) xxxxxxx xxxxxxxxxx xx xxxxxxx xxxxx xxxxxx xx xxxxxxxxxxx xxxxxx
|
o 0602d38 6m (redacted-ref-0) xxx
Event ID: 176, transaction ID: 183
  1. RefUpdateEvent { timestamp: 1646609831.5132928, event_tx_id: EventTransactionId(183), ref_name: "HEAD", old_oid: 5b7a8c03ebbfff54b2189b1f0d65f1c33b7e574a, new_oid: 5b7a8c03ebbfff54b2189b1f0d65f1c33b7e574a, message: None }
:
O 296b6d3 71d xxxxx xxxx xxxxxxx xxxx xxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
|\
: o 1893dd7 71d xxxxxxxx xxxxxxxxxxxxxx
: |
: o 18d0f41 71d (redacted-ref-1) xxxxxx xxxxxxxxxxxxx
:
O 7a9211a 64d xxxxx xxxx xxxxxxx xxxx xxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
|\
: o 76292f6 64d xxx
: |
: o 0883d75 63d (redacted-ref-2) xxx
:
O 5b7a8c0 39d (redacted-ref-3) xxxxx xxxx xxxxxxx xxxx xxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
:
@ f6217c4 1d (redacted-ref-4) xxxxx xxxx xxxxxxx xxxx xxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
:
O 3aafdf4 46m (remote origin/main) xxxxxxx xxxxxxxxxx xx xxxxxxx xxxxx xxxxxx xx xxxxxxxxxxx xxxxxx
|
o 0602d38 6m (redacted-ref-0) xxx
Event ID: 175, transaction ID: 182
  1. RefUpdateEvent { timestamp: 1646609831.4847836, event_tx_id: EventTransactionId(182), ref_name: "refs/heads/redacted-ref-3", old_oid: 0000000000000000000000000000000000000000, new_oid: 5b7a8c03ebbfff54b2189b1f0d65f1c33b7e574a, message: None }
:
O 296b6d3 71d xxxxx xxxx xxxxxxx xxxx xxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
|\
: o 1893dd7 71d xxxxxxxx xxxxxxxxxxxxxx
: |
: o 18d0f41 71d (redacted-ref-1) xxxxxx xxxxxxxxxxxxx
:
O 7a9211a 64d xxxxx xxxx xxxxxxx xxxx xxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
|\
: o 76292f6 64d xxx
: |
: o 0883d75 63d (redacted-ref-2) xxx
:
O 5b7a8c0 39d (redacted-ref-3) xxxxx xxxx xxxxxxx xxxx xxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
:
@ f6217c4 1d (redacted-ref-4) xxxxx xxxx xxxxxxx xxxx xxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
:
O 3aafdf4 46m (remote origin/main) xxxxxxx xxxxxxxxxx xx xxxxxxx xxxxx xxxxxx xx xxxxxxxxxxx xxxxxx
|
o 0602d38 6m (redacted-ref-0) xxx

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions