git filters don't get applied to dotfiles

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

 



I'd like to report a bug regarding git filters not being applied to
files beginning with a dot character "."
Using git version 2.24.1
Please let me know if there is a better way to report bugs. The github
page only mentions this email.

To give a bit of context, I've followed this arch linux suggestion to
track my dotfiles using the "bare repository and alias method".

.gitattributes
> mailrc filter=remove-smtp-pass
> .mailrc filter=remove-smtp-pass


.dotfiles/config
> [core]
> repositoryformatversion = 0
> filemode = true
> bare = true
>
> [status]
> showUntrackedFiles = no
>
> [filter "remove-smtp-pass"]
> clean = "sed -e 's/gmail.com:.*@smtp/gmail.com:PASSWORD@smtp/'"


The file I'm trying to commit is called .mailrc, but to confirm the
bug, I copied it as mailrc (without leading dot). When adding both
files, the filter only gets applied to the file without leading dot.

> $ config diff --cached
> diff --git a/.mailrc b/.mailrc
> new file mode 100644
> index 0000000..7ac2abb
> --- /dev/null
> +++ b/.mailrc
> @@ -0,0 +1,4 @@
> +account gmail {
> +  set v15-compat
> +  set mta=smtp://lemaire.adrien%40gmail.com:IamApassword@xxxxxxxxxxxxxx:587 smtp-use-starttls
> +}
> diff --git a/mailrc b/mailrc
> new file mode 100644
> index 0000000..2698128
> --- /dev/null
> +++ b/mailrc
> @@ -0,0 +1,4 @@
> +account gmail {
> +  set v15-compat
> +  set mta=smtp://lemaire.adrien%40gmail.com:PASSWORD@xxxxxxxxxxxxxx:587 smtp-use-starttls
> +}
> $ config check-attr -a -- mailrc
> mailrc: filter: remove-smtp-pass
> $ config check-attr -a -- .mailrc
> .mailrc: filter: remove-smtp-pass


As reported by check-attr, the .mailrc file is correctly assigned to
the filter, but the diff output shows the password.

Cordially
Adrien



[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]

  Powered by Linux