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

x/review/git-codereview: reword doesn't work properly in alternate worktree #43695

Open
thanm opened this issue Jan 14, 2021 · 2 comments
Open
Labels
NeedsFix The path to resolution is known, but the work has not been done.
Milestone

Comments

@thanm
Copy link
Contributor

thanm commented Jan 14, 2021

What version of Go are you using (go version)?

$ go version
go version devel +9734fd482d Thu Jan 14 08:31:22 2021 +0000 linux/amd64

Does this issue reproduce with the latest release?

Yes

What did you do?

$ git worktree list
/ssd2/go bcd9ec47a1 [abi_wrap_gen]
/ssd2/xgo f9fbdb4640 [dwarf_minimal_line_table]
/ssd2/ygo 9734fd4 [dev.regabi]
$ cd /ssd2/xgo
$ git codereview reword HEAD

What did you expect to see?

Normal reword

What did you see instead?

Instead got error

git-codereview: cannot save messages: open /ssd2/xgo/.git/REWORD_MSGS: not a directory

Looks like the recipe that 'git codereview reword' is using to locate the .git dir is not correct in the presence of multiple work trees. I will send a patch.

@thanm thanm self-assigned this Jan 14, 2021
@gopherbot gopherbot added this to the Unreleased milestone Jan 14, 2021
@gopherbot
Copy link

Change https://golang.org/cl/283646 mentions this issue: git-codereview: fix buglet in 'reword' related to work trees

@thanm
Copy link
Contributor Author

thanm commented Jan 21, 2021

Looks like the sync-branch subcommand has the same issue (I am just now getting around to trying it). Will send a CL.

@thanm thanm modified the milestones: Unreleased, Backlog Jan 21, 2021
@thanm thanm added the NeedsFix The path to resolution is known, but the work has not been done. label Jan 21, 2021
@rsc rsc unassigned thanm Jun 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
NeedsFix The path to resolution is known, but the work has not been done.
Projects
None yet
Development

No branches or pull requests

2 participants