Thread (10 messages) flat view 10 messages, 6 authors, 2016-08-11

Re: Separating "add path to index" from "update content in index"

From: Sean <hidden>
Date: 2016-06-15 22:42:46

On Thu, 21 Dec 2006 18:32:55 -0800
Carl Worth [off-list ref] wrote:
So here I'm arguing against "git add" being a more convenient synonym
for "git update-index". I still think it would be nice to have a more
convenient synonym. I've proposed "stage" before but that wasn't well
accepted. Just shortening "update-index" to "update" would be
problematic as many other RCSs use "update" as a way of picking up new
content that has become available on the remote end. So, the best
suggestion I have at this point is "refresh". So I'd be happy if
either:

	git refresh --add
or:
	git add --refresh

would provide the behavior that currently is provided by "git add",
(that is, add a new path to the index and update the content of that
path in the index from the content of the named file in the working
tree). But it would be great if "git add" without the --refresh would
add the path without updating the content.

The end result you're trying to achieve is worthwhile, but it seems the
new git add capabilities have already taken root.  What do you think
about accepting the new behavior of add, but offer a new command, say:

$ git track-file <file>

Which would do exactly as you propose in your email, add the path to
the index with empty content?

Sean
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help