GitHub Sale: sign up for any paid plan this week and pay nothing until January 1, 2009!  [ hide ]

public
Fork of jwiegley/git-issues
Description: A distributed issue tracking system based on Git repositories, written in Python
Homepage: http://www.newartisans.com/software.html
Clone URL: git://github.com/ktf/git-issues.git
git-issues edit now reads input from stdin if available.
ktf (author)
Sun Jul 20 13:57:44 -0700 2008
commit  bf0368e2a8af927118e5457c58c0ec72bb0b3bae
tree    d9ed78622481a8e8b4e68a33c95c281d6d483a57
parent  a26b3ac5e0004c2f85b0f92d40d9b84b18e9de5c
...
1134
1135
1136
1137
 
 
 
 
1138
1139
1140
...
1134
1135
1136
 
1137
1138
1139
1140
1141
1142
1143
0
@@ -1134,7 +1134,10 @@ if __name__ == '__main__':
0
             if len(args) != 2:
0
               print "Usage: %s edit <issue-id> <field>" % sys.argv[0]
0
               sys.exit(1)
0
- contents = inputFromEditor(getattr(issue, args[1]))
0
+ if not sys.stdin.isatty():
0
+ contents = sys.stdin.read()
0
+ else:
0
+ contents = inputFromEditor(getattr(issue, args[1]))
0
             getattr(issue, "set_"+args[1])(contents)
0
 
0
 ######################################################################

Comments

    No one has commented yet.