git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* git-add--interactive works only in top level
@ 2007-12-04  3:19 Reid Barton
  2007-12-04  5:44 ` Junio C Hamano
  0 siblings, 1 reply; 9+ messages in thread
From: Reid Barton @ 2007-12-04  3:19 UTC (permalink / raw)
  To: git

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

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2007-12-04 17:45 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-12-04  3:19 git-add--interactive works only in top level Reid Barton
2007-12-04  5:44 ` Junio C Hamano
2007-12-04  6:07   ` Reid Barton
2007-12-04  6:22     ` Junio C Hamano
2007-12-04 10:37       ` Wincent Colaiuta
2007-12-04 11:48         ` Johannes Schindelin
2007-12-04 11:56           ` Wincent Colaiuta
2007-12-04 12:21             ` Jakub Narebski
2007-12-04 17:45           ` Junio C Hamano

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).