Russell Belfer
bc81220dfc
minor cleanups
2014-05-31 10:19:55 -07:00
Russell Belfer
947a58c175
Clean up the handling of large binary diffs
2014-05-31 10:14:14 -07:00
Edward Thomson
49837fd49f
Ignore core.safecrlf=warn until we have a warn infrastructure
2014-05-30 11:30:53 -05:00
Arthur Schreiber
824f755f10
Refs: Introduce git_refname_t.
2014-05-30 14:30:30 +02:00
Arthur Schreiber
68f9d6b283
Refs: Fix some issue when core.precomposeunicode = true.
...
This fixes two issues I found when core.precomposeunicode is enabled:
* When creating a reference with a NFD string, the returned
git_reference would return this NFD string as the reference’s
name. But when looking up the reference later, the name would
then be returned as NFC string.
* Renaming a reference would not honor the core.precomposeunicode and
apply no normalization to the new reference name.
2014-05-30 14:30:30 +02:00
Carlos Martín Nieto
5f0527aeac
config: initialize the error
...
The error would be uninitialized if we take a snapshot of a config with
no backends.
2014-05-30 13:06:34 +02:00
Vicent Marti
31c551528b
Merge pull request #2011 from libgit2/cmn/clone-local
...
Local clone
2014-05-29 14:50:57 +02:00
Carlos Martín Nieto
2614819cf3
clone: allow for linking in local clone
...
If requested, git_clone_local_into() will try to link the object files
instead of copying them.
This only works on non-Windows (since it doesn't have this) when both
are on the same filesystem (which are unix semantics).
2014-05-28 15:40:47 +02:00
Carlos Martín Nieto
94f742bac6
fileops: allow linking files when copying directory structures
...
When passed the LINK_FILES flag, the recursive copy will hardlink files
instead of copying them.
2014-05-28 15:40:22 +02:00
Carlos Martín Nieto
c1dbfcbb4a
clone: add flag not to link
2014-05-28 15:40:22 +02:00
Carlos Martín Nieto
121b26738e
clone: add flags to override whether to perform a local clone
2014-05-28 15:40:22 +02:00
Carlos Martín Nieto
a0b5f7854c
clone: store the realpath when given a relative one
...
A call like git_clone("./foo", "./foo1") writes origin's url as './foo',
which makes it unusable, as they're relative to different things.
Go with git's behaviour and store the realpath as the url.
2014-05-28 15:40:22 +02:00
Carlos Martín Nieto
4386d80be1
clone: perform a "local clone" when given a local path
...
When git is given such a path, it will perform a "local clone",
bypassing the git-aware protocol and simply copying over all objects
that exist in the source.
Copy this behaviour when given a local path.
2014-05-28 15:40:20 +02:00
Vicent Marti
5d91bea22a
Merge pull request #2380 from libgit2/cmn/index-add-modes
...
index: check for valid filemodes on add
2014-05-28 13:55:57 +02:00
Vicent Marti
07c0eacd87
Merge pull request #2359 from e45lee/chmod-fix
...
Fixed permissions on template directories.
2014-05-28 13:50:58 +02:00
Edward Thomson
eff531e103
Modify GIT_MERGE_CONFIG -> GIT_MERGE_PREFERENCE
2014-05-27 20:58:20 -05:00
Edward Thomson
de3f851ec4
Staticify merge_config
2014-05-27 20:49:24 -05:00
Edward Thomson
22ab888178
Use a config snapshot
2014-05-27 20:49:22 -05:00
Edward Thomson
a3622ba6cc
Move GIT_MERGE_CONFIG_* to its own enum
2014-05-27 20:49:20 -05:00
Edward Thomson
d362093f9e
Introduce GIT_MERGE_CONFIG_* for merge.ff settings
...
git_merge_analysis will now return GIT_MERGE_CONFIG_NO_FASTFORWARD
when merge.ff=false and GIT_MERGE_CONFIG_FASTFORWARD_ONLY when
merge.ff=true
2014-05-27 20:49:16 -05:00
Edward Lee
517341c5d8
Address style concerns in setting mkdir/copy flags.
2014-05-23 22:41:35 -04:00
Carlos Martín Nieto
530594c0aa
odb: clear backend errors on successful read
...
We go through the different backends in order, so it's not an error if
at least one of the backends has the data we want.
2014-05-23 06:01:57 +02:00
Carlos Martín Nieto
052a2ffde4
index: check for valid filemodes on add
2014-05-22 16:01:02 +02:00
Carlos Martín Nieto
9331f98aca
smart: initialize the error variable
2014-05-22 12:52:31 +02:00
Carlos Martín Nieto
4c4408c351
Plug leaks and fix a C99-ism
...
We have too many places where we repeat free code, so when adding the
new free to the generic code, it didn't take for the local transport.
While there, fix a C99-ism that sneaked through.
2014-05-22 12:28:39 +02:00
Vicent Marti
a598264463
Merge pull request #2376 from libgit2/cmn/remote-symref
...
Add support for the symref extension
2014-05-22 02:28:42 +02:00
Vicent Marti
7ee233a920
Merge pull request #2375 from libgit2/rb/safecrlf-on-lf-platform
...
Make core.safecrlf not generate an error on LF-ending platforms
2014-05-22 02:27:33 +02:00
Vicent Marti
2bc36facce
Merge pull request #2372 from libgit2/cmn/fetch-terminate
...
smart: send a flush when we disconnect
2014-05-21 13:07:45 +02:00
Carlos Martín Nieto
2a59711658
clone: get rid of head_info
...
Since we no longer need to push data to callbacks, there's no need for
this truct.
2014-05-21 12:12:33 +02:00
Carlos Martín Nieto
cdb8a60824
clone: make use of the remote's default branch guessing
...
Let's use the remote's default branch guessing instead of reinventing
one ourselves with callbacks.
2014-05-21 12:12:32 +02:00
Carlos Martín Nieto
d22db24fb7
remote: add api to guess the remote's default branch
...
If the remote supports the symref protocol extension, then we return
that, otherwise we guess with git's rules.
2014-05-21 12:12:32 +02:00
Carlos Martín Nieto
04865aa05e
local transport: expose the symref data
...
When using the local transport, we always have the symbolic information
available, so fill it.
2014-05-21 12:12:32 +02:00
Carlos Martín Nieto
306475eb01
remote: expose the remote's symref mappings
...
Add a symref_target field to git_remote_head to expose the symref
mappings to the user.
2014-05-21 12:12:32 +02:00
Carlos Martín Nieto
8156835df1
smart: store reported symrefs
...
The protocol has a capability which allows the server to tell us which
refs are symrefs, so we can e.g. know which is the default branch.
This capability is different from the ones we already support, as it's
not setting a flag to true, but requires us to store a list of
refspec-formatted mappings.
This commit does not yet expose the information in the reference
listing.
2014-05-21 12:12:32 +02:00
Albert Meltzer
60cdf49583
Minor fix for cmn/clone-into-mirror.
...
A recently added check might skip initialization of old_fetchhead and go
directly to cleanup. So, destruct in the opposite order of construction.
2014-05-20 06:21:15 -07:00
Carlos Martín Nieto
ac11219b80
smart: send a flush when we disconnect
...
The git server wants to hear a flush from us when we disconnect,
particularly when we want to perform a fetch but are up to date.
2014-05-20 02:41:45 +02:00
Russell Belfer
c094197bf9
Just don't CRLF filter if there are no CRs
2014-05-19 15:05:39 -07:00
Russell Belfer
16798d08cf
Make core.safecrlf work on LF-ending platforms
...
If you enabled core.safecrlf on an LF-ending platform, we would
error even for files with all LFs. We should only be warning on
irreversible mappings, I think.
2014-05-19 14:57:09 -07:00
Vicent Marti
588a43af54
Merge pull request #2371 from martinwoodward/attrib_fnmatch
...
Restore attributions for fnmatch
2014-05-19 15:43:13 +02:00
Martin Woodward
213a269a50
Restore attributions for fnmatch
2014-05-19 14:39:45 +01:00
Vicent Marti
124a45ead3
Merge pull request #2354 from libgit2/cmn/clone-into-mirror
...
Allow mirror-clone via `git_clone_into()`
2014-05-19 15:00:50 +02:00
Carlos Martín Nieto
32332fccc9
clone: don't error out if the branch already exists
...
We set up the current branch after we fetch from the remote. This means
that the user's refspec may have already created this reference. It is
therefore not an error if we cannot create the branch because it already
exists.
This allows for the user to replicate git-clone's --mirror option.
2014-05-19 14:24:43 +02:00
Carlos Martín Nieto
3c607685da
clone: duplicate the remote
...
Instead of changing the user-provided remote, duplicate it so we can add
the extra refspec without having to worry about unsetting it before
returning.
2014-05-19 14:24:43 +02:00
Vicent Marti
52b597b66e
Merge pull request #2364 from libgit2/cmn/comment-char
...
message: don't assume the comment char
2014-05-19 12:21:37 +02:00
Vicent Marti
138af33717
Merge pull request #2303 from jacquesg/mingw-lseek
...
WIP: Windows fixes
2014-05-19 12:20:31 +02:00
Albert Meltzer
9c4feef9f8
Fix warning on uninitialized variable.
2014-05-18 07:27:06 -07:00
Carlos Martín Nieto
49e369b29d
message: don't assume the comment char
...
The comment char is configurable and we need to provide a way for the
user to specify which comment char they chose for their message.
2014-05-18 10:06:49 +02:00
Philip Kelley
4c9ffdff76
Fix printf format string from previous commit
2014-05-17 12:45:34 -04:00
Philip Kelley
c6320bec93
print_binary_hunk: Treat types with respect
2014-05-17 12:19:32 -04:00
Philip Kelley
bf6a5b6143
Merge remote-tracking branch 'upstream/cmn/indexer-mmap' into development
2014-05-17 11:38:03 -04:00