Re: [PATCH 08/12] MINGW: fix main() signature in http-fetch.c and remote-curl.c
On Wed, Apr 30, 2014 at 10:35:56AM +0200, Karsten Blees wrote: > Am 29.04.2014 11:12, schrieb Marat Radchenko: > > On MinGW, compat/mingw.h defines a 'mingw_main' wrapper function. > > Fix `warning: passing argument 2 of 'mingw_main' from incompatible > > pointer type` in http-fetch.c and remote-curl.c by dropping 'const'. > > > > Would you mind cross checking your changes with the msysgit fork? > Fixing the same thing in a slightly different manner will just cause > unnecessary conflicts (i.e. unnecessary work for the Git for Windows > maintainers, as well as for you to come up with an alternate solution > for something that's long been fixed). > > See https://github.com/msysgit/git/commit/9206e7fd (squashed from > https://github.com/msysgit/git/commit/0115ef83 and > https://github.com/msysgit/git/commit/6949537a). 6949537a is just an unnecessary hack and would have to be rewritten no matter who would try to submit it upstream. -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 08/12] MINGW: fix main() signature in http-fetch.c and remote-curl.c
Hello, On Wed, Apr 30, 2014 at 10:35:56AM +0200, Karsten Blees wrote: > Would you mind cross checking your changes with the msysgit fork? > [...] > See https://github.com/msysgit/git/commit/9206e7fd (squashed from > https://github.com/msysgit/git/commit/0115ef83 and > https://github.com/msysgit/git/commit/6949537a). OK, I _did_ checked these, let's look at the two original commits: - 0115ef83 is interesting, but not relevant to the warnings, - 6949537a contains a fix for the const warning, plus it fixed a minor nit in the other commit. > [...] you to come up with an > alternate solution for something that's long been fixed). Long been fixed by a quick and dirty hack. Marat's fix is nicer, can I ask some of the msysGit guys to ack it? (Appended below for the new cc's here.) Have a nice day, Stepan PS: I bet Dscho will be able to handle the conflict. From: Marat Radchenko Subject: [PATCH 08/12] MINGW: fix main() signature in http-fetch.c and remote-curl.c Date: Tue, 29 Apr 2014 13:12:02 +0400 On MinGW, compat/mingw.h defines a 'mingw_main' wrapper function. Fix `warning: passing argument 2 of 'mingw_main' from incompatible pointer type` in http-fetch.c and remote-curl.c by dropping 'const'. Signed-off-by: Marat Radchenko --- http-fetch.c | 5 +++-- remote-curl.c | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/http-fetch.c b/http-fetch.c index ba3ea10..a6a9a2f 100644 --- a/http-fetch.c +++ b/http-fetch.c @@ -6,7 +6,7 @@ static const char http_fetch_usage[] = "git http-fetch " "[-c] [-t] [-a] [-v] [--recover] [-w ref] [--stdin] commit-id url"; -int main(int argc, const char **argv) +int main(int argc, char **argv) { struct walker *walker; int commits_on_stdin = 0; @@ -38,7 +38,8 @@ int main(int argc, const char **argv) } else if (argv[arg][1] == 'v') { get_verbosely = 1; } else if (argv[arg][1] == 'w') { - write_ref = &argv[arg + 1]; + const char *ref = argv[arg + 1]; + write_ref = &ref; arg++; } else if (argv[arg][1] == 'h') { usage(http_fetch_usage); diff --git a/remote-curl.c b/remote-curl.c index 52c2d96..565b6c9 100644 --- a/remote-curl.c +++ b/remote-curl.c @@ -938,7 +938,7 @@ static void parse_push(struct strbuf *buf) free(specs); } -int main(int argc, const char **argv) +int main(int argc, char **argv) { struct strbuf buf = STRBUF_INIT; int nongit; -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 08/12] MINGW: fix main() signature in http-fetch.c and remote-curl.c
Johannes Schindelin wrote: > On Wed, 30 Apr 2014, Erik Faye-Lund wrote: > > > While it's certainly a good point, I think this is *our* fault for not > > upstreaming our changes, and the responsibility of cleaning up merges > > should lie on our shoulders. We've diverged a lot. Sure, Dscho does a > > great job making the divergence less painful, but IMO we should try to > > reduce the delta as well. > > Just for historical context: we *did* try to get our changes upstream. In > fact, that was in large part everything Steffen Prohaska did while he was > maintaining Git for Windows. The going has been tough, though, to the > point that we were losing contributors who were not *quite* willing to put > up with such a detailed vetting process as the Git mailing list requires. > > I have to admit that it is really, really hard even for someone like me, > who is used to the ways of the Git mailing list, because just a simple > thing like this curl-config issue already eats up several days of my Git > time budget. > > So while I am sympathetic to the point of view that the Git for Windows > project failed to upstream its changes, I am *equally* sympathetic to the > point of view that it is an undue burden to have to go through the process > of getting patches included by upstream Git. I, for one, simply ain't got > the time, man. As a maintainer of another friendly fork of Git (or downstream), because of very similar reaons, I symphathize. It's something that has to be done though, otherwise the burden of maintaining the friendly fork becomse unberable. The trick is to only send the trivial patches upstream, and also to constantly keep track of what is missing from upstream. In oder to do this I've found invaluable to have an integration branch, which I constnatly regenerate with `git reintegrate`[1]. IIRC you do a similar kind of reintegration for each new release of msysgit, and it appears to me that you do it by hand, which must be tedious. I'm planning to write a blog post about the subject, but basically I have a bunch of branches that are direct descendants of an upstream version, I tell `git reintegrate` to merge them on top of certain upstream release, the result must match *exactly* what my main master branch has. The descendant branches I constanly keep rebasing, and the main master branch always mergering and cherry-picking, never rebasing. [1] https://github.com/felipec/git-reintegrate -- Felipe Contreras -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 08/12] MINGW: fix main() signature in http-fetch.c and remote-curl.c
Hi kusma, On Wed, 30 Apr 2014, Erik Faye-Lund wrote: > While it's certainly a good point, I think this is *our* fault for not > upstreaming our changes, and the responsibility of cleaning up merges > should lie on our shoulders. We've diverged a lot. Sure, Dscho does a > great job making the divergence less painful, but IMO we should try to > reduce the delta as well. Just for historical context: we *did* try to get our changes upstream. In fact, that was in large part everything Steffen Prohaska did while he was maintaining Git for Windows. The going has been tough, though, to the point that we were losing contributors who were not *quite* willing to put up with such a detailed vetting process as the Git mailing list requires. I have to admit that it is really, really hard even for someone like me, who is used to the ways of the Git mailing list, because just a simple thing like this curl-config issue already eats up several days of my Git time budget. So while I am sympathetic to the point of view that the Git for Windows project failed to upstream its changes, I am *equally* sympathetic to the point of view that it is an undue burden to have to go through the process of getting patches included by upstream Git. I, for one, simply ain't got the time, man. Ciao, Johannes -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 08/12] MINGW: fix main() signature in http-fetch.c and remote-curl.c
On Wed, Apr 30, 2014 at 10:35 AM, Karsten Blees wrote: > Am 29.04.2014 11:12, schrieb Marat Radchenko: >> On MinGW, compat/mingw.h defines a 'mingw_main' wrapper function. >> Fix `warning: passing argument 2 of 'mingw_main' from incompatible >> pointer type` in http-fetch.c and remote-curl.c by dropping 'const'. >> > > Would you mind cross checking your changes with the msysgit fork? Fixing the > same thing in a slightly different manner will just cause unnecessary > conflicts (i.e. unnecessary work for the Git for Windows maintainers, as well > as for you to come up with an alternate solution for something that's long > been fixed). > > See https://github.com/msysgit/git/commit/9206e7fd (squashed from > https://github.com/msysgit/git/commit/0115ef83 and > https://github.com/msysgit/git/commit/6949537a). > While it's certainly a good point, I think this is *our* fault for not upstreaming our changes, and the responsibility of cleaning up merges should lie on our shoulders. We've diverged a lot. Sure, Dscho does a great job making the divergence less painful, but IMO we should try to reduce the delta as well. For instance, I think the Unicode-support patches have proven themselves by now and should go upstream. And there's probably a ton of smaller free-standing clean-ups that could get the same treatment. -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 08/12] MINGW: fix main() signature in http-fetch.c and remote-curl.c
Am 29.04.2014 11:12, schrieb Marat Radchenko: > On MinGW, compat/mingw.h defines a 'mingw_main' wrapper function. > Fix `warning: passing argument 2 of 'mingw_main' from incompatible > pointer type` in http-fetch.c and remote-curl.c by dropping 'const'. > Would you mind cross checking your changes with the msysgit fork? Fixing the same thing in a slightly different manner will just cause unnecessary conflicts (i.e. unnecessary work for the Git for Windows maintainers, as well as for you to come up with an alternate solution for something that's long been fixed). See https://github.com/msysgit/git/commit/9206e7fd (squashed from https://github.com/msysgit/git/commit/0115ef83 and https://github.com/msysgit/git/commit/6949537a). -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 08/12] MINGW: fix main() signature in http-fetch.c and remote-curl.c
On MinGW, compat/mingw.h defines a 'mingw_main' wrapper function. Fix `warning: passing argument 2 of 'mingw_main' from incompatible pointer type` in http-fetch.c and remote-curl.c by dropping 'const'. Signed-off-by: Marat Radchenko --- http-fetch.c | 5 +++-- remote-curl.c | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/http-fetch.c b/http-fetch.c index ba3ea10..a6a9a2f 100644 --- a/http-fetch.c +++ b/http-fetch.c @@ -6,7 +6,7 @@ static const char http_fetch_usage[] = "git http-fetch " "[-c] [-t] [-a] [-v] [--recover] [-w ref] [--stdin] commit-id url"; -int main(int argc, const char **argv) +int main(int argc, char **argv) { struct walker *walker; int commits_on_stdin = 0; @@ -38,7 +38,8 @@ int main(int argc, const char **argv) } else if (argv[arg][1] == 'v') { get_verbosely = 1; } else if (argv[arg][1] == 'w') { - write_ref = &argv[arg + 1]; + const char *ref = argv[arg + 1]; + write_ref = &ref; arg++; } else if (argv[arg][1] == 'h') { usage(http_fetch_usage); diff --git a/remote-curl.c b/remote-curl.c index 52c2d96..565b6c9 100644 --- a/remote-curl.c +++ b/remote-curl.c @@ -938,7 +938,7 @@ static void parse_push(struct strbuf *buf) free(specs); } -int main(int argc, const char **argv) +int main(int argc, char **argv) { struct strbuf buf = STRBUF_INIT; int nongit; -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html