diff options
author | Jeff King <peff@peff.net> | 2011-12-12 16:54:17 -0500 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2011-12-12 15:43:38 -0800 |
commit | cd40b05d13676a41fc68807c351d0de07eb4c270 (patch) | |
tree | 0af2dd362c8f00e948a8ce66ca5c849d4f68dd30 /git-instaweb.sh | |
parent | 77471646d3d87691b4bcf11682945e6ccc27f9e3 (diff) | |
download | git-cd40b05d13676a41fc68807c351d0de07eb4c270.tar.gz |
mv: improve overwrite warning
When we try to "git mv" over an existing file, the error
message is fairly informative:
$ git mv one two
fatal: destination exists, source=one, destination=two
When the user forces the overwrite, we give a warning:
$ git mv -f one two
warning: destination exists; will overwrite!
This is less informative, but still sufficient in the simple
rename case, as there is only one rename happening.
But when moving files from one directory to another, it
becomes useless:
$ mkdir three
$ touch one two three/one
$ git add .
$ git mv one two three
fatal: destination exists, source=one, destination=three/one
$ git mv -f one two three
warning: destination exists; will overwrite!
The first message is helpful, but the second one gives us no
clue about what was overwritten. Let's mention the name of
the destination file:
$ git mv -f one two three
warning: overwriting 'three/one'
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'git-instaweb.sh')
0 files changed, 0 insertions, 0 deletions