1. 02 10月, 2017 1 次提交
    • R
      coccinelle: remove parentheses that become unnecessary · 9ca356fa
      René Scharfe 提交于
      Transformations that hide multiplications can end up with an pair of
      parentheses that is no longer needed.  E.g. with a rule like this:
      
        @@
        expression E;
        @@
        - E * 2
        + double(E)
      
      ... we might get a patch like this:
      
        -	x = (a + b) * 2;
        +	x = double((a + b));
      
      Add a pair of parentheses to the preimage side of such rules.
      Coccinelle will generate patches that remove them if they are present,
      and it will still match expressions that lack them.
      Signed-off-by: NRene Scharfe <l.s.r@web.de>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      9ca356fa
  2. 22 9月, 2017 13 次提交
  3. 12 9月, 2017 3 次提交
    • J
      cvsimport: shell-quote variable used in backticks · 5b4efea6
      Jeff King 提交于
      We run `git rev-parse` though the shell, and quote its
      argument only with single-quotes. This prevents most
      metacharacters from being a problem, but misses the obvious
      case when $name itself has single-quotes in it. We can fix
      this by applying the usual shell-quoting formula.
      Signed-off-by: NJeff King <peff@peff.net>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      5b4efea6
    • J
      archimport: use safe_pipe_capture for user input · 8d0fad0a
      Jeff King 提交于
      Refnames can contain shell metacharacters which need to be
      passed verbatim to sub-processes. Using safe_pipe_capture
      skips the shell entirely.
      Signed-off-by: NJeff King <peff@peff.net>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      8d0fad0a
    • J
      shell: drop git-cvsserver support by default · 9a42c03c
      Jeff King 提交于
      The git-cvsserver script is old and largely unmaintained
      these days. But git-shell allows untrusted users to run it
      out of the box, significantly increasing its attack surface.
      
      Let's drop it from git-shell's list of internal handlers so
      that it cannot be run by default.  This is not backwards
      compatible. But given the age and development activity on
      CVS-related parts of Git, this is likely to impact very few
      users, while helping many more (i.e., anybody who runs
      git-shell and had no intention of supporting CVS).
      
      There's no configuration mechanism in git-shell for us to
      add a boolean and flip it to "off". But there is a mechanism
      for adding custom commands, and adding CVS support here is
      fairly trivial. Let's document it to give guidance to
      anybody who really is still running cvsserver.
      Signed-off-by: NJeff King <peff@peff.net>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      9a42c03c
  4. 11 9月, 2017 3 次提交
  5. 10 9月, 2017 20 次提交