Thread (4 messages) flat view 4 messages, 1 author, 2016-06-15
DORMANTno replies

Revision v2 of 2 in this series.

Revisions (2)
  1. rfc [diff vs current]
  2. v2 current

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

From: Eric Sunshine <hidden>
Date: 2016-06-15 22:57:59

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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help