Changes between Version 1 and Version 2 of GitCommit


Ignore:
Timestamp:
02/26/2010 02:56:01 PM (13 years ago)
Author:
damoxc
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • GitCommit

    v1 v2  
    6666        current_branch = branch 
    6767 
     68    # Check to make sure that the provided branches are valid 
    6869    for branch in branches: 
    6970        if branch not in local_branches: 
     
    7172            sys.exit(1) 
    7273 
     74    # Perform the main commit 
    7375    subprocess.call([GIT_COMMIT] + git_args) 
    7476 
     77    # Loop through the specified branches applying the commit to all of 
     78    # them. 
    7579    for branch in branches: 
    7680        subprocess.call([GIT_CHECKOUT, branch]) 
     
    7983        p2 = subprocess.Popen([GIT, 'am', '-3', '-k'], stdin=p1.stdout) 
    8084        p2.communicate() 
     85 
     86    # Switch back to the original branch 
     87    subprocess.call([GIT_CHECKOUT, current_branch]) 
    8188}}}