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

Relative editor paths don't work #152

Closed
zombiezen opened this issue Dec 21, 2021 · 0 comments
Closed

Relative editor paths don't work #152

zombiezen opened this issue Dec 21, 2021 · 0 comments
Labels
bug Something isn't working
Milestone

Comments

@zombiezen
Copy link
Member

It seems that Git executes the editor command from the root of the working copy, rather than wherever the commit command is invoked from.

Steps to Reproduce

gg init &&
cat > editor <<EOF &&
#!/bin/bash
vim "$@"
EOF
chmod +x editor &&
git config core.editor ./editor &&
git add . &&
mkdir subdir &&
cd subdir &&
gg commit

Expected Behavior

vim is opened to edit the commit message.

Actual Behavior

/bin/sh: 1: ./editor: not found
gg: open editor: exit status 127

and an exit with code 1.

Version Info

gg version 1.1.0-1, built on 2020-12-23T02:07:47Z
go: go1.15.6 gc linux/amd64
git version 2.17.1
@zombiezen zombiezen added the bug Something isn't working label Dec 21, 2021
@zombiezen zombiezen added this to the 1.2 milestone Feb 18, 2022
zombiezen added a commit that referenced this issue Feb 24, 2022
Version 1.2 includes features to handle repositories with lots of branches.

### Added

- gg can now be installed via [Nix](https://nixos.org/)!
  See https://gg-scm.io/install for instructions.
- `push` and `commit` have a new `-hooks=0` flag.
  ([#153](#153))
- `pull` has a new `--force-tags` flag.
  ([#155](#155))
- `branch` has a new `--pattern` flag to filter listed branches.
  ([#156](#156))

### Changed

- Local branches are moved under `refs/gg-old/` during `pull`
  when they are deleted from a remote.
  ([#118](#118))

### Fixed

- `GIT_EDITOR` is now always invoked from the root of the working copy
  to match with the behavior of Git.
  ([#152](#152))
- `revert` now prints an error message
  if used on a nonexistent file in a new repository.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Development

No branches or pull requests

1 participant