Re: Importing from tarballs; add, rm, update-index?

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Peter Baumann
Date: Saturday, January 13, 2007 - 9:19 am

On Sat, Jan 13, 2007 at 12:17:18PM +0100, Johannes Schindelin wrote:
OK. Now we are talking clear. I don't like git-add to do two things (see
below)


I unterstand the concept of the index, I even glanced at the code. The
index holds for every file... err..  content a struct cache_entry (my
above mentioned "buckets"). If I add a new cache_entry, I enlarge my
later committed tree by at least one new file (adding a new file could
also add an entry for a directory in the final tree object).

I would much more like the idea of having one command (git-add) which
would enlarge the index by a new struct cache_entry and another which
replaces a previously added cache_entry. Because I'd like to control
how my final tree looks like and add least to me adding a file entry to
a tree is something different than updating a file entry (at least
mentally).

I'd favour the following model:

 git-add: register the content of a previously unkown file to git
    (there was now struct chache_entry in the index previously which
     described a file with the same name)

 git-rm: remove a struct cache_entry from the index and after some
    safty checks remove the file, too. (see in the mailinglist archive;
    there was much talk about git-rm and its semantic)

 git-refresh (or git-stage or git-update or what-ever you call it):
    replace the cache_entry by a new one

And this all about content; the content which would represent my next
tree object. Because developers don't think of "add" if they want to
remove a file from the commit. If the power users liked to have only one
command, wich does remove, add and update then lets not call it add.
Better make this commmand the above mentioned git-refresh which would do
"the right thing" if called with a new file/removed file

Im simply think its confusing to call the described command git-add, as
we have it now. It's at least *very* confusing for new starters.

-Peter

-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: Importing from tarballs; add, rm, update-index?, Peter Baumann, (Fri Jan 12, 12:11 pm)
Re: Importing from tarballs; add, rm, update-index?, Junio C Hamano, (Fri Jan 12, 12:43 pm)
Re: Importing from tarballs; add, rm, update-index?, Peter Baumann, (Fri Jan 12, 2:04 pm)
Re: Importing from tarballs; add, rm, update-index?, Junio C Hamano, (Fri Jan 12, 5:48 pm)
Re: Importing from tarballs; add, rm, update-index?, Brian Gernhardt, (Fri Jan 12, 11:36 pm)
Re: Importing from tarballs; add, rm, update-index?, Peter Baumann, (Sat Jan 13, 2:33 am)
Re: Importing from tarballs; add, rm, update-index?, Johannes Schindelin, (Sat Jan 13, 4:17 am)
Re: Importing from tarballs; add, rm, update-index?, Carl Worth, (Sat Jan 13, 9:09 am)
Re: Importing from tarballs; add, rm, update-index?, Peter Baumann, (Sat Jan 13, 9:19 am)
Re: Importing from tarballs; add, rm, update-index?, Julian Phillips, (Sat Jan 13, 9:27 am)
Re: Importing from tarballs; add, rm, update-index?, Brian Gernhardt, (Sat Jan 13, 9:45 am)
Re: Importing from tarballs; add, rm, update-index?, Peter Baumann, (Sat Jan 13, 9:48 am)
Re: Importing from tarballs; add, rm, update-index?, Nicolas Pitre, (Sat Jan 13, 11:54 am)
Re: Importing from tarballs; add, rm, update-index?, Carl Worth, (Sat Jan 13, 12:32 pm)
Re: Importing from tarballs; add, rm, update-index?, Junio C Hamano, (Sat Jan 13, 1:25 pm)
Re: Importing from tarballs; add, rm, update-index?, Nicolas Pitre, (Sat Jan 13, 1:29 pm)