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

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

From
Junio C Hamano <gitster@pobox.com>
Date
Feb 10, 2009, 05:16 UTC
Message-ID
<7v63jirhw8.fsf@gitster.siamese.dyndns.org>
In-Reply-To
<1234222843-15577-1-git-send-email-s-beyer@gmx.net>
Stephan Beyer <s-beyer@gmx.net> writes:
Show 15 quoted lines
>   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.
Previous: Jeff KingNext: Stephan Beyer
Message 3 of 4 in “Generalize and libify index_is_dirty() to index_differs_from(...)”
  1. Generalize and libify index_is_dirty() to index_differs_from(...)Stephan Beyer, Feb 9, 2009
  2. Jeff KingFeb 10, 2009
  3. Junio C HamanoFeb 10, 2009
  4. Generalize and libify index_is_dirty() to index_differs_from(...)Stephan Beyer, Feb 10, 2009

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.