neogit icon indicating copy to clipboard operation
neogit copied to clipboard

Cherry picking errors

Open timsofteng opened this issue 2 years ago • 12 comments

Description

I'm trying to figure out how to do cherry picking with neogit but I get a lot of errors. I press A twice and then choose commit with enter. and I see a lot of errors on the screen Снимок экрана 2023-07-19 в 15 32 29

Here is the log

  1 git cherry-pick --ff 6b0115591773b248f80e95137aea0a8c8e789b82                                                                                                (38.000 ms) [stderr 7]
  | The previous cherry-pick is now empty, possibly due to conflict resolution.
  | If you wish to commit it anyway, use:
  |
  |     git commit --allow-empty
  |
  | Otherwise, please use 'git cherry-pick --skip'
  |

Neovim version

NVIM v0.9.1 Build type: Release LuaJIT 2.1.0-beta3

Operating system and version

macOS 13.4.1 (22F82)

Steps to reproduce

Open repo Press A twice Press enter on the commit

Expected behavior

No response

Actual behavior

Cherry picking doesn't work or I don't understand how does it work.

Minimal config

vim.cmd([[set runtimepath=$VIMRUNTIME]])
vim.cmd([[set packpath=/tmp/nvim/site]])
local package_root = "/tmp/nvim/site/pack"
local install_path = package_root .. "/packer/start/packer.nvim"
local function load_plugins()
  require("packer").startup({
    {
      "wbthomason/packer.nvim",
      {
        "TimUntersberger/neogit",
        requires = {
          { "nvim-lua/plenary.nvim" },
          { "sindrets/diffview.nvim" },
        },
        config = function()
          print("loaded neogit")
          require("neogit").setup()
        end,
      },
    },
    config = {
      package_root = package_root,
      compile_path = install_path .. "/plugin/packer_compiled.lua",
      display = { non_interactive = true },
    },
  })
end
if vim.fn.isdirectory(install_path) == 0 then
  print("Installing neogit and dependencies.")
  vim.fn.system({ "git", "clone", "--depth=1", "https://github.com/wbthomason/packer.nvim", install_path })
end
load_plugins()
require("packer").sync()

timsofteng avatar Jul 19 '23 13:07 timsofteng

The status buffer doesnt auto-refresh (yet) - if you hit c-r does the conflict show up?

CKolkey avatar Jul 19 '23 13:07 CKolkey

Check out if https://github.com/NeogitOrg/neogit/pull/614 has a better UX

CKolkey avatar Jul 19 '23 13:07 CKolkey

@CKolkey btw is it possible to select several commits?

timsofteng avatar Jul 19 '23 13:07 timsofteng

Yea, linewise visual mode on the commits

CKolkey avatar Jul 19 '23 14:07 CKolkey

I got an error "unexpected type <table>" when doing that on master (before help popup merge :P)

image

ten3roberts avatar Jul 19 '23 14:07 ten3roberts

Yea, linewise visual mode on the commits

How to do it properly? Still don't understand sorry. I switch mode to visual but it doesn't help to pick up multiple commits.

timsofteng avatar Jul 19 '23 14:07 timsofteng

Try V

ten3roberts avatar Jul 19 '23 14:07 ten3roberts

V just activate visual mode and then I cannot do cherry picking. I press enter and it do what it do in common vim's visual mode.

timsofteng avatar Jul 19 '23 14:07 timsofteng

Might be a bug if you can't, but that's how it should work to cherry pick multiple commits. Is this from the log buffer or the status buffer?

CKolkey avatar Jul 19 '23 15:07 CKolkey

@CKolkey I'll open another issue with video cause it is out of scope

timsofteng avatar Jul 19 '23 16:07 timsofteng

The issue still exists on latest master. I see a lot of error and have no idea how to do cherry pick.

timsofteng avatar Aug 01 '23 08:08 timsofteng

If you run the same command from the terminal, does it produce the same error?

CKolkey avatar Aug 05 '23 11:08 CKolkey