Commit graph

8 commits

Author SHA1 Message Date
Grzegorz Bizon
c7b31e4029 Enable some Rubocop cops related to new lines 2016-08-03 12:02:41 +02:00
Timothy Andrew
eb16e1e3c2 Improve the error message displayed when branch creation fails.
Note: This feature was developed independently on master while this was
in review. I've removed the conflicting bits and left the relevant
additions, mainly a test for `Gitlab::Git::Hook`. The original commit
message follows:

1. `gitlab-shell` outputs errors to `stderr`, but we weren't using this
   information, prior to this commit. Now we capture the `stderr`, and
   display it in the flash message when branch creation fails.

2. This can be used to display better errors for other git operation
   failures with small tweaks.

3. The return value of `Gitlab::Git::Hook#trigger` is changed from a
   simple `true`/`false` to a tuple of `[status, errors]`. All usages
   and tests have been updated to reflect this change.

4. This is only relevant to branch creation _from the Web UI_, since SSH
   and HTTP pushes access `gitlab-shell` either directly or through
   `gitlab-workhorse`.

5. A few minor changes need to be made on the `gitlab-shell` end. Right
   now, the `stderr` message it outputs is prefixed by "GitLab: ", which
   shows up in our flash message. This is better removed.
2016-07-05 11:05:16 +05:30
Dmitriy Zaporozhets
4f2d2c90f7 Move Gitlab::Git out of gitlab core 2013-04-27 23:50:17 +03:00
Dmitriy Zaporozhets
211c433cd8 Gitlab::Git::Stats specs 2013-04-16 16:39:48 +03:00
Dmitriy Zaporozhets
be41d0e1bf Gitlab::Git::Diff specs 2013-04-16 16:30:16 +03:00
Dmitriy Zaporozhets
c3bbbff673 specs for repository tag_names, branch_names 2013-04-03 21:21:24 +03:00
Dmitriy Zaporozhets
f8a4a76048 decorate commits in Gitlab::Git::repository with valid class 2013-04-03 21:17:50 +03:00
Dmitriy Zaporozhets
e91ff84df7 keep same dir structure for specs as in lib/ 2013-04-03 21:09:07 +03:00