magithub icon indicating copy to clipboard operation
magithub copied to clipboard

Commit log is empty when creating a new PR for an out-of-fork PR

Open jonathanj opened this issue 6 years ago • 3 comments

Inspecting the arguments to magit-log (in magithub-pull-request-new) it seems like it ends up doing something like (magit-log "master..jonathanj:the-branch") which likely will never result in anything useful. I think probably this is supposed to use head-no-user.

jonathanj avatar May 24 '18 15:05 jonathanj

which likely will never result in anything useful

It certainly resulted in useful information when I tested :-)

Can you expand on what you mean by an out-of-fork PR?

vermiculus avatar May 24 '18 17:05 vermiculus

As far as I understand it, jonathanj:the-branch is the <rev>:<path> Git revision syntax, so it's looking for the path the-branch within the tree-ish object called jonathanj, which is probably nothing like what is intended.

I don't know what the word for "out-of-fork" is, but basically I mean I'm not publishing a pull request against my own fork. For example, I forked the-team/project to jonathanj/project and my PR is to merge my branch (on Github as jonathanj/project:the-branch) into the upstream master branch (on Github as the-team/project:master). What happens here is magithub attempts to call (magit-log "master..jonathanj:the-branch") which I can't see ever producing the correct result under these circumstances.

jonathanj avatar May 24 '18 17:05 jonathanj

I forgot what the params to magit-log were, in all cases above I meant (magit-log '("master..jonathanj:the-branch")), sorry for any confusion as a result of this.

jonathanj avatar May 24 '18 17:05 jonathanj