Re: [RFC] Two conceptually distinct commit commands

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Horst H. von Brand
Date: Monday, December 4, 2006 - 7:14 pm

Carl Worth <cworth@cworth.org> wrote:



How do you distinguish a "new file, same contents as old file" from "old
file, renamed"? What is the difference between:

  mv somefile newfile

and

  cp somefine newfile
  rm somefile

?

How should

  cp somefile newfile
  vi somefile

be handled? How about

  cp somefile oldfile
  vi somefile

or just

  mv somefile oldfile

? Or

  cp somefile somefile.my-own-bakup
  vi somefile

?

The whole problem is your description based on "file renaming" and
such. AFAIU git has a list of file names it is tracking, and for those
names it keeps track of what the contents for each are at each commit. That
the name somefile had some contents that later show up as newfile (both
names tracked) is recorded just as that. You could /interpret/ this as a
"rename" if somefile is then gone, but it could well be something else.
Besides, you'd have to search for the old somefile contents among /all/
newfiles just to find out it was renamed. Better don't mix facts with
interpretation (== guesses on what operations came in between the snapshots
git takes). Note that it should never matter what strange ideas a random
user gets for naming her temporary backup files, or their git configuration.
-- 
Dr. Horst H. von Brand                   User #22616 counter.li.org
Departamento de Informatica                    Fono: +56 32 2654431
Universidad Tecnica Federico Santa Maria             +56 32 2654239
Casilla 110-V, Valparaiso, Chile               Fax:  +56 32 2797513
-
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:
[RFC] Two conceptually distinct commit commands, Carl Worth, (Mon Dec 4, 12:08 pm)
Re: [RFC] Two conceptually distinct commit commands, Carl Worth, (Mon Dec 4, 1:10 pm)
Re: [RFC] Two conceptually distinct commit commands , Horst H. von Brand, (Mon Dec 4, 5:52 pm)
Re: [RFC] Two conceptually distinct commit commands , Horst H. von Brand, (Mon Dec 4, 7:14 pm)
Re: [RFC] Two conceptually distinct commit commands, Theodore Tso, (Mon Dec 4, 8:51 pm)
Re: [RFC] Two conceptually distinct commit commands, Junio C Hamano, (Mon Dec 4, 11:33 pm)
Re: [RFC] Two conceptually distinct commit commands, Carl Worth, (Mon Dec 4, 11:38 pm)
Re: [RFC] Two conceptually distinct commit commands, Junio C Hamano, (Tue Dec 5, 6:13 pm)
Re: [RFC] Two conceptually distinct commit commands, Carl Worth, (Tue Dec 5, 9:53 pm)
Commit order in git.git, was Re: [RFC] Two conceptually di ..., Johannes Schindelin, (Wed Dec 6, 2:54 am)
Re: [RFC] Two conceptually distinct commit commands, Carl Worth, (Wed Dec 6, 9:14 am)