Permalink
Browse files

removed FmtMergeMsgCommand and added it to the list of unsupported AP…

…I commands...

Instead the functionality will be modelled as static method of MergeCommand; ie. MergeCommand.FormatMergeMessage(...)
  • Loading branch information...
1 parent 157fd0c commit f6844d92bb76a5bd35e945c48e54248485b61c12 @henon henon committed Mar 21, 2010
Showing with 20 additions and 121 deletions.
  1. +17 −12 Git/FmtMergeMsg.cs
  2. +0 −109 GitSharp/Commands/FmtMergeMsgCommand.cs
  3. +3 −0 GitSharp/Commands/_NotSupportedCommands.txt
View
@@ -46,7 +46,7 @@ namespace GitSharp.CLI
[Command(common=true, requiresRepository=true, usage = "")]
public class Fmtmergemsg : TextBuiltin
{
- private FmtMergeMsgCommand cmd = new FmtMergeMsgCommand();
+ private MergeOptions cmd = new MergeOptions();
private static Boolean isHelp;
public override void Run(string[] args)
@@ -55,19 +55,24 @@ public override void Run(string[] args)
{
{ "h|help", "Display this help information. To see online help, use: git help <command>", v=>OfflineHelp()},
{ "log", "In addition to branch names, populate the log message with one-line descriptions from the actual commits that are being merged", v => cmd.Log = true },
- { "no-log", "Do not list one-line descriptions from the actual commits being merged", v => cmd.NoLog = true },
- { "summary", "Synonyms to --log and --no-log; these are deprecated and will be removed in the future", v => cmd.Summary = true },
- { "no-summary", "Synonyms to --log and --no-log; these are deprecated and will be removed in the future", v => cmd.NoSummary = true },
- { "F|file=", "Take the list of merged objects from <file> instead of stdin", v => cmd.File = v },
+ { "no-log", "Do not list one-line descriptions from the actual commits being merged", v => cmd.Log = false },
+ // [obsolete]
+ //{ "summary", "Synonyms to --log and --no-log; these are deprecated and will be removed in the future", v => cmd.Summary = true },
+ //{ "no-summary", "Synonyms to --log and --no-log; these are deprecated and will be removed in the future", v => cmd.NoSummary = true },
+ { "F|file=", "Take the list of merged objects from <file> instead of stdin", v =>
+ {
+ //cmd.File = v
+ }
+ },
};
try
{
List<String> Arguments = ParseOptions(args);
if (arguments.Count > 0)
{
- cmd.Arguments = arguments;
- cmd.Execute();
+ //cmd.Arguments = arguments;
+ //cmd.Execute();
}
else
{
@@ -76,7 +81,7 @@ public override void Run(string[] args)
}
catch (Exception e)
{
- cmd.OutputStream.WriteLine(e.Message);
+ //cmd.OutputStream.WriteLine(e.Message);
}
}
@@ -85,10 +90,10 @@ private void OfflineHelp()
if (!isHelp)
{
isHelp = true;
- cmd.OutputStream.WriteLine("Here should be the usage...");
- cmd.OutputStream.WriteLine();
- options.WriteOptionDescriptions(Console.Out);
- cmd.OutputStream.WriteLine();
+ OutputStream.WriteLine("Here should be the usage...");
+ OutputStream.WriteLine();
+ options.WriteOptionDescriptions(OutputStream);
+ OutputStream.WriteLine();
}
}
}
@@ -1,109 +0,0 @@
-/*
- * Copyright (C) 2010, Dominique van de Vorle <dvdvorle@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 System.Linq;
-using System.Text;
-
-namespace GitSharp.Commands
-{
- public class FmtMergeMsgCommand
- : AbstractCommand
- {
-
- public FmtMergeMsgCommand() {
- }
-
- // note: the naming of command parameters is not following .NET conventions in favour of git command line parameter naming conventions.
-
- #region Properties / Options
- public List<string> Arguments { get; set; }
- /// <summary>
- /// Not implemented
- ///
- /// In addition to branch names, populate the log message with
- /// one-line descriptions from the actual commits that are being
- /// merged.
- ///
- /// </summary>
- public bool Log { get; set; }
-
- /// <summary>
- /// Not implemented
- ///
- /// Do not list one-line descriptions from the actual commits being
- /// merged.
- ///
- /// </summary>
- public bool NoLog { get; set; }
-
- /// <summary>
- /// Not implemented
- ///
- /// Synonyms to --log and --no-log; these are deprecated and will be
- /// removed in the future.
- ///
- /// </summary>
- public bool Summary { get; set; }
-
- /// <summary>
- /// Not implemented
- ///
- /// Synonyms to --log and --no-log; these are deprecated and will be
- /// removed in the future.
- ///
- /// </summary>
- public bool NoSummary { get; set; }
-
- /// <summary>
- /// Not implemented
- ///
- /// Take the list of merged objects from &lt;file&gt; instead of
- /// stdin.
- /// </summary>
- public string File { get; set; }
-
- #endregion
-
- public override void Execute()
- {
- throw new NotImplementedException();
- }
- }
-}
@@ -0,0 +1,3 @@
+The following git commands are not supported by the command api
+
+fmt-merge-msg: see MergeCommand.FormatMergeMessage

0 comments on commit f6844d9

Please sign in to comment.