Commit Graph

1875 Commits

Author SHA1 Message Date
Vicent Martí
880b6f0c22 Merge pull request #497 from carlosmn/config
Don't fail when opening a new config file
2011-11-25 21:31:35 -08:00
Vicent Martí
e42ea1f488 Merge pull request #491 from schu/refs-cleanup
reference_rename() cleanup
2011-11-25 21:30:08 -08:00
Carlos Martín Nieto
533fda3b83 config: test saving config to new file 2011-11-26 02:00:18 +01:00
Carlos Martín Nieto
4e90a0a4a0 config: allow to open and write to a new file 2011-11-26 01:54:12 +01:00
Vicent Marti
2869f404fd transport: Add git_transport_valid_url 2011-11-22 15:49:23 +01:00
Carlos Martín Nieto
6616e20750 Add a note not to free the result from git_remote_ls 2011-11-22 11:18:27 +01:00
Carlos Martín Nieto
391575638c Free the created refs in git_remote_update_tips 2011-11-22 11:16:44 +01:00
Carlos Martín Nieto
a31471140f Set transport to NULL after freeing it 2011-11-22 10:31:32 +01:00
Brandon Casey
b026b00d9c tests-clay: remove extra semi-colon in clay_libgit2.h, add one to index/rename.c 2011-11-22 01:19:07 -06:00
Vicent Martí
f80263225b Merge pull request #493 from euler0/fix-typos-readme
Fix typos in the README file
2011-11-21 22:36:19 -08:00
Vincent Lee
9d163937ea Fix to follow the Qt trademark policy
Never use the Qt trade mark with both letters capitalized, in the form
"QT".
(http://qt-project.org/trademarkpolicy.html)
2011-11-22 15:12:57 +09:00
Vincent Lee
5689a8d5fd Fix a typo in the README file 2011-11-22 15:04:33 +09:00
Vicent Marti
4bef35656e remote: Assert things that should be asserted 2011-11-22 02:16:20 +01:00
Vicent Martí
bec92f78bf Merge pull request #492 from carlosmn/networking
Networking improvements
2011-11-21 17:12:23 -08:00
Vicent Marti
2744806f32 tree: Fix documentation 2011-11-22 02:10:41 +01:00
Vicent Marti
bf038dab30 clay: Properly initialize filebuf 2011-11-22 02:06:24 +01:00
Russell Belfer
b762e576c6 filebuf: add GIT_FILEBUF_INIT and protect multiple opens and cleanups
Update all stack allocations of git_filebuf to use GIT_FILEBUF_INIT
and make git_filebuf_open and git_filebuf_cleanup safe to be called
multiple times on the same buffer.

Signed-off-by: Vicent Marti <tanoku@gmail.com>
2011-11-22 01:53:56 +01:00
Vicent Marti
1d09a1c88d clay: Merge manually @leto's tests from #485
This uses the new Clay code. As you can see, the diff is minimal... It
works!
2011-11-22 01:41:22 +01:00
Vicent Martí
967617ccad Merge pull request #489 from lht/fix-doc-bare-repo
Fix typo in repository documentation
2011-11-21 16:37:44 -08:00
Carlos Martín Nieto
6ac3b707b1 Add git_remote_connected
Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
2011-11-21 21:00:43 +01:00
Carlos Martín Nieto
4cf01e9a1a Add git_remote_disconnect
It can be useful to separate disconnecting from actually destroying
the object.

Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
2011-11-21 21:00:42 +01:00
schu
a5cd086dff reference_rename: don't delete the reflog
reference_rename used to delete an old reflog file when renaming a
reference to not confuse git.git. Don't do this anymore but let the user
take care of writing a reflog entry.

Signed-off-by: schu <schu-github@schulog.org>
2011-11-21 16:38:30 +01:00
schu
b7c93a66e2 Add git_reflog_rename() and git_reflog_delete()
Signed-off-by: schu <schu-github@schulog.org>
2011-11-21 13:15:56 +01:00
schu
64093ce518 reference_rename: make sure to rollback
Actually rollback when we can't create the new reference. Mark the
rolled back reference as loose.

Signed-off-by: schu <schu-github@schulog.org>
2011-11-21 13:11:10 +01:00
schu
bdbdefac39 fileops.h: remove git_futils_mv_atomic prototype
0c49ec2 replaced git_futils_mv_atomic with p_rename without removing its
prototype.

Signed-off-by: schu <schu-github@schulog.org>
2011-11-21 13:11:10 +01:00
Carlos Martín Nieto
0ca7ca3ef7 refspec: allow a simple branchname
A simple branchname as refspec is valid and we shouldn't throw an
error when encountering one.

Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
2011-11-18 21:57:16 +01:00
Carlos Martín Nieto
dc9e960f4b refspec: make the structure more complete
Add a next pointer to make it a linked list and add the 'pattern' and
'matching' flags.

Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
2011-11-18 21:57:16 +01:00
Carlos Martín Nieto
617bfdf47f Add a name to a remote created from the API
Make it a bit more resilient.

Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
2011-11-18 21:39:34 +01:00
Carlos Martín Nieto
95057b8503 remote: get rid of git_remote_negotiate
There is no good reason to expose the negotiation as a different step
to downloading the packfile.

Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
2011-11-18 21:18:39 +01:00
Carlos Martín Nieto
40a40e8e9d net: move the reference storage to common code 2011-11-18 21:03:23 +01:00
Haitao Li
28ba94ceed Fix typo in repository documentation 2011-11-18 17:47:22 +08:00
Carlos Martín Nieto
e4c93a3927 Update clay instructions to use -vtap 2011-11-18 02:35:46 +01:00
Carlos Martín Nieto
c515b5bf1e Add test for renaming a file and adding it to the index
Thanks to Emeric.
2011-11-18 02:35:45 +01:00
Carlos Martín Nieto
472d4d858b Don't overwrite existing objects
It's redundant to do this (git doesn't) and Windows doesn't allow us
to overwrite a read-only file (which objects are).

Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
2011-11-18 02:12:28 +01:00
Vicent Marti
2cbca8b06c include: Unify internal include strategies
Do not add the `git2` path to internal includes, or that will cause
an extra path dependency.
2011-11-18 01:43:27 +01:00
Vicent Marti
d1a721c595 clay: Bump to 0.9.0, add TAP support
Comes with schu's stress tests for config files. Hopefully the diffs
will stay minimal from now on.
2011-11-18 01:40:35 +01:00
Vicent Marti
2ba14f2367 tree: Add payload to git_tree_walk 2011-11-18 01:40:35 +01:00
Vicent Marti
9432af36fc Rename git_tree_frompath to git_tree_get_subtree
That makes more sense to me.
2011-11-18 01:40:35 +01:00
Vicent Martí
010879d9e7 Merge pull request #486 from petdance/development
Quoted the asterisk to avoid markdown highlighter confusion
2011-11-16 20:35:29 -08:00
Andy Lester
a07d899449 Quoted the asterisk to avoid markdown highlighter confusion 2011-11-16 17:33:02 -06:00
Vicent Martí
682408110f Merge pull request #484 from brodie/packed-refs-perms
refs: permissions-related fixes/improvements
2011-11-16 11:45:37 -08:00
Brodie Rao
9788e72ad4 refs: move GIT_PACKED_REFS_FILE_MODE to refs.h as GIT_PACKEDREFS_FILE_MODE
This groups the #define with the other ref-related file modes, and it
makes the name consistent with the other packed-refs definitions.
2011-11-16 11:39:03 -08:00
Brodie Rao
7096d0f9e4 refs: use 0666 permissions when writing packed-refs, not 0644
This matches stock Git's behavior.
2011-11-16 11:36:13 -08:00
Vicent Martí
b2ae96fd6b Merge pull request #482 from leto/patch-1
Fix docs about the command to mix the clay tests
2011-11-16 11:34:10 -08:00
Jonathan "Duke" Leto
7b6156108c Fix docs about the command to mix the clay tests 2011-11-16 10:22:13 -08:00
Vicent Marti
a15c550db8 threads: Fix the shared global state with TLS
See `global.c` for a description of what we're doing.

When libgit2 is built with GIT_THREADS support, the threading system
must be explicitly initialized with `git_threads_init()`.
2011-11-16 14:09:44 +01:00
Vicent Martí
b0b2dd5ecc Merge pull request #475 from carlosmn/perms
Fix Windows permissions problems
2011-11-07 12:04:13 -08:00
Carlos Martín Nieto
657a395186 Write packed-refs with 0644 permissions
Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
2011-11-07 20:40:50 +01:00
Carlos Martín Nieto
718eb4b8ae Reword packed-refs error messages so they're easier to track down
Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
2011-11-07 20:34:42 +01:00
Carlos Martín Nieto
0c49ec2d3b Implement p_rename
Move the callers of git_futils_mv_atomic to use p_rename.

Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
2011-11-07 20:34:27 +01:00