My favorites | Sign in
Project Home Downloads Wiki Issues Source
New issue   Search
for
  Advanced search   Search tips   Subscriptions
Issue 2238: Automatic insert Change-Id hint incorrect for submodule
2 people starred this issue and may be notified of changes. Back to list
Status:  Released
Owner:  ----
Closed:  Oct 2014


Sign in to add a comment
 
Reported by he...@henryjenkins.name, Nov 4, 2013
Affected Version: 2.7

What steps will reproduce the problem?
1. clone repo that holds a submodule
2. make and commit changes in submodule
3. push to gerrit for review from submodule
4. Note message.
5. Run `scp -p -P 29418 user@gerrit.host:hooks/commit-msg .git/hooks/`
Get: .git/hooks/: Not a directory
protocol error: expected control record


Set up is the following (Only showing relevant files):
.
├── submodule
│   └── .git
├── .git
│   └── modules
│       └── submodule
│           └──hooks
└── file.txt


What is the expected output? What do you see instead?
While committing the following message is printed:
[snip]
remote: Hint: To automatically insert Change-Id, install the hook:
remote:   scp -p -P 29418 user@gerrit.host:hooks/commit-msg .git/hooks/
remote: 
remote: 

Because the submodule does not have a .git directory the sujested method of installing a hook does not work. So running `scp -p -P 29418 user@gerrit.host:hooks/commit-msg .git/hooks/` gives the following:
 Get: .git/hooks/: Not a directory
 protocol error: expected control record



Please provide any additional information below.

The output of ./submodule/.git:
gitdir: /home/user/workspace/main/.git/modules/submodule

Jul 25, 2014
#2 konrad.b...@gmail.com
Solution is to put the hook in the root .git/modules/[name of submodule]/hooks/ and the problem is solved.
Jul 25, 2014
#3 he...@henryjenkins.name
That is a workaround. I haven't tried it, but that should work. However I believe the issue is still a bug.
Oct 2, 2014
Project Member #4 jrn@google.com
https://gerrit-review.googlesource.com/45630
Status: Released
Sign in to add a comment

Powered by Google Project Hosting