git-review icon indicating copy to clipboard operation
git-review copied to clipboard

using tag like commit message does not allow to make request

Open kalabiyau opened this issue 10 years ago • 4 comments

given last commit in HEAD looks like [TAGNAME] done stuff

having latter will not allow to make a review request.

kalabiyau avatar Mar 04 '14 14:03 kalabiyau

Could you please explain how to reproduce the problem?

xystushi avatar Mar 07 '14 09:03 xystushi

given you have a commit in your branch with square brackets [] like [TAG] this is commit message

if you will try to git review create it will break execution

╭─kalabiyau@kalabiyau  ~/Code ‹ruby-2.0.0› ‹review_140321_caramba*› 
╰─$ git ci -am "[tag] commit"
[review_140321_caramba 8311faf] [tag] commit
 1 file changed, 2 insertions(+), 1 deletion(-)
╭─kalabiyau@kalabiyau  ~/Code ‹ruby-2.0.0› ‹review_140321_caramba› 
╰─$ git review create
Faraday::Builder is now Faraday::RackBuilder.
fatal: 'tag' does not appear to be a git repository
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
error: Execution of git-review stopped.

kalabiyau avatar Mar 21 '14 08:03 kalabiyau

Yes. I can confirm this bug.

It is because currently in remote_for_branch() we are trying to match remote tracking branch like [origin/master]. If there's no remote branch and the commit message happens to start with [some tag], it will mistakenly match some tag to remote branch name.

This is fixed in #90.

xystushi avatar Mar 22 '14 08:03 xystushi

Fix is in development branch. I plan to release a new version before GSoC anyways (and thus merge development into master). Gimme a couple of days to regain a feeling about what's in the development branch right now and what can be merged or cherry-picked.

b4mboo avatar Mar 28 '14 13:03 b4mboo