GitSharp.Core.PackLock.Lock C# (CSharp) Method

Lock() public method

Create the pack-*.keep file, with the given message.
/// The keep file could not be written. ///
public Lock ( string msg ) : bool
msg string message to store in the file.
return bool
        public bool Lock(string msg)
        {
            if (msg == null) return false;
            if (!msg.EndsWith("\n")) msg += "\n";
            var lf = new LockFile(_keepFile);
            if (!lf.Lock()) return false;
            lf.Write(Constants.encode(msg));
            return lf.Commit();
        }