Commit Graph

5146 Commits

Author SHA1 Message Date
Carlos Martín Nieto
4f2eb2b7f4 Introduce git_reference_shorthand
Generate a shorthand name out of the full refname.
2013-05-08 02:28:47 +02:00
Vicent Martí
af795759a7 Merge pull request #1552 from carlosmn/config-helpers
Config helpers for global/xdg config files
2013-05-07 15:09:11 -07:00
Carlos Martín Nieto
98d633cccf Expose git_reference_dwim
Extract this function out of the rev-parse code to be able to DWIM a
reference instead of its target.
2013-05-07 23:34:48 +02:00
Carlos Martín Nieto
5d8318875f config: convenience function to open global/xdg
The rules for which one to open is a bit silly, so let's make it
easier for our users.
2013-05-07 21:42:56 +02:00
Carlos Martín Nieto
a4b75dcf56 repo: unconditionally create a global config backend
When a repository is initialised, we need to probe to see if there is
a global config to load. If this is not the case, the user isn't able
to write to the global config without creating the backend and adding
it themselves, which is inconvenient and overly complex.

Unconditionally create and add a backend for the global config file
regardless of whether it exists as a convenience for users.

To enable this, we allow creating backends to files that do not exist
yet, changing the semantics somewhat, and making some tests invalid.
2013-05-07 21:42:56 +02:00
Brad Morgan
4ca3d6d28f Added ifdef 2013-05-07 14:37:15 -04:00
Brad Morgan
00e43380a0 Merge remote-tracking branch 'origin/development' into ssh_transport 2013-05-07 14:30:35 -04:00
Brad Morgan
7369b3c3bf Added libssh2 cmake module 2013-05-07 14:26:33 -04:00
Brad Morgan
574b86b722 Fixed compilation issues when libssh2 is missing 2013-05-07 13:56:34 -04:00
Brad Morgan
c36565c0ee Added SSH public key authentication 2013-05-07 13:45:31 -04:00
Vicent Martí
d6465e1a7d Merge pull request #1557 from carlosmn/tagopt
remote: correctly interpret tagopt '--tags'
2013-05-07 10:14:28 -07:00
Russell Belfer
0f938c6b8f Fix win32 type warnings 2013-05-07 09:59:53 -07:00
Carlos Martín Nieto
505b5d0c81 remote: correctly interpret tagopt '--tags'
When tagopt is set to '--tags', we should only take the default tags
refspec into account and ignore any configured ones.

Bring the code into compliance.
2013-05-07 18:49:47 +02:00
Vicent Martí
33665410d6 Merge pull request #1556 from arrbee/diff-patch-fixes
Diff patch bug fixes
2013-05-07 08:00:44 -07:00
Russell Belfer
c2f602f8a5 Fix line numbering for patches with eofnl
When a patch contained an eofnl change (i.e. the last line either
gained or lost a newline), the oldno and newno line number values
for the lines in the last hunk of the patch were not useful.  This
makes them behave in a more expected manner.
2013-05-07 07:15:39 -07:00
Russell Belfer
d63eec6946 Improve diff function docs 2013-05-07 04:44:08 -07:00
Russell Belfer
fd96f98e14 More tests for files with no newline at end 2013-05-07 04:36:42 -07:00
Russell Belfer
e35e2684f6 Add GIT_DIFF_LINE_CONTEXT_EOFNL
This adds a new line origin constant for the special line that
is used when both files end without a newline.

In the course of writing the tests for this, I was having problems
with modifying a file but not having diff notice because it was
the same size and modified less than one second from the start of
the test, so I decided to start working on nanosecond timestamp
support.  This commit doesn't contain the nanosecond support, but
it contains the reorganization of maybe_modified and the hooks so
that if the nanosecond data were being read by stat() (or rather
being copied by git_index_entry__init_from_stat), then the nsec
would be taken into account.

This new stuff could probably use some more tests, although there
is some amount of it here.
2013-05-07 04:32:17 -07:00
Carlos Martín Nieto
1c92f1090e Merge pull request #1551 from nvloff/set_upstream_local_branch
fix git_branch_set_upstream for local branches
2013-05-07 01:32:10 -07:00
Russell Belfer
51e297dd18 Merge pull request #1554 from sba1/sort-amiga-fix
Fixed qsort_r() problem when targeting AmigaOS.
2013-05-07 00:31:40 -07:00
Sebastian Bauer
7f8cf6fefd Fixed qsort_r() problem when targeting AmigaOS.
We fall back to the libgit2-provided insert sort as done for other
platforms.
2013-05-07 09:15:12 +02:00
Russell Belfer
590991a7e0 Merge pull request #1553 from jdavid/git_commit_owner
Add git_commit_owner to the public interface
2013-05-06 23:25:06 -07:00
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
Nikolai Vladimirov
3d42e9a31e git_branch_set_upstream with local branches
Currently git_branch_set_upstream when passed a local branch
creates invalid configuration, for ex. if we setup branch
'tracking_master' to track local 'master' libgit2 generates
the following config

```
[branch "track_master"]
  remote = .
  merge = .refs/heads/track_master
```

The merge value is invalid and calling git_branch_upstream on
'tracking_master' results in invalid reference error.

It should do:

```
[branch "track_master"]
  remote = .
  merge = refs/heads/master
```
2013-05-06 20:33:11 +03: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
Brad Morgan
7621519f73 Cleanup 2013-05-05 14:46:28 -04:00
Brad Morgan
67a7136c7b Renaming 2013-05-05 14:24:47 -04:00
Brad Morgan
3eed595e85 Refactoring 2013-05-05 14:24:05 -04:00
Brad Morgan
d97669593a Cleanup 2013-05-05 14:05:03 -04:00
Brad Morgan
c0cef9e0d6 Added username and password auth for ssh 2013-05-05 13:58:18 -04:00
Brad Morgan
7261d9837e Added support for ssh:// urls 2013-05-05 13:36:11 -04: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
Brad Morgan
120b0122c5 Refactoring 2013-05-05 09:03:49 -04:00
Brad Morgan
22595b8480 Added ssh stream cleanup 2013-05-05 08:43:58 -04:00
Brad Morgan
58ba0a4eba Cleanup 2013-05-05 08:34:56 -04: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
Brad Morgan
f7158cd79b Push working over ssh 2013-05-04 11:28:20 -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
Brad Morgan
d04c384036 Adding ssh transport logic 2013-05-03 14:53:23 -04:00
Vicent Marti
b641c00eeb clar: Always generate the test suite 2013-05-03 17:35:50 +02:00