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

Add fetch & push refspec. #318

Merged
merged 1 commit into from
Jan 22, 2014
Merged

Add fetch & push refspec. #318

merged 1 commit into from
Jan 22, 2014

Conversation

xtao
Copy link
Contributor

@xtao xtao commented Jan 20, 2014

RT

@alexband
Copy link

🍺

@jdavid
Copy link
Member

jdavid commented Jan 21, 2014

Hello and thanks for contributing.

I get this warning when compiling:

x86_64-pc-linux-gnu-gcc -pthread -fPIC -I/usr/local/include -Iinclude -I/usr/include/python2.7 -c src/remote.c -o build/temp.linux-x86_64-2.7/src/remote.o
src/remote.c: In function ‘Remote_add_push’:
src/remote.c:752:5: warning: passing argument 1 of ‘free’ discards ‘const’ qualifier from pointer target type [enabled by default]
In file included from /usr/include/python2.7/Python.h:42:0,
             from src/remote.c:29:
/usr/include/stdlib.h:482:13: note: expected ‘void *’ but argument is of type ‘const char *’
src/remote.c: In function ‘Remote_add_fetch’:
src/remote.c:781:5: warning: passing argument 1 of ‘free’ discards ‘const’ qualifier from pointer target type [enabled by default]
In file included from /usr/include/python2.7/Python.h:42:0,
             from src/remote.c:29:
/usr/include/stdlib.h:482:13: note: expected ‘void *’ but argument is of type ‘const char *’

const char *refspec = NULL;
int err = 0;

if (!PyArg_ParseTuple(args, "O", &py_refspec))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not use "s" as the format directly?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll fix this.

@xtao
Copy link
Contributor Author

xtao commented Jan 22, 2014

@jdavid Fixed. 🍺

@jdavid jdavid merged commit 9ef75d8 into libgit2:master Jan 22, 2014
@xtao xtao deleted the fetch branch January 29, 2014 06:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants