From d10f11d31064f8d6fd6bccaf907897e07cd63cef Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Tue, 12 Nov 2019 18:19:12 +0000 Subject: terrain replace double by float --- OpenSim/Framework/TerrainData.cs | 6 ++-- .../World/Terrain/Effects/ChannelDigger.cs | 4 +-- .../CoreModules/World/Terrain/FileLoaders/LLRAW.cs | 4 +-- .../World/Terrain/FileLoaders/Terragen.cs | 22 ++++++------ .../World/Terrain/FloodBrushes/FlattenArea.cs | 2 +- .../World/Terrain/FloodBrushes/NoiseArea.cs | 2 +- .../World/Terrain/FloodBrushes/SmoothArea.cs | 20 +++++++---- .../World/Terrain/PaintBrushes/LowerSphere.cs | 4 +-- .../World/Terrain/PaintBrushes/NoiseSphere.cs | 2 +- .../World/Terrain/PaintBrushes/RaiseSphere.cs | 2 +- .../World/Terrain/PaintBrushes/RevertSphere.cs | 2 +- .../World/Terrain/PaintBrushes/SmoothSphere.cs | 12 +++---- .../CoreModules/World/Terrain/TerrainModifier.cs | 2 +- .../CoreModules/World/Terrain/TerrainModule.cs | 42 +++++++++++----------- .../CoreModules/World/Terrain/Tests/TerrainTest.cs | 14 ++++---- .../Region/Framework/Interfaces/ITerrainChannel.cs | 2 +- OpenSim/Region/Framework/Scenes/TerrainChannel.cs | 9 ++--- .../Shared/Api/Implementation/OSSL_Api.cs | 2 +- 18 files changed, 77 insertions(+), 76 deletions(-) diff --git a/OpenSim/Framework/TerrainData.cs b/OpenSim/Framework/TerrainData.cs index 1a2d5d1..0e5e83e 100644 --- a/OpenSim/Framework/TerrainData.cs +++ b/OpenSim/Framework/TerrainData.cs @@ -194,9 +194,6 @@ namespace OpenSim.Framework return ret; } - // This one dimensional version is ordered so height = map[y*sizeX+x]; - // DEPRECATED: don't use this function as it does not retain the dimensions of the terrain - // and the caller will probably do the wrong thing if the terrain is not the legacy 256x256. public float[] GetFloatsSerialized() { int points = SizeX * SizeY; @@ -485,7 +482,8 @@ namespace OpenSim.Framework for (int yy = 0; yy < SizeY; yy++) for (int xx = 0; xx < SizeX; xx++) { - bw.Write((float)m_heightmap[xx, yy]); + //bw.Write((float)m_heightmap[xx, yy]); + bw.Write((float)Math.Round(m_heightmap[xx, yy], 3, MidpointRounding.AwayFromZero)); } bw.Flush(); diff --git a/OpenSim/Region/CoreModules/World/Terrain/Effects/ChannelDigger.cs b/OpenSim/Region/CoreModules/World/Terrain/Effects/ChannelDigger.cs index 39d8d49..3354817 100644 --- a/OpenSim/Region/CoreModules/World/Terrain/Effects/ChannelDigger.cs +++ b/OpenSim/Region/CoreModules/World/Terrain/Effects/ChannelDigger.cs @@ -68,14 +68,14 @@ namespace OpenSim.Region.CoreModules.World.Terrain.Effects } } - private void FillMap(ITerrainChannel map, double val) + private void FillMap(ITerrainChannel map, float val) { for (int x = 0; x < map.Width; x++) for (int y = 0; y < map.Height; y++) map[x, y] = val; } - private void BuildTiles(ITerrainChannel map, double height) + private void BuildTiles(ITerrainChannel map, float height) { int channelWidth = (int) Math.Floor((map.Width / num_w) * 0.8); int channelHeight = (int) Math.Floor((map.Height / num_h) * 0.8); diff --git a/OpenSim/Region/CoreModules/World/Terrain/FileLoaders/LLRAW.cs b/OpenSim/Region/CoreModules/World/Terrain/FileLoaders/LLRAW.cs index 68d6ed2..4f6576f 100644 --- a/OpenSim/Region/CoreModules/World/Terrain/FileLoaders/LLRAW.cs +++ b/OpenSim/Region/CoreModules/World/Terrain/FileLoaders/LLRAW.cs @@ -131,7 +131,7 @@ namespace OpenSim.Region.CoreModules.World.Terrain.FileLoaders for (x = 0; x < sectionWidth; x++) { // Read a strip and continue - retval[x, y] = bs.ReadByte() * (bs.ReadByte() / 128.0); + retval[x, y] = bs.ReadByte() * (bs.ReadByte() / 128.0f); bs.ReadBytes(11); } // record that we wrote it @@ -171,7 +171,7 @@ namespace OpenSim.Region.CoreModules.World.Terrain.FileLoaders int x; for (x = 0; x < retval.Width; x++) { - retval[x, (retval.Height - 1) - y] = bs.ReadByte() * (bs.ReadByte() / 128.0); + retval[x, (retval.Height - 1) - y] = bs.ReadByte() * (bs.ReadByte() / 128.0f); bs.ReadBytes(11); // Advance the stream to next bytes. } } diff --git a/OpenSim/Region/CoreModules/World/Terrain/FileLoaders/Terragen.cs b/OpenSim/Region/CoreModules/World/Terrain/FileLoaders/Terragen.cs index 219011e..d61a09a 100644 --- a/OpenSim/Region/CoreModules/World/Terrain/FileLoaders/Terragen.cs +++ b/OpenSim/Region/CoreModules/World/Terrain/FileLoaders/Terragen.cs @@ -120,7 +120,7 @@ namespace OpenSim.Region.CoreModules.World.Terrain.FileLoaders for (int x = 0; x < sectionWidth; x++) { // Read a strip and continue - retval[x, y] = baseHeight + bs.ReadInt16() * (double)heightScale / 65536.0; + retval[x, y] = baseHeight + bs.ReadInt16() * (float)heightScale / 65536.0f; } // record that we wrote it currFileXOffset++; @@ -188,13 +188,13 @@ namespace OpenSim.Region.CoreModules.World.Terrain.FileLoaders eof = true; // create new channel of proper size (now that we know it) retval = new TerrainChannel(w, h); - double heightScale = (double)bs.ReadInt16() / 65536.0; - double baseHeight = (double)bs.ReadInt16(); + float heightScale = bs.ReadInt16() / 65536.0f; + float baseHeight = bs.ReadInt16(); for (int y = 0; y < h; y++) { for (int x = 0; x < w; x++) { - retval[x, y] = baseHeight + (double)bs.ReadInt16() * heightScale; + retval[x, y] = baseHeight + bs.ReadInt16() * heightScale; } } break; @@ -222,14 +222,14 @@ namespace OpenSim.Region.CoreModules.World.Terrain.FileLoaders BinaryWriter bs = new BinaryWriter(stream); //find the max and min heights on the map - double heightMax = map[0,0]; - double heightMin = map[0,0]; + float heightMax = map[0,0]; + float heightMin = map[0,0]; for (int y = 0; y < map.Height; y++) { for (int x = 0; x < map.Width; x++) { - double current = map[x,y]; + float current = map[x,y]; if (heightMax < current) heightMax = current; if (heightMin > current) @@ -237,13 +237,13 @@ namespace OpenSim.Region.CoreModules.World.Terrain.FileLoaders } } - double baseHeight = Math.Floor( (heightMax + heightMin) / 2d ); + float baseHeight = (float)Math.Floor(0.5f * (heightMax + heightMin)); - double horizontalScale = Math.Ceiling((heightMax - heightMin)); + float horizontalScale = (float) Math.Ceiling((heightMax - heightMin)); // if we are completely flat add 1cm range to avoid NaN divisions - if (horizontalScale < 0.01d) - horizontalScale = 0.01d; + if (horizontalScale < 0.01f) + horizontalScale = 0.01f; Encoding enc = Encoding.ASCII; diff --git a/OpenSim/Region/CoreModules/World/Terrain/FloodBrushes/FlattenArea.cs b/OpenSim/Region/CoreModules/World/Terrain/FloodBrushes/FlattenArea.cs index 9569d08..58bf9dc 100644 --- a/OpenSim/Region/CoreModules/World/Terrain/FloodBrushes/FlattenArea.cs +++ b/OpenSim/Region/CoreModules/World/Terrain/FloodBrushes/FlattenArea.cs @@ -46,7 +46,7 @@ namespace OpenSim.Region.CoreModules.World.Terrain.FloodBrushes for (int y = startY; y <= endY; y++) { if (fillArea[x, y]) - map[x, y] = (map[x, y] * (1.0 - strength)) + (height * strength); + map[x, y] = (map[x, y] * (1.0f - strength)) + (height * strength); } } } diff --git a/OpenSim/Region/CoreModules/World/Terrain/FloodBrushes/NoiseArea.cs b/OpenSim/Region/CoreModules/World/Terrain/FloodBrushes/NoiseArea.cs index 26d77ea..b881fa0 100644 --- a/OpenSim/Region/CoreModules/World/Terrain/FloodBrushes/NoiseArea.cs +++ b/OpenSim/Region/CoreModules/World/Terrain/FloodBrushes/NoiseArea.cs @@ -47,7 +47,7 @@ namespace OpenSim.Region.CoreModules.World.Terrain.FloodBrushes { if (fillArea[x, y]) { - double noise = TerrainUtil.PerlinNoise2D((double) x / map.Width, (double) y / map.Height, 8, 1.0); + float noise = (float)TerrainUtil.PerlinNoise2D((double) x / map.Width, (double) y / map.Height, 8, 1.0); map[x, y] += noise * strength; } } diff --git a/OpenSim/Region/CoreModules/World/Terrain/FloodBrushes/SmoothArea.cs b/OpenSim/Region/CoreModules/World/Terrain/FloodBrushes/SmoothArea.cs index c302c08..0e13096 100644 --- a/OpenSim/Region/CoreModules/World/Terrain/FloodBrushes/SmoothArea.cs +++ b/OpenSim/Region/CoreModules/World/Terrain/FloodBrushes/SmoothArea.cs @@ -48,7 +48,7 @@ namespace OpenSim.Region.CoreModules.World.Terrain.FloodBrushes if(strength > 1.0f) strength = 1.0f; - double[,] tweak = new double[endX - startX + 1, endX - startX + 1]; + float[,] tweak = new float[endX - startX + 1, endY - startY + 1]; for (int x = startX, i = 0; x <= endX; x++, i++) { @@ -57,15 +57,21 @@ namespace OpenSim.Region.CoreModules.World.Terrain.FloodBrushes if (!fillArea[x, y]) continue; - double average = 0.0; + float average = 0f; int avgsteps = 0; for (int n = x - sx; n <= x + sx; ++n) { - for (int l = y - sy; l < y + sy; ++l) + if (n >= 0 && n < map.Width) { - avgsteps++; - average += map[n, l]; + for (int l = y - sy; l < y + sy; ++l) + { + if (l >= 0 && l < map.Height) + { + avgsteps++; + average += map[n, l]; + } + } } } @@ -77,11 +83,11 @@ namespace OpenSim.Region.CoreModules.World.Terrain.FloodBrushes { for (int y = startY, j = 0; y <= endY; y++, j++) { - double ty = tweak[i, j]; + float ty = tweak[i, j]; if (ty == 0.0) continue; - map[x, y] = (1.0 - strength) * map[x, y] + strength * ty; + map[x, y] = (1.0f - strength) * map[x, y] + strength * ty; } } } diff --git a/OpenSim/Region/CoreModules/World/Terrain/PaintBrushes/LowerSphere.cs b/OpenSim/Region/CoreModules/World/Terrain/PaintBrushes/LowerSphere.cs index 4e1d0fc..f19043f 100644 --- a/OpenSim/Region/CoreModules/World/Terrain/PaintBrushes/LowerSphere.cs +++ b/OpenSim/Region/CoreModules/World/Terrain/PaintBrushes/LowerSphere.cs @@ -50,10 +50,10 @@ namespace OpenSim.Region.CoreModules.World.Terrain.PaintBrushes // Calculate a cos-sphere and add it to the heighmap double r = Math.Sqrt(dx2 + (y - ry) * (y - ry)); - double distancefactor = Math.Cos(r * size); + float distancefactor = (float)Math.Cos(r * size); if (distancefactor > 0.0) { - double newz = map[x, y] - distancefactor * strength; + float newz = map[x, y] - distancefactor * strength; if (newz <= 0f) map[x, y] = 0f; else diff --git a/OpenSim/Region/CoreModules/World/Terrain/PaintBrushes/NoiseSphere.cs b/OpenSim/Region/CoreModules/World/Terrain/PaintBrushes/NoiseSphere.cs index ac6d1af..ab9a18f 100644 --- a/OpenSim/Region/CoreModules/World/Terrain/PaintBrushes/NoiseSphere.cs +++ b/OpenSim/Region/CoreModules/World/Terrain/PaintBrushes/NoiseSphere.cs @@ -58,7 +58,7 @@ namespace OpenSim.Region.CoreModules.World.Terrain.PaintBrushes continue; distancefactor = strength * (1.0f - distancefactor); - double noise = TerrainUtil.PerlinNoise2D(x / (double) map.Width, y / (double) map.Height, 8, 1.0); + float noise = (float)TerrainUtil.PerlinNoise2D(x / (double) map.Width, y / (double) map.Height, 8, 1.0); map[x, y] += noise * distancefactor; } } diff --git a/OpenSim/Region/CoreModules/World/Terrain/PaintBrushes/RaiseSphere.cs b/OpenSim/Region/CoreModules/World/Terrain/PaintBrushes/RaiseSphere.cs index 1946f27..5d50b25 100644 --- a/OpenSim/Region/CoreModules/World/Terrain/PaintBrushes/RaiseSphere.cs +++ b/OpenSim/Region/CoreModules/World/Terrain/PaintBrushes/RaiseSphere.cs @@ -51,7 +51,7 @@ namespace OpenSim.Region.CoreModules.World.Terrain.PaintBrushes // Calculate a cos-sphere and add it to the heighmap double r = Math.Sqrt(dx2 + (y - ry) * (y - ry)); - double distancefactor = Math.Cos(r * size); + float distancefactor = (float)Math.Cos(r * size); if (distancefactor > 0.0) map[x, y] += distancefactor * strength; } diff --git a/OpenSim/Region/CoreModules/World/Terrain/PaintBrushes/RevertSphere.cs b/OpenSim/Region/CoreModules/World/Terrain/PaintBrushes/RevertSphere.cs index 4b7d9a1..8d06fc2 100644 --- a/OpenSim/Region/CoreModules/World/Terrain/PaintBrushes/RevertSphere.cs +++ b/OpenSim/Region/CoreModules/World/Terrain/PaintBrushes/RevertSphere.cs @@ -68,7 +68,7 @@ namespace OpenSim.Region.CoreModules.World.Terrain.PaintBrushes continue; distancefactor = strength * (1.0f - distancefactor); - map[x, y] = (map[x, y] * (1.0 - distancefactor)) + (m_revertmap[x, y] * distancefactor); + map[x, y] = (map[x, y] * (1.0f - distancefactor)) + (m_revertmap[x, y] * distancefactor); } } } diff --git a/OpenSim/Region/CoreModules/World/Terrain/PaintBrushes/SmoothSphere.cs b/OpenSim/Region/CoreModules/World/Terrain/PaintBrushes/SmoothSphere.cs index 69efdb9..fa609e0 100644 --- a/OpenSim/Region/CoreModules/World/Terrain/PaintBrushes/SmoothSphere.cs +++ b/OpenSim/Region/CoreModules/World/Terrain/PaintBrushes/SmoothSphere.cs @@ -40,7 +40,7 @@ namespace OpenSim.Region.CoreModules.World.Terrain.PaintBrushes float distancefactor; float dx2; - double[,] tweak = new double[endX - startX + 1, endX - startX + 1]; + float[,] tweak = new float[endX - startX + 1, endY - startY + 1]; int ssize = (int)(size + 0.5); if(ssize > 4) ssize = 4; @@ -64,16 +64,16 @@ namespace OpenSim.Region.CoreModules.World.Terrain.PaintBrushes { distancefactor = strength * (1.0f - distancefactor); - double average = 0.0; + float average = 0f; int avgsteps = 0; for (int n = x - ssize; n <= x + ssize; ++n) { - if(n > 0 && n < map.Width) + if(n >= 0 && n < map.Width) { for (int l = y - ssize; l <= y + ssize; ++l) { - if (l > 0 && l < map.Height) + if (l >= 0 && l < map.Height) { avgsteps++; average += map[n, l]; @@ -91,10 +91,10 @@ namespace OpenSim.Region.CoreModules.World.Terrain.PaintBrushes { for (int y = startY, j = 0; y <= endY; y++, j++) { - double tz = tweak[i, j]; + float tz = tweak[i, j]; if(tz != 0.0) { - double newz = map[x, y] - tz; + float newz = map[x, y] - tz; if (newz > 0.0) map[x, y] = newz; } diff --git a/OpenSim/Region/CoreModules/World/Terrain/TerrainModifier.cs b/OpenSim/Region/CoreModules/World/Terrain/TerrainModifier.cs index c6e992f..e977a75 100644 --- a/OpenSim/Region/CoreModules/World/Terrain/TerrainModifier.cs +++ b/OpenSim/Region/CoreModules/World/Terrain/TerrainModifier.cs @@ -227,7 +227,7 @@ namespace OpenSim.Region.CoreModules.World.Terrain if ((xPos >= 0) && (xPos < map.Width) && (mask[xDim, yDim])) { double endElevation = this.operate(buffer, data, xPos, yPos); - map[xPos, yPos] = endElevation; + map[xPos, yPos] = (float)endElevation; } } } diff --git a/OpenSim/Region/CoreModules/World/Terrain/TerrainModule.cs b/OpenSim/Region/CoreModules/World/Terrain/TerrainModule.cs index b98bc9d..d73c89f 100755 --- a/OpenSim/Region/CoreModules/World/Terrain/TerrainModule.cs +++ b/OpenSim/Region/CoreModules/World/Terrain/TerrainModule.cs @@ -1564,8 +1564,8 @@ namespace OpenSim.Region.CoreModules.World.Terrain { for (int y = 0; y < m_channel.Height / 2; y++) { - double height = m_channel[x, y]; - double flippedHeight = m_channel[x, (int)m_channel.Height - 1 - y]; + float height = m_channel[x, y]; + float flippedHeight = m_channel[x, (int)m_channel.Height - 1 - y]; m_channel[x, y] = flippedHeight; m_channel[x, (int)m_channel.Height - 1 - y] = height; @@ -1578,8 +1578,8 @@ namespace OpenSim.Region.CoreModules.World.Terrain { for (int x = 0; x < m_channel.Width / 2; x++) { - double height = m_channel[x, y]; - double flippedHeight = m_channel[(int)m_channel.Width - 1 - x, y]; + float height = m_channel[x, y]; + float flippedHeight = m_channel[(int)m_channel.Width - 1 - x, y]; m_channel[x, y] = flippedHeight; m_channel[(int)m_channel.Width - 1 - x, y] = height; @@ -1594,11 +1594,11 @@ namespace OpenSim.Region.CoreModules.World.Terrain private void InterfaceRescaleTerrain(Object[] args) { - double desiredMin = (double)args[0]; - double desiredMax = (double)args[1]; + float desiredMin = (float)args[0]; + float desiredMax = (float)args[1]; // determine desired scaling factor - double desiredRange = desiredMax - desiredMin; + float desiredRange = desiredMax - desiredMin; //m_log.InfoFormat("Desired {0}, {1} = {2}", new Object[] { desiredMin, desiredMax, desiredRange }); if (desiredRange == 0d) @@ -1609,8 +1609,8 @@ namespace OpenSim.Region.CoreModules.World.Terrain else { //work out current heightmap range - double currMin = double.MaxValue; - double currMax = double.MinValue; + float currMin = float.MaxValue; + float currMax = float.MinValue; int width = m_channel.Width; int height = m_channel.Height; @@ -1619,7 +1619,7 @@ namespace OpenSim.Region.CoreModules.World.Terrain { for(int y = 0; y < height; y++) { - double currHeight = m_channel[x, y]; + float currHeight = m_channel[x, y]; if (currHeight < currMin) { currMin = currHeight; @@ -1631,8 +1631,8 @@ namespace OpenSim.Region.CoreModules.World.Terrain } } - double currRange = currMax - currMin; - double scale = desiredRange / currRange; + float currRange = currMax - currMin; + float scale = desiredRange / currRange; //m_log.InfoFormat("Current {0}, {1} = {2}", new Object[] { currMin, currMax, currRange }); //m_log.InfoFormat("Scale = {0}", scale); @@ -1642,7 +1642,7 @@ namespace OpenSim.Region.CoreModules.World.Terrain { for(int y = 0; y < height; y++) { - double currHeight = m_channel[x, y] - currMin; + float currHeight = m_channel[x, y] - currMin; m_channel[x, y] = desiredMin + (currHeight * scale); } } @@ -1652,7 +1652,7 @@ namespace OpenSim.Region.CoreModules.World.Terrain private void InterfaceElevateTerrain(Object[] args) { - double val = (double)args[0]; + float val = (float)args[0]; int x, y; for (x = 0; x < m_channel.Width; x++) @@ -1663,7 +1663,7 @@ namespace OpenSim.Region.CoreModules.World.Terrain private void InterfaceMultiplyTerrain(Object[] args) { int x, y; - double val = (double)args[0]; + float val = (float)args[0]; for (x = 0; x < m_channel.Width; x++) for (y = 0; y < m_channel.Height; y++) @@ -1673,7 +1673,7 @@ namespace OpenSim.Region.CoreModules.World.Terrain private void InterfaceLowerTerrain(Object[] args) { int x, y; - double val = (double)args[0]; + float val = (float)args[0]; for (x = 0; x < m_channel.Width; x++) for (y = 0; y < m_channel.Height; y++) @@ -1683,7 +1683,7 @@ namespace OpenSim.Region.CoreModules.World.Terrain public void InterfaceFillTerrain(Object[] args) { int x, y; - double val = (double)args[0]; + float val = (float)args[0]; for (x = 0; x < m_channel.Width; x++) for (y = 0; y < m_channel.Height; y++) @@ -1693,7 +1693,7 @@ namespace OpenSim.Region.CoreModules.World.Terrain private void InterfaceMinTerrain(Object[] args) { int x, y; - double val = (double)args[0]; + float val = (float)args[0]; for (x = 0; x < m_channel.Width; x++) { for(y = 0; y < m_channel.Height; y++) @@ -1706,7 +1706,7 @@ namespace OpenSim.Region.CoreModules.World.Terrain private void InterfaceMaxTerrain(Object[] args) { int x, y; - double val = (double)args[0]; + float val = (float)args[0]; for (x = 0; x < m_channel.Width; x++) { for(y = 0; y < m_channel.Height; y++) @@ -1733,8 +1733,8 @@ namespace OpenSim.Region.CoreModules.World.Terrain private void InterfaceShowDebugStats(Object[] args) { - double max = Double.MinValue; - double min = double.MaxValue; + float max = float.MinValue; + float min = float.MaxValue; double sum = 0; int x; diff --git a/OpenSim/Region/CoreModules/World/Terrain/Tests/TerrainTest.cs b/OpenSim/Region/CoreModules/World/Terrain/Tests/TerrainTest.cs index b39e0a2..af202b3 100644 --- a/OpenSim/Region/CoreModules/World/Terrain/Tests/TerrainTest.cs +++ b/OpenSim/Region/CoreModules/World/Terrain/Tests/TerrainTest.cs @@ -75,7 +75,7 @@ namespace OpenSim.Region.CoreModules.World.Terrain.Tests { for (y=0; y= Width || y < 0 || y >= Height) return 0; - return (double)m_terrainData[x, y]; + return m_terrainData[x, y]; } set { @@ -492,7 +489,7 @@ namespace OpenSim.Region.Framework.Scenes float value; value = BitConverter.ToSingle(dataArray, index); index += 4; - this[x, y] = (double)value; + this[x, y] = value; } } } diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs index ac6abb0..3cb0fe7 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs @@ -599,7 +599,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api if (World.Permissions.CanTerraformLand(m_host.OwnerID, new Vector3(x, y, 0))) { - World.Heightmap[x, y] = val; + World.Heightmap[x, y] = (float)val; return 1; } else -- cgit v1.1