text: public override void Save(){byte[] @out;string text = ToText();if (utf8Bom){ByteArrayOutputStream bos = new ByteArrayOutputStream();bos.Write(unchecked((int)(0xEF)));bos.Write(unchecked((int)(0xBB)));bos.Write(unchecked((int)(0xBF)));bos.Write(Sharpen.Runtime.GetBytesForString(text, RawParseUtils.UTF8_CHARSET.Name()));@out = bos.ToByteArray();}else{@out = Constants.Encode(text);}LockFile lf = new LockFile(GetFile(), fs);if (!lf.Lock()){throw new LockFailedException(GetFile());}try{lf.SetNeedSnapshot(true);lf.Write(@out);if (!lf.Commit()){throw new IOException(MessageFormat.Format(JGitText.Get().cannotCommitWriteTo, GetFile()));}}finally{lf.Unlock();}snapshot = lf.GetCommitSnapshot();hash = Hash(@out);FireConfigChangedEvent();}