]> git.ipfire.org Git - thirdparty/git.git/blobdiff - builtin/reset.c
Merge branch 'en/rebase-signoff-fix'
[thirdparty/git.git] / builtin / reset.c
index 246bf9d737de9517760afdc821f4c86dccaf75a3..18228c312ea009e79b1ae179f4a40ad3b4a35574 100644 (file)
@@ -337,7 +337,7 @@ int cmd_reset(int argc, const char **argv, const char *prefix)
        if (unborn) {
                /* reset on unborn branch: treat as reset to empty tree */
                oidcpy(&oid, the_hash_algo->empty_tree);
-       } else if (!pathspec.nr) {
+       } else if (!pathspec.nr && !patch_mode) {
                struct commit *commit;
                if (get_oid_committish(rev, &oid))
                        die(_("Failed to resolve '%s' as a valid revision."), rev);