@@ -142,8 +142,10 @@ def post(self):
142142 POST request handler,
143143 fetches Commit SHA, Author Name, Commit Date & Commit Message.
144144 """
145- current_path = self .get_json_body ()["current_path" ]
146- result = self .git .log (current_path )
145+ body = self .get_json_body ()
146+ current_path = body ["current_path" ]
147+ history_count = body .get ("history_count" , 25 )
148+ result = self .git .log (current_path , history_count )
147149 self .finish (json .dumps (result ))
148150
149151
@@ -179,9 +181,6 @@ def post(self):
179181 top_repo_path = self .get_json_body ()["top_repo_path" ]
180182 my_output = self .git .diff (top_repo_path )
181183 self .finish (my_output )
182- print ("GIT DIFF" )
183- print (my_output )
184-
185184
186185class GitBranchHandler (GitHandler ):
187186 """
@@ -289,12 +288,10 @@ def post(self):
289288 top_repo_path = data ["top_repo_path" ]
290289 if data ["checkout_branch" ]:
291290 if data ["new_check" ]:
292- print ("to create a new branch" )
293291 my_output = self .git .checkout_new_branch (
294292 data ["branchname" ], top_repo_path
295293 )
296294 else :
297- print ("switch to an old branch" )
298295 my_output = self .git .checkout_branch (data ["branchname" ], top_repo_path )
299296 elif data ["checkout_all" ]:
300297 my_output = self .git .checkout_all (top_repo_path )
@@ -418,7 +415,6 @@ def post(self):
418415 """
419416 top_repo_path = self .get_json_body ()["top_repo_path" ]
420417 my_output = self .git .add_all_untracked (top_repo_path )
421- print (my_output )
422418 self .finish (my_output )
423419
424420class GitChangedFilesHandler (GitHandler ):
0 commit comments