Skip to content

Instantly share code, notes, and snippets.

@vathpela
Last active August 29, 2015 14:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vathpela/bf5e4bb001065a6e777d to your computer and use it in GitHub Desktop.
Save vathpela/bf5e4bb001065a6e777d to your computer and use it in GitHub Desktop.
github pull requests from the command line without adding remotes for everybody's private branches
# this works in repo/.git/config as well as just putting it in ~/.gitconfig
# and having it work magically for all repos
[remote "origin"]
fetch = +refs/pull/*/head:refs/pull/*
fenchurch:~/devel/github.com/efibootmgr$ git fetch
From github.com:vathpela/efibootmgr
* [new ref] refs/pull/8/head -> refs/pull/8
fenchurch:~/devel/github.com/efibootmgr$ git show pull/8
commit 65063c80e377a60c689c4efc38975f97788c70e8
Author: groxxda <ried@mytum.de>
Date: Thu Jul 31 18:37:37 2014 +0200
Update efibootmgr.c
Compare should respect the size of the data it compares.
diff --git a/src/efibootmgr/efibootmgr.c b/src/efibootmgr/efibootmgr.c
index ba5f54f..6b03c84 100644
--- a/src/efibootmgr/efibootmgr.c
+++ b/src/efibootmgr/efibootmgr.c
@@ -144,7 +144,7 @@ static int
compare(const void *a, const void *b)
{
int rc = -1;
- uint32_t n1, n2;
+ uint16_t n1, n2;
memcpy(&n1, a, sizeof(n1));
memcpy(&n2, b, sizeof(n2));
if (n1 < n2) rc = -1;
@vathpela
Copy link
Author

(Worth noting that e.g. "git am pull/8" or adding a pick line for pull/8 in "git rebase -i HEAD~10" should work as well.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment