Thread (2 messages) flat view 2 messages, 2 authors, 2016-06-15

Re: [PATCH] Generalize and libify index_is_dirty() to index_differs_from(...)

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:46:08

Possibly related (same subject, not in this thread)

Stephan Beyer [off-list ref] writes:
  This is one of the sequencer-preparing patches.
  (The function is used in sequencer several times, most of the time
   with diff_flags set to DIFF_OPT_IGNORE_SUBMODULES.)

  Alex is on Cc because he introduced the "Is commitable?" (i.e.
  "Is index dirty?") part in builtin-commit.c.

  Peff is on Cc because he introduced index_is_dirty() in
  builtin-revert.c.

 builtin-commit.c |   13 ++-----------
 builtin-revert.c |   13 +------------
 revision.c       |   15 +++++++++++++++
 revision.h       |    2 ++
 4 files changed, 20 insertions(+), 23 deletions(-)
It is a straightforward and clean restructuring, but please do not
contaminate revision.[ch] with this function about "internally running
diff-index".  

revision.[ch] is a library for revision/ancestry traversal and it is
already one of the largest library-ish files. It does not know nor care
about the index, and we want to keep it that way.  Please keep its focus
to revision traversal.

Perhaps diff-lib.c would be a better home for your helper function.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help