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: does not work with 'git worktree' #12182

Open
josharian opened this issue Aug 18, 2015 · 3 comments
Open

x/review/git-codereview: does not work with 'git worktree' #12182

josharian opened this issue Aug 18, 2015 · 3 comments
Milestone

Comments

@josharian
Copy link
Contributor

See https://github.com/blog/2042-git-2-5-including-multiple-worktrees-and-triangular-workflows for info about 'git worktree'.

At the least, the hook checker needs updating:

$ git sync
git-codereview: checking hook: stat /Volumes/Data/src/go.ssa/.git/hooks/commit-msg: not a directory

There might be other stuff as well.

@josharian josharian added this to the Unreleased milestone Aug 18, 2015
@mikioh mikioh changed the title x/codereview: git-codereview does not work with 'git worktree' x/review/git-codereview: does not work with 'git worktree' Aug 18, 2015
@gopherbot
Copy link

CL https://golang.org/cl/18349 mentions this issue.

@cmarcelo
Copy link
Contributor

I'll rework the CL for this.

@gopherbot
Copy link

CL https://golang.org/cl/19882 mentions this issue.

gopherbot pushed a commit to golang/review that referenced this issue Mar 2, 2016
Use 'git rev-parse' to obtain the repo root (toplevel) and the hooks
directory (git-path hooks).

Git knows better how to handle more complex scenarios, e.g. in a
linked worktree (created using "git worktree add"), ".git" is not
a directory but a regular file, that contains the path to the linked
gitdir, that then contains the path to the main gitdir. The hooks
should be there.

For older version git versions without --git-path (and without
worktree), fallback to the previous approach.

Updates golang/go#12182.

Change-Id: I7a90362409fc5000282db95c4ec2ab5052ae59a8
Reviewed-on: https://go-review.googlesource.com/19882
Run-TryBot: Andrew Gerrand <adg@golang.org>
Reviewed-by: Andrew Gerrand <adg@golang.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants