Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

changed the code base from CRLF to LF. Please set "git config core.au…

…tocrlf true"
  • Loading branch information...
commit e5dfc7643a22e997cb993132eef65c4a19d1bc35 1 parent 00fa639
@henon authored
Showing with 11,758 additions and 11,758 deletions.
  1. +3 −3 .gitignore
  2. +131 −131 Git/CmdParserOptionSet.cs
  3. +213 −213 Git/CommandCatalog.cs
  4. +147 −147 Git/Commands/Add.cs
  5. +148 −148 Git/Commands/Checkout.cs
  6. +162 −162 Git/Commands/Commit.cs
  7. +2 −2 Git/Commands/Config.cs
  8. +123 −123 Git/Commands/Fetch.cs
  9. +75 −75 Git/Commands/Help.cs
  10. +99 −99 Git/Commands/Init.cs
  11. +155 −155 Git/Commands/Log.cs
  12. +135 −135 Git/Commands/Merge.cs
  13. +151 −151 Git/Commands/Pull.cs
  14. +137 −137 Git/Commands/Push.cs
  15. +110 −110 Git/Commands/Rm.cs
  16. +114 −114 Git/Commands/Status.cs
  17. +33 −33 Git/Commands/Version.cs
  18. +61 −61 Git/Die.cs
  19. +217 −217 Git/Git.csproj
  20. +1,180 −1,180 Git/Options.cs
  21. +308 −308 Git/Program.cs
  22. +4 −4 Git/Properties/AssemblyInfo.cs
  23. +6 −6 Git/README.txt
  24. +113 −113 Git/Stubs/Am.cs
  25. +107 −107 Git/Stubs/Annotate.cs
  26. +112 −112 Git/Stubs/Apply.cs
  27. +98 −98 Git/Stubs/Archive.cs
  28. +113 −113 Git/Stubs/Blame.cs
  29. +108 −108 Git/Stubs/Branch.cs
  30. +96 −96 Git/Stubs/CatFile.cs
  31. +102 −102 Git/Stubs/CheckoutIndex.cs
  32. +91 −91 Git/Stubs/Cherry.cs
  33. +97 −97 Git/Stubs/CherryPick.cs
  34. +98 −98 Git/Stubs/Clean.cs
  35. +92 −92 Git/Stubs/CommitTree.cs
  36. +91 −91 Git/Stubs/CountObjects.cs
  37. +101 −101 Git/Stubs/Describe.cs
  38. +143 −143 Git/Stubs/Diff.cs
  39. +149 −149 Git/Stubs/DiffFiles.cs
  40. +145 −145 Git/Stubs/DiffIndex.cs
  41. +159 −159 Git/Stubs/DiffTree.cs
  42. +93 −93 Git/Stubs/Difftool.cs
  43. +99 −99 Git/Stubs/FastExport.cs
  44. +102 −102 Git/Stubs/FastImport.cs
  45. +102 −102 Git/Stubs/FetchPack.cs
  46. +103 −103 Git/Stubs/FilterBranch.cs
  47. +100 −100 Git/Stubs/FmtMergeMsg.cs
  48. +94 −94 Git/Stubs/ForEachRef.cs
  49. +168 −168 Git/Stubs/FormatPatch.cs
  50. +99 −99 Git/Stubs/Fsck.cs
  51. +97 −97 Git/Stubs/Gc.cs
  52. +123 −123 Git/Stubs/Grep.cs
  53. +96 −96 Git/Stubs/HashObject.cs
  54. +100 −100 Git/Stubs/IndexPack.cs
  55. +111 −111 Git/Stubs/LsFiles.cs
  56. +93 −93 Git/Stubs/LsRemote.cs
  57. +100 −100 Git/Stubs/LsTree.cs
  58. +97 −97 Git/Stubs/Mailinfo.cs
  59. +94 −94 Git/Stubs/Mailsplit.cs
  60. +91 −91 Git/Stubs/MergeBase.cs
  61. +93 −93 Git/Stubs/MergeFile.cs
  62. +93 −93 Git/Stubs/MergeIndex.cs
  63. +93 −93 Git/Stubs/Mergetool.cs
  64. +93 −93 Git/Stubs/Mktree.cs
  65. +93 −93 Git/Stubs/Mv.cs
  66. +97 −97 Git/Stubs/NameRev.cs
  67. +94 −94 Git/Stubs/Notes.cs
  68. +114 −114 Git/Stubs/PackObjects.cs
  69. +93 −93 Git/Stubs/PackRedundant.cs
  70. +92 −92 Git/Stubs/PackRefs.cs
  71. +90 −90 Git/Stubs/PatchId.cs
  72. +91 −91 Git/Stubs/PeekRemote.cs
  73. +93 −93 Git/Stubs/Prune.cs
  74. +94 −94 Git/Stubs/PrunePacked.cs
  75. +93 −93 Git/Stubs/Quiltimport.cs
  76. +100 −100 Git/Stubs/ReadTree.cs
  77. +110 −110 Git/Stubs/Rebase.cs
  78. +90 −90 Git/Stubs/ReceivePack.cs
  79. +97 −97 Git/Stubs/Reflog.cs
  80. +91 −91 Git/Stubs/Relink.cs
  81. +91 −91 Git/Stubs/Remote.cs
  82. +101 −101 Git/Stubs/Repack.cs
  83. +93 −93 Git/Stubs/Replace.cs
  84. +90 −90 Git/Stubs/RequestPull.cs
  85. +96 −96 Git/Stubs/Reset.cs
  86. +125 −125 Git/Stubs/RevParse.cs
  87. +95 −95 Git/Stubs/Revert.cs
  88. +97 −97 Git/Stubs/SendPack.cs
  89. +95 −95 Git/Stubs/Shortlog.cs
  90. +110 −110 Git/Stubs/Show.cs
  91. +106 −106 Git/Stubs/ShowBranch.cs
  92. +101 −101 Git/Stubs/ShowRef.cs
  93. +91 −91 Git/Stubs/Stripspace.cs
  94. +102 −102 Git/Stubs/Submodule.cs
  95. +98 −98 Git/Stubs/Svn.cs
  96. +94 −94 Git/Stubs/SymbolicRef.cs
  97. +101 −101 Git/Stubs/Tag.cs
  98. +91 −91 Git/Stubs/TarTree.cs
  99. +90 −90 Git/Stubs/UnpackFile.cs
  100. +94 −94 Git/Stubs/UnpackObjects.cs
  101. +111 −111 Git/Stubs/UpdateIndex.cs
  102. +91 −91 Git/Stubs/UpdateServerInfo.cs
Sorry, we could not display the entire diff because too many files (629) changed.
View
6 .gitignore
@@ -14,7 +14,7 @@ Reports
*.userprefs
*.orig
test-results
-dist
-build
-SharedAssemblyInfo.cs
+dist
+build
+SharedAssemblyInfo.cs
VersionAssemblyInfo.cs
View
262 Git/CmdParserOptionSet.cs
@@ -1,131 +1,131 @@
-/*
- * Copyright (C) 2008, Shawn O. Pearce <spearce@spearce.org>
- * Copyright (C) 2009, Rolenun <rolenun@gmail.com>
- *
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or
- * without modification, are permitted provided that the following
- * conditions are met:
- *
- * - Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * - Redistributions in binary form must reproduce the above
- * copyright notice, this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided
- * with the distribution.
- *
- * - Neither the name of the Git Development Community nor the
- * names of its contributors may be used to endorse or promote
- * products derived from this software without specific prior
- * written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
- * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
- * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
- * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
- * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-using System;
-using System.Collections.Generic;
-using NDesk.Options;
-
-namespace GitSharp.CLI
-{
- public class CmdParserOptionSet : OptionSet
- {
- protected override void InsertItem(int index, Option item)
- {
- base.InsertItem (index, item);
- }
-
- protected override OptionContext CreateOptionContext()
- {
- return new OptionContext (this);
- }
-
- protected override bool Parse(string option, OptionContext c)
- {
- string f, n, s, v;
- bool haveParts = GetOptionParts (option, out f, out n, out s, out v);
- Option nextOption = null;
- string newOption = option;
-
- if (haveParts)
- {
- nextOption = Contains (n) ? this [n] : null;
- newOption = f + n + (v != null ? s + v : "");
- }
-
- if (c.Option != null)
- {
- // Prevent --a --b
- if (c.Option != null && haveParts)
- {
- throw new OptionException (
- string.Format ("Found option `{0}' as value for option `{1}'.",
- option, c.OptionName), c.OptionName);
- }
-
- // have a option w/ required value; try to concat values.
- if (AppendValue (option, c))
- {
- if (!option.EndsWith ("\\") &&
- c.Option.MaxValueCount == c.OptionValues.Count)
- {
- c.Option.Invoke (c);
- }
-
- return true;
- }
- else
- base.Parse (newOption, c);
- }
- if (!haveParts || v == null)
- {
- // Not an option; let base handle as a non-option argument.
- return base.Parse (newOption, c);
- }
- if (nextOption.OptionValueType != OptionValueType.None &&
- v.EndsWith ("\\"))
- {
- c.Option = nextOption;
- c.OptionValues.Add (v);
- c.OptionName = f + n;
- return true;
- }
- return base.Parse (newOption, c);
- }
-
- private bool AppendValue(string value, OptionContext c)
- {
- bool added = false;
- string[] seps = c.Option.GetValueSeparators ();
- foreach (var o in seps.Length != 0 ? value.Split(seps, StringSplitOptions.None) : new string[] { value })
- {
- int idx = c.OptionValues.Count - 1;
- if (idx == -1 || !c.OptionValues[idx].EndsWith("\\"))
- {
- c.OptionValues.Add(o);
- added = true;
- }
- else
- {
- c.OptionValues[idx] += value;
- added = true;
- }
- }
- return added;
- }
- }
-}
+/*
+ * Copyright (C) 2008, Shawn O. Pearce <spearce@spearce.org>
+ * Copyright (C) 2009, Rolenun <rolenun@gmail.com>
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or
+ * without modification, are permitted provided that the following
+ * conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following
+ * disclaimer in the documentation and/or other materials provided
+ * with the distribution.
+ *
+ * - Neither the name of the Git Development Community nor the
+ * names of its contributors may be used to endorse or promote
+ * products derived from this software without specific prior
+ * written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
+ * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+using System;
+using System.Collections.Generic;
+using NDesk.Options;
+
+namespace GitSharp.CLI
+{
+ public class CmdParserOptionSet : OptionSet
+ {
+ protected override void InsertItem(int index, Option item)
+ {
+ base.InsertItem (index, item);
+ }
+
+ protected override OptionContext CreateOptionContext()
+ {
+ return new OptionContext (this);
+ }
+
+ protected override bool Parse(string option, OptionContext c)
+ {
+ string f, n, s, v;
+ bool haveParts = GetOptionParts (option, out f, out n, out s, out v);
+ Option nextOption = null;
+ string newOption = option;
+
+ if (haveParts)
+ {
+ nextOption = Contains (n) ? this [n] : null;
+ newOption = f + n + (v != null ? s + v : "");
+ }
+
+ if (c.Option != null)
+ {
+ // Prevent --a --b
+ if (c.Option != null && haveParts)
+ {
+ throw new OptionException (
+ string.Format ("Found option `{0}' as value for option `{1}'.",
+ option, c.OptionName), c.OptionName);
+ }
+
+ // have a option w/ required value; try to concat values.
+ if (AppendValue (option, c))
+ {
+ if (!option.EndsWith ("\\") &&
+ c.Option.MaxValueCount == c.OptionValues.Count)
+ {
+ c.Option.Invoke (c);
+ }
+
+ return true;
+ }
+ else
+ base.Parse (newOption, c);
+ }
+ if (!haveParts || v == null)
+ {
+ // Not an option; let base handle as a non-option argument.
+ return base.Parse (newOption, c);
+ }
+ if (nextOption.OptionValueType != OptionValueType.None &&
+ v.EndsWith ("\\"))
+ {
+ c.Option = nextOption;
+ c.OptionValues.Add (v);
+ c.OptionName = f + n;
+ return true;
+ }
+ return base.Parse (newOption, c);
+ }
+
+ private bool AppendValue(string value, OptionContext c)
+ {
+ bool added = false;
+ string[] seps = c.Option.GetValueSeparators ();
+ foreach (var o in seps.Length != 0 ? value.Split(seps, StringSplitOptions.None) : new string[] { value })
+ {
+ int idx = c.OptionValues.Count - 1;
+ if (idx == -1 || !c.OptionValues[idx].EndsWith("\\"))
+ {
+ c.OptionValues.Add(o);
+ added = true;
+ }
+ else
+ {
+ c.OptionValues[idx] += value;
+ added = true;
+ }
+ }
+ return added;
+ }
+ }
+}
View
426 Git/CommandCatalog.cs
@@ -1,213 +1,213 @@
-/*
- * Copyright (C) 2008, Shawn O. Pearce <spearce@spearce.org>
- * Copyright (C) 2009, Rolenun <rolenun@gmail.com>
- *
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or
- * without modification, are permitted provided that the following
- * conditions are met:
- *
- * - Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * - Redistributions in binary form must reproduce the above
- * copyright notice, this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided
- * with the distribution.
- *
- * - Neither the name of the Git Development Community nor the
- * names of its contributors may be used to endorse or promote
- * products derived from this software without specific prior
- * written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
- * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
- * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
- * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
- * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-using System;
-using System.Collections;
-using System.Collections.Generic;
-using System.Collections.ObjectModel;
-using System.IO;
-using System.Reflection;
-using System.Text;
-using System.Xml;
-using GitSharp;
-
-namespace GitSharp.CLI
-{
-
- /// <summary>
- /// List of all commands known by the command line tools.
- /// Commands are implementations of the TextBuiltin class, with a required
- /// command attribute to insert additional documentation and add some extra
- /// information such as if the command is common and completed.
- ///
- /// Commands may be registered by adding them to the Commands.xml file.
- /// The Commands.xml file should contain:
- /// a. The command name including namespace.
- /// b. The website address for command specific online help.(optional)
- /// </summary>
- public class CommandCatalog
- {
- /// <summary>
- /// Stores the command catalog.
- /// </summary>
- private SortedList<String, CommandRef> commands = new SortedList<string, CommandRef>();
-
- /// <summary>
- /// Creates the command catalog from the Commands.xml file.
- /// </summary>
- public CommandCatalog()
- {
- const string commandsXmlPath = "GitSharp.CLI.Resources.Commands.xml";
- Stream fileStream = Assembly.GetExecutingAssembly().GetManifestResourceStream(commandsXmlPath);
- var doc = new XmlDocument();
- doc.Load(fileStream);
-
- XmlNodeList xmlNodeList = doc.SelectNodes("/root/CommandList/Command");
- foreach (XmlNode node in xmlNodeList)
- {
- XmlElement nameElement = node["Name"];
- XmlElement helpElement = node["Help"];
- if (nameElement != null)
- Load(nameElement.InnerText, helpElement.InnerText);
- }
- }
-
- /// <summary>
- /// Returns all commands starting with a specified string, sorted by command name.
- /// </summary>
- public List<CommandRef> StartsWith(String s)
- {
- List<CommandRef> matches = new List<CommandRef>();
- foreach (CommandRef c in commands.Values)
- {
- if (c.getName().StartsWith(s))
- matches.Add(c);
- }
-
- return toSortedArray(matches);
- }
-
- /// <summary>
- /// Create and loads the command name into the command catalog.
- /// </summary>
- /// <param name="commandName">Specifies the command name to load.</param>
- /// <param name="commandHelp">Specifies the command's website for faster reference.</param>
- public void Load(String commandName, String commandHelp)
- {
- TextBuiltin clazz;
-
- Type commandType = Type.GetType(commandName);
- if (commandType == null)
- return;
-
- clazz = Activator.CreateInstance(commandType) as TextBuiltin;
- if (clazz == null)
- return;
-
- int index = clazz.ToString().LastIndexOf(".");
- string cmdName = clazz.ToString().Substring(index + 1).ToLower();
- clazz.setCommandName(cmdName);
- clazz.setCommandHelp(commandHelp);
-
- CommandRef cr = new CommandRef(clazz);
- if (cr != null)
- commands.Add(cr.getName(), cr);
- }
-
- /// <summary>
- /// Locates a single command by its user friendly name.
- /// </summary>
- /// <param name="name">Specifies the name of the command.</param>
- /// <returns>Returns the CommandRef containing the command's information.</returns>
- public CommandRef Get(String name)
- {
- CommandRef value = null;
- commands.TryGetValue(name, out value);
- return value;
- }
-
- /// <summary>
- /// Returns all known commands, sorted by command name.
- /// </summary>
- public IList<CommandRef> All()
- {
- return commands.Values;
- }
-
- /// <summary>
- /// Returns all common commands, sorted by command name.
- /// </summary>
- public List<CommandRef> Common()
- {
- List<CommandRef> common = new List<CommandRef>();
- foreach (CommandRef c in commands.Values)
- {
- if (c.isCommon())
- common.Add(c);
- }
-
- return toSortedArray(common);
- }
-
- /// <summary>
- /// Returns all incomplete commands, sorted by command name.
- /// </summary>
- public List<CommandRef> Incomplete()
- {
- List<CommandRef> incomplete = new List<CommandRef>();
- foreach (CommandRef c in commands.Values)
- {
- if (!c.isComplete())
- incomplete.Add(c);
- }
-
- return toSortedArray(incomplete);
- }
-
- /// <summary>
- /// Returns all complete commands, sorted by command name.
- /// </summary>
- public List<CommandRef> Complete()
- {
- List<CommandRef> complete = new List<CommandRef>();
- foreach (CommandRef c in commands.Values)
- {
- if (c.isComplete())
- complete.Add(c);
- }
-
- return toSortedArray(complete);
- }
-
- /// <summary>
- /// Sorts a list of specified commands by command name.
- /// </summary>
- /// <param name="c">Specifies the list of commands to be sorted.</param>
- /// <returns>Returns the sorted list of commands.</returns>
- private List<CommandRef> toSortedArray(List<CommandRef> c)
- {
- c.Sort(
- delegate(CommandRef ref1, CommandRef ref2)
- {
- return ref1.getName().CompareTo(ref2.getName());
- }
- );
- return c;
- }
- }
-}
+/*
+ * Copyright (C) 2008, Shawn O. Pearce <spearce@spearce.org>
+ * Copyright (C) 2009, Rolenun <rolenun@gmail.com>
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or
+ * without modification, are permitted provided that the following
+ * conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following
+ * disclaimer in the documentation and/or other materials provided
+ * with the distribution.
+ *
+ * - Neither the name of the Git Development Community nor the
+ * names of its contributors may be used to endorse or promote
+ * products derived from this software without specific prior
+ * written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
+ * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+using System;
+using System.Collections;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.IO;
+using System.Reflection;
+using System.Text;
+using System.Xml;
+using GitSharp;
+
+namespace GitSharp.CLI
+{
+
+ /// <summary>
+ /// List of all commands known by the command line tools.
+ /// Commands are implementations of the TextBuiltin class, with a required
+ /// command attribute to insert additional documentation and add some extra
+ /// information such as if the command is common and completed.
+ ///
+ /// Commands may be registered by adding them to the Commands.xml file.
+ /// The Commands.xml file should contain:
+ /// a. The command name including namespace.
+ /// b. The website address for command specific online help.(optional)
+ /// </summary>
+ public class CommandCatalog
+ {
+ /// <summary>
+ /// Stores the command catalog.
+ /// </summary>
+ private SortedList<String, CommandRef> commands = new SortedList<string, CommandRef>();
+
+ /// <summary>
+ /// Creates the command catalog from the Commands.xml file.
+ /// </summary>
+ public CommandCatalog()
+ {
+ const string commandsXmlPath = "GitSharp.CLI.Resources.Commands.xml";
+ Stream fileStream = Assembly.GetExecutingAssembly().GetManifestResourceStream(commandsXmlPath);
+ var doc = new XmlDocument();
+ doc.Load(fileStream);
+
+ XmlNodeList xmlNodeList = doc.SelectNodes("/root/CommandList/Command");
+ foreach (XmlNode node in xmlNodeList)
+ {
+ XmlElement nameElement = node["Name"];
+ XmlElement helpElement = node["Help"];
+ if (nameElement != null)
+ Load(nameElement.InnerText, helpElement.InnerText);
+ }
+ }
+
+ /// <summary>
+ /// Returns all commands starting with a specified string, sorted by command name.
+ /// </summary>
+ public List<CommandRef> StartsWith(String s)
+ {
+ List<CommandRef> matches = new List<CommandRef>();
+ foreach (CommandRef c in commands.Values)
+ {
+ if (c.getName().StartsWith(s))
+ matches.Add(c);
+ }
+
+ return toSortedArray(matches);
+ }
+
+ /// <summary>
+ /// Create and loads the command name into the command catalog.
+ /// </summary>
+ /// <param name="commandName">Specifies the command name to load.</param>
+ /// <param name="commandHelp">Specifies the command's website for faster reference.</param>
+ public void Load(String commandName, String commandHelp)
+ {
+ TextBuiltin clazz;
+
+ Type commandType = Type.GetType(commandName);
+ if (commandType == null)
+ return;
+
+ clazz = Activator.CreateInstance(commandType) as TextBuiltin;
+ if (clazz == null)
+ return;
+
+ int index = clazz.ToString().LastIndexOf(".");
+ string cmdName = clazz.ToString().Substring(index + 1).ToLower();
+ clazz.setCommandName(cmdName);
+ clazz.setCommandHelp(commandHelp);
+
+ CommandRef cr = new CommandRef(clazz);
+ if (cr != null)
+ commands.Add(cr.getName(), cr);
+ }
+
+ /// <summary>
+ /// Locates a single command by its user friendly name.
+ /// </summary>
+ /// <param name="name">Specifies the name of the command.</param>
+ /// <returns>Returns the CommandRef containing the command's information.</returns>
+ public CommandRef Get(String name)
+ {
+ CommandRef value = null;
+ commands.TryGetValue(name, out value);
+ return value;
+ }
+
+ /// <summary>
+ /// Returns all known commands, sorted by command name.
+ /// </summary>
+ public IList<CommandRef> All()
+ {
+ return commands.Values;
+ }
+
+ /// <summary>
+ /// Returns all common commands, sorted by command name.
+ /// </summary>
+ public List<CommandRef> Common()
+ {
+ List<CommandRef> common = new List<CommandRef>();
+ foreach (CommandRef c in commands.Values)
+ {
+ if (c.isCommon())
+ common.Add(c);
+ }
+
+ return toSortedArray(common);
+ }
+
+ /// <summary>
+ /// Returns all incomplete commands, sorted by command name.
+ /// </summary>
+ public List<CommandRef> Incomplete()
+ {
+ List<CommandRef> incomplete = new List<CommandRef>();
+ foreach (CommandRef c in commands.Values)
+ {
+ if (!c.isComplete())
+ incomplete.Add(c);
+ }
+
+ return toSortedArray(incomplete);
+ }
+
+ /// <summary>
+ /// Returns all complete commands, sorted by command name.
+ /// </summary>
+ public List<CommandRef> Complete()
+ {
+ List<CommandRef> complete = new List<CommandRef>();
+ foreach (CommandRef c in commands.Values)
+ {
+ if (c.isComplete())
+ complete.Add(c);
+ }
+
+ return toSortedArray(complete);
+ }
+
+ /// <summary>
+ /// Sorts a list of specified commands by command name.
+ /// </summary>
+ /// <param name="c">Specifies the list of commands to be sorted.</param>
+ /// <returns>Returns the sorted list of commands.</returns>
+ private List<CommandRef> toSortedArray(List<CommandRef> c)
+ {
+ c.Sort(
+ delegate(CommandRef ref1, CommandRef ref2)
+ {
+ return ref1.getName().CompareTo(ref2.getName());
+ }
+ );
+ return c;
+ }
+ }
+}
View
294 Git/Commands/Add.cs
@@ -1,147 +1,147 @@
-/*
- * Copyright (C) 2008, Shawn O. Pearce <spearce@spearce.org>
- * Copyright (C) 2009, Rolenun <rolenun@gmail.com>
- *
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or
- * without modification, are permitted provided that the following
- * conditions are met:
- *
- * - Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * - Redistributions in binary form must reproduce the above
- * copyright notice, this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided
- * with the distribution.
- *
- * - Neither the name of the Git Development Community nor the
- * names of its contributors may be used to endorse or promote
- * products derived from this software without specific prior
- * written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
- * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
- * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
- * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
- * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-using System;
-using System.Collections.Generic;
-using NDesk.Options;
-using GitSharp.Commands;
-
-namespace GitSharp.CLI
-{
- [Command(complete = false, common = true, requiresRepository = true, usage = "Add file contents to the index")]
- class Add : TextBuiltin
- {
- private AddCommand cmd = new AddCommand();
-
- private static Boolean isHelp = false;
-
-#if ported
- private static Boolean isDryRun = false;
- private static Boolean isVerbose = false;
- private static Boolean isForced = false;
- private static Boolean isInteractive = false;
- private static Boolean isUpdateKnown = false;
- private static Boolean isUpdateAll = false;
- private static Boolean isIntentToAdd = false;
- private static Boolean isRefreshOnly = false;
- private static Boolean isIgnoreErrors = false;
-#endif
-
- override public void Run(String[] args)
- {
- options = new CmdParserOptionSet()
- {
- { "h|help", "Display this help information. To see online help, use: git help <command>", v=>OfflineHelp()},
-#if ported
- { "n|dry-run", "Don't actually add the files, just show if they exist.", v=>{isDryRun = true;}},
- { "v|verbose", "Be verbose.", v=> {isVerbose = true;}},
- { "f|force", "Allow adding otherwise ignored files.", v=> {isForced = true;}},
- { "i|interactive", "Interactive picking.", v=>{isInteractive = true;}},
- { "p|patch", "Interactive patching.", v=>DoPatch()},
- { "e|edit", "Open the diff vs. the index in an editor and let the user edit it.", v=>DoEdit()},
- { "u|update", "Update tracked files.", v=> {isUpdateKnown = true;}},
- { "A|all", "Add all files, noticing removal of tracked files.", v=>{isUpdateAll = true;}},
- { "N|intent-to-add", "Record only the fact the path will be added later.", v=>{isIntentToAdd = true;}},
- { "refresh", "Don't add the files, only refresh the index.", v=> {isRefreshOnly = true;}},
- { "ignore-errors", "Just skip files which cannot be added because of errors.", v=>{isIgnoreErrors = true;}},
-#endif
- };
-
- try
- {
- List<String> arguments = ParseOptions(args);
- if (arguments.Count > 0)
- {
- //Add the file(s)
- //DoAdd(arguments);
- try
- {
- cmd.Arguments = arguments;
- cmd.Execute();
- }
- catch (ArgumentException e)
- {
- Console.WriteLine("Path does not exist: " + e.ParamName);
- Console.WriteLine("Adding path(s) has been aborted.");
- }
- }
- else if (args.Length <= 0)
- {
- //Display the modified files for the existing repository
- Console.WriteLine("Nothing specified, nothing added.");
- Console.WriteLine("Maybe you wanted to say 'git add .'?");
- }
- else
- {
- OfflineHelp();
- }
- }
- catch (OptionException e)
- {
- Console.WriteLine(e.Message);
- }
- }
-
- private void OfflineHelp()
- {
- if (!isHelp)
- {
- isHelp = true;
- Console.WriteLine("usage: git add [options] [--] <filepattern>...");
- Console.WriteLine();
- options.WriteOptionDescriptions(Console.Out);
- }
- }
-
- private void DoAdd(List<String> filesAdded)
- {
- Console.WriteLine("This command still needs to be implemented.");
- }
-
- private void DoEdit()
- {
- Console.WriteLine("This option still needs to be implemented.");
- }
-
- private void DoPatch()
- {
- Console.WriteLine("This option still needs to be implemented.");
- }
-
- }
-}
+/*
+ * Copyright (C) 2008, Shawn O. Pearce <spearce@spearce.org>
+ * Copyright (C) 2009, Rolenun <rolenun@gmail.com>
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or
+ * without modification, are permitted provided that the following
+ * conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following
+ * disclaimer in the documentation and/or other materials provided
+ * with the distribution.
+ *
+ * - Neither the name of the Git Development Community nor the
+ * names of its contributors may be used to endorse or promote
+ * products derived from this software without specific prior
+ * written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
+ * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+using System;
+using System.Collections.Generic;
+using NDesk.Options;
+using GitSharp.Commands;
+
+namespace GitSharp.CLI
+{
+ [Command(complete = false, common = true, requiresRepository = true, usage = "Add file contents to the index")]
+ class Add : TextBuiltin
+ {
+ private AddCommand cmd = new AddCommand();
+
+ private static Boolean isHelp = false;
+
+#if ported
+ private static Boolean isDryRun = false;
+ private static Boolean isVerbose = false;
+ private static Boolean isForced = false;
+ private static Boolean isInteractive = false;
+ private static Boolean isUpdateKnown = false;
+ private static Boolean isUpdateAll = false;
+ private static Boolean isIntentToAdd = false;
+ private static Boolean isRefreshOnly = false;
+ private static Boolean isIgnoreErrors = false;
+#endif
+
+ override public void Run(String[] args)
+ {
+ options = new CmdParserOptionSet()
+ {
+ { "h|help", "Display this help information. To see online help, use: git help <command>", v=>OfflineHelp()},
+#if ported
+ { "n|dry-run", "Don't actually add the files, just show if they exist.", v=>{isDryRun = true;}},
+ { "v|verbose", "Be verbose.", v=> {isVerbose = true;}},
+ { "f|force", "Allow adding otherwise ignored files.", v=> {isForced = true;}},
+ { "i|interactive", "Interactive picking.", v=>{isInteractive = true;}},
+ { "p|patch", "Interactive patching.", v=>DoPatch()},
+ { "e|edit", "Open the diff vs. the index in an editor and let the user edit it.", v=>DoEdit()},
+ { "u|update", "Update tracked files.", v=> {isUpdateKnown = true;}},
+ { "A|all", "Add all files, noticing removal of tracked files.", v=>{isUpdateAll = true;}},
+ { "N|intent-to-add", "Record only the fact the path will be added later.", v=>{isIntentToAdd = true;}},
+ { "refresh", "Don't add the files, only refresh the index.", v=> {isRefreshOnly = true;}},
+ { "ignore-errors", "Just skip files which cannot be added because of errors.", v=>{isIgnoreErrors = true;}},
+#endif
+ };
+
+ try
+ {
+ List<String> arguments = ParseOptions(args);
+ if (arguments.Count > 0)
+ {
+ //Add the file(s)
+ //DoAdd(arguments);
+ try
+ {
+ cmd.Arguments = arguments;
+ cmd.Execute();
+ }
+ catch (ArgumentException e)
+ {
+ Console.WriteLine("Path does not exist: " + e.ParamName);
+ Console.WriteLine("Adding path(s) has been aborted.");
+ }
+ }
+ else if (args.Length <= 0)
+ {
+ //Display the modified files for the existing repository
+ Console.WriteLine("Nothing specified, nothing added.");
+ Console.WriteLine("Maybe you wanted to say 'git add .'?");
+ }
+ else
+ {
+ OfflineHelp();
+ }
+ }
+ catch (OptionException e)
+ {
+ Console.WriteLine(e.Message);
+ }
+ }
+
+ private void OfflineHelp()
+ {
+ if (!isHelp)
+ {
+ isHelp = true;
+ Console.WriteLine("usage: git add [options] [--] <filepattern>...");
+ Console.WriteLine();
+ options.WriteOptionDescriptions(Console.Out);
+ }
+ }
+
+ private void DoAdd(List<String> filesAdded)
+ {
+ Console.WriteLine("This command still needs to be implemented.");
+ }
+
+ private void DoEdit()
+ {
+ Console.WriteLine("This option still needs to be implemented.");
+ }
+
+ private void DoPatch()
+ {
+ Console.WriteLine("This option still needs to be implemented.");
+ }
+
+ }
+}
View
296 Git/Commands/Checkout.cs
@@ -1,148 +1,148 @@
-/*
- * Copyright (C) 2008, Shawn O. Pearce <spearce@spearce.org>
- * Copyright (C) 2009, Rolenun <rolenun@gmail.com>
- *
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or
- * without modification, are permitted provided that the following
- * conditions are met:
- *
- * - Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * - Redistributions in binary form must reproduce the above
- * copyright notice, this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided
- * with the distribution.
- *
- * - Neither the name of the Git Development Community nor the
- * names of its contributors may be used to endorse or promote
- * products derived from this software without specific prior
- * written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
- * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
- * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
- * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
- * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-using System;
-using System.Collections.Generic;
-using System.Text;
-using NDesk.Options;
-using GitSharp.Commands;
-
-namespace GitSharp.CLI
-{
- [Command(complete = false, common = true, requiresRepository = true, usage = "Checkout a branch or paths to the working tree")]
- public class Checkout : TextBuiltin
- {
- private CheckoutCommand cmd = new CheckoutCommand();
-
- private static Boolean isHelp = false;
-
-#if ported
- private static Boolean isQuiet = false;
- private static Boolean isForced = false;
- private static Boolean isTracked = false;
- private static Boolean isNoTrack = false;
- private static Boolean isMerging = false;
- private static Boolean isOurs = false;
- private static Boolean isTheirs = false;
- private static Boolean isConflict = false;
- private static string branchName = "";
-#endif
-
- override public void Run(string[] args)
- {
- options = new CmdParserOptionSet()
- {
- { "h|help", "Display this help information. To see online help, use: git help <command>", v=>OfflineHelp()},
- { "q|quiet", "Quiet, suppress feedback messages", v => cmd.Quiet = false },
-#if ported
- { "f|force", "Force checkout and ignore unmerged changes", v=>{isForced = true;}},
- { "ours", "For unmerged paths, checkout stage #2 from the index", v=>{isOurs = true;}},
- { "theirs", "For unmerged paths, checkout stage #3 from the index", v=>{isTheirs = true;}},
- { "b|branch=", "Create a new {branch}",(string v) => branchName = v },
- { "t|track", "Set the upstream configuration", v=>{isTracked = true;}},
- { "no-track", "Do not set the upstream configuration", v=>{isNoTrack = true;}},
- { "l", "Create the new branch's reflog", v=>RefLog()},
- { "m|merge", "Perform a three-way merge between the current branch, your working tree contents " +
- "and the new branch", v=>{isMerging = true;}},
- { "conflict","Same as merge above, but changes how the conflicting hunks are presented", isConflict = true},
- { "p|patch", "Creates a diff and applies it in reverse order to the working tree", v=>Patch()}
-
- // [Mr Happy] this should be compatible w/ the CommandStub, haven't checked yet tho.
- //{ "f|force", "When switching branches, proceed even if the index or the working tree differs from HEAD", v => cmd.Force = true },
- //{ "ours", "When checking out paths from the index, check out stage #2 ('ours') or #3 ('theirs') for unmerged paths", v => cmd.Ours = true },
- //{ "theirs", "When checking out paths from the index, check out stage #2 ('ours') or #3 ('theirs') for unmerged paths", v => cmd.Theirs = true },
- //{ "b=", "Create a new branch named <new_branch> and start it at <start_point>; see linkgit:git-branch[1] for details", v => cmd.B = v },
- //{ "t|track", "When creating a new branch, set up "upstream" configuration", v => cmd.Track = true },
- //{ "no-track", "Do not set up "upstream" configuration, even if the branch", v => cmd.NoTrack = true },
- //{ "l", "Create the new branch's reflog; see linkgit:git-branch[1] for details", v => cmd.L = true },
- //{ "m|merge", "When switching branches, if you have local modifications to one or more files that are different between the current branch and the branch to which you are switching, the command refuses to switch branches in order to preserve your modifications in context", v => cmd.Merge = true },
- //{ "conflict=", "The same as --merge option above, but changes the way the conflicting hunks are presented, overriding the merge", v => cmd.Conflict = v },
- //{ "p|patch", "Interactively select hunks in the difference between the <tree-ish> (or the index, if unspecified) and the working tree", v => cmd.Patch = true },
-#endif
- };
-
- try
- {
- List<String> arguments = ParseOptions(args);
- if ((arguments.Count > 0) || (args.Length <=0))
- {
- //Checkout the new repository
- cmd.Arguments = arguments;
- cmd.Execute();
-
- if (!cmd.Quiet)
- {
- //Display FileNotFound errors, but process checkout request for all found files first.
- foreach (string file in cmd.Results.FileNotFoundList)
- OutputStream.WriteLine("error: pathspec '" + file + "' did not match any file(s) known to GitSharp.");
- }
- }
- else
- {
- OfflineHelp();
- }
- } catch (OptionException e) {
- Console.WriteLine(e.Message);
- }
- }
-
- private void OfflineHelp()
- {
- if (!isHelp)
- {
- isHelp = true;
- Console.WriteLine("usage:");
- Console.WriteLine(" git checkout [-q] [-f] [-m] [<branch>]");
- Console.WriteLine(" git checkout [-q] [-f] [-m] [-b <new_branch>] [<start_point>]");
- Console.WriteLine(" git checkout [-f|--ours|--theirs|-m|--conflict=<style>] [<tree-ish>] [--] <paths>...");
- Console.WriteLine(" git checkout --patch [<tree-ish>] [--] [<paths>...]");
- Console.WriteLine("\nThe available options for this command are:\n");
- Console.WriteLine();
- options.WriteOptionDescriptions(Console.Out);
- Console.WriteLine();
- }
- }
-
- private void RefLog()
- {
- }
-
- private void Patch(String treeish)
- {
- }
- }
-}
+/*
+ * Copyright (C) 2008, Shawn O. Pearce <spearce@spearce.org>
+ * Copyright (C) 2009, Rolenun <rolenun@gmail.com>
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or
+ * without modification, are permitted provided that the following
+ * conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following
+ * disclaimer in the documentation and/or other materials provided
+ * with the distribution.
+ *
+ * - Neither the name of the Git Development Community nor the
+ * names of its contributors may be used to endorse or promote
+ * products derived from this software without specific prior
+ * written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
+ * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+using System;
+using System.Collections.Generic;
+using System.Text;
+using NDesk.Options;
+using GitSharp.Commands;
+
+namespace GitSharp.CLI
+{
+ [Command(complete = false, common = true, requiresRepository = true, usage = "Checkout a branch or paths to the working tree")]
+ public class Checkout : TextBuiltin
+ {
+ private CheckoutCommand cmd = new CheckoutCommand();
+
+ private static Boolean isHelp = false;
+
+#if ported
+ private static Boolean isQuiet = false;
+ private static Boolean isForced = false;
+ private static Boolean isTracked = false;
+ private static Boolean isNoTrack = false;
+ private static Boolean isMerging = false;
+ private static Boolean isOurs = false;
+ private static Boolean isTheirs = false;
+ private static Boolean isConflict = false;
+ private static string branchName = "";
+#endif
+
+ override public void Run(string[] args)
+ {
+ options = new CmdParserOptionSet()
+ {
+ { "h|help", "Display this help information. To see online help, use: git help <command>", v=>OfflineHelp()},
+ { "q|quiet", "Quiet, suppress feedback messages", v => cmd.Quiet = false },
+#if ported
+ { "f|force", "Force checkout and ignore unmerged changes", v=>{isForced = true;}},
+ { "ours", "For unmerged paths, checkout stage #2 from the index", v=>{isOurs = true;}},
+ { "theirs", "For unmerged paths, checkout stage #3 from the index", v=>{isTheirs = true;}},
+ { "b|branch=", "Create a new {branch}",(string v) => branchName = v },
+ { "t|track", "Set the upstream configuration", v=>{isTracked = true;}},
+ { "no-track", "Do not set the upstream configuration", v=>{isNoTrack = true;}},
+ { "l", "Create the new branch's reflog", v=>RefLog()},
+ { "m|merge", "Perform a three-way merge between the current branch, your working tree contents " +
+ "and the new branch", v=>{isMerging = true;}},
+ { "conflict","Same as merge above, but changes how the conflicting hunks are presented", isConflict = true},
+ { "p|patch", "Creates a diff and applies it in reverse order to the working tree", v=>Patch()}
+
+ // [Mr Happy] this should be compatible w/ the CommandStub, haven't checked yet tho.
+ //{ "f|force", "When switching branches, proceed even if the index or the working tree differs from HEAD", v => cmd.Force = true },
+ //{ "ours", "When checking out paths from the index, check out stage #2 ('ours') or #3 ('theirs') for unmerged paths", v => cmd.Ours = true },
+ //{ "theirs", "When checking out paths from the index, check out stage #2 ('ours') or #3 ('theirs') for unmerged paths", v => cmd.Theirs = true },
+ //{ "b=", "Create a new branch named <new_branch> and start it at <start_point>; see linkgit:git-branch[1] for details", v => cmd.B = v },
+ //{ "t|track", "When creating a new branch, set up "upstream" configuration", v => cmd.Track = true },
+ //{ "no-track", "Do not set up "upstream" configuration, even if the branch", v => cmd.NoTrack = true },
+ //{ "l", "Create the new branch's reflog; see linkgit:git-branch[1] for details", v => cmd.L = true },
+ //{ "m|merge", "When switching branches, if you have local modifications to one or more files that are different between the current branch and the branch to which you are switching, the command refuses to switch branches in order to preserve your modifications in context", v => cmd.Merge = true },
+ //{ "conflict=", "The same as --merge option above, but changes the way the conflicting hunks are presented, overriding the merge", v => cmd.Conflict = v },
+ //{ "p|patch", "Interactively select hunks in the difference between the <tree-ish> (or the index, if unspecified) and the working tree", v => cmd.Patch = true },
+#endif
+ };
+
+ try
+ {
+ List<String> arguments = ParseOptions(args);
+ if ((arguments.Count > 0) || (args.Length <=0))
+ {
+ //Checkout the new repository
+ cmd.Arguments = arguments;
+ cmd.Execute();
+
+ if (!cmd.Quiet)
+ {
+ //Display FileNotFound errors, but process checkout request for all found files first.
+ foreach (string file in cmd.Results.FileNotFoundList)
+ OutputStream.WriteLine("error: pathspec '" + file + "' did not match any file(s) known to GitSharp.");
+ }
+ }
+ else
+ {
+ OfflineHelp();
+ }
+ } catch (OptionException e) {
+ Console.WriteLine(e.Message);
+ }
+ }
+
+ private void OfflineHelp()
+ {
+ if (!isHelp)
+ {
+ isHelp = true;
+ Console.WriteLine("usage:");
+ Console.WriteLine(" git checkout [-q] [-f] [-m] [<branch>]");
+ Console.WriteLine(" git checkout [-q] [-f] [-m] [-b <new_branch>] [<start_point>]");
+ Console.WriteLine(" git checkout [-f|--ours|--theirs|-m|--conflict=<style>] [<tree-ish>] [--] <paths>...");
+ Console.WriteLine(" git checkout --patch [<tree-ish>] [--] [<paths>...]");
+ Console.WriteLine("\nThe available options for this command are:\n");
+ Console.WriteLine();
+ options.WriteOptionDescriptions(Console.Out);
+ Console.WriteLine();
+ }
+ }
+
+ private void RefLog()
+ {
+ }
+
+ private void Patch(String treeish)
+ {
+ }
+ }
+}
View
324 Git/Commands/Commit.cs
@@ -1,162 +1,162 @@
-/*
- * Copyright (C) 2008, Shawn O. Pearce <spearce@spearce.org>
- * Copyright (C) 2009, Rolenun <rolenun@gmail.com>
- *
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or
- * without modification, are permitted provided that the following
- * conditions are met:
- *
- * - Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * - Redistributions in binary form must reproduce the above
- * copyright notice, this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided
- * with the distribution.
- *
- * - Neither the name of the Git Development Community nor the
- * names of its contributors may be used to endorse or promote
- * products derived from this software without specific prior
- * written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
- * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
- * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
- * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
- * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-using System;
-using System.Collections.Generic;
-using NDesk.Options;
-
-namespace GitSharp.CLI
-{
- [Command(complete = false, common = true, usage = "Record changes to the repository")]
- class Commit : TextBuiltin
- {
- private static Boolean isHelp = false;
-
-#if ported
- private static Boolean isCommitAll = false;
- private static String reUseMessage = "";
- private static String reEditMessage = "";
- private static String cleanupOption = "default";
- private static String untrackedFileMode = "all";
- private static String message = "";
- private static String author = "";
- private static String logFile = "";
- private static String templateFile = "";
- private static Boolean isSignOff= false;
- private static Boolean isNoVerify = false;
- private static Boolean isAllowEmpty = false;
- private static Boolean isAmend = false;
- private static Boolean isForceEdit = false;
- private static Boolean isInclude = false;
- private static Boolean isCommitOnly = false;
- private static Boolean isInteractive = false;
- private static Boolean isVerbose = false;
- private static Boolean isQuiet = false;
- private static Boolean isDryRun = false;
-#endif
-
- override public void Run(String[] args)
- {
- options = new CmdParserOptionSet()
- {
- { "h|help", "Display this help information. To see online help, use: git help <command>", v=>OfflineHelp()},
-#if ported
- { "v|verbose", "Be verbose", v=>{isVerbose = true;}},
- { "q|quiet", "Be quiet", v=>{isQuiet = true;}},
- { "F|file=", "Read log from {file}", (string v) => logFile = v },
- { "author=", "Override {author} for commit", (string v) => author = v },
- { "m|message=", "Specify commit {message}", (string v) => message = v },
- { "c|reedit-message=", "Reuse and edit {message} from specified commit", (string v) => reEditMessage = v },
- { "C|reuse-message=", "Reuse {message} from specified commit", (string v) => reUseMessage = v },
- { "s|signoff", "Add Signed-off-by:", v=>{isSignOff = true;}},
- { "t|template=", "Use specified {template} file", (string v) => templateFile = v },
- { "e|edit", "Force edit of commit", v=>{isForceEdit = true;}},
- { "a|all", "Commit all changed files.", v=>{isCommitAll = true;}},
- { "i|include", "Add specified files to index for commit", v=>{isInclude = true;}},
- { "interactive", "Interactively add files", v=>{isInteractive = true;}},
- { "o|only", "Commit only specified files", v=>{isCommitOnly = true;}},
- { "n|no-verify", "Bypass pre-commit hook", v=>{isNoVerify = true;}},
- { "amend", "Amend previous commit", v=>{isAmend = true;}},
- { "u|untracked-files=", "Show untracked files, optional {MODE}s: all, normal, no.", (string v) => untrackedFileMode = v },
- { "allow-empty", "Ok to record an empty change", v=> {isAllowEmpty = true;}},
- { "cleanup=", "How to strip spaces and #comments from message. Options are: " +
- "verbatim, whitespace, strip, and default.", (string v) => cleanupOption = v },
- { "dry-run", "Don't actually commit the files, just show if they exist.", v=>{isDryRun = true;}},
-
-
- // [Mr Happy] There are the options that should be compatible w/ the stub, placed for convenience only.
- // { "h|help", "Display this help information. To see online help, use: git help <command>", v=>OfflineHelp()},
- // { "a|all", "Tell the command to automatically stage files that have been modified and deleted, but new files you have not told git about are not affected", v => cmd.All = true },
- // { "C|reuse-message=", "Take an existing commit object, and reuse the log message and the authorship information (including the timestamp) when creating the commit", v => cmd.ReuseMessage = v },
- // { "c|reedit-message=", "Like '-C', but with '-c' the editor is invoked, so that the user can further edit the commit message", v => cmd.ReeditMessage = v },
- // { "reset-author", "When used with -C/-c/--amend options, declare that the authorship of the resulting commit now belongs of the committer", v => cmd.ResetAuthor = true },
- // { "F|file=", "Take the commit message from the given file", v => cmd.File = v },
- // { "author=", "Override the author name used in the commit", v => cmd.Author = v },
- // { "m|message=", "Use the given <msg> as the commit message", v => cmd.Message = v },
- // { "t|template=", "Use the contents of the given file as the initial version of the commit message", v => cmd.Template = v },
- // { "s|signoff", "Add Signed-off-by line by the committer at the end of the commit log message", v => cmd.Signoff = true },
- // { "n|no-verify", "This option bypasses the pre-commit and commit-msg hooks", v => cmd.NoVerify = true },
- // { "allow-empty", "Usually recording a commit that has the exact same tree as its sole parent commit is a mistake, and the command prevents you from making such a commit", v => cmd.AllowEmpty = true },
- // { "cleanup=", "This option sets how the commit message is cleaned up", v => cmd.Cleanup = v },
- // { "e|edit", "The message taken from file with `-F`, command line with `-m`, and from file with `-C` are usually used as the commit log message unmodified", v => cmd.Edit = true },
- // { "amend", "Used to amend the tip of the current branch", v => cmd.Amend = true },
- #endif
- };
-
- try
- {
- List<String> arguments = ParseOptions(args);
- if (arguments.Count > 0)
- {
- //Execute the commit using the specified file pattern
- DoCommit(arguments[0]);
- }
- else if (args.Length <= 0)
- {
- //Display status if no changes are added to commit
- //If changes have been made, commit them?
- Console.WriteLine("These commands still need to be implemented.");
- }
- else
- {
- OfflineHelp();
- }
- }
- catch (OptionException e)
- {
- Console.WriteLine(e.Message);
- }
- }
-
- private void OfflineHelp()
- {
- if (!isHelp)
- {
- isHelp = true;
- Console.WriteLine("usage: git commit [options] [--] <filepattern>...");
- Console.WriteLine();
- options.WriteOptionDescriptions(Console.Out);
- }
- }
-
- public void DoCommit(String filepattern)
- {
- Console.WriteLine("This command still needs to be implemented.");
- }
- }
-}
+/*
+ * Copyright (C) 2008, Shawn O. Pearce <spearce@spearce.org>
+ * Copyright (C) 2009, Rolenun <rolenun@gmail.com>
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or
+ * without modification, are permitted provided that the following
+ * conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following
+ * disclaimer in the documentation and/or other materials provided
+ * with the distribution.
+ *
+ * - Neither the name of the Git Development Community nor the
+ * names of its contributors may be used to endorse or promote
+ * products derived from this software without specific prior
+ * written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
+ * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+using System;
+using System.Collections.Generic;
+using NDesk.Options;
+
+namespace GitSharp.CLI
+{
+ [Command(complete = false, common = true, usage = "Record changes to the repository")]
+ class Commit : TextBuiltin
+ {
+ private static Boolean isHelp = false;
+
+#if ported
+ private static Boolean isCommitAll = false;
+ private static String reUseMessage = "";
+ private static String reEditMessage = "";
+ private static String cleanupOption = "default";
+ private static String untrackedFileMode = "all";
+ private static String message = "";
+ private static String author = "";
+ private static String logFile = "";
+ private static String templateFile = "";
+ private static Boolean isSignOff= false;
+ private static Boolean isNoVerify = false;
+ private static Boolean isAllowEmpty = false;
+ private static Boolean isAmend = false;
+ private static Boolean isForceEdit = false;
+ private static Boolean isInclude = false;
+ private static Boolean isCommitOnly = false;
+ private static Boolean isInteractive = false;
+ private static Boolean isVerbose = false;
+ private static Boolean isQuiet = false;
+ private static Boolean isDryRun = false;
+#endif
+
+ override public void Run(String[] args)
+ {
+ options = new CmdParserOptionSet()
+ {
+ { "h|help", "Display this help information. To see online help, use: git help <command>", v=>OfflineHelp()},
+#if ported
+ { "v|verbose", "Be verbose", v=>{isVerbose = true;}},
+ { "q|quiet", "Be quiet", v=>{isQuiet = true;}},
+ { "F|file=", "Read log from {file}", (string v) => logFile = v },
+ { "author=", "Override {author} for commit", (string v) => author = v },
+ { "m|message=", "Specify commit {message}", (string v) => message = v },
+ { "c|reedit-message=", "Reuse and edit {message} from specified commit", (string v) => reEditMessage = v },
+ { "C|reuse-message=", "Reuse {message} from specified commit", (string v) => reUseMessage = v },
+ { "s|signoff", "Add Signed-off-by:", v=>{isSignOff = true;}},
+ { "t|template=", "Use specified {template} file", (string v) => templateFile = v },
+ { "e|edit", "Force edit of commit", v=>{isForceEdit = true;}},
+ { "a|all", "Commit all changed files.", v=>{isCommitAll = true;}},
+ { "i|include", "Add specified files to index for commit", v=>{isInclude = true;}},
+ { "interactive", "Interactively add files", v=>{isInteractive = true;}},
+ { "o|only", "Commit only specified files", v=>{isCommitOnly = true;}},
+ { "n|no-verify", "Bypass pre-commit hook", v=>{isNoVerify = true;}},
+ { "amend", "Amend previous commit", v=>{isAmend = true;}},
+ { "u|untracked-files=", "Show untracked files, optional {MODE}s: all, normal, no.", (string v) => untrackedFileMode = v },
+ { "allow-empty", "Ok to record an empty change", v=> {isAllowEmpty = true;}},
+ { "cleanup=", "How to strip spaces and #comments from message. Options are: " +
+ "verbatim, whitespace, strip, and default.", (string v) => cleanupOption = v },
+ { "dry-run", "Don't actually commit the files, just show if they exist.", v=>{isDryRun = true;}},
+
+
+ // [Mr Happy] There are the options that should be compatible w/ the stub, placed for convenience only.
+ // { "h|help", "Display this help information. To see online help, use: git help <command>", v=>OfflineHelp()},
+ // { "a|all", "Tell the command to automatically stage files that have been modified and deleted, but new files you have not told git about are not affected", v => cmd.All = true },
+ // { "C|reuse-message=", "Take an existing commit object, and reuse the log message and the authorship information (including the timestamp) when creating the commit", v => cmd.ReuseMessage = v },
+ // { "c|reedit-message=", "Like '-C', but with '-c' the editor is invoked, so that the user can further edit the commit message", v => cmd.ReeditMessage = v },
+ // { "reset-author", "When used with -C/-c/--amend options, declare that the authorship of the resulting commit now belongs of the committer", v => cmd.ResetAuthor = true },
+ // { "F|file=", "Take the commit message from the given file", v => cmd.File = v },
+ // { "author=", "Override the author name used in the commit", v => cmd.Author = v },
+ // { "m|message=", "Use the given <msg> as the commit message", v => cmd.Message = v },
+ // { "t|template=", "Use the contents of the given file as the initial version of the commit message", v => cmd.Template = v },
+ // { "s|signoff", "Add Signed-off-by line by the committer at the end of the commit log message", v => cmd.Signoff = true },
+ // { "n|no-verify", "This option bypasses the pre-commit and commit-msg hooks", v => cmd.NoVerify = true },
+ // { "allow-empty", "Usually recording a commit that has the exact same tree as its sole parent commit is a mistake, and the command prevents you from making such a commit", v => cmd.AllowEmpty = true },
+ // { "cleanup=", "This option sets how the commit message is cleaned up", v => cmd.Cleanup = v },
+ // { "e|edit", "The message taken from file with `-F`, command line with `-m`, and from file with `-C` are usually used as the commit log message unmodified", v => cmd.Edit = true },
+ // { "amend", "Used to amend the tip of the current branch", v => cmd.Amend = true },
+ #endif
+ };
+
+ try
+ {
+ List<String> arguments = ParseOptions(args);
+ if (arguments.Count > 0)
+ {
+ //Execute the commit using the specified file pattern
+ DoCommit(arguments[0]);
+ }
+ else if (args.Length <= 0)
+ {
+ //Display status if no changes are added to commit
+ //If changes have been made, commit them?
+ Console.WriteLine("These commands still need to be implemented.");
+ }
+ else
+ {
+ OfflineHelp();
+ }
+ }
+ catch (OptionException e)
+ {
+ Console.WriteLine(e.Message);
+ }
+ }
+
+ private void OfflineHelp()
+ {
+ if (!isHelp)
+ {
+ isHelp = true;
+ Console.WriteLine("usage: git commit [options] [--] <filepattern>...");
+ Console.WriteLine();
+ options.WriteOptionDescriptions(Console.Out);
+ }
+ }
+
+ public void DoCommit(String filepattern)
+ {
+ Console.WriteLine("This command still needs to be implemented.");
+ }
+ }
+}
View
4 Git/Commands/Config.cs
@@ -37,8 +37,8 @@
*/
using System;
-using System.Collections.Generic;
-using GitSharp.Commands;
+using System.Collections.Generic;
+using GitSharp.Commands;
using NDesk.Options;
View
246 Git/Commands/Fetch.cs
@@ -1,123 +1,123 @@
-/*
- * Copyright (C) 2008, Shawn O. Pearce <spearce@spearce.org>
- * Copyright (C) 2009, Rolenun <rolenun@gmail.com>
- *
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or
- * without modification, are permitted provided that the following
- * conditions are met:
- *
- * - Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * - Redistributions in binary form must reproduce the above
- * copyright notice, this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided
- * with the distribution.
- *
- * - Neither the name of the Git Development Community nor the
- * names of its contributors may be used to endorse or promote
- * products derived from this software without specific prior
- * written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
- * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
- * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
- * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
- * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-using System;
-using System.Collections.Generic;
-using NDesk.Options;
-
-namespace GitSharp.CLI
-{
- [Command(complete = false, common = true, usage = "Download objects and refs from another repository")]
- class Fetch : TextBuiltin
- {
- private static Boolean isHelp = false;
-
-#if ported
- private static Boolean isQuiet = false;
- private static Boolean isVerbose = false;
- private static Boolean isAppend = false;
- private static String uploadPack = "";
- private static Boolean isForced = false;
- private static Boolean isTags = false;
- private static Boolean isNoTags = false;
- private static Boolean isKeep = false;
- private static Boolean isUpdateHeadOk = false;
- private static Int32 depth = 0;
-#endif
-
- override public void Run(String[] args)
- {
- options = new CmdParserOptionSet()
- {
- { "h|help", "Display this help information. To see online help, use: git help <command>", v=>OfflineHelp()},
-
-#if ported
- { "q|quiet", "Be quiet", v=>{isQuiet = true;}},
- { "v|verbose", "Be verbose", v=>{isVerbose = true;}},
- { "append", "Append to .git/FETCH_HEAD instead of overwriting", v=>{isAppend = true;}},
- { "upload-pack=", "{Path} to upload pack on remote end", (string v) => uploadPack = v },
- { "force", "Force overwrite of local branch", v=> {isForced = true;}},
- { "tags", "Fetch all tags and associated objects", v=>{isTags = true;} },
- { "no-tags", "Disable tags from being fetched and stored locally", v=>{isNoTags = true;}},
- { "k|keep", "Keep download pack", v=>{isKeep = true;}},
- { "u|update-head-ok", "Allow updating of HEAD ref", v=>{isUpdateHeadOk = true;}},
- { "depth=", "Deepen the history of a shallow repository created by git clone", (int v) => depth = v },
-#endif
- };
-
- try
- {
- List<String> arguments = ParseOptions(args);
- if (arguments.Count > 0)
- {
- DoFetch(arguments);
- }
- else if (args.Length <= 0)
- {
- // DoFetch with preset arguments
- Console.WriteLine("This command still needs to be implemented.");
-
- }
- else
- {
- OfflineHelp();
- }
- }
- catch (OptionException e)
- {
- Console.WriteLine(e.Message);
- }
- }
-
- private void OfflineHelp()
- {
- if (!isHelp)
- {
- isHelp = true;
- Console.WriteLine("usage: git fetch [options] [<repository> <refspec>...]");
- Console.WriteLine();
- options.WriteOptionDescriptions(Console.Out);
- }
- }
-
- private void DoFetch(List<String> args)
- {
- Console.WriteLine("This command still needs to be implemented.");
- }
- }
-}
+/*
+ * Copyright (C) 2008, Shawn O. Pearce <spearce@spearce.org>
+ * Copyright (C) 2009, Rolenun <rolenun@gmail.com>
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or
+ * without modification, are permitted provided that the following
+ * conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following
+ * disclaimer in the documentation and/or other materials provided
+ * with the distribution.
+ *
+ * - Neither the name of the Git Development Community nor the
+ * names of its contributors may be used to endorse or promote
+ * products derived from this software without specific prior
+ * written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
+ * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+using System;
+using System.Collections.Generic;
+using NDesk.Options;
+
+namespace GitSharp.CLI
+{
+ [Command(complete = false, common = true, usage = "Download objects and refs from another repository")]
+ class Fetch : TextBuiltin
+ {
+ private static Boolean isHelp = false;
+
+#if ported
+ private static Boolean isQuiet = false;
+ private static Boolean isVerbose = false;
+ private static Boolean isAppend = false;
+ private static String uploadPack = "";
+ private static Boolean isForced = false;
+ private static Boolean isTags = false;
+ private static Boolean isNoTags = false;
+ private static Boolean isKeep = false;
+ private static Boolean isUpdateHeadOk = false;
+ private static Int32 depth = 0;
+#endif
+
+ override public void Run(String[] args)
+ {
+ options = new CmdParserOptionSet()
+ {
+ { "h|help", "Display this help information. To see online help, use: git help <command>", v=>OfflineHelp()},
+
+#if ported
+ { "q|quiet", "Be quiet", v=>{isQuiet = true;}},
+ { "v|verbose", "Be verbose", v=>{isVerbose = true;}},
+ { "append", "Append to .git/FETCH_HEAD instead of overwriting", v=>{isAppend = true;}},
+ { "upload-pack=", "{Path} to upload pack on remote end", (string v) => uploadPack = v },
+ { "force", "Force overwrite of local branch", v=> {isForced = true;}},
+ { "tags", "Fetch all tags and associated objects", v=>{isTags = true;} },
+ { "no-tags", "Disable tags from being fetched and stored locally", v=>{isNoTags = true;}},
+ { "k|keep", "Keep download pack", v=>{isKeep = true;}},
+ { "u|update-head-ok", "Allow updating of HEAD ref", v=>{isUpdateHeadOk = true;}},
+ { "depth=", "Deepen the history of a shallow repository created by git clone", (int v) => depth = v },
+#endif
+ };
+
+ try
+ {
+ List<String> arguments = ParseOptions(args);
+ if (arguments.Count > 0)
+ {
+ DoFetch(arguments);
+ }
+ else if (args.Length <= 0)
+ {
+ // DoFetch with preset arguments
+ Console.WriteLine("This command still needs to be implemented.");
+
+ }
+ else
+ {
+ OfflineHelp();
+ }
+ }
+ catch (OptionException e)
+ {
+ Console.WriteLine(e.Message);
+ }
+ }
+
+ private void OfflineHelp()
+ {
+ if (!isHelp)
+ {
+ isHelp = true;
+ Console.WriteLine("usage: git fetch [options] [<repository> <refspec>...]");
+ Console.WriteLine();
+ options.WriteOptionDescriptions(Console.Out);
+ }
+ }
+
+ private void DoFetch(List<String> args)
+ {
+ Console.WriteLine("This command still needs to be implemented.");
+ }
+ }
+}
View
150 Git/Commands/Help.cs
@@ -1,75 +1,75 @@
-/*
- * Copyright (C) 2008, Shawn O. Pearce <spearce@spearce.org>
- * Copyright (C) 2009, Henon <meinrad.recheis@gmail.com>
- *
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or
- * without modification, are permitted provided that the following
- * conditions are met:
- *
- * - Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * - Redistributions in binary form must reproduce the above
- * copyright notice, this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided
- * with the distribution.
- *
- * - Neither the name of the Git Development Community nor the
- * names of its contributors may be used to endorse or promote
- * products derived from this software without specific prior
- * written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
- * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
- * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
- * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
- * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-using System;
-using System.Linq;
-
-namespace GitSharp.CLI.Nonstandard
-{
- [Command(complete = false, common = true, usage = "Displays the online help for the command. Use --help for offline options")]
- class Help : TextBuiltin
- {
-
- override public void Run(String[] args)
- {
- CommandCatalog catalog = new CommandCatalog();
- if (args.Length > 0)
- {
- CommandRef subcommand = catalog.Get(args[0]);
- if (subcommand != null)
- {
- TextBuiltin cmd = subcommand.Create();
- cmd.OnlineHelp();
- }
- else
- {
- OfflineHelp();
- }
- }
- else
- {
- OfflineHelp();
- }
- }
-
- private static void OfflineHelp()
- {
- Console.WriteLine("usage: git help <command> ");
- }
- }
-}
+/*
+ * Copyright (C) 2008, Shawn O. Pearce <spearce@spearce.org>
+ * Copyright (C) 2009, Henon <meinrad.recheis@gmail.com>
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or
+ * without modification, are permitted provided that the following
+ * conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following
+ * disclaimer in the documentation and/or other materials provided
+ * with the distribution.
+ *
+ * - Neither the name of the Git Development Community nor the
+ * names of its contributors may be used to endorse or promote
+ * products derived from this software without specific prior
+ * written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
+ * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+using System;
+using System.Linq;
+
+namespace GitSharp.CLI.Nonstandard
+{
+ [Command(complete = false, common = true, usage = "Displays the online help for the command. Use --help for offline options")]
+ class Help : TextBuiltin
+ {
+
+ override public void Run(String[] args)
+ {
+ CommandCatalog catalog = new CommandCatalog();
+ if (args.Length > 0)
+ {
+ CommandRef subcommand = catalog.Get(args[0]);
+ if (subcommand != null)
+ {
+ TextBuiltin cmd = subcommand.Create();
+ cmd.OnlineHelp();
+ }
+ else
+ {
+ OfflineHelp();
+ }
+ }
+ else
+ {
+ OfflineHelp();
+ }
+ }
+
+ private static void OfflineHelp()
+ {
+ Console.WriteLine("usage: git help <command> ");
+ }
+ }
+}
View
198 Git/Commands/Init.cs
@@ -1,100 +1,100 @@
-/*
- * Copyright (C) 2008, Google Inc.
- * Copyright (C) 2009, Henon <meinrad.recheis@gmail.com>
- *
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or
- * without modification, are permitted provided that the following
- * conditions are met:
- *
- * - Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * - Redistributions in binary form must reproduce the above
- * copyright notice, this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided
- * with the distribution.
- *
- * - Neither the name of the Git Development Community nor the
- * names of its contributors may be used to endorse or promote
- * products derived from this software without specific prior
- * written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
- * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
- * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
- * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
- * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-using System;
-using System.Collections.Generic;
-using System.IO;
-using GitSharp.Commands;
-
-namespace GitSharp.CLI
-{
-
- [Command(common = true, complete = false, usage = "Create an empty git repository")]
- class Init : TextBuiltin
- {
- private InitCommand cmd = new InitCommand();
-
- private static Boolean isHelp = false;
-
- public override void Run(string[] args)
- {
- cmd.Quiet = false; // [henon] the api defines the commands quiet by default. thus we need to override with git's default here.
-
- options = new CmdParserOptionSet
- {
- {"bare", "Create a bare repository", v => cmd.Bare = true},
- {"quiet|q", "Only print error and warning messages, all other output will be suppressed.", v => cmd.Quiet = true},
- {"template", "Not supported.", var => OutputStream.WriteLine("--template=<template dir> is not supported")},
- {"shared", "Not supported.", var => OutputStream.WriteLine("--shared is not supported")},
- };
-
- try
- {
- List<String> arguments = ParseOptions(args);
- cmd.Execute();
- cmd.OutputStream.WriteLine(cmd.Repository.Directory);
- }
- catch (Exception e)
- {
- cmd.OutputStream.WriteLine(e.Message);
- }
-
- }
-
- private void OfflineHelp()
- {
- if (!isHelp)
- {
- isHelp = true;
- cmd.OutputStream.WriteLine("usage: git init [options] [directory]");
- cmd.OutputStream.WriteLine();
- options.WriteOptionDescriptions(Console.Out);
- cmd.OutputStream.WriteLine();
- }
- }
- //private void create()
- //{
- // if (gitdir == null)
- // gitdir = bare ? Environment.CurrentDirectory : Path.Combine(Environment.CurrentDirectory, Constants.DOT_GIT);
- // db = new Repository(new DirectoryInfo(gitdir));
- // db.Create(bare);
- // Console.WriteLine("Initialized empty Git repository in " + (new DirectoryInfo(gitdir)).FullName);
- //}
- }
-
+/*
+ * Copyright (C) 2008, Google Inc.
+ * Copyright (C) 2009, Henon <meinrad.recheis@gmail.com>
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or
+ * without modification, are permitted provided that the following
+ * conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following
+ * disclaimer in the documentation and/or other materials provided
+ * with the distribution.
+ *
+ * - Neither the name of the Git Development Community nor the
+ * names of its contributors may be used to endorse or promote
+ * products derived from this software without specific prior
+ * written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
+ * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+using System;
+using System.Collections.Generic;
+using System.IO;
+using GitSharp.Commands;
+
+namespace GitSharp.CLI
+{
+
+ [Command(common = true, complete = false, usage = "Create an empty git repository")]
+ class Init : TextBuiltin
+ {
+ private InitCommand cmd = new InitCommand();
+
+ private static Boolean isHelp = false;
+
+ public override void Run(string[] args)
+ {
+ cmd.Quiet = false; // [henon] the api defines the commands quiet by default. thus we need to override with git's default here.
+
+ options = new CmdParserOptionSet
+ {
+ {"bare", "Create a bare repository", v => cmd.Bare = true},
+ {"quiet|q", "Only print error and warning messages, all other output will be suppressed.", v => cmd.Quiet = true},
+ {"template", "Not supported.", var => OutputStream.WriteLine("--template=<template dir> is not supported")},
+ {"shared", "Not supported.", var => OutputStream.WriteLine("--shared is not supported")},
+ };
+
+ try
+ {
+ List<String> arguments = ParseOptions(args);
+ cmd.Execute();
+ cmd.OutputStream.WriteLine(cmd.Repository.Directory);
+ }
+ catch (Exception e)
+ {
+ cmd.OutputStream.WriteLine(e.Message);
+ }
+
+ }
+
+ private void OfflineHelp()
+ {
+ if (!isHelp)
+ {
+ isHelp = true;
+ cmd.OutputStream.WriteLine("usage: git init [options] [directory]");
+ cmd.OutputStream.WriteLine();
+ options.WriteOptionDescriptions(Console.Out);
+ cmd.OutputStream.WriteLine();
+ }
+ }
+ //private void create()
+ //{
+ // if (gitdir == null)
+ // gitdir = bare ? Environment.CurrentDirectory : Path.Combine(Environment.CurrentDirectory, Constants.DOT_GIT);
+ // db = new Repository(new DirectoryInfo(gitdir));
+ // db.Create(bare);
+ // Console.WriteLine("Initialized empty Git repository in " + (new DirectoryInfo(gitdir)).FullName);
+ //}
+ }
+
}
View
310 Git/Commands/Log.cs
@@ -1,155 +1,155 @@
-/*
- * Copyright (C) 2010, Dominique van de Vorle <dvdvorle@gmail.com>
- * Copyright (C) 2010, Andrew Cooper <andymancooper@gmail.com>
- *
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or
- * without modification, are permitted provided that the following
- * conditions are met:
- *
- * - Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * - Redistributions in binary form must reproduce the above
- * copyright notice, this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided
- * with the distribution.
- *
- * - Neither the name of the Git Development Community nor the
- * names of its contributors may be used to endorse or promote
- * products derived from this software without specific prior
- * written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
- * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
- * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
- * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
- * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-using GitSharp.Commands;
-using System;
-using System.Collections.Generic;
-using System.IO;
-using System.Linq;
-
-namespace GitSharp.CLI
-{
-
- [Command(common=true, requiresRepository=true, usage = "")]
- public class Log : TextBuiltin
- {
- private LogCommand cmd = new LogCommand();
- private static Boolean isHelp;
-
- public override void Run(string[] args)