Re: [PATCH] Replace git-cvsimport with a rewrite that fixes major bugs.

2 messages, 2 authors, 2016-06-15 · open the first message on its own page

Re: [PATCH] Replace git-cvsimport with a rewrite that fixes major bugs.

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:55:38

Chris Rorvick [off-list ref] writes:
outdir needs to be quoted in the formatted string, i.e.:

  "%s | (cd '%s' >/dev/null ..."
The issue is real, but I am afraid that the above is not sufficient
because outdir can contain single quotes.  I think other places that
call out to external processes share the same issue of being careless
about quoting in general.

Doesn't Python come with a standard subprocess module that lets you
spawn external programs safely, similar to the way Perl's list form
open(), e.g. "open($fh, "-|", 'git', @args)", works?

Re: [PATCH] Replace git-cvsimport with a rewrite that fixes major bugs.

From: Antoine Pelisse <hidden>
Date: 2016-06-15 22:55:38

Doesn't Python come with a standard subprocess module that lets you
spawn external programs safely, similar to the way Perl's list form
open(), e.g. "open($fh, "-|", 'git', @args)", works?
You mean something like this:

  p1 = subprocess.Popen([backend.command()], stdout=subprocess.PIPE)
  subprocess.Popen(["git", "fast-import", "--quiet"] + gitopts,
cwd=outdir, stdin=p1.stdout)

Assuming gitopts is a list rather than a string. (care must be taken
with backend.command() also)
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help