1. 03 Aug, 2011 1 commit
  2. 02 Aug, 2011 3 commits
  3. 01 Aug, 2011 2 commits
  4. 29 Jul, 2011 3 commits
  5. 28 Jul, 2011 4 commits
  6. 27 Jul, 2011 1 commit
  7. 26 Jul, 2011 4 commits
  8. 25 Jul, 2011 19 commits
    • filebuf: update git_filebuf.write signature to take non-const buffer · 05a62d1a
      z_stream.next_in is non-const. Although currently Zlib doesn't modify
      buffer content on deflate(), it might be change in the future. gzwrite()
      already modify it.
      
      To avoid this let's change signature of git_filebuf.write and rework
      git_filebuf_write() accordingly.
      
      Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name>
      Kirill A. Shutemov committed
    • index: rework index entry initialization routine · 76159921
      index_init_entry() renamed to index_entry_init(). Now it allocates entry
      on its own.
      
      git_index_add() and git_index_append() reworked accordingly.
      
      This commit fixes warning:
      
      /home/kas/git/public/libgit2/src/index.c: In function ‘index_init_entry’:
      /home/kas/git/public/libgit2/src/index.c:452:14: warning: assignment discards ‘const’ qualifier from pointer target type [enabled by default]
      
      Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name>
      Kirill A. Shutemov committed
    • index: rework index_insert() · f939d39b
      Now index_insert() takes copy of index entry, not coping it by itself.
      
      Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name>
      Kirill A. Shutemov committed
    • index: introduce index_entry_free() · b2dd6815
      Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name>
      Kirill A. Shutemov committed
    • index: extract index_entry_dup() from index_insert() · 51917d9c
      Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name>
      Kirill A. Shutemov committed
    • index: fix cast warnings · 7d9cc9f8
      /home/kas/git/public/libgit2/src/index.c: In function ‘git_index_clear’:
      /home/kas/git/public/libgit2/src/index.c:228:8: warning: cast discards ‘__attribute__((const))’ qualifier from pointer target type [-Wcast-qual]
      /home/kas/git/public/libgit2/src/index.c:235:8: warning: cast discards ‘__attribute__((const))’ qualifier from pointer target type [-Wcast-qual]
      /home/kas/git/public/libgit2/src/index.c: In function ‘index_insert’:
      /home/kas/git/public/libgit2/src/index.c:392:7: warning: cast discards ‘__attribute__((const))’ qualifier from pointer target type [-Wcast-qual]
      /home/kas/git/public/libgit2/src/index.c:399:7: warning: cast discards ‘__attribute__((const))’ qualifier from pointer target type [-Wcast-qual]
      /home/kas/git/public/libgit2/src/index.c: In function ‘read_unmerged’:
      /home/kas/git/public/libgit2/src/index.c:681:35: warning: cast discards ‘__attribute__((const))’ qualifier from pointer target type [-Wcast-qual]
      /home/kas/git/public/libgit2/src/index.c: In function ‘read_entry’:
      /home/kas/git/public/libgit2/src/index.c:716:33: warning: cast discards ‘__attribute__((const))’ qualifier from pointer target type [-Wcast-qual]
      
      Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name>
      Kirill A. Shutemov committed
    • tests: fix cast warnings · 84ef7f36
      /home/kas/git/public/libgit2/tests/t00-core.c: In function ‘test_cmp’:
      /home/kas/git/public/libgit2/tests/t00-core.c:78:10: warning: cast discards ‘__attribute__((const))’ qualifier from pointer target type [-Wcast-qual]
      /home/kas/git/public/libgit2/tests/t00-core.c:78:22: warning: cast discards ‘__attribute__((const))’ qualifier from pointer target type [-Wcast-qual]
      /home/kas/git/public/libgit2/tests/t07-hashtable.c: In function ‘hash_func’:
      /home/kas/git/public/libgit2/tests/t07-hashtable.c:42:7: warning: cast discards ‘__attribute__((const))’ qualifier from pointer target type [-Wcast-qual]
      /home/kas/git/public/libgit2/tests/t08-tag.c: In function ‘_gittest__write0’:
      /home/kas/git/public/libgit2/tests/t08-tag.c:141:21: warning: cast discards ‘__attribute__((const))’ qualifier from pointer target type [-Wcast-qual]
      /home/kas/git/public/libgit2/tests/t08-tag.c: In function ‘_gittest__write2’:
      /home/kas/git/public/libgit2/tests/t08-tag.c:192:21: warning: cast discards ‘__attribute__((const))’ qualifier from pointer target type [-Wcast-qual]
      /home/kas/git/public/libgit2/tests/t08-tag.c: In function ‘_gittest__write3’:
      /home/kas/git/public/libgit2/tests/t08-tag.c:227:21: warning: cast discards ‘__attribute__((const))’ qualifier from pointer target type [-Wcast-qual]
      /home/kas/git/public/libgit2/tests/t04-commit.c: In function ‘_gittest__write0’:
      /home/kas/git/public/libgit2/tests/t04-commit.c:650:21: warning: cast discards ‘__attribute__((const))’ qualifier from pointer target type [-Wcast-qual]
      /home/kas/git/public/libgit2/tests/t04-commit.c:651:21: warning: cast discards ‘__attribute__((const))’ qualifier from pointer target type [-Wcast-qual]
      /home/kas/git/public/libgit2/tests/t04-commit.c: In function ‘_gittest__root0’:
      /home/kas/git/public/libgit2/tests/t04-commit.c:723:21: warning: cast discards ‘__attribute__((const))’ qualifier from pointer target type [-Wcast-qual]
      /home/kas/git/public/libgit2/tests/t04-commit.c:724:21: warning: cast discards ‘__attribute__((const))’ qualifier from pointer target type [-Wcast-qual]
      /home/kas/git/public/libgit2/tests/t12-repo.c: In function ‘write_file’:
      /home/kas/git/public/libgit2/tests/t12-repo.c:360:24: warning: cast discards ‘__attribute__((const))’ qualifier from pointer target type [-Wcast-qual]
      
      Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name>
      Kirill A. Shutemov committed
    • refs: fix cast warning · b75bec94
      /home/kas/git/public/libgit2/src/refs.c: In function ‘normalize_name’:
      /home/kas/git/public/libgit2/src/refs.c:1681:12: warning: cast discards ‘__attribute__((const))’ qualifier from pointer target type [-Wcast-qual]
      
      Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name>
      Kirill A. Shutemov committed
    • tree: fix cast warnings · 0cbbdc26
      /home/kas/git/public/libgit2/src/tree.c: In function ‘entry_search_cmp’:
      /home/kas/git/public/libgit2/src/tree.c:47:36: warning: cast discards ‘__attribute__((const))’ qualifier from pointer target type [-Wcast-qual]
      /home/kas/git/public/libgit2/src/tree.c: In function ‘git_treebuilder_remove’:
      /home/kas/git/public/libgit2/src/tree.c:443:31: warning: cast discards ‘__attribute__((const))’ qualifier from pointer target type [-Wcast-qual]
      
      Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name>
      Kirill A. Shutemov committed
    • posix: declare 'buf' argument of p_write() as const · 2ba222c5
      Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name>
      Kirill A. Shutemov committed
    • odb_pack: fix cast warnings · 03cdbab4
      /home/kas/git/public/libgit2/src/odb_pack.c: In function ‘packfile_sort__cb’:
      /home/kas/git/public/libgit2/src/odb_pack.c:702:24: warning: cast discards ‘__attribute__((const))’ qualifier from pointer target type [-Wcast-qual]
      /home/kas/git/public/libgit2/src/odb_pack.c:703:24: warning: cast discards ‘__attribute__((const))’ qualifier from pointer target type [-Wcast-qual]
      /home/kas/git/public/libgit2/src/odb_pack.c: In function ‘nth_packed_object_offset’:
      /home/kas/git/public/libgit2/src/odb_pack.c:944:10: warning: cast discards ‘__attribute__((const))’ qualifier from pointer target type [-Wcast-qual]
      /home/kas/git/public/libgit2/src/odb_pack.c:944:10: warning: cast discards ‘__attribute__((const))’ qualifier from pointer target type [-Wcast-qual]
      /home/kas/git/public/libgit2/src/odb_pack.c:944:10: warning: cast discards ‘__attribute__((const))’ qualifier from pointer target type [-Wcast-qual]
      /home/kas/git/public/libgit2/src/odb_pack.c:948:9: warning: cast discards ‘__attribute__((const))’ qualifier from pointer target type [-Wcast-qual]
      /home/kas/git/public/libgit2/src/odb_pack.c:948:9: warning: cast discards ‘__attribute__((const))’ qualifier from pointer target type [-Wcast-qual]
      /home/kas/git/public/libgit2/src/odb_pack.c:948:9: warning: cast discards ‘__attribute__((const))’ qualifier from pointer target type [-Wcast-qual]
      /home/kas/git/public/libgit2/src/odb_pack.c:952:22: warning: cast discards ‘__attribute__((const))’ qualifier from pointer target type [-Wcast-qual]
      /home/kas/git/public/libgit2/src/odb_pack.c:952:22: warning: cast discards ‘__attribute__((const))’ qualifier from pointer target type [-Wcast-qual]
      /home/kas/git/public/libgit2/src/odb_pack.c:952:22: warning: cast discards ‘__attribute__((const))’ qualifier from pointer target type [-Wcast-qual]
      /home/kas/git/public/libgit2/src/odb_pack.c:953:8: warning: cast discards ‘__attribute__((const))’ qualifier from pointer target type [-Wcast-qual]
      /home/kas/git/public/libgit2/src/odb_pack.c:953:8: warning: cast discards ‘__attribute__((const))’ qualifier from pointer target type [-Wcast-qual]
      /home/kas/git/public/libgit2/src/odb_pack.c:953:8: warning: cast discards ‘__attribute__((const))’ qualifier from pointer target type [-Wcast-qual]
      
      Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name>
      Kirill A. Shutemov committed
    • sha1: fix cast warnings · 4414b355
      /home/kas/git/public/libgit2/src/sha1.c: In function ‘blk_SHA1_Block’:
      /home/kas/git/public/libgit2/src/sha1.c:128:2: warning: cast discards ‘__attribute__((const))’ qualifier from pointer target type [-Wcast-qual]
      /home/kas/git/public/libgit2/src/sha1.c:128:2: warning: cast discards ‘__attribute__((const))’ qualifier from pointer target type [-Wcast-qual]
      /home/kas/git/public/libgit2/src/sha1.c:128:2: warning: cast discards ‘__attribute__((const))’ qualifier from pointer target type [-Wcast-qual]
      /home/kas/git/public/libgit2/src/sha1.c:129:2: warning: cast discards ‘__attribute__((const))’ qualifier from pointer target type [-Wcast-qual]
      /home/kas/git/public/libgit2/src/sha1.c:129:2: warning: cast discards ‘__attribute__((const))’ qualifier from pointer target type [-Wcast-qual]
      /home/kas/git/public/libgit2/src/sha1.c:129:2: warning: cast discards ‘__attribute__((const))’ qualifier from pointer target type [-Wcast-qual]
      /home/kas/git/public/libgit2/src/sha1.c:130:2: warning: cast discards ‘__attribute__((const))’ qualifier from pointer target type [-Wcast-qual]
      /home/kas/git/public/libgit2/src/sha1.c:130:2: warning: cast discards ‘__attribute__((const))’ qualifier from pointer target type [-Wcast-qual]
      /home/kas/git/public/libgit2/src/sha1.c:130:2: warning: cast discards ‘__attribute__((const))’ qualifier from pointer target type [-Wcast-qual]
      /home/kas/git/public/libgit2/src/sha1.c:131:2: warning: cast discards ‘__attribute__((const))’ qualifier from pointer target type [-Wcast-qual]
      /home/kas/git/public/libgit2/src/sha1.c:131:2: warning: cast discards ‘__attribute__((const))’ qualifier from pointer target type [-Wcast-qual]
      /home/kas/git/public/libgit2/src/sha1.c:131:2: warning: cast discards ‘__attribute__((const))’ qualifier from pointer target type [-Wcast-qual]
      /home/kas/git/public/libgit2/src/sha1.c:132:2: warning: cast discards ‘__attribute__((const))’ qualifier from pointer target type [-Wcast-qual]
      /home/kas/git/public/libgit2/src/sha1.c:132:2: warning: cast discards ‘__attribute__((const))’ qualifier from pointer target type [-Wcast-qual]
      /home/kas/git/public/libgit2/src/sha1.c:132:2: warning: cast discards ‘__attribute__((const))’ qualifier from pointer target type [-Wcast-qual]
      /home/kas/git/public/libgit2/src/sha1.c:133:2: warning: cast discards ‘__attribute__((const))’ qualifier from pointer target type [-Wcast-qual]
      /home/kas/git/public/libgit2/src/sha1.c:133:2: warning: cast discards ‘__attribute__((const))’ qualifier from pointer target type [-Wcast-qual]
      /home/kas/git/public/libgit2/src/sha1.c:133:2: warning: cast discards ‘__attribute__((const))’ qualifier from pointer target type [-Wcast-qual]
      /home/kas/git/public/libgit2/src/sha1.c:134:2: warning: cast discards ‘__attribute__((const))’ qualifier from pointer target type [-Wcast-qual]
      /home/kas/git/public/libgit2/src/sha1.c:134:2: warning: cast discards ‘__attribute__((const))’ qualifier from pointer target type [-Wcast-qual]
      /home/kas/git/public/libgit2/src/sha1.c:134:2: warning: cast discards ‘__attribute__((const))’ qualifier from pointer target type [-Wcast-qual]
      /home/kas/git/public/libgit2/src/sha1.c:135:2: warning: cast discards ‘__attribute__((const))’ qualifier from pointer target type [-Wcast-qual]
      /home/kas/git/public/libgit2/src/sha1.c:135:2: warning: cast discards ‘__attribute__((const))’ qualifier from pointer target type [-Wcast-qual]
      /home/kas/git/public/libgit2/src/sha1.c:135:2: warning: cast discards ‘__attribute__((const))’ qualifier from pointer target type [-Wcast-qual]
      /home/kas/git/public/libgit2/src/sha1.c:136:2: warning: cast discards ‘__attribute__((const))’ qualifier from pointer target type [-Wcast-qual]
      /home/kas/git/public/libgit2/src/sha1.c:136:2: warning: cast discards ‘__attribute__((const))’ qualifier from pointer target type [-Wcast-qual]
      /home/kas/git/public/libgit2/src/sha1.c:136:2: warning: cast discards ‘__attribute__((const))’ qualifier from pointer target type [-Wcast-qual]
      /home/kas/git/public/libgit2/src/sha1.c:137:2: warning: cast discards ‘__attribute__((const))’ qualifier from pointer target type [-Wcast-qual]
      /home/kas/git/public/libgit2/src/sha1.c:137:2: warning: cast discards ‘__attribute__((const))’ qualifier from pointer target type [-Wcast-qual]
      /home/kas/git/public/libgit2/src/sha1.c:137:2: warning: cast discards ‘__attribute__((const))’ qualifier from pointer target type [-Wcast-qual]
      /home/kas/git/public/libgit2/src/sha1.c:138:2: warning: cast discards ‘__attribute__((const))’ qualifier from pointer target type [-Wcast-qual]
      /home/kas/git/public/libgit2/src/sha1.c:138:2: warning: cast discards ‘__attribute__((const))’ qualifier from pointer target type [-Wcast-qual]
      /home/kas/git/public/libgit2/src/sha1.c:138:2: warning: cast discards ‘__attribute__((const))’ qualifier from pointer target type [-Wcast-qual]
      /home/kas/git/public/libgit2/src/sha1.c:139:2: warning: cast discards ‘__attribute__((const))’ qualifier from pointer target type [-Wcast-qual]
      /home/kas/git/public/libgit2/src/sha1.c:139:2: warning: cast discards ‘__attribute__((const))’ qualifier from pointer target type [-Wcast-qual]
      /home/kas/git/public/libgit2/src/sha1.c:139:2: warning: cast discards ‘__attribute__((const))’ qualifier from pointer target type [-Wcast-qual]
      /home/kas/git/public/libgit2/src/sha1.c:140:2: warning: cast discards ‘__attribute__((const))’ qualifier from pointer target type [-Wcast-qual]
      /home/kas/git/public/libgit2/src/sha1.c:140:2: warning: cast discards ‘__attribute__((const))’ qualifier from pointer target type [-Wcast-qual]
      /home/kas/git/public/libgit2/src/sha1.c:140:2: warning: cast discards ‘__attribute__((const))’ qualifier from pointer target type [-Wcast-qual]
      /home/kas/git/public/libgit2/src/sha1.c:141:2: warning: cast discards ‘__attribute__((const))’ qualifier from pointer target type [-Wcast-qual]
      /home/kas/git/public/libgit2/src/sha1.c:141:2: warning: cast discards ‘__attribute__((const))’ qualifier from pointer target type [-Wcast-qual]
      /home/kas/git/public/libgit2/src/sha1.c:141:2: warning: cast discards ‘__attribute__((const))’ qualifier from pointer target type [-Wcast-qual]
      /home/kas/git/public/libgit2/src/sha1.c:142:2: warning: cast discards ‘__attribute__((const))’ qualifier from pointer target type [-Wcast-qual]
      /home/kas/git/public/libgit2/src/sha1.c:142:2: warning: cast discards ‘__attribute__((const))’ qualifier from pointer target type [-Wcast-qual]
      /home/kas/git/public/libgit2/src/sha1.c:142:2: warning: cast discards ‘__attribute__((const))’ qualifier from pointer target type [-Wcast-qual]
      /home/kas/git/public/libgit2/src/sha1.c:143:2: warning: cast discards ‘__attribute__((const))’ qualifier from pointer target type [-Wcast-qual]
      /home/kas/git/public/libgit2/src/sha1.c:143:2: warning: cast discards ‘__attribute__((const))’ qualifier from pointer target type [-Wcast-qual]
      /home/kas/git/public/libgit2/src/sha1.c:143:2: warning: cast discards ‘__attribute__((const))’ qualifier from pointer target type [-Wcast-qual]
      
      Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name>
      Kirill A. Shutemov committed
    • revwalk: fix cast warning · 803ca5cb
      /home/kas/git/public/libgit2/src/revwalk.c: In function ‘object_table_hash’:
      /home/kas/git/public/libgit2/src/revwalk.c:120:7: warning: cast discards ‘__attribute__((const))’ qualifier from pointer target type [-Wcast-qual]
      
      Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name>
      Kirill A. Shutemov committed
    • transport_local: fix cast warnings · ba1de1af
      home/kas/git/public/libgit2/src/transport_local.c: In function ‘cmp_refs’:
      /home/kas/git/public/libgit2/src/transport_local.c:19:22: warning: cast discards ‘__attribute__((const))’ qualifier from pointer target type [-Wcast-qual]
      /home/kas/git/public/libgit2/src/transport_local.c:20:22: warning: cast discards ‘__attribute__((const))’ qualifier from pointer target type [-Wcast-qual]
      
      Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name>
      Kirill A. Shutemov committed
    • reflog: fix cast warning · b42a7f01
      /home/kas/git/public/libgit2/src/reflog.c: In function ‘reflog_parse’:
      /home/kas/git/public/libgit2/src/reflog.c:148:17: warning: cast discards ‘__attribute__((const))’ qualifier from pointer target type [-Wcast-qual]
      
      Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name>
      Kirill A. Shutemov committed
    • commit: fix cast warnings · 14468c6b
      /home/kas/git/public/libgit2/src/commit.c: In function ‘commit_parse_buffer’:
      /home/kas/git/public/libgit2/src/commit.c:186:23: warning: cast discards ‘__attribute__((const))’ qualifier from pointer target type [-Wcast-qual]
      /home/kas/git/public/libgit2/src/commit.c:187:27: warning: cast discards ‘__attribute__((const))’ qualifier from pointer target type [-Wcast-qual]
      
      Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name>
      Kirill A. Shutemov committed
    • Merge pull request #336 from schu/cleanup · 269beb47
      repository.c: remove obsolete TODO marker
      Vicent Martí committed
    • Merge pull request #337 from belkiss/development · 738715eb
      Modify struct definition to enable forward declare with C++ compiler, thus avoid including C library's header in C++ header.
      Vicent Martí committed
    • Modify struct definition to enable forward declare with C++ compiler, · ac2351fd
      thus avoid including C library's header in C++ header.
      Lambert CLARA committed
  9. 24 Jul, 2011 1 commit
  10. 23 Jul, 2011 2 commits
    • index: use git_futils_readbuffer_updated · 7db40d45
      This helps readability a bit as well.
      
      Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
      Carlos Martín Nieto committed
    • refs: don't stat so much · c4982328
      In reference_read we stat a file and then call futils which stats it
      again. Use git_futils_readbuffer_updated to avoid the extra stat
      call. This introduces another parameter which is used to tell the
      caller whether the file was read or not.
      
      Modify the callers to take advantage of this new feature. This change
      removes ~140 stat calls from the test suite.
      
      Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
      Carlos Martín Nieto committed