<commit_before>// Copyright 2012, The gohg Authors. All rights reserved.
// Use of this source code is governed by a BSD style license
// that can be found in the LICENSE file.

package gohg

import (
	"fmt"
)

type identifyOpts struct {
	Cwd
	Hidden
	NonInteractive
	Quiet
	Repository
	Verbose

	Insecure
	// Mq
	RemoteCmd
	Rev
	Bookmarks
	Branch
	Id
	Num
	Tags
	Ssh

	Debug
	Profile
	Time
	Traceback
}

func (cmd *identifyOpts) String() string {
	return fmt.Sprintf(
		"identifyOpts = {\n    bookmarks: (%T) %t\n    branch: (%T) %t\n    id: (%T) %t\n"+
			// "    mq: (%T) %t\n    num: (%T) %t\n    rev: (%T) %t\n    tags: (%T) %t\n"+
			"    num: (%T) %t\n    rev: (%T) %t\n    tags: (%T) %t\n"+
			"    debug: (%T) %t\n    traceback: (%T) %t\n    profile: (%T) %t\n}\n",
		cmd.Bookmarks, cmd.Bookmarks, cmd.Branch, cmd.Branch,
		cmd.Id, cmd.Id,
		// cmd.Mq, cmd.Mq,
		cmd.Num, cmd.Num,
		cmd.Rev, cmd.Rev, cmd.Tags, cmd.Tags,
		cmd.Debug, cmd.Debug, cmd.Traceback, cmd.Traceback, cmd.Profile, cmd.Profile)
}

// Identify provides the 'hg identify' command.
func (hgcl *HgClient) Identify(source string, opts ...optionAdder) ([]byte, error) {
	cmdOpts := new(identifyOpts)
	// apply gohg defaults (that differ from type default)
	cmdOpts.Bookmarks = true
	cmdOpts.Branch = true
	cmdOpts.Id = true
	cmdOpts.Num = true
	cmdOpts.Tags = true
	params := []string{source}
	hgcmd, err := hgcl.buildCommand("identify", cmdOpts, opts, params)
	if err != nil {
		return nil, err
	}
	return hgcl.runcommand(hgcmd)
}<commit_msg>identify: removed unnecessary option defaults<commit_after>// Copyright 2012, The gohg Authors. All rights reserved.
// Use of this source code is governed by a BSD style license
// that can be found in the LICENSE file.

package gohg

import (
	"fmt"
)

type identifyOpts struct {
	Cwd
	Hidden
	NonInteractive
	Quiet
	Repository
	Verbose

	Insecure
	// Mq
	RemoteCmd
	Rev
	Bookmarks
	Branch
	Id
	Num
	Tags
	Ssh

	Debug
	Profile
	Time
	Traceback
}

func (cmd *identifyOpts) String() string {
	return fmt.Sprintf(
		"identifyOpts = {\n    bookmarks: (%T) %t\n    branch: (%T) %t\n    id: (%T) %t\n"+
			// "    mq: (%T) %t\n    num: (%T) %t\n    rev: (%T) %t\n    tags: (%T) %t\n"+
			"    num: (%T) %t\n    rev: (%T) %t\n    tags: (%T) %t\n"+
			"    debug: (%T) %t\n    traceback: (%T) %t\n    profile: (%T) %t\n}\n",
		cmd.Bookmarks, cmd.Bookmarks, cmd.Branch, cmd.Branch,
		cmd.Id, cmd.Id,
		// cmd.Mq, cmd.Mq,
		cmd.Num, cmd.Num,
		cmd.Rev, cmd.Rev, cmd.Tags, cmd.Tags,
		cmd.Debug, cmd.Debug, cmd.Traceback, cmd.Traceback, cmd.Profile, cmd.Profile)
}

// Identify provides the 'hg identify' command.
func (hgcl *HgClient) Identify(source string, opts ...optionAdder) ([]byte, error) {
	hgcmd, err := hgcl.buildCommand("identify", new(identifyOpts), opts, []string{source})
	if err != nil {
		return nil, err
	}
	return hgcl.runcommand(hgcmd)
}
{'fraction_non_alphanumeric': 0.15660969654691315, 'fraction_numerical': 0.0027903732124171608, 'mean_word_length': 3.03943661971831, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4754941', 'n_tokens_mistral': 1183, 'n_tokens_neox': 1146, 'n_words': 332}