Ggit.DiffOptions

g GObject.Object GObject.Object Ggit.DiffOptions Ggit.DiffOptions GObject.Object->Ggit.DiffOptions

Subclasses:None

Methods

Inherited:GObject.Object (37)
Structs:GObject.ObjectClass (5)
class new ()
  get_flags ()
  get_n_context_lines ()
  get_n_interhunk_lines ()
  get_new_prefix ()
  get_old_prefix ()
  get_pathspec ()
  set_flags (flags)
  set_n_context_lines (n)
  set_n_interhunk_lines (n)
  set_new_prefix (prefix)
  set_old_prefix (prefix)
  set_pathspec (pathspec)

Virtual Methods

Inherited:GObject.Object (7)

Properties

Name Type Flags Short Description
flags Ggit.DiffOption r/w/c Flags
n-context-lines int r/w/c N context lines
n-interhunk-lines int r/w/c N interhunk lines
new-prefix str r/w/c New prefix
old-prefix str r/w/c Old prefix
pathspec [str] r/w/c Pathspec

Signals

Inherited:GObject.Object (1)

Fields

Inherited:GObject.Object (1)
Name Type Access Description
parent_instance GObject.Object r  

Class Details

class Ggit.DiffOptions(**kwargs)
Bases:GObject.Object
Abstract:No
Structure:Ggit.DiffOptionsClass

Represents the options used when creating a Ggit.Diff.

classmethod new()
Returns:a Ggit.DiffOptions or None.
Return type:Ggit.DiffOptions or None

Create a new diff options object.

get_flags()
Returns:a Ggit.DiffOption.
Return type:Ggit.DiffOption

Get the diff flags.

get_n_context_lines()
Returns:the number of context lines.
Return type:int

Get the number of context lines to include in the diff.

get_n_interhunk_lines()
Returns:the number of lines.
Return type:int

Get the number of interhunk lines to include in the diff.

get_new_prefix()
Returns:the new-prefix string or None.
Return type:str or None

Get the diff new-prefix string.

get_old_prefix()
Returns:the old-prefix string or None.
Return type:str or None

Get the diff old-prefix string.

get_pathspec()
Returns:the pathspec or None.
Return type:[str] or None

Get the pathspec.

set_flags(flags)
Parameters:flags (Ggit.DiffOption) – a Ggit.DiffOption.

Set the diff flags.

set_n_context_lines(n)
Parameters:n (int) – the number of lines.

Set the number of context lines to include in the diff.

set_n_interhunk_lines(n)
Parameters:n (int) – the number of lines.

Set the number of interhunk lines to include in the diff.

set_new_prefix(prefix)
Parameters:prefix (str) – the prefix.

Set the diff new-prefix string.

set_old_prefix(prefix)
Parameters:prefix (str) – the prefix.

Get the diff old-prefix string.

set_pathspec(pathspec)
Parameters:pathspec ([str] or None) – the pathspec.

Set the pathspec.

Property Details

Ggit.DiffOptions.props.flags
Name:flags
Type:Ggit.DiffOption
Default Value:Ggit.DiffOption.NORMAL
Flags:READABLE, WRITABLE, CONSTRUCT

The diff option flags.

Ggit.DiffOptions.props.n_context_lines
Name:n-context-lines
Type:int
Default Value:3
Flags:READABLE, WRITABLE, CONSTRUCT

N context lines

Ggit.DiffOptions.props.n_interhunk_lines
Name:n-interhunk-lines
Type:int
Default Value:0
Flags:READABLE, WRITABLE, CONSTRUCT

N interhunk lines

Ggit.DiffOptions.props.new_prefix
Name:new-prefix
Type:str
Default Value:None
Flags:READABLE, WRITABLE, CONSTRUCT

New prefix

Ggit.DiffOptions.props.old_prefix
Name:old-prefix
Type:str
Default Value:None
Flags:READABLE, WRITABLE, CONSTRUCT

Old prefix

Ggit.DiffOptions.props.pathspec
Name:pathspec
Type:[str]
Default Value:[]
Flags:READABLE, WRITABLE, CONSTRUCT

Pathspec