Re: Does content provenance matter?

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

 



Thomas Rast <trast@xxxxxxxxxxxxxxx> writes:

> Kelly Dean <kellydeanch@xxxxxxxxx> writes:
>
>> [copying B/X over to C/X is not recorded as such], on the theory that
>> just content, not provenance, is what matters.
>
>> [merging branches *is* recorded], on the theory that not only content,
>> but also provenance, matters.
>
>> The basic question is, if provenance doesn't matter, then why does a
>> git commit record its parent(s)? Why not omit this information, and
>> figure it out at search time (by looking at all commits with older
>> timestamps), the same as you're supposed to figure out renames at
>> search time and figure out the movement of lines within/among files at
>> search time (by looking at all files in the parent commit(s))?
>
> What's the difference between the following series of commits?
>
>   Foo
>   Bar
>   Revert Bar
>
> and
>
>   Foo
>
> You claim that they're the same, because the tree state after each is
> the same.  But I learned that Bar was broken, and recorded it for all to
> see.

I am not sure if that is what the original poster was claiming.

But a more illustrative situation to consider is this.  What if the change
were not just "copy B/X to C/X", but was "concatenate the first half of
B/X and the second half of C/X to create a new D/X".

As it happens, because our commit records the whole tree state and its
parent commit, the "content provenance" of what is in D/X is precisely
tracked.  Look at the tree of the parent commit and look at the result,
and you will notice the first half of D/X is identical to the first half
of B/X before the commit and the second half of D/X is identical to the
second half of C/X before the commit.

In a situation where "provenance" is disputed, it does not matter if D/X
was created by mechanically running

	head -n $n B/X >D/X
	tail -n $n C/X >C/X
        
or if you typed the file afresh.  You could try to argue "No, your honour,
I did not copy from these two files.  I typed it myself from scratch and
there is no plagiarism involved.  They are all my words."  But in the end,
by comparing the tree state before your change and after your change, it
would be very clear to any sane person that D/X is identical to the first
half of B/X and the second half of C/X.

Also see http://article.gmane.org/gmane.comp.version-control.git/217 aka
one of the most important messages in the history of the Git mailing list
for inspirations.
--
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]