Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
G
git-pre-commit
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
nimrod
git-pre-commit
Commits
58d23bac
Commit
58d23bac
authored
7 years ago
by
nimrod
Browse files
Options
Downloads
Patches
Plain Diff
- Added a specific test for empty patch (changed the no confict test to have a patch).
parent
511ff06e
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
tests/merge-conflict.bats
+9
-0
9 additions, 0 deletions
tests/merge-conflict.bats
with
9 additions
and
0 deletions
tests/merge-conflict.bats
+
9
−
0
View file @
58d23bac
...
@@ -13,6 +13,9 @@ export repo="$BATS_TMPDIR/testrepo"
...
@@ -13,6 +13,9 @@ export repo="$BATS_TMPDIR/testrepo"
git commit -m "Initial commit."
git commit -m "Initial commit."
git checkout -b master2
git checkout -b master2
git checkout -b no-conflict
git checkout -b no-conflict
echo 1 > file2
git add file2
git commit -m "Another not-conflicting commit."
git checkout -b conflict
git checkout -b conflict
echo 2 > file
echo 2 > file
git commit file -m "Conflict with master."
git commit file -m "Conflict with master."
...
@@ -40,6 +43,12 @@ export repo="$BATS_TMPDIR/testrepo"
...
@@ -40,6 +43,12 @@ export repo="$BATS_TMPDIR/testrepo"
merge-conflict master2
merge-conflict master2
}
}
@test "Empty patch" {
cd "$repo"
git checkout master2 || true
merge-conflict
}
@test "Conflict" {
@test "Conflict" {
cd "$repo"
cd "$repo"
git checkout conflict || true
git checkout conflict || true
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment