* [PATCH] Fix remote.<remote>.vcs
@ 2010-01-27 16:16 Ilari Liusvaara
2010-01-27 16:22 ` Sverre Rabbelier
0 siblings, 1 reply; 3+ messages in thread
From: Ilari Liusvaara @ 2010-01-27 16:16 UTC (permalink / raw)
To: git; +Cc: Tor Arvid Lund
remote.<remote>.vcs causes remote->foreign_vcs to be set on entry to
transport_get(). Unfortunately, the code assumed that any such entry
is stale from previous round. Resetting after starting the remote helper
avoids that case (it isn't likely anyone is using VCS setting and multiple
push URLs, as VCS setting is meant for non-URL-based helpers).
Signed-off-by: Ilari Liusvaara <ilari.liusvaara@elisanet.fi>
---
transport.c | 4 +---
1 files changed, 1 insertions(+), 3 deletions(-)
Tor, does this also fix the segfault for you? This might work without
breaking some multiple-URL cases (just commenting out the reset will break
them).
diff --git a/transport.c b/transport.c
index 7714fdb..76b22e5 100644
--- a/transport.c
+++ b/transport.c
@@ -923,9 +923,6 @@ struct transport *transport_get(struct remote *remote, const char *url)
url = remote->url[0];
ret->url = url;
- /* In case previous URL had helper forced, reset it. */
- remote->foreign_vcs = NULL;
-
/* maybe it is a foreign URL? */
if (url) {
const char *p = url;
@@ -938,6 +935,7 @@ struct transport *transport_get(struct remote *remote, const char *url)
if (remote && remote->foreign_vcs) {
transport_helper_init(ret, remote->foreign_vcs);
+ remote->foreign_vcs = NULL;
} else if (!prefixcmp(url, "rsync:")) {
ret->get_refs_list = get_refs_via_rsync;
ret->fetch = fetch_objs_via_rsync;
--
1.7.0.rc0.19.gd681a
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] Fix remote.<remote>.vcs
2010-01-27 16:16 [PATCH] Fix remote.<remote>.vcs Ilari Liusvaara
@ 2010-01-27 16:22 ` Sverre Rabbelier
2010-01-27 17:18 ` Ilari Liusvaara
0 siblings, 1 reply; 3+ messages in thread
From: Sverre Rabbelier @ 2010-01-27 16:22 UTC (permalink / raw)
To: Ilari Liusvaara; +Cc: git, Tor Arvid Lund
Heya,
On Wed, Jan 27, 2010 at 17:16, Ilari Liusvaara
<ilari.liusvaara@elisanet.fi> wrote:
> it isn't likely anyone is using VCS setting and multiple
> push URLs, as VCS setting is meant for non-URL-based helpers
I don't like that assumption, I've used the vcs setting with regular
urls myself, is there a different way to solve this without
introducing that assumption? Also, what happens if one _does_ do that,
do we crash? abort?
--
Cheers,
Sverre Rabbelier
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] Fix remote.<remote>.vcs
2010-01-27 16:22 ` Sverre Rabbelier
@ 2010-01-27 17:18 ` Ilari Liusvaara
0 siblings, 0 replies; 3+ messages in thread
From: Ilari Liusvaara @ 2010-01-27 17:18 UTC (permalink / raw)
To: Sverre Rabbelier; +Cc: git, Tor Arvid Lund
On Wed, Jan 27, 2010 at 05:22:07PM +0100, Sverre Rabbelier wrote:
> Heya,
>
> On Wed, Jan 27, 2010 at 17:16, Ilari Liusvaara
> <ilari.liusvaara@elisanet.fi> wrote:
> > it isn't likely anyone is using VCS setting and multiple
> > push URLs, as VCS setting is meant for non-URL-based helpers
>
> I don't like that assumption, I've used the vcs setting with regular
> urls myself, is there a different way to solve this without
> introducing that assumption? Also, what happens if one _does_ do that,
> do we crash? abort?
If you have url-based remote helper, then use the <helper>::<URL> syntax.
As for what would happen: If you don't override with URL, the first
URL would use remote helper specified by vcs setting.
Maybe it would be better idea to have vcs setting set the default
helper (that gets used unless you override?)
-Ilari
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2010-01-27 17:18 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-01-27 16:16 [PATCH] Fix remote.<remote>.vcs Ilari Liusvaara
2010-01-27 16:22 ` Sverre Rabbelier
2010-01-27 17:18 ` Ilari Liusvaara
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).