[PATCH v2 0/3] commit, add: error out when passing untracked path

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Fix 'commit -i' and 'add -u', which expect known paths, not erroring
out when passing untracked paths.

The first patch introduces a new parameter to add_files_to_cache() and
run_diff_files() to optionally collect pathspec matching info for use
in reporting error. And the second and third patch use this parameter
to collect pathspec matching info and report error when passing
untracked paths to 'git commit -i' and 'git add -u' respectively.

Ghanshyam Thakkar (3):
  optionally collect pathspec matching info
  builtin/commit: error out when passing untracked path with -i
  builtin/add: error out when passing untracked path with -u

 add-interactive.c                     |  2 +-
 builtin/add.c                         | 13 ++++++++++---
 builtin/checkout.c                    |  3 ++-
 builtin/commit.c                      |  9 ++++++++-
 builtin/diff-files.c                  |  2 +-
 builtin/diff.c                        |  2 +-
 builtin/merge.c                       |  2 +-
 builtin/stash.c                       |  2 +-
 builtin/submodule--helper.c           |  4 ++--
 diff-lib.c                            |  5 +++--
 diff.h                                |  3 ++-
 read-cache-ll.h                       |  4 ++--
 read-cache.c                          |  6 +++---
 t/t2200-add-update.sh                 |  6 ++++++
 t/t7501-commit-basic-functionality.sh | 16 +---------------
 wt-status.c                           |  6 +++---
 16 files changed, 47 insertions(+), 38 deletions(-)

-- 
2.44.0





[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux