Class: Git::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/qcloudhive/git_helper.rb

Instance Method Summary collapse

Instance Method Details

#clean?Boolean

Returns:

  • (Boolean)

38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
# File 'lib/qcloudhive/git_helper.rb', line 38

def clean?()
  begin
  if status.changed.count > 0
    L.info("****************************")
    L.info("changed #{status.changed}")
    return false
  end
  if status.untracked.count >0
    L.info("****************************")
    L.info("untracked #{status.untracked}")
    return false
  end

  if status.deleted.count > 0
    L.info("****************************")
    L.info("deleted #{status.deleted}")
    return false
  end

  if status.added.count > 0
    L.info("****************************")
    L.info("added #{status.added}")
    return false
  end
  rescue => err
    puts "读取Git数据失败#{err}"
    return false
  end
return true
end