]> git.ipfire.org Git - thirdparty/git.git/commitdiff
last-modified: remove double error message
authorToon Claes <toon@iotcl.com>
Fri, 16 Jan 2026 13:08:39 +0000 (14:08 +0100)
committerJunio C Hamano <gitster@pobox.com>
Fri, 16 Jan 2026 17:30:27 +0000 (09:30 -0800)
When the user passes two revisions, they get the following output:

    $ git last-modified HEAD HEAD~
    error: last-modified can only operate on one revision at a time
    error: unable to setup last-modified

The error message about "unable to setup" is not very informative,
remove it.

Signed-off-by: Toon Claes <toon@iotcl.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/last-modified.c

index 06e3f79aec38084ed8c72abc45378f799260d637..0df85be31876b0dc6a8c698d6fd9d08a1bb2367b 100644 (file)
@@ -495,7 +495,7 @@ static int last_modified_init(struct last_modified *lm, struct repository *r,
        lm->rev.bloom_filter_settings = get_bloom_filter_settings(lm->rev.repo);
 
        if (populate_paths_from_revs(lm) < 0)
-               return error(_("unable to setup last-modified"));
+               return -1;
 
        CALLOC_ARRAY(lm->all_paths, hashmap_get_size(&lm->paths));
        lm->all_paths_nr = 0;