Re: Overly aggressive .gitignore file?

From: Masahiro Yamada
Date: Wed Jul 05 2023 - 12:29:15 EST


On Thu, Jul 6, 2023 at 12:34 AM Theodore Ts'o <tytso@xxxxxxx> wrote:
>
> On Wed, Jul 05, 2023 at 10:59:28AM +0900, Masahiro Yamada wrote:
> > Perhaps, a slightly similar case is *.patch.
> > (We do ignore *.patch)
> >
> > People quite often run 'git format-patch'.
> > And, the generated patches have similar prefixes.
> > (0001-, 0002-, 0003-, ..., for good reasons)
> >
> > The autocomplete does not work if 000* files
> > exist from the previous time I ran 'git format-patch'.
> > I repeatedly run 'rm -f 00*' even if 'git status' does not show them.
>
> Autocomplete "works", in so far that if you type 0<TAB>, it will
> autocomplete up to 000 and then ring the terminal bell, at which point
> I'll type say, 1<TAB>, and then if there are previous *.patch files,
> it will ring the terminal bell again, and then if you type <TAB> a
> second time, it will list the possible autocompletes.



Of course, "autocomplete does not work" means
"it does not fill out the whole filename by
pressing the tab key just one time".

I thought it was obvious in the context of this thread.
Anyway, thanks for coming back again to point it out.






>
> I will also say that since of "rm -f <pattern includes a '*'>" is too
> easy to accidentally screwup and delete something I would care about,
> my solution is "git format-patch -o /tmp/p ...", since then I can
> clear out the files by typing "rm -r /tmp/p".
>
> Cheers,
>
> - Ted
>
> P.S. Also note that "git format-patch" will automatically create
> /tmp/p if it doesn't exist, unlike how b4 works with the -o option.



--
Best Regards
Masahiro Yamada