git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH v2 0/3] Perl rewrite of Ruby git-related

From
Eric Sunshine <sunshine@sunshineco.com>
Date
Jul 3, 2013, 20:59 UTC
Message-ID
<1372885182-5512-1-git-send-email-sunshine@sunshineco.com>

This is v2 of the Perl rewrite of Felipe Contreras' git-related v9 patch series[1] which was written in Ruby. v2 addresses (hopefully all of) Junio's v1[2] review points.

[1]: http://thread.gmane.org/gmane.comp.version-control.git/226065/ [2]: http://thread.gmane.org/gmane.comp.version-control.git/229266/

Changes since v1:
* Match Signed-off-by:, etc. labels case-insensitively.
* Recognize Cc: in addition to Signed-off-by: and other typical labels.
* Match SHA-1's and surrounding context more strictly in output of
  git-format-patch, git-blame, git-cat-file.
* Mention -C in commit message of [1/3].
* Pass just a single -C to git-blame and git-diff. Previously, git-blame
  was invoked inconsistently with '-C -C' and git-diff with '-C'.
* Employ git-blame --porcelain rather than --incremental.
* Fix bug where a "new file" ('--- /dev/null') hunk following a "changed
  file" ('--- a/path/to/file') hunk would incorrectly invoke git-blame
  on "changed file" with line numbers from "new file".
* Fix bug where filename containing whitespace was not recognized
  correctly when scanning hunk source lines ('--- /a/file name').
* Abort when unable to parse hunk source ('--- path') from diff with
  custom --src-prefix=.
* Emit diagnostic, rather than exiting silently, when user neglects to
  provide input arguments.
* Combine v1 patches [1/4] and [2/4]. As Junio pointed, a single patch
  file may contain multiple patches (for example "git format-patch
  --stdout -4 >P.mbox"), so the machinery for dealing with multiple
  patches must already be present in [1/4] whether the patches come from
  one file or many. Consequently, adding "multiple file" support
  involved only a very minor change to @ARGV handling, not deserving of
  a separate [2/4] patch.
* Drop Perl source file and line number information from user-facing
  error messages.
Possible future directions and considerations:
* Add mailmap support.
* Make participation parameters (minimum-percent, blame since-date, -C
  level) configurable.
* Optimize by coalescing ranges into a single git-blame -L invocation;
  or enhance git-blame to accept multiple -L's.
* Improve Windows support if needed, possibly via grabbing
  run_cmd_pipe() from git-add--interactive.perl or similar.
Eric Sunshine (3):
  contrib: add git-contacts helper
  contrib: contacts: add ability to parse from committish
  contrib: contacts: interpret committish akin to format-patch
 contrib/contacts/git-contacts | 170 ++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 170 insertions(+)
 create mode 100755 contrib/contacts/git-contacts
-- 
1.8.3.2
Next: Eric Sunshine
Message 1 of 4 in “Perl rewrite of Ruby git-related”
  1. 0/3 Perl rewrite of Ruby git-relatedEric Sunshine, Jul 3, 2013
  2. 1/3 contrib: add git-contacts helperEric Sunshine, Jul 3, 2013
  3. 2/3 contrib: contacts: add ability to parse from committishEric Sunshine, Jul 3, 2013
  4. 3/3 contrib: contacts: interpret committish akin to format-patchEric Sunshine, Jul 3, 2013

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.