Commit Graph

4710 Commits

Author SHA1 Message Date
J. David Ibáñez
6e8659969a Add git_commit_owner to the public interface
Just like git_tree_owner, etc.
2013-05-07 07:33:35 +02:00
Vicent Martí
3405f78754 Merge pull request #1547 from ethomson/win32_stat
p_stat() should follow symlinks on windows
2013-05-06 06:51:21 -07:00
Vicent Martí
03c28d92d0 Merge pull request #1526 from arrbee/cleanup-error-return-without-msg
Make sure error messages are set for most error returns
2013-05-06 06:45:53 -07:00
Vicent Martí
d5e5bbd719 Merge pull request #1524 from jamill/clone_tagopts
By default do not set tagopt when cloning
2013-05-06 06:45:40 -07:00
Vicent Martí
450a78bf07 Merge pull request #1545 from ethomson/checkout_dirs_in_use
allow checkout to proceed when a dir to be removed is in use (win32)
2013-05-06 06:33:02 -07:00
Russell Belfer
0ed3fa8a37 Merge pull request #1550 from nvloff/fix_typo_in_branch_h
branch.h: fix typo in docs
2013-05-06 05:53:13 -07:00
Nikolai Vladimirov
72662202ac branch.h: fix typo in docs 2013-05-06 15:31:26 +03:00
Russell Belfer
3e96e3391c Merge pull request #1549 from nulltoken/fix/from_oids
Strict/lax commit API
2013-05-05 08:01:18 -07:00
nulltoken
467cbec73d commit: make create_from_oids() accept plain oid 2013-05-05 16:48:34 +02:00
nulltoken
ce72e399d2 commit: guard create() against not owned trees 2013-05-05 16:47:07 +02:00
Edward Thomson
00a4c47938 p_stat() should follow symlinks on windows 2013-05-04 12:40:41 -05:00
Jameson Miller
6f748f3885 Do not write tagopt configuration option on clone by default 2013-05-04 12:14:40 -04:00
Russell Belfer
6e286e8dc5 Remove obsolete test for peel type
Peeling to an invalid type is now checked via an assert so this
test is no longer relevant.
2013-05-04 01:04:23 -07:00
Edward Thomson
e09d18eed6 allow checkout to proceed when a dir to be removed is in use (win32) 2013-05-03 18:54:47 -05:00
Vicent Marti
dfec726bba odb: Do not error out if an alternate ODB is missing 2013-05-03 23:30:54 +02:00
Vicent Marti
b641c00eeb clar: Always generate the test suite 2013-05-03 17:35:50 +02:00
Vicent Martí
811c761fe1 Merge pull request #1540 from ethomson/leaks
fix some leaks
2013-05-03 08:19:12 -07:00
Edward Thomson
d80416384f fix some leaks 2013-05-02 20:43:45 -05:00
Vicent Martí
42b2bcf038 Merge pull request #1538 from ethomson/merge_warning_cleanup
braces
2013-05-02 13:42:16 -07:00
Edward Thomson
5e151329fb braces 2013-05-02 15:20:21 -05:00
Vicent Martí
dc83d32ade Merge pull request #1537 from ethomson/merge_warning_cleanup
puns are not funny; type punning especially so
2013-05-02 13:01:44 -07:00
Edward Thomson
4e7c15608f puns are not funny; type punning especially so 2013-05-02 14:58:40 -05:00
Russell Belfer
0cce210a54 Use assert for peel target type check 2013-05-02 10:36:58 -07:00
Vicent Martí
af7689ea24 Merge pull request #1535 from carlosmn/pack-threading
Switch to index_version as "git_pack_file is ready" flag
2013-05-02 09:50:34 -07:00
Carlos Martín Nieto
0ddfcb40d5 Switch to index_version as "git_pack_file is ready" flag
We use p->index_map.data to check whether the struct has been set up
and all the information about the index is stored there. This variable
gets set up halfway through the setup process, however, and a thread
can come along and use fields that haven't been written to yet.

Crucially, pack_entry_find_offset() needs to read the index version
(which is written after index_map) to know the offset and stride
length to pass to sha1_entry_pos(). If these values are wrong,
assertions in it will fail, as it will be reading bogus data.

Make index_version the last field to be written and switch from using
p->index_map.data to p->index_version as "git_pack_file is ready" flag
as we can use it to know if every field has been written.
2013-05-02 18:27:02 +02:00
Vicent Martí
8a497ec9ad Merge pull request #1531 from libgit2/jk/peeled-refs
refdb_fs: do not require peeled packed refs to be tags
2013-05-02 09:21:46 -07:00
Jeff King
a591ed3ea9 refdb_fs: respect PEELING_STANDARD
We only set our negative flag for PEELING_FULL; we can fall
back to the lesser PEELING_STANDARD if our ref is in the
refs/tags/ hierarchy.
2013-05-02 12:06:46 -04:00
Vicent Marti
822645f629 refdb_fs: Only strstr the traits line 2013-05-02 17:48:49 +02:00
Vicent Marti
1022db2b68 refdb_fs: Traits are always surrounded by spaces
This makes parsing easier! :p
2013-05-02 17:42:09 +02:00
Vicent Marti
f69db390fb refdb_fs: store "cannot be peeled" flag for packed refs
Fixes #1532
2013-05-02 17:39:14 +02:00
Vicent Marti
3bb00f3360 refdb_fs: implement the fully-peeled trait 2013-05-02 17:17:46 +02:00
Carlos Martín Nieto
34bd59992e Revert "Protect sha1_entry_pos call with mutex"
This reverts commit 8c535f3f68.
2013-05-02 17:14:05 +02:00
Jeff King
7edb9071da refdb_fs: do not require peeled packed refs to be tags
Older versions of git would only write peeled entries for
items under refs/tags/. Newer versions will write them for
all refs, and we should be prepared to handle that.
2013-05-02 11:07:20 -04:00
Vicent Martí
d966310cab Merge pull request #1529 from arrbee/more-packfile-locking
More packfile locking
2013-05-02 03:37:28 -07:00
Russell Belfer
8c535f3f68 Protect sha1_entry_pos call with mutex
There is an occasional assertion failure in sha1_entry_pos from
pack_entry_find_index when running threaded.  Holding the mutex
around the code that grabs the index_map data and processes it
makes this assertion failure go away.
2013-05-02 03:34:56 -07:00
Russell Belfer
81b7dec4ee Fix some compile warnings and trailing whitespace 2013-05-02 03:06:34 -07:00
Russell Belfer
d82d66c96d Extra threading tests
We need to hammer the packfile open phase harder in the thread
tests, in addition to the cache API.
2013-05-02 03:05:21 -07:00
Russell Belfer
9d2f841a5d Add extra locking around packfile open
We were still seeing a few issues in threaded access to packs.
This adds extra locks around the opening of the mwindow to
avoid a different race.
2013-05-02 03:03:54 -07:00
Russell Belfer
b60d95c714 clarify error propogation 2013-05-01 15:55:54 -07:00
Russell Belfer
2f28219ce3 clarify where error message is set 2013-05-01 15:53:12 -07:00
Russell Belfer
52c5273735 Clear error msg when we eat error silently 2013-05-01 15:51:30 -07:00
Russell Belfer
f470b00b03 Fix one error not reported in revparse
There are many paths through revparse that may return an error
code without reporting an error, I believe.  This fixes one of
them.  Because of the backtracking in revparse, it is pretty
complicated to fix the others.
2013-05-01 15:48:40 -07:00
Russell Belfer
1a9e406c21 minor missing error message 2013-05-01 15:47:37 -07:00
Russell Belfer
bf6bebe22e Factor out some code that needed to clear errors
A number of places were looking up option config values and then
not clearing the error codes if the values were not found.  This
moves the repeated pattern into a shared routine and adds the
extra call to giterr_clear() when needed.
2013-05-01 15:23:40 -07:00
Russell Belfer
41e93563e7 Error messages for a couple other boundary conditions 2013-05-01 15:08:12 -07:00
Russell Belfer
62caf3f38f Report some errors returnable by push 2013-05-01 15:01:47 -07:00
Russell Belfer
f063f57898 Catch some odd odb backend corner case errors
There are some cases, particularly where no loaded ODB backends
support a particular operation, where we would return an error
code without having set an error.  This catches those cases and
reports that no ODB backends support the operation in question.
2013-05-01 14:48:35 -07:00
Russell Belfer
8915a140cb Report a couple object error conditions 2013-05-01 14:23:01 -07:00
Russell Belfer
734c6fc134 Report errors finding notes 2013-05-01 14:15:55 -07:00
Russell Belfer
de19c4a958 Set error when no merge base is found 2013-05-01 14:00:20 -07:00