1. 23 6月, 2018 2 次提交
    • T
      grep.[ch]: extend grep_opt to allow showing matched column · 017c0fcf
      Taylor Blau 提交于
      To support showing the matched column when calling 'git-grep(1)', teach
      'grep_opt' the normal set of options to configure the default behavior
      and colorization of this feature.
      
      Now that we have opt->columnnum, use it to disable short-circuiting over
      ORs and ANDs so that col and icol are always filled with the earliest
      matches on each line. In addition, don't return the first match from
      match_line(), for the same reason.
      Signed-off-by: NTaylor Blau <me@ttaylorr.com>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      017c0fcf
    • T
      grep.c: expose {,inverted} match column in match_line() · 68d686e6
      Taylor Blau 提交于
      When calling match_line(), callers presently cannot determine the
      relative offset of the match because match_line() discards the
      'regmatch_t' that contains this information.
      
      Instead, teach match_line() to take in two 'ssize_t's. Fill the first
      with the offset of the match produced by the given expression. If
      extended, fill the later with the offset of the match produced as if
      --invert were given.
      
      For instance, matching "--not -e x" on this line produces a columnar
      offset of 0, (i.e., the whole line does not contain an x), but "--invert
      --not -e -x" will fill the later ssize_t of the column containing an
      "x", because this expression is semantically equivalent to "-e x".
      
      To determine the column for the inverted and non-inverted case, do the
      following:
      
        - If matching an atom, the non-inverted column is as given from
          match_one_pattern(), and the inverted column is unset.
      
        - If matching a --not, the inverted column and non-inverted column
          swap.
      
        - If matching an --and, or --or, the non-inverted column is the
          minimum of the two children.
      
      Presently, the existing short-circuiting logic for AND and OR applies as
      before. This will change in the following commit when we add options to
      configure the --column flag. Taken together, this and the forthcoming
      change will always yield the earlier column on a given line.
      
      This patch will become useful when we later pick between the two new
      results in order to display the column number of the first match on a
      line with --column.
      Co-authored-by: NJeff King <peff@peff.net>
      Signed-off-by: NTaylor Blau <me@ttaylorr.com>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      68d686e6
  2. 22 6月, 2018 1 次提交
  3. 20 6月, 2018 6 次提交
  4. 19 6月, 2018 25 次提交
  5. 18 6月, 2018 2 次提交
    • K
      t3200: clarify description of --set-upstream test · cf317877
      Kaartic Sivaraam 提交于
      Support for the --set-upstream option was removed in 52668846
      (builtin/branch: stop supporting the "--set-upstream" option,
      2017-08-17). The change did not completely remove the command
      due to an issue noted in the commit's log message.
      
      So, a test was added to ensure that a command which uses the
      '--set-upstream' option fails instead of silently acting as an alias
      for the '--set-upstream-to' option due to option parsing features.
      
      To avoid confusion, clarify that the option is disabled intentionally
      in the corresponding test description.
      
      The test is expected to be around as long as we intentionally fail
      on seeing the '--set-upstream' option which in turn we expect to
      do for a period of time after which we can be sure that existing
      users of '--set-upstream' are aware that the option is no
      longer supported.
      Signed-off-by: NKaartic Sivaraam <kaartic.sivaraam@gmail.com>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      cf317877
    • J
      l10n: zh_CN: for git v2.18.0 l10n round 1 to 3 · fd8cb379
      Jiang Xin 提交于
      Translate 251 new messages (3608t0f0u) for git 2.18.0.
      Signed-off-by: NJiang Xin <worldhello.net@gmail.com>
      fd8cb379
  6. 17 6月, 2018 4 次提交