Use h5diff in pre-/post-commit hook in git

Dear all,

does anybody have experience with using h5diff for creating a human readable diff message for git ?
I would like to have some kind of pre-commit hook that starts h5diff to generate a diff report between a HDF5 in its previous state and the one to be commited.
Of course this pre-commit hook should only be executed for binary HDF5 files. The generated diff should then go the commit's log.

Any suggestion or help ?

Thank you.

Best regards,

Florian

···

--
Mit freundlichen Grüßen
--
Dr.-Ing. Florian Hoffmann
inuTech GmbH Phone : +49-(0)911-323843-22
Fuerther Strasse 212 Fax : +49-(0)911-323843-43
90429 Nuernberg E-Mai l : florian.hoffmann@inutech.de
Germany Internet : http://www.inutech.de

inuTech GmbH
Sitz / Registered Office: Nuernberg
Handelsregister / Companies' Register: AG Nürnberg HRB Nr. 19026
Geschäftsführer / Managing Director: Frank Vogel

*****************************************************************
DIFFPACK - THE NEW GENERATION OF SIMULATION-SOFTWARE!

Go to http://www.diffpack.com to read the details
*****************************************************************

Hi Florian,

···

On Nov 12, 2015, at 8:57 AM, Florian Hoffmann <florian.hoffmann@inutech.de> wrote:

Dear all,

does anybody have experience with using h5diff for creating a human readable diff message for git ?
I would like to have some kind of pre-commit hook that starts h5diff to generate a diff report between a HDF5 in its previous state and the one to be commited.
Of course this pre-commit hook should only be executed for binary HDF5 files. The generated diff should then go the commit's log.

Any suggestion or help ?

Unfortunately, no help or suggestion, just an observation... In general, h5diff may not be a good tool at all. It really depends on what kind of differences you are looking for.

The content of an HDF5 file can be the same and h5diff will report no differencies, but binary will be quite different. Example will be a file repacked with h5repack to delete unused space in the file.

Another example: h5diff doesn’t compare many creation properties of the objects, for example, creation order for attributes and groups, fill values and storage allocation time for the datasets. For example, one can delete a dataset, and recreate it using different creation properties. h5diff will not find the difference, but once again, binary will be different.

Elena

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Elena Pourmal The HDF Group http://hdfgroup.org
1800 So. Oak St., Suite 203, Champaign IL 61820
217.531.6112
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Thank you.

Best regards,

Florian

--
Mit freundlichen Grüßen
--
Dr.-Ing. Florian Hoffmann
inuTech GmbH Phone : +49-(0)911-323843-22
Fuerther Strasse 212 Fax : +49-(0)911-323843-43
90429 Nuernberg E-Mai l : florian.hoffmann@inutech.de
Germany Internet : http://www.inutech.de

inuTech GmbH
Sitz / Registered Office: Nuernberg
Handelsregister / Companies' Register: AG Nürnberg HRB Nr. 19026
Geschäftsführer / Managing Director: Frank Vogel

*****************************************************************
DIFFPACK - THE NEW GENERATION OF SIMULATION-SOFTWARE!

Go to http://www.diffpack.com to read the details
*****************************************************************

_______________________________________________
Hdf-forum is for HDF software users discussion.
Hdf-forum@lists.hdfgroup.org
http://lists.hdfgroup.org/mailman/listinfo/hdf-forum_lists.hdfgroup.org
Twitter: https://twitter.com/hdf5