Unverified Commit 628ebc51 by Edward Thomson Committed by GitHub

Merge pull request #4937 from lhchavez/fix-crlf

Convert tests/resources/push.sh to LF endings
parents 2c795807 7a43a892
#!/bin/sh #!/bin/sh
#creates push_src repo for libgit2 push tests. #creates push_src repo for libgit2 push tests.
set -eu set -eu
#Create src repo for push #Create src repo for push
mkdir push_src mkdir push_src
pushd push_src pushd push_src
git init git init
echo a > a.txt echo a > a.txt
git add . git add .
git commit -m 'added a.txt' git commit -m 'added a.txt'
mkdir fold mkdir fold
echo b > fold/b.txt echo b > fold/b.txt
git add . git add .
git commit -m 'added fold and fold/b.txt' git commit -m 'added fold and fold/b.txt'
git branch b1 #b1 and b2 are the same git branch b1 #b1 and b2 are the same
git branch b2 git branch b2
git checkout -b b3 git checkout -b b3
echo edit >> a.txt echo edit >> a.txt
git add . git add .
git commit -m 'edited a.txt' git commit -m 'edited a.txt'
git checkout -b b4 master git checkout -b b4 master
echo edit >> fold\b.txt echo edit >> fold\b.txt
git add . git add .
git commit -m 'edited fold\b.txt' git commit -m 'edited fold\b.txt'
git checkout -b b5 master git checkout -b b5 master
git submodule add ../testrepo.git submodule git submodule add ../testrepo.git submodule
git commit -m "added submodule named 'submodule' pointing to '../testrepo.git'" git commit -m "added submodule named 'submodule' pointing to '../testrepo.git'"
git checkout master git checkout master
git merge -m "merge b3, b4, and b5 to master" b3 b4 b5 git merge -m "merge b3, b4, and b5 to master" b3 b4 b5
#Log commits to include in testcase #Log commits to include in testcase
git log --format=oneline --decorate --graph git log --format=oneline --decorate --graph
#*-. 951bbbb90e2259a4c8950db78946784fb53fcbce (HEAD, master) merge b3, b4, and b5 to master #*-. 951bbbb90e2259a4c8950db78946784fb53fcbce (HEAD, master) merge b3, b4, and b5 to master
#|\ \ #|\ \
#| | * fa38b91f199934685819bea316186d8b008c52a2 (b5) added submodule named 'submodule' pointing to '../testrepo.git' #| | * fa38b91f199934685819bea316186d8b008c52a2 (b5) added submodule named 'submodule' pointing to '../testrepo.git'
#| * | 27b7ce66243eb1403862d05f958c002312df173d (b4) edited fold\b.txt #| * | 27b7ce66243eb1403862d05f958c002312df173d (b4) edited fold\b.txt
#| |/ #| |/
#* | d9b63a88223d8367516f50bd131a5f7349b7f3e4 (b3) edited a.txt #* | d9b63a88223d8367516f50bd131a5f7349b7f3e4 (b3) edited a.txt
#|/ #|/
#* a78705c3b2725f931d3ee05348d83cc26700f247 (b2, b1) added fold and fold/b.txt #* a78705c3b2725f931d3ee05348d83cc26700f247 (b2, b1) added fold and fold/b.txt
#* 5c0bb3d1b9449d1cc69d7519fd05166f01840915 added a.txt #* 5c0bb3d1b9449d1cc69d7519fd05166f01840915 added a.txt
#fix paths so that we can add repo folders under libgit2 repo #fix paths so that we can add repo folders under libgit2 repo
#rename .git to .gitted #rename .git to .gitted
find . -name .git -exec mv -i '{}' '{}ted' \; find . -name .git -exec mv -i '{}' '{}ted' \;
mv -i .gitmodules gitmodules mv -i .gitmodules gitmodules
popd popd
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment