Re: Basename matching during rename/copy detection

5 messages, 3 authors, 2016-06-15 · open the first message on its own page

Re: Basename matching during rename/copy detection

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:43:17

Andy Parkins [off-list ref] writes:
On Thursday 2007 June 21, Junio C Hamano wrote:
quoted
Having many "identical files" in the preimage is just stupid to
begin with (if you know they are identical, why are you storing
copies, instead of your build procedure to reuse the same file),
so the algorithm did not bother finding a better match among
"equals".
That's a really poor argument; it's not git's place to impose restrictions on 
what is stored in it.
It's not even an argument, nor an attempt to justify it.  It was
just an explanation of historical fact "It did not bother".
Please re-read the final part of the message, which you omitted
from your quote.

Re: Basename matching during rename/copy detection

From: Andy Parkins <hidden>
Date: 2016-06-15 22:43:17

On Thursday 2007 June 21, Junio C Hamano wrote:
It's not even an argument, nor an attempt to justify it.  It was
just an explanation of historical fact "It did not bother".
Please re-read the final part of the message, which you omitted
from your quote.
I omitted it because I didn't object to that part :-)

I appreciated (as always) your practicality in that what you proposed would 
let people keep their copies.  What I was objecting to was the idea that any 
repository with duplicate files was "stupid".


Andy
-- 
Dr Andy Parkins, M Eng (hons), MIET
andyparkins@gmail.com

Re: Basename matching during rename/copy detection

From: Johannes Schindelin <hidden>
Date: 2016-06-15 22:43:17

Hi,

On Thu, 21 Jun 2007, Andy Parkins wrote:
On Thursday 2007 June 21, Junio C Hamano wrote:
quoted
It's not even an argument, nor an attempt to justify it.  It was just 
an explanation of historical fact "It did not bother". Please re-read 
the final part of the message, which you omitted from your quote.
I appreciated (as always) your practicality in that what you proposed 
would let people keep their copies.  What I was objecting to was the 
idea that any repository with duplicate files was "stupid".
FWIW I find it stupid, too.

Ciao,
Dscho

Re: Basename matching during rename/copy detection

From: Andy Parkins <hidden>
Date: 2016-06-15 22:43:17

On Thursday 2007 June 21, Johannes Schindelin wrote:
quoted
would let people keep their copies.  What I was objecting to was the
idea that any repository with duplicate files was "stupid".
FWIW I find it stupid, too.
Thanks very much.  Okay, as I've been put in the position of defending this, 
let me give you the use case that has cropped up for me to do this stupid 
thing.

I've got a GUI program with a load of tool buttons.  Each of those buttons 
will, in the final product, be unique images.  When I write the program, I 
want to be able to refer to each of the button images in the correct place.  
e.g.

 setImage( NewButton, "path/to/new-button.png" );
 setImage( OpenButton, "path/to/open-button.png" );
 setImage( SaveButton, "path/to/save-button.png" );

Unfortunately, I can't draw.  So, I open up gimp, draw a big red X and save it 
as new-button.png.  Then I copy that file to open-button.png and 
save-button.png, knowing that at some point in the future, someone will come 
and replace those red-X images with something appropriate.

All those images now go in the repository.  Symbolic links are not an option, 
as it's got to be checkable out on Windows.

Tell me what part of that is stupid?


Andy
-- 
Dr Andy Parkins, M Eng (hons), MIET
andyparkins@gmail.com

Re: Basename matching during rename/copy detection

From: Johannes Schindelin <hidden>
Date: 2016-06-15 22:43:17

Hi,

On Thu, 21 Jun 2007, Andy Parkins wrote:
I open up gimp, draw a big red X and save it as new-button.png.  Then I 
copy that file to open-button.png and save-button.png, knowing that at 
some point in the future, someone will come and replace those red-X 
images with something appropriate.
So you have a couple of identical files in your repo, which are 
placeholders. That is quite different from what I criticised of being 
stupid.

Well, I would not have checked in the files in your place, but only one:

	dumb-red-X.png

Then, my Makefile would have checked for the existence of, say, 
my-wonderful-ok-button.png, and if it does not exist yet, copy 
dumb-red-X.png to it.

Now, when somebody comes along, paining the prettiest ok button I ever 
saw, I copy that over the copy of dumb-red-X.png, and check it in.

It has the further bonus that I know exactly which buttons I have to find 
a suck^Wgifted artist for.

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