fix 'git update-index --verbose --again' output
authorKarsten Blees <karsten.blees@gmail.com>
Thu, 14 Nov 2013 19:23:42 +0000 (20:23 +0100)
committerJunio C Hamano <gitster@pobox.com>
Mon, 18 Nov 2013 21:04:25 +0000 (13:04 -0800)
'git update-index --verbose' consistently reports paths relative to the
work-tree root. The only exception is the '--again' option, which reports
paths relative to the current working directory.

Change do_reupdate to use non-prefixed paths.

Signed-off-by: Karsten Blees <blees@dcon.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/update-index.c
index e3a10d706d406845b74b2cc0c9e9a120be6adce0..d180d80c040312bfc569b9c66780bd83664da80d 100644 (file)
@@ -579,7 +579,7 @@ static int do_reupdate(int ac, const char **av,
                 * or worse yet 'allow_replace', active_nr may decrease.
                 */
                save_nr = active_nr;
                 * or worse yet 'allow_replace', active_nr may decrease.
                 */
                save_nr = active_nr;
-               update_one(ce->name + prefix_length, prefix, prefix_length);
+               update_one(ce->name, NULL, 0);
                if (save_nr != active_nr)
                        goto redo;
        }
                if (save_nr != active_nr)
                        goto redo;
        }