예제 #1
0
        public void log(RefUpdate update, string msg, bool deref)
        {
            ObjectId oldId = update.getOldObjectId();
            ObjectId newId = update.getNewObjectId();
            Ref      @ref  = update.getRef();

            PersonIdent ident = update.getRefLogIdent();

            if (ident == null)
            {
                ident = new PersonIdent(parent);
            }
            else
            {
                ident = new PersonIdent(ident);
            }

            var r = new StringBuilder();

            r.Append(ObjectId.ToString(oldId));
            r.Append(' ');
            r.Append(ObjectId.ToString(newId));
            r.Append(' ');
            r.Append(ident.ToExternalString());
            r.Append('\t');
            r.Append(msg);
            r.Append('\n');
            byte[] rec = Constants.encode(r.ToString());

            if (deref && @ref.isSymbolic())
            {
                log(@ref.getName(), rec);
                log(@ref.getLeaf().getName(), rec);
            }
            else
            {
                log(@ref.getName(), rec);
            }
        }
예제 #2
0
 /// <returns>identity of the user making the change in the reflog.</returns>
 public PersonIdent getRefLogIdent()
 {
     return(destination.getRefLogIdent());
 }