On 2/9/19 1:21 am, Axel Beckert wrote:
> 
> So I can't really reproduce this.
> 
> Any idea what I might do different than you? Did you use any
> additional commandline options when you ran into this?

Without the -m option, tardiff only details the changes to the source
tree (i.e. new or removed files and directories), but not changes to
actual source files. So to reproduce the bug in a way that shows it
clearly, you would have to use tarballs that only have changes to source
files and to use the -m option with tardiff. This is what I did:

$ mkdir -p foo-1.0/src
$ echo README > foo-1.0/README
$ echo 1.0 > foo-1.0/VERSION
$ touch foo-1.0/src/main.c
$ tar cvf foo-1.0.tar foo-1.0
foo-1.0/
foo-1.0/README
foo-1.0/VERSION
foo-1.0/src/
foo-1.0/src/main.c
$ cp -a foo-1.0 foo-1.1
$ echo 1.1 > foo-1.1/VERSION
$ tar cvf foo-1.1.tar foo-1.1
foo-1.1/
foo-1.1/README
foo-1.1/VERSION
foo-1.1/src/
foo-1.1/src/main.c
$ tardiff -m foo-1.0.tar foo-1.1.tar
/ VERSION
$ rm *.tar
$ mv foo-1.0 foo
$ tar cvf foo-1.0.tar foo
foo/
foo/README
foo/VERSION
foo/src/
foo/src/main.c
$ rm -rf foo
$ mv foo-1.1 foo
$ tar cvf foo-1.1.tar foo
foo/
foo/README
foo/VERSION
foo/src/
foo/src/main.c
$ tardiff -m foo-1.0.tar foo-1.1.tar
$ exit
exit

In the first case, when the top-level directories are different, it
correctly detects that the VERSION file has changed, whereas when the
top-level directories are the same, it fails to detect the change.
The reason being, the VERSION file from the second tarball will have
clobbered that of the first.

> 
> P.S.: I've hence uploaded a new tardiff package without your patch,
> but once I'm able to reproduce this, I'd include your patch and do
> another upload.

Cheers for that.


Carlos

Reply via email to