Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: pushRemote.branch string extraction #1659

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,9 +99,11 @@ See [the test documentation for more details](./tests/README.md).
### Linting

Additionally, linting is enforced using `selene` to catch common errors, most of which are also caught by
`lua-language-server`.
`lua-language-server`. Source code spell checking is done via `typos`.

```sh make lint ```
```sh
make lint
```

### Formatting

Expand Down
2 changes: 1 addition & 1 deletion lua/neogit/lib/git/branch.lua
Original file line number Diff line number Diff line change
Expand Up @@ -424,7 +424,7 @@ local function update_branch_information(state)

local pushRemote = git.branch.pushRemote_ref()
if pushRemote and not status.detached then
local remote, branch = unpack(vim.split(pushRemote, "/"))
local remote, branch = pushRemote:match("([^/]+)/(.+)")
state.pushRemote.ref = pushRemote
state.pushRemote.remote = remote
state.pushRemote.branch = branch
Expand Down
4 changes: 2 additions & 2 deletions lua/neogit/lib/graph/kitty.lua
Original file line number Diff line number Diff line change
Expand Up @@ -670,10 +670,10 @@ function M.build(commits, color)
local connector_row = { cells = connector_cells } ---@type I.Row

-- handle bi-connector rows
local is_bi_crossing, bi_crossing_safely_resolveable =
local is_bi_crossing, bi_crossing_safely_resolvable =
get_is_bi_crossing(commit_row, connector_row, next_commit)

if is_bi_crossing and bi_crossing_safely_resolveable and next_commit then
if is_bi_crossing and bi_crossing_safely_resolvable and next_commit then
resolve_bi_crossing(prev_commit_row, prev_connector_row, commit_row, connector_row, next_commit)
end

Expand Down
Loading