Re: [PATCH] git-stash: add flag to skip "git reset --hard"

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Tom Anderson <thomasanderson@xxxxxxxxxx> writes:

> @@ -61,6 +61,9 @@ stashed and then cleaned up with `git clean`,
> leaving the working directory
>  in a very clean state. If the `--all` option is used instead then the
>  ignored files are stashed and cleaned in addition to the untracked files.
>  +
> +If the `--no-reset` option is used, `git reset --hard` is skipped and the
> +`--[no-]keep-index`, `--include-untracked`, and `--all` flags are ignored.
> ++

I am afraid that a reader who does not read git-stash.sh script
would not know what you are talking about.  They do not know (or
particularly care) where "git reset --hard", how often and for what
purpose.  They can tell that this option affects only "save",
because that is where it is described, but they would not know what
it means to "skip reset --hard", other than that they cannot use the
three features listed there.

It is unclear what problem you are trying to solve from this text,
and the log message's mention of mtime and rebuilding makes it
sound like an X-Y problem.

It could very well be that what you are trying to implement makes
perfect sense and the new option is named with a stress on a wrong
aspect (i.e. named after what it uses to achieve things, rather than
saying what you are trying to achieve).

The workhorse used in "git stash save" (which is what you are
touching) is "git stash create", and that is only responsible for
recording a new stash entry without touch the working tree.  Is that
what you are after, perhaps?

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]