~ubuntu-branches/ubuntu/trusty/monodevelop/trusty-proposed

« back to all changes in this revision

Viewing changes to external/ngit/NGit/NGit.Storage.Pack/ObjectToPack.cs

  • Committer: Package Import Robot
  • Author(s): Jo Shields
  • Date: 2013-05-12 09:46:03 UTC
  • mto: This revision was merged to the branch mainline in revision 29.
  • Revision ID: package-import@ubuntu.com-20130512094603-mad323bzcxvmcam0
Tags: upstream-4.0.5+dfsg
ImportĀ upstreamĀ versionĀ 4.0.5+dfsg

Show diffs side-by-side

added added

removed removed

Lines of Context:
71
71
 
72
72
                private const int EDGE = 1 << 3;
73
73
 
 
74
                private const int DELTA_ATTEMPTED = 1 << 4;
 
75
 
 
76
                private const int ATTEMPT_DELTA_MASK = REUSE_AS_IS | DELTA_ATTEMPTED;
 
77
 
74
78
                private const int TYPE_SHIFT = 5;
75
79
 
76
80
                private const int EXT_SHIFT = 8;
94
98
                /// <li>1 bit: canReuseAsIs</li>
95
99
                /// <li>1 bit: doNotDelta</li>
96
100
                /// <li>1 bit: edgeObject</li>
97
 
                /// <li>1 bit: unused</li>
 
101
                /// <li>1 bit: deltaAttempted</li>
98
102
                /// <li>3 bits: type</li>
99
103
                /// <li>4 bits: subclass flags (if any)</li>
100
104
                /// <li>--</li>
301
305
                        flags |= EDGE;
302
306
                }
303
307
 
 
308
                internal virtual bool DoNotAttemptDelta()
 
309
                {
 
310
                        // Do not attempt if delta attempted and object reuse.
 
311
                        return (flags & ATTEMPT_DELTA_MASK) == ATTEMPT_DELTA_MASK;
 
312
                }
 
313
 
 
314
                internal virtual bool IsDeltaAttempted()
 
315
                {
 
316
                        return (flags & DELTA_ATTEMPTED) != 0;
 
317
                }
 
318
 
 
319
                internal virtual void SetDeltaAttempted(bool deltaAttempted)
 
320
                {
 
321
                        if (deltaAttempted)
 
322
                        {
 
323
                                flags |= DELTA_ATTEMPTED;
 
324
                        }
 
325
                        else
 
326
                        {
 
327
                                flags &= ~DELTA_ATTEMPTED;
 
328
                        }
 
329
                }
 
330
 
304
331
                /// <returns>the extended flags on this object, in the range [0x0, 0xf].</returns>
305
332
                protected internal virtual int GetExtendedFlags()
306
333
                {