Coder Social home page Coder Social logo

unity-git-hooks's Issues

License Type

Hello! I would love to use this in our project but it is missing the license type. Would you mind adding it?

`Assets.meta' is not in the git index.

In pre-commit script The cycle is designed in such a way that it always checks the existence of the Assets.meta file at the end.

git status
new file:   Assets/Issue.meta
new file:   Assets/Issue/TestScript.cs
new file:   Assets/Issue/TestScript.cs.meta
git commit -m "testScriptCommit"
Error: Missing meta file.
Asset `Assets/Issue/TestScript.cs' is added, but `Assets.meta' is not in the git index.
Please add `Assets.meta' to git as well.

I solved the problem, but not sure what is correct. I added a condition into a while loop after 51 and 89 lines

if [ "$p" = "Assets" ]; then 
	break
fi

Trace log for help.

++ git config --get unity3d.assets-dir
+ ASSETS_DIR=E:/UnityWork/bulletshero/
+ against=HEAD
++ git status --untracked-files=no --porcelain
+ '[' 'A  Assets/Issue.meta
A  Assets/Issue/TestScript.cs
A  Assets/Issue/TestScript.cs.meta' == '' ']'
+ exec
+ echo -e '\e[32m[RUN] start checking .meta files \e[39m'
[RUN] start checking .meta files
+ git diff --cached --name-only --diff-filter=A -z HEAD -- E:/UnityWork/bulletshero/
+ read -d '' f
+ ext=meta
+ base=Assets/Issue
+ '[' meta = meta ']'
++ git ls-files --cached -- Assets/Issue
++ wc -l
+ '[' 2 = 0 ']'
+ read -d '' f
+ ext=cs
+ base=Assets/Issue/TestScript
+ '[' cs = meta ']'
+ p=Assets/Issue/TestScript.cs
+ '[' Assets/Issue/TestScript.cs '!=' E:/UnityWork/bulletshero/ ']'
++ git ls-files --cached -- Assets/Issue/TestScript.cs.meta
++ wc -l
+ '[' 1 = 0 ']'
+ p=Assets/Issue
+ '[' Assets/Issue '!=' E:/UnityWork/bulletshero/ ']'
++ git ls-files --cached -- Assets/Issue.meta
++ wc -l
+ '[' 1 = 0 ']'
+ p=Assets
+ '[' Assets '!=' E:/UnityWork/bulletshero/ ']'
++ git ls-files --cached -- Assets.meta
++ wc -l
+ '[' 0 = 0 ']'
+ cat
Error: Missing meta file.
Asset `Assets/Issue/TestScript.cs' is added, but `Assets.meta' is not in the git index.
Please add `Assets.meta' to git as well.
+ exit 1
+ ret=1
+ '[' 1 '!=' 0 ']'

Thank you.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.