GNU bug report logs - #75336
[PATCH] Allow pcomplete of git add to include untracked files.

Previous Next

Package: emacs;

Reported by: Peter Seibel <peter <at> gigamonkeys.com>

Date: Sat, 4 Jan 2025 03:34:01 UTC

Severity: normal

Tags: patch

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 75336 in the body.
You can then email your comments to 75336 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#75336; Package emacs. (Sat, 04 Jan 2025 03:34:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Peter Seibel <peter <at> gigamonkeys.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Sat, 04 Jan 2025 03:34:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Peter Seibel <peter <at> gigamonkeys.com>
To: bug-gnu-emacs <at> gnu.org
Subject: [PATCH] Allow pcomplete of git add to include untracked files.
Date: Fri, 3 Jan 2025 16:00:27 -0800
[Message part 1 (text/plain, inline)]
I was going a bit crazy trying to figure out why tab completion in *shell*
wasn't working for git add when I was trying to add a new file to my repo.
Turns out pcomplete was only completing modified tracked files.This patch
changes it so after git add it also completes untracked non-ignored files.

I believe I long ago signed a Copyright assignment to the Emacs project but
I'm happy to do it again if that's still required. Cheers!


-- 
Peter Seibel
http://www.gigamonkeys.com/
[Message part 2 (text/html, inline)]
[0001-Allow-pcomplete-of-git-add-to-include-untracked-file.patch (application/octet-stream, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#75336; Package emacs. (Sat, 04 Jan 2025 07:53:02 GMT) Full text and rfc822 format available.

Message #8 received at 75336 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Peter Seibel <peter <at> gigamonkeys.com>
Cc: 75336 <at> debbugs.gnu.org
Subject: Re: bug#75336: [PATCH] Allow pcomplete of git add to include untracked
 files.
Date: Sat, 04 Jan 2025 09:52:23 +0200
> From: Peter Seibel <peter <at> gigamonkeys.com>
> Date: Fri, 3 Jan 2025 16:00:27 -0800
> 
> I believe I long ago signed a Copyright assignment to the Emacs project but I'm happy to do it again if that's
> still required. Cheers!

Form sent off-list.

Thanks.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#75336; Package emacs. (Sat, 04 Jan 2025 07:55:02 GMT) Full text and rfc822 format available.

Message #11 received at 75336 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Peter Seibel <peter <at> gigamonkeys.com>, Augusto Stoffel <arstoffel <at> gmail.com>
Cc: Stefan Monnier <monnier <at> iro.umontreal.ca>, 75336 <at> debbugs.gnu.org
Subject: Re: bug#75336: [PATCH] Allow pcomplete of git add to include untracked
 files.
Date: Sat, 04 Jan 2025 09:54:19 +0200
> From: Peter Seibel <peter <at> gigamonkeys.com>
> Date: Fri, 3 Jan 2025 16:00:27 -0800
> 
> I was going a bit crazy trying to figure out why tab completion in *shell* wasn't working for git add when I was
> trying to add a new file to my repo. Turns out pcomplete was only completing modified tracked files.This
> patch changes it so after git add it also completes untracked non-ignored files.

Augusto and Stefan, any comments?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#75336; Package emacs. (Sat, 04 Jan 2025 14:00:02 GMT) Full text and rfc822 format available.

Message #14 received at 75336 <at> debbugs.gnu.org (full text, mbox):

From: Peter Seibel <peter <at> gigamonkeys.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: Augusto Stoffel <arstoffel <at> gmail.com>,
 Stefan Monnier <monnier <at> iro.umontreal.ca>, 75336 <at> debbugs.gnu.org
Subject: Re: bug#75336: [PATCH] Allow pcomplete of git add to include
 untracked files.
Date: Sat, 4 Jan 2025 05:59:18 -0800
[Message part 1 (text/plain, inline)]
I just realized there's a better way to do this. New patch attached.

On Fri, Jan 3, 2025 at 11:54 PM Eli Zaretskii <eliz <at> gnu.org> wrote:

> > From: Peter Seibel <peter <at> gigamonkeys.com>
> > Date: Fri, 3 Jan 2025 16:00:27 -0800
> >
> > I was going a bit crazy trying to figure out why tab completion in
> *shell* wasn't working for git add when I was
> > trying to add a new file to my repo. Turns out pcomplete was only
> completing modified tracked files.This
> > patch changes it so after git add it also completes untracked
> non-ignored files.
>
> Augusto and Stefan, any comments?
>


-- 
Peter Seibel
http://www.gigamonkeys.com/
[Message part 2 (text/html, inline)]
[0002-Simpler-way-to-get-list-of-addable-files.patch (application/octet-stream, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#75336; Package emacs. (Sat, 04 Jan 2025 15:05:01 GMT) Full text and rfc822 format available.

Message #17 received at 75336 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Peter Seibel <peter <at> gigamonkeys.com>
Cc: Eli Zaretskii <eliz <at> gnu.org>, Augusto Stoffel <arstoffel <at> gmail.com>,
 75336 <at> debbugs.gnu.org
Subject: Re: bug#75336: [PATCH] Allow pcomplete of git add to include
 untracked files.
Date: Sat, 04 Jan 2025 10:04:31 -0500
>> > I was going a bit crazy trying to figure out why tab completion in
>> > *shell* wasn't working for git add when I was trying to add a new
>> > file to my repo.  Turns out pcomplete was only completing modified
>> > tracked files.  This patch changes it so after git add it also
>> > completes untracked non-ignored files.
>> Augusto and Stefan, any comments?

The (new) patch looks good to me.

FWIW, it also makes sense occasionally to `git add` ignored files
(e.g. we could want to track a `.elc` file in the test suite inside the
Emacs repository to check how we handle specific old-format `.elc`
files).


        Stefan





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#75336; Package emacs. (Sat, 04 Jan 2025 15:53:02 GMT) Full text and rfc822 format available.

Message #20 received at 75336 <at> debbugs.gnu.org (full text, mbox):

From: Peter Seibel <peter <at> gigamonkeys.com>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: Eli Zaretskii <eliz <at> gnu.org>, Augusto Stoffel <arstoffel <at> gmail.com>,
 75336 <at> debbugs.gnu.org
Subject: Re: bug#75336: [PATCH] Allow pcomplete of git add to include
 untracked files.
Date: Sat, 4 Jan 2025 07:52:07 -0800
[Message part 1 (text/plain, inline)]
Okay, here's an updated patch to also complete ignored files when -f or
--force is specified.

If you want I can rebase and make a single patch.

On Sat, Jan 4, 2025 at 7:04 AM Stefan Monnier <monnier <at> iro.umontreal.ca>
wrote:

> >> > I was going a bit crazy trying to figure out why tab completion in
> >> > *shell* wasn't working for git add when I was trying to add a new
> >> > file to my repo.  Turns out pcomplete was only completing modified
> >> > tracked files.  This patch changes it so after git add it also
> >> > completes untracked non-ignored files.
> >> Augusto and Stefan, any comments?
>
> The (new) patch looks good to me.
>
> FWIW, it also makes sense occasionally to `git add` ignored files
> (e.g. we could want to track a `.elc` file in the test suite inside the
> Emacs repository to check how we handle specific old-format `.elc`
> files).
>
>
>         Stefan
>
>

-- 
Peter Seibel
http://www.gigamonkeys.com/
[Message part 2 (text/html, inline)]
[0003-Complete-ignored-files-when-force-specified-in-git-a.patch (application/octet-stream, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#75336; Package emacs. (Sat, 18 Jan 2025 09:29:02 GMT) Full text and rfc822 format available.

Message #23 received at 75336 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Peter Seibel <peter <at> gigamonkeys.com>
Cc: arstoffel <at> gmail.com, monnier <at> iro.umontreal.ca, 75336 <at> debbugs.gnu.org
Subject: Re: bug#75336: [PATCH] Allow pcomplete of git add to include
 untracked files.
Date: Sat, 18 Jan 2025 11:27:51 +0200
> From: Peter Seibel <peter <at> gigamonkeys.com>
> Date: Sat, 4 Jan 2025 07:52:07 -0800
> Cc: Eli Zaretskii <eliz <at> gnu.org>, Augusto Stoffel <arstoffel <at> gmail.com>, 75336 <at> debbugs.gnu.org
> 
> Okay, here's an updated patch to also complete ignored files when -f or --force is specified.

Thanks.

> If you want I can rebase and make a single patch.

Yes, please rebase on the latest master, because the patch failed to
apply when I tried.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#75336; Package emacs. (Sat, 18 Jan 2025 16:02:02 GMT) Full text and rfc822 format available.

Message #26 received at 75336 <at> debbugs.gnu.org (full text, mbox):

From: Peter Seibel <peter <at> gigamonkeys.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: arstoffel <at> gmail.com, monnier <at> iro.umontreal.ca, 75336 <at> debbugs.gnu.org
Subject: Re: bug#75336: [PATCH] Allow pcomplete of git add to include
 untracked files.
Date: Sat, 18 Jan 2025 08:01:25 -0800
[Message part 1 (text/plain, inline)]
Okay, here's a single patch. Cheers!

On Sat, Jan 18, 2025 at 1:27 AM Eli Zaretskii <eliz <at> gnu.org> wrote:

> > From: Peter Seibel <peter <at> gigamonkeys.com>
> > Date: Sat, 4 Jan 2025 07:52:07 -0800
> > Cc: Eli Zaretskii <eliz <at> gnu.org>, Augusto Stoffel <arstoffel <at> gmail.com>,
> 75336 <at> debbugs.gnu.org
> >
> > Okay, here's an updated patch to also complete ignored files when -f or
> --force is specified.
>
> Thanks.
>
> > If you want I can rebase and make a single patch.
>
> Yes, please rebase on the latest master, because the patch failed to
> apply when I tried.
>


-- 
Peter Seibel
http://www.gigamonkeys.com/
[Message part 2 (text/html, inline)]
[0001-Improved-git-add-completion.patch (application/octet-stream, attachment)]

Reply sent to Eli Zaretskii <eliz <at> gnu.org>:
You have taken responsibility. (Sun, 19 Jan 2025 13:00:02 GMT) Full text and rfc822 format available.

Notification sent to Peter Seibel <peter <at> gigamonkeys.com>:
bug acknowledged by developer. (Sun, 19 Jan 2025 13:00:03 GMT) Full text and rfc822 format available.

Message #31 received at 75336-done <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Peter Seibel <peter <at> gigamonkeys.com>
Cc: 75336-done <at> debbugs.gnu.org, arstoffel <at> gmail.com, monnier <at> iro.umontreal.ca
Subject: Re: bug#75336: [PATCH] Allow pcomplete of git add to include
 untracked files.
Date: Sun, 19 Jan 2025 14:58:52 +0200
> From: Peter Seibel <peter <at> gigamonkeys.com>
> Date: Sat, 18 Jan 2025 08:01:25 -0800
> Cc: monnier <at> iro.umontreal.ca, arstoffel <at> gmail.com, 75336 <at> debbugs.gnu.org
> 
> Okay, here's a single patch. Cheers!

Thanks, installed on the master branch, and closing the bug.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#75336; Package emacs. (Sun, 19 Jan 2025 16:54:02 GMT) Full text and rfc822 format available.

Message #34 received at 75336-done <at> debbugs.gnu.org (full text, mbox):

From: Peter Seibel <peter <at> gigamonkeys.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 75336-done <at> debbugs.gnu.org, arstoffel <at> gmail.com, monnier <at> iro.umontreal.ca
Subject: Re: bug#75336: [PATCH] Allow pcomplete of git add to include
 untracked files.
Date: Sun, 19 Jan 2025 08:53:40 -0800
[Message part 1 (text/plain, inline)]
Awesome, thanks. Does that mean it will go out in 31.x? Or 30.x?

On Sun, Jan 19, 2025 at 4:59 AM Eli Zaretskii <eliz <at> gnu.org> wrote:

> > From: Peter Seibel <peter <at> gigamonkeys.com>
> > Date: Sat, 18 Jan 2025 08:01:25 -0800
> > Cc: monnier <at> iro.umontreal.ca, arstoffel <at> gmail.com, 75336 <at> debbugs.gnu.org
> >
> > Okay, here's a single patch. Cheers!
>
> Thanks, installed on the master branch, and closing the bug.
>


-- 
Peter Seibel
http://www.gigamonkeys.com/
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#75336; Package emacs. (Sun, 19 Jan 2025 17:41:01 GMT) Full text and rfc822 format available.

Message #37 received at 75336-done <at> debbugs.gnu.org (full text, mbox):

From: Stefan Kangas <stefankangas <at> gmail.com>
To: Peter Seibel <peter <at> gigamonkeys.com>, Eli Zaretskii <eliz <at> gnu.org>
Cc: 75336-done <at> debbugs.gnu.org, arstoffel <at> gmail.com, monnier <at> iro.umontreal.ca
Subject: Re: bug#75336: [PATCH] Allow pcomplete of git add to include
 untracked files.
Date: Sun, 19 Jan 2025 11:40:51 -0600
Peter Seibel <peter <at> gigamonkeys.com> writes:

> Awesome, thanks. Does that mean it will go out in 31.x? Or 30.x?

The master branch is what will eventually become Emacs 31.1.

Emacs 30.1 is in feature freeze for many months now.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Mon, 17 Feb 2025 12:24:09 GMT) Full text and rfc822 format available.

This bug report was last modified 121 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.