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

Last pull-request title is uploaded instead of new one. #1146

Closed
bgvo opened this issue Mar 14, 2016 · 10 comments
Closed

Last pull-request title is uploaded instead of new one. #1146

bgvo opened this issue Mar 14, 2016 · 10 comments

Comments

@bgvo
Copy link

bgvo commented Mar 14, 2016

When I do git pull-request being on a feature-branch, it opens my editor and it shows the last title and description I entered. However, once I overwrite it with the new title and description still uploads to Github the previous title and description.

Why do we have this behavior?

Thanks.

@mislav
Copy link
Owner

mislav commented May 3, 2016

Hmm, that shouldn't happen. Did you remember to save the file after editing? If you exited the editor but didn't save the changes, hub would use the original title and description that were presented to you when the text editor opened, but not with any of your changes. That's the only explanation I could see.

Does this keep happening to you? If so, are you using the latest hub version?

@valentin-hc
Copy link

valentin-hc commented May 3, 2016

I have the same issue. I work with @bgvo and it has been happening every time for me.
The process usually is : save changed files, git add . , git commit, git push, git pull-request (I have git alias so it uses hub).
It opens my editor with the description of my last pull request. I overwrite it and then save but it catches the previous text, not the one I just entered before saving.

To avoid having that problem, what I have been doing is leaving the page blank before saving on my second attempt. That way next time I do a pull request, I fill in my comment, save, it fails to execute pull request due to empty title, then I do git pull-request again, this time I erase the comment I just entered before and save the blank page. That second time it does catch the comment I had written on the first attempt.

I hope that helps, let me know if you need more clarification.

@danielnolan
Copy link

I am having this same issue after updating hub recently. I am currently on the most current version of hub 2.2.5 and git 2.9.3. My remote is named origin. No matter what I do now it uses the previous pull request title and body, even if I erase all of the text for the pull request when vim opens to edit the pull request message. My workflow is pretty typical

  1. cut a feature branch from master
  2. add changed files using git add . and commit using git commit
  3. push to remote using git push -u
  4. open pull request using git pull-request

@mislav
Copy link
Owner

mislav commented Aug 17, 2016

@danielnolan I'm sorry that you're having trouble. Is the problem that you're having one where you edited title & pull request body in your text editor, but those edits were ignored? Did you properly save the file when editing pull request message before closing vim? Are you using a graphical vim such as gvim or macvim?

@danielnolan
Copy link

Yes when I open a pull request using hub it has the title and body from the previous pull request when vim opens. It used to have the last commit message title and body from the current branch. If I change the title and body or even delete it and submit it blank it still uses the title and body from the previous pull request. I am currently using neovim installed via homebrew, I also use tmux if that could have any effect on the issue. Hub has been part of my workflow everyday and this was all working great until version 2.2.4 I believe.

@mislav
Copy link
Owner

mislav commented Aug 17, 2016

That's pretty strange that it broke now. What's your git var GIT_EDITOR? If you rm .git/PULLREQ_EDITMSG, does the problem go away permanently?

@danielnolan
Copy link

GIT_EDITOR is vim and I don't seem to have a .git/PULLREQ_EDITMSG

@mislav
Copy link
Owner

mislav commented Aug 19, 2016

@danielnolan That's how it should be, but then I don't have any explanation for the problems you are experiencing. I'm sorry. I'll keep an eye out for similar reports and will try to reproduce the issue myself. Please keep me updated on any variations of this bug.

@timja
Copy link

timja commented Sep 14, 2017

I'm also having this issue.
I cleared my message and it still created the pull request with the old title.

$ git var GIT_EDITOR
nvim

I also don't have this file PULLREQ_EDITMSG

@mislav
Copy link
Owner

mislav commented Sep 29, 2019

Closing due to lack of newer reports. Sorry that this hasn't reached a satisfying conclusion! I hope it was somehow fixed in the meantime.

@mislav mislav closed this as completed Sep 29, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants