git-add--interactive works only in top level

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

 



When the working directory is not the top of the working tree, git- add--interactive fails silently and confusingly. In this example, the working tree is rooted at ~/sandbox/foo and ~/sandbox/foo/bar/x is a file that's been edited.

rwbarton@homothety:~/sandbox/foo/bar$ git-add--interactive
           staged     unstaged path
  1:    unchanged        +1/-0 bar/x

*** Commands ***
  1: status       2: update       3: revert       4: add untracked
  5: patch        6: diff         7: quit         8: help
What now> 5
           staged     unstaged path
  1:    unchanged        +1/-0 bar/x
Patch update> 1

*** Commands ***
  1: status       2: update       3: revert       4: add untracked
  5: patch        6: diff         7: quit         8: help
What now>

Rather than returning to the main menu, git-add--interactive should have showed me a list of chunks. It seems that the list of files is relative to the working tree root (which is sensible) but when git- add--interactive invokes git-diff-files it does not take this into account. Perhaps git-diff-files should also complain when invoked as

git-diff-files -- non-existent-file-name

so it wouldn't have taken me half an hour to track this down.

Regards,
Reid Barton

-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[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