Commit Briefs

4fccd2fe0f Thomas Adam

portable: configure: split out dependencies

Rather than assume all dependencies are required for all programs, split them out. This will make packaging easier, as well as splitting the code to use subprojects. Note that due to the use of config.h semantics, in most cases the got_compat.h header file is now at the top of the .c file it is included in, so that it can handle the system header inclusion properly.


e4a6dbc6cd Thomas Adam

fix off_t type mismatches

off_t is a signed type and depending on the platform, it can be "long" or "long long", so cast to long long for printf(). ok stsp


8b925c6ccd Thomas Adam

portable: add back sys/queue.h

Now that the handling of including sys/queue.h is better, there's no need to remove those lines from the source. Copy the location of those original sys/queue.h lines from upstream at the same line number, so as to avoid any conflicts in the future.


cc524d369b Thomas Adam

use random seeds for murmurhash2

change the three hardcoded seeds to fresh ones generated on demand via arc4random. Suggested/fixed by and ok stsp@


fa8129f71e Thomas Adam

const-ify tables

ok thomas_adam millert


90dfa2bf41 Thomas Adam

consistently match size of hash variables to that returned by murmurhash

ok millert stsp




7d76c4e74f Thomas Adam

fix wrong function in error string of emitdelta()




92a9e85d28 Thomas Adam

portable: add FreeBSD support

This adds the capability to compile got-portable on FreeBSD.


dd038bc6ec Thomas Adam

portable: initial Linux compilation

This commit modifies the GoT main branch to be able to compile it under linux.


5de743f8fd Stefan Sperling

fix seek to incorrect offset in the delta base when creating deltas

The stretchblk() function needs to compare data located after the block which has just been matched. However, upon entry it was resetting the file pointer of the delta base to the beginning(!) of the block. The other file is correctly positioned after the block. In many cases the data won't match and stretchblk() will not stretch the matched block. But when the data did happen to match this resulted in a bogus delta, and wrong file contents when the delta was applied. Fix this by setting the delta base file pointer to end of the block. Problem reported by naddy after our server refused a pack file which was sent by 'got send'. I could reproduce the issue by running the 'gotadmin pack' command on a copy of naddy's repository. ok naddy


0af64e8644 Stefan Sperling

plug a memory leak in an error path of got_deltify()


dd29967c8b Stefan Sperling

make got_deltify() rellocate the deltas array less often



740bba1c31 Stefan Sperling

allow the delta base file to lose its header between deltify_init and deltify

This simplifies pack file creation. A delta base could be read from a loose object, a packfile, or it might be available in a temporary file. All these cases can now be handled the same way. We may need to open, close, and re-open a given delta base multiple times while packing.


7550e799ee Stefan Sperling

check for errors from emitdelta() in got_deltify()




0d15f6dcf9 Stefan Sperling

in addblk(), only read data into buffer1 if we will compare it to buffer2

suggested by and ok naddy@



a893025fd2 Stefan Sperling

addblk: iterate over the correct number of entries after growing the array

ok naddy


e89540a95a Stefan Sperling

addblk: be more careful about expanding the blocks array when we outgrow it

fixes + ok naddy