Edward Thomson
b033f3a3f9
Never convert CRLF->LF
...
Core git performs no conversion on systems that use LF, emulate that.
2014-02-11 16:52:08 -08:00
Russell Belfer
5d195cf76b
Merge pull request #2110 from libgit2/ed/crlf_input
...
Handle `core.autocrlf=input` when checking out
2014-02-11 15:56:04 -08:00
Russell Belfer
b362fbf363
Merge pull request #2111 from libgit2/cmn/cond-fixups
...
Conditional ref update fixups
2014-02-10 10:01:36 -08:00
Carlos Martín Nieto
15284a2c5a
refs: move current_id before the reflog parameters
...
Keep the reflog parameters as the last two, as they're the optional
parameters.
2014-02-10 14:52:28 +01:00
Carlos Martín Nieto
77ad675464
refs: conditional wording fixups
...
This addresses arrbee's concerns about wording in the conditional
reference udpate functions.
2014-02-10 14:38:01 +01:00
Edward Thomson
66b2626c93
core.autocrlf=input w/ text=auto attr to workdir
2014-02-09 13:45:40 -08:00
Edward Thomson
9780020b18
Tests for crlf filtering into the repository
2014-02-09 13:45:39 -08:00
Edward Thomson
f77127da12
Tests for core.autocrlf and .gitattributes
2014-02-09 13:45:38 -08:00
Edward Thomson
fb6f4539d1
Close files on file diff failure
...
Not closing the files on a diff failure ensures that clar
cleanup will fail on win32 because we still have the file open.
2014-02-09 13:45:36 -08:00
Ben Straub
fb52ba19ff
Merge pull request #2107 from rocky-luo/examples-diff-numstat
...
add example for diff with --numstat
2014-02-09 07:25:49 -08:00
rocky-luo
8086b78be0
replace 'out' with 'patch',replace the literal tabs with '\t'.
2014-02-09 21:08:42 +08:00
rocky-luo
4f5a3f400b
add example for diff with --numstat
2014-02-08 20:10:19 +08:00
Ben Straub
f1590a18b0
Merge pull request #2056 from libgit2/rb/commit-amend
...
Add git_commit_amend API
2014-02-07 16:56:46 -08:00
Russell Belfer
80c29fe93e
Add git_commit_amend API
...
This adds an API to amend an existing commit, basically a shorthand
for creating a new commit filling in missing parameters from the
values of an existing commit. As part of this, I also added a new
"sys" API to create a commit using a callback to get the parents.
This allowed me to rewrite all the other commit creation APIs so
that temporary allocations are no longer needed.
2014-02-07 16:17:59 -08:00
Russell Belfer
2d9291943c
Merge pull request #2099 from libgit2/bs/more-reflog-stuff
...
More reflogness
2014-02-07 16:14:17 -08:00
Russell Belfer
57c47af107
Merge pull request #2042 from libgit2/cmn/conditional-ref
...
refs: conditional ref updates
2014-02-07 16:05:19 -08:00
Russell Belfer
3158e2febe
Fix some Windows warnings
...
This fixes a number of warnings with the Windows 64-bit build
including a test failure in test_repo_message__message where an
invalid pointer to a git_buf was being used.
2014-02-07 15:43:37 -08:00
Vicent Marti
c4ee3b54f8
Merge pull request #2100 from libgit2/rb/update-pqueue
...
Replace priority queue code with implementation from hashsig
2014-02-07 18:32:06 +01:00
Ben Straub
db55bb73ff
Correct default reflog message for git_remote_fetch
2014-02-06 11:18:10 -08:00
Ben Straub
2bfc673910
Fix terrible indentation
2014-02-06 10:39:57 -08:00
Russell Belfer
8875ef21cb
Merge pull request #2104 from ethomson/utf8_cleanup
...
Remove unused utf8 -> utf16 conversion code
2014-02-06 10:11:17 -08:00
Ben Straub
5dae3ffe25
Only run clone-failure test on private repo
2014-02-05 19:27:27 -08:00
Edward Thomson
55d257e7de
Remove unused utf8 -> utf16 conversion code
2014-02-05 15:03:00 -08:00
Ben Straub
78ee7e81f5
More merge.conflictstyle fixes
2014-02-05 14:10:19 -08:00
Ben Straub
3094102f69
Avoid crash when skipping remote test
2014-02-05 14:05:18 -08:00
Ben Straub
fe45922d77
Fix broken clone test
2014-02-05 13:41:12 -08:00
Ben Straub
a2ce19ca68
Prevent user's merge.conflictstyle from breaking tests
2014-02-05 13:35:26 -08:00
Ben Straub
5c8be32559
Fix a few references to changed function signatures
2014-02-05 13:32:45 -08:00
Ben Straub
0de2c4e3a3
Merge remote-tracking branch 'libgit2/development' into bs/more-reflog-stuff
2014-02-05 13:15:57 -08:00
Ben Straub
629ba7f105
Merge pull request #2027 from libgit2/rb/only-windows-is-windows
...
Some tests of paths that can't actually be written to disk
2014-02-05 13:07:46 -08:00
Russell Belfer
df70de071a
Merge pull request #2094 from libgit2/cmn/push-non-commit
...
Add flexibility to the revwalk API
2014-02-05 10:25:50 -08:00
Vicent Marti
daeac29add
Merge pull request #2103 from libgit2/cmn/parse-commit-faster
...
commit: faster parsing
2014-02-05 16:24:09 +01:00
Carlos Martín Nieto
24f3024f36
Split p_strlen into its own header
...
We need this from util.h and posix.h, but the latter includes common.h
which includes util.h, which means p_strlen is not defined by the time
we get to git__strndup().
Split the definition on p_strlen() off into its own header so we can use
it in util.h.
2014-02-05 14:34:15 +01:00
Carlos Martín Nieto
1e6f0ac436
utils: don't reimplement strnlen
...
The standard library provides a very nice strnlen function, which knows
to use SSE, let's not reimplement it ourselves.
2014-02-05 14:31:13 +01:00
Carlos Martín Nieto
a6563619e9
commit: faster parsing
...
The current code issues a lot of strncmp() calls in order to check for
the end of the header, simply in order to copy it and start going
through it again. These are a lot of calls for something we can check as
we go along. Knowing the amount of parents beforehand to reduce
allocations in extreme cases does not make up for them.
Instead start parsing immediately and check for the double-newline after
each header field, leaving the raw_header allocation for the end, which
lets us go through the header once and reduces the amount of strncmp()
calls significantly.
In unscientific testing, this has reduced a shortlog-like usage (walking
though the whole history of a branch and extracting data from the
commits) of git.git from ~830ms to ~700ms and makes the time we spend in
strncmp() negligible.
2014-02-05 14:31:13 +01:00
Carlos Martín Nieto
d60064132a
docs: produce literal asterisks
2014-02-05 13:09:34 +01:00
Carlos Martín Nieto
c74077d13c
revparse: do look at all refs when matching text
...
Now that we no longer fail to push non-commits on a glob, let's search
on all refs when we rev-parse syntax asks us to match text.
2014-02-05 12:16:44 +01:00
Carlos Martín Nieto
d18209eef9
revwalk: add a test for pushing all references
...
This used to be broken, let's make sure we don't break this use-case.
2014-02-05 12:16:44 +01:00
Carlos Martín Nieto
af81720236
revwalk: remove usage of foreach
2014-02-05 12:16:44 +01:00
Carlos Martín Nieto
d465e4e980
revwalk: ignore wrong object type in glob pushes
...
Pushing a whole namespace can cause us to attempt to push non-committish
objects. Catch this situation and special-case it for ignoring this.
2014-02-05 12:16:44 +01:00
Carlos Martín Nieto
b4ef67d5eb
revwalk: add a failing test for pushing "tags"
...
This shows that pusing a whole namespace can be problematic.
2014-02-05 12:16:37 +01:00
Carlos Martín Nieto
f61272e047
revwalk: accept committish objects
...
Let the user push committish objects and peel them to figure out which
commit to push to our queue.
This is for convenience and for allowing uses of
git_revwalk_push_glob(w, "tags")
with annotated tags.
2014-02-05 12:16:37 +01:00
Carlos Martín Nieto
5367ec4b84
refs: add an unconditional delete
...
Add it under the git_reference_remove() name, letting the user pass the
repo and name, analogous to unconditional setting/creation.
2014-02-05 12:07:57 +01:00
Carlos Martín Nieto
b7ae71ecf2
refs: catch cases where the ref type has changed
...
If the type of the on-disk reference has changed, the old value
comparison should fail.
2014-02-05 12:07:57 +01:00
Carlos Martín Nieto
f44fd59ed7
refs: check the ref's old value when deleting
...
Recognize when the reference has changed since we loaded it.
2014-02-05 12:07:57 +01:00
Carlos Martín Nieto
7ee8c7e677
refs: placeholder conditional delete
...
We don't actually pass the old value yet.
2014-02-05 12:07:57 +01:00
Carlos Martín Nieto
f8621dde40
refs: factor out old value comparison
...
We will reuse this later for deletion.
2014-02-05 12:07:57 +01:00
Carlos Martín Nieto
878fb66f57
refs: bring conditional symbolic updates to the frontend
...
Bring the race detection goodness to symbolic references as well.
2014-02-05 12:07:57 +01:00
Carlos Martín Nieto
911236619b
refdb: add conditional symbolic updates
...
Add a parameter to the backend to allow checking for the old symbolic
target.
2014-02-05 12:07:56 +01:00
Carlos Martín Nieto
d6236cf662
refs: add tests for conditional updates
2014-02-05 12:07:56 +01:00