Re: [1.8.0] use 'stage' term consistently

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

 



Jonathan Nieder wrote:

> For the sake of having a proposal: :)

For the command-line interface:

Making the "git stage" command more prominent.  Unfortunately it is
currently a synonym for "git add", which makes "git rm" less
discoverable and generally isn't very helpful.  But if we discard that
property, it could become a nice way to make some operations more
discoverable:

	git stage --add <paths>; # stage an addition
	git stage --remove <paths>; # stage a removal
	git stage --edit <paths>; # edit the staged content
	git stage --apply <patch>; # stage the described change

These would be commands that modify the index without touching the
worktree.

If anyone claims this is the command for manipulating "the stage", we
can apologize for the confusing homonym and point them to a dictionary
and images of raised platforms and staging areas and hopefully that
will avoid any confusion.  The command is named after the verb.

Finding a better mnemonic than "also update the current directory cache"
and "trust the current directory cache" for operations like git apply
--index and git grep --cached.  Better concepts would be "search the
content staged for the next commit" and "also update the staged
content".

Maybe:

	git apply --index=(yes | no | only)
		# apply         	= apply --index=no
		# apply --index 	= apply --index=yes
		# apply --cached	= apply --index=only

	git grep --index; # (= git grep --cached)

I imagine others can come up with something better.
--
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]