quilt-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Quilt-dev] quilt push and globbing


From: Jean Delvare
Subject: Re: [Quilt-dev] quilt push and globbing
Date: Thu, 12 May 2005 13:06:01 +0200 (CEST)

[Andreas Gruenbacher]
> The fix is correct; unfortunately it doesn't really help much though:
> patch names are not fully quoted almost everywhere, so to make this work
> properly, the entire code would need to be thoroughly reviewed, fixed,
> and re-tested. That's probably one full day of work or more.

I see your point. However I tend to think that this case is rather worse
than the other ones, because nullglob is in effect, which means that a
problem is much more likely to happen here. Without nullglob, problems
will happen if the patch name contains a globbing expression and the
unwanted globbing succeeds. With nullglob, it will fail as soon as the
patch name contains s globbing expression, regardless of the success or
failure of the unwanted globbing. For this reason, I believe that it's
worth fixing this case even if we don't fix all the scripts right now.

Note that nullglob is also used in scripts/inspect. I don't use this one
script myself, but someone who does should probably take a look and add
the missing quotes, if any. It looks to me like some are missing.

It might be worth explaining why I have been hitting this globbing
problem.  As you might remember, I added a "rename" function to quilt,
and am using it locally. Before, when I wanted to apply a new patch, I
would rename it first (without fancy characters in the new name, of
course), then import it, then attempt to push it. Now, I do it the other
way around, i.e. import, push, and if the push succeeds, rename it. The
benefit is that I don't bother renaming patches which do not apply and
will be deleted anyway. This is not the reason why I wrote the rename
function in the first place, but it happens to be a convenient use. The
drawback is that it now causes me to import and push patches with names
I did not choose, and which may contain strings like "[PATCH]",
causing the globbing problem.

I suspect that for now every user of quilt does rename his/her patches
before importing them, which is the reason why nobody ever hit the
problem. However, if we are to include my rename function in quilt at a
later time, it is likely that some people will start working the way I
do, and will hit the problem. This means that we would have to ensure
that the import, push and delete functions are fancy-character-proof, or
at least don't fail in the common case of square brackets in the patch
name. So far only the nullglob part in push has caused trouble to me
(most likely for the reason explained above), which is why applying my
fix seems to make sense even if much more would be needed to make quilt
totally fancy-character-proof.

Thanks,
--
Jean Delvare




reply via email to

[Prev in Thread] Current Thread [Next in Thread]