def unstage_paths(args, head="HEAD"): status, output = git.reset(head, "--", with_stderr=True, with_status=True, *set(args)) if status != 128: return (status, output) # handle git init: we have to use 'git rm --cached' # detect this condition by checking if the file is still staged return untrack_paths(args, head=head)
def unstage_paths(args, head='HEAD'): status, out, err = git.reset(head, '--', *set(args)) if status == 128: # handle git init: we have to use 'git rm --cached' # detect this condition by checking if the file is still staged return untrack_paths(args, head=head) else: return (status, out, err)
def unstage_paths(args, head="HEAD"): status, out, err = git.reset(head, "--", *set(args)) if status == 128: # handle git init: we have to use 'git rm --cached' # detect this condition by checking if the file is still staged return untrack_paths(args, head=head) else: return (status, out, err)
def unstage_paths(args, head='HEAD'): status, output = git.reset(head, '--', with_status=True, *set(args)) if status == 128: # handle git init: we have to use 'git rm --cached' # detect this condition by checking if the file is still staged return untrack_paths(args, head=head) else: return (status, output)
def unstage_paths(args, head='HEAD'): status, output = git.reset(head, '--', with_stderr=True, with_status=True, *set(args)) if status != 128: return (status, output) # handle git init: we have to use 'git rm --cached' # detect this condition by checking if the file is still staged status, output = git.update_index('--', force_remove=True, with_status=True, with_stderr=True, *set(args)) return (status, output)