public inbox for git@vger.kernel.org
 help / color / mirror / Atom feed
* Interest in options for stash -k and -u by default
@ 2024-02-07 20:59 Ricardo C
  2024-02-07 21:08 ` Junio C Hamano
  2024-02-07 21:42 ` Kristoffer Haugsbakk
  0 siblings, 2 replies; 3+ messages in thread
From: Ricardo C @ 2024-02-07 20:59 UTC (permalink / raw)
  To: git


[-- Attachment #1.1.1: Type: text/plain, Size: 1220 bytes --]

Hello,


After some discussion on Mastodon[1], I decided to try my hand at creating 
configuration options that enable --keep-index and --include-untracked in 
git-stash by default. I have made a preliminary such patch[2], and some 
additional discussion[3] has encouraged me to try submitting it upstream.

I am wondering whether this change is something that would even be considered 
for being accepted. The patch still needs some work (mainly documentation and 
tests), which I'd be happy to do if I knew there was upstream interest in this 
work.

I would also appreciate feedback on the patch. Currently, it creates two 
separate options: stash.keepindex and stash.includeuntracked. These options 
set the default value of --keep-index and --include-untracked if not otherwise 
specified (e.g., --no-keep-index) and do not conflict with other options 
(e.g., --patch). More details are of course available in the source code[2].


Thank you,

Ricardo "MithicSpirit" Prado Cunha


[1] https://bsd.network/@ed1conf/111783574839749798

[2] 
https://github.com/MithicSpirit/git/commit/f33c8d5d26d8438ddb123781bd5db3bff8618247.patch

[3] https://social.jvns.ca/@b0rk/111880230506448122


[-- Attachment #1.1.2: OpenPGP public key --]
[-- Type: application/pgp-keys, Size: 3215 bytes --]

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 840 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Interest in options for stash -k and -u by default
  2024-02-07 20:59 Interest in options for stash -k and -u by default Ricardo C
@ 2024-02-07 21:08 ` Junio C Hamano
  2024-02-07 21:42 ` Kristoffer Haugsbakk
  1 sibling, 0 replies; 3+ messages in thread
From: Junio C Hamano @ 2024-02-07 21:08 UTC (permalink / raw)
  To: Ricardo C; +Cc: git

Ricardo C <rpc01234@gmail.com> writes:

> I am wondering whether this change is something that would even be
> considered for being accepted. The patch still needs some work (mainly
> documentation and tests), which I'd be happy to do if I knew there was
> upstream interest in this work.

There is a canned response for it ;-)

I've seen from time to time people ask "I am thinking of doing this;
will a patch be accepted?  If so, I'll work on it." before showing
any work, and my response always has been:

 (1) We don't know how useful and interesting your contribution would
     be for our audience, until we see it; and

 (2) If you truly believe in your work (find it useful, find writing
     it fun, etc.), that would be incentive enough for you to work
     on it, whether or not the result will land in my tree.  You
     should instead aim for something so brilliant that we would
     come to you begging for your permission to include it in our
     project.


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Interest in options for stash -k and -u by default
  2024-02-07 20:59 Interest in options for stash -k and -u by default Ricardo C
  2024-02-07 21:08 ` Junio C Hamano
@ 2024-02-07 21:42 ` Kristoffer Haugsbakk
  1 sibling, 0 replies; 3+ messages in thread
From: Kristoffer Haugsbakk @ 2024-02-07 21:42 UTC (permalink / raw)
  To: Ricardo C; +Cc: git

On Wed, Feb 7, 2024, at 21:59, Ricardo C wrote:
> Hello,
>
>
> After some discussion on Mastodon[1], I decided to try my hand at creating
> configuration options that enable --keep-index and --include-untracked in
> git-stash by default. I have made a preliminary such patch[2], and some
> additional discussion[3] has encouraged me to try submitting it upstream.
>
> I am wondering whether this change is something that would even be considered
> for being accepted. The patch still needs some work (mainly documentation and
> tests), which I'd be happy to do if I knew there was upstream interest in this
> work.
>
> I would also appreciate feedback on the patch. Currently, it creates two
> separate options: stash.keepindex and stash.includeuntracked. These options
> set the default value of --keep-index and --include-untracked if not otherwise
> specified (e.g., --no-keep-index) and do not conflict with other options
> (e.g., --patch). More details are of course available in the source code[2].

The way I understand it:

• You already have a working implementation
• There already exists conventions for using config variables for
  defaults which then can be in turn overridden using the corresponding
  flags (the `--[no]-<flag>` pair)

So what’s the hold-up? :)

> I would also appreciate feedback on the patch.

That would be part of the patch series in any case.

-- 
Kristoffer Haugsbakk

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-02-07 21:42 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-02-07 20:59 Interest in options for stash -k and -u by default Ricardo C
2024-02-07 21:08 ` Junio C Hamano
2024-02-07 21:42 ` Kristoffer Haugsbakk

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox