-
Notifications
You must be signed in to change notification settings - Fork 5.1k
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
Fix git rpr #1109
Fix git rpr #1109
Conversation
|
||
if [ "$#" -ne 1 ]; then | ||
if [ "$#" -ne 2 ]; then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we have a default value for the most common case ? (if $2
is not present, use upstream/master
for ex 👼 )
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@emilevauge there is still room for improvement
git fetch -p --all
(-p
is not required though 👼) to make sure the remotes are all up-to-date- Validate beforehand that the specified remote exists.
ac9cecc
to
792570b
Compare
@vdemeester I added 1/. On 2/, is it really needed? The script will fail if the specified remote doesn't exist, right ? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The script will fail if the specified remote doesn't exist, right ?
It will, but it leaves you in a weird state (not on the same branch when you ran the script initially).
Also, shouldn't rpr
use cpr
and rmpr
?
.github/cpr.sh
Outdated
@@ -0,0 +1,26 @@ | |||
#!/bin/sh | |||
# | |||
# git config --global alias.rpr '!sh .github/cpr.sh' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This alias is not right 👼
.github/rmpr.sh
Outdated
@@ -0,0 +1,27 @@ | |||
#!/bin/sh | |||
# | |||
# git config --global alias.rpr '!sh .github/rmpr.sh' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This alias is not right 👼 👼
Signed-off-by: Emile Vauge <[email protected]>
Signed-off-by: Emile Vauge <[email protected]>
Signed-off-by: Emile Vauge <[email protected]>
792570b
to
c00a9fa
Compare
Added a TRAP calling clean.
Indeed, fixed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 🐸
This PR adds an argument to manage upstream correctly:
git rpr pr remote/branch
It also adds
git rmpr
&git cpr
commands./cc @vdemeester
Signed-off-by: Emile Vauge [email protected]