1#!/bin/sh23test_description='git-add -u with path limiting45This test creates a working tree state with three files:67top (previously committed, modified)8dir/sub (previously committed, modified)9dir/other (untracked)1011and issues a git-add -u with path limiting on "dir" to add12only the updates to dir/sub.'1314. ./test-lib.sh1516test_expect_success 'setup' '17echo initial >top &&18mkdir dir &&19echo initial >dir/sub &&20git-add dir/sub top &&21git-commit -m initial &&22echo changed >top &&23echo changed >dir/sub &&24echo other >dir/other25'2627test_expect_success 'update' 'git-add -u dir'2829test_expect_success 'update touched correct path' \30'test "`git-diff-files --name-status dir/sub`" = ""'3132test_expect_success 'update did not touch other tracked files' \33'test "`git-diff-files --name-status top`" = "M top"'3435test_expect_success 'update did not touch untracked files' \36'test "`git-diff-files --name-status dir/other`" = ""'3738test_done