Edward Thomson
451aaf866a
Merge pull request #2181 from anuraggup/hide_cb
...
Callback function to hide commit and its parents in revision walker
2014-03-25 10:33:18 -07:00
Anurag Gupta
34ffe22344
Modified test for revwalk_hidecb
2014-03-24 11:21:01 -07:00
Anurag Gupta
892b7c9fef
Correcting format of comments in header file
2014-03-24 11:20:51 -07:00
Anurag Gupta
169fb81d87
Undoing local change done for building on x64
2014-03-24 11:20:41 -07:00
Anurag Gupta
7ca1584b47
Conforming to libgit2 coding style.
2014-03-24 11:20:31 -07:00
Anurag Gupta
46e4d82d6f
Remove unused push_cb_data
2014-03-24 11:20:22 -07:00
Anurag Gupta
3a666071d9
Unit Tests for hide_cb in revwalk
2014-03-24 11:20:13 -07:00
Anurag Gupta
892aa808e2
Callback to hide commits in revision walker.
2014-03-24 11:20:03 -07:00
Russell Belfer
f210cb5b14
Merge pull request #2201 from ethomson/gitbuf_test_fix
...
env test needs to deref git_buf's ptr
2014-03-24 10:58:10 -07:00
Edward Thomson
fdc54eb2fb
env test needs to deref git_buf's ptr
2014-03-24 10:56:11 -07:00
Vicent Marti
85a41fc4bf
Merge pull request #2183 from ethomson/merge_refactor
...
Refactor the `git_merge` API
2014-03-24 18:09:13 +01:00
Vicent Marti
f57cc63811
Merge pull request #2200 from libgit2/cmn/opts-buf
...
settings: use git_buf for returning strings
2014-03-24 13:52:02 +01:00
Carlos Martín Nieto
6057c4a038
opts: bits are not bytes
...
The default cache size is 256 megabytes, not megabits as claimed in the
docs.
2014-03-24 13:21:51 +01:00
Carlos Martín Nieto
42dee8ecd7
settings: use git_buf for returning strings
...
This survived the last round of culling, as the signature is only in the
comments.
2014-03-24 13:21:51 +01:00
Vicent Marti
0deb534d76
Merge pull request #2197 from linquize/assert-wrong
...
Fix wrong assertion
2014-03-21 12:25:53 +01:00
Linquize
31a14982a0
Fix wrong assertion
...
Fixes issue #2196
2014-03-21 17:36:34 +08:00
Vicent Marti
36a80fdaed
Merge pull request #2195 from libgit2/cmn/revwalk-no-hide
...
revwalk: don't try to find merge bases when there can be none
2014-03-20 21:06:23 +01:00
Carlos Martín Nieto
704b55cce3
revwalk: don't try to find merge bases when there can be none
...
As a way to speed up the cases where we need to hide some commits, we
find out what the merge bases are so we know to stop marking commits as
uninteresting and avoid walking down a potentially very large amount of
commits which we will never see. There are however two oversights in
current code.
The merge-base finding algorithm fails to recognize that if it is only
given one commit, there can be no merge base. It instead walks down the
whole ancestor chain needlessly. Make it return an empty list
immediately in this situation.
The revwalk does not know whether the user has asked to hide any commits
at all. In situation where the user pushes multiple commits but doesn't
hide any, the above fix wouldn't do the trick. Keep track of whether the
user wants to hide any commits and only run the merge-base finding
algorithm when it's needed.
2014-03-20 20:24:11 +01:00
Vicent Marti
7d63357266
Merge pull request #2194 from libgit2/cmn/reflog-bare
...
reflog: follow core.logallrefupdates
2014-03-20 20:08:01 +01:00
Carlos Martín Nieto
1c35165993
reflog: remove some dead code
2014-03-20 19:18:50 +01:00
Carlos Martín Nieto
8350437112
reflog: follow core.logallrefupdates
...
On bare by default, or when core.logallrefupdates is false, we must not
write the reflog.
2014-03-20 19:18:49 +01:00
Edward Thomson
58c2b1c421
UNBORN implies FAST_FORWARD
2014-03-20 09:35:22 -07:00
Edward Thomson
ac584fcfd3
Introduce GIT_MERGE_ANALYSIS_UNBORN
2014-03-20 09:25:11 -07:00
Edward Thomson
97f3462ae6
git_merge_status -> git_merge_analysis
2014-03-20 09:25:10 -07:00
Edward Thomson
d9fdee6e4c
Remove git_merge_result
as it's now unnecessary
2014-03-20 09:25:09 -07:00
Edward Thomson
5aa2ac6de1
Update git_merge_tree_opts to git_merge_options
2014-03-20 09:25:08 -07:00
Edward Thomson
02105a27f0
Change signature of git_merge
to take merge and checkout opts
2014-03-20 09:25:07 -07:00
Edward Thomson
1c0b6a38ba
Remove fastforward / uptodate from git_merge
2014-03-20 09:25:06 -07:00
Edward Thomson
ccb308273a
Add git_merge_status
to provide info about an upcoming merge
2014-03-20 09:25:06 -07:00
Edward Thomson
05d47768ca
Introduce git_merge_file for consumers
2014-03-20 09:25:05 -07:00
Vicent Marti
f29e48995e
Merge pull request #2193 from libgit2/cmn/reflog-HEAD
...
Reflog all the way
2014-03-19 19:51:57 +01:00
Carlos Martín Nieto
99797c96cd
reflog: handle symref chains
...
Given HEAD -> master -> foo, when updating foo's reflog we should also
update HEAD's, as it's considered the current branch.
2014-03-19 18:14:35 +01:00
Carlos Martín Nieto
6aaae94a70
reflog: handle the birth of a branch
...
The reflog append function was overzealous in its checking. When passed
an old and new ids, it should not do any checking, but just serialize
the data to a reflog entry.
2014-03-19 16:52:20 +01:00
Carlos Martín Nieto
afc57eb48f
reflog: simplify the append logic
...
Remove some duplicated logic.
2014-03-19 15:54:33 +01:00
Carlos Martín Nieto
1afe140043
refdb: don't update when there's no need
...
If the caller wants to update a ref to point to the same target as it
currently has, we should return early and avoid writing to the reflog.
2014-03-19 15:54:33 +01:00
Carlos Martín Nieto
bac95e6e1e
reflog: more comprehensive HEAD tests
...
The existing ones lack checking zeroed ids when switching back from an
unborn branch as well as what happens when detaching.
The reflog appending function mistakenly wrote zeros when dealing with a
detached HEAD. This explicitly checks for those situations and fixes
them.
2014-03-18 19:58:52 +01:00
Vicent Marti
5dd7d2432e
Merge pull request #2189 from Aimeast/octopus
...
Implement git_merge_base_octopus
2014-03-18 16:23:51 +01:00
Aimeast
0aee025bef
Implement git_merge_base_octopus
2014-03-18 22:31:14 +08:00
Vicent Marti
dd4c6962d7
Merge pull request #2192 from phkelley/development
...
Seamless support for NTLM/Kerberos auth on Windows
2014-03-18 15:25:43 +01:00
Philip Kelley
1392418ea8
Seamless support for NTLM/Kerberos auth on Windows
2014-03-18 10:24:23 -04:00
Vicent Marti
a7af1f7dd6
Merge pull request #2190 from libgit2/cmn/current-branch-reflog
...
refs: append to the HEAD reflog when updating the current branch
2014-03-18 14:46:42 +01:00
Russell Belfer
dd5e74e59a
Merge pull request #2191 from libgit2/cmn/projects
...
Add a few projects to the list
2014-03-17 15:57:25 -07:00
Carlos Martín Nieto
5c8096c53c
Add a few projects to the list
2014-03-17 19:44:07 +01:00
Carlos Martín Nieto
4b7e1b9e92
refs: append to the HEAD reflog when updating the current branch
...
When we update the current branch, we must also append to HEAD's reflog
to keep them in sync.
This is a bit of a hack, but as git.git says, it covers 100% of
default cases.
2014-03-17 17:47:47 +01:00
Carlos Martín Nieto
cb562c3fb3
repo: remove test which deletes HEAD
...
This is not something anybody would ever do; removing HEAD makes the
.git/ directory no longer be a repository, so we wouldn't be expected to
handle such a situation.
2014-03-17 17:47:47 +01:00
Carlos Martín Nieto
853b1407c0
branch: constness fixes
2014-03-17 17:47:46 +01:00
Carlos Martín Nieto
2b40390f22
refs: fix copy-paste doc error
2014-03-13 15:54:53 +01:00
Edward Thomson
e59e712f64
Merge pull request #2184 from libgit2/rb/fix-revwalk-order-regression
...
Fix pqueue sort boundary condition bug
2014-03-12 12:05:35 -07:00
Russell Belfer
5302a88538
Fix pqueue sort boundary condition bug
...
If the pqueue comparison fn returned just 0 or 1 (think "a<b")
then the sort order of returned items could be wrong because there
was a "< 0" that really needed to be "<= 0". Yikes!!!
2014-03-12 11:21:55 -07:00
Carlos Martín Nieto
9af14886a9
MSVC is silly
2014-03-10 18:20:47 +01:00