Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug: auto add multiple files to .gitignore file doesn't break into more than 1 newline in 0.4.0 #789

Closed
simkimsia opened this issue Mar 14, 2022 · 8 comments · Fixed by #791
Labels

Comments

@simkimsia
Copy link

What are the steps to reproduce this issue?

  1. attempt to add more than 1 file before git ignore it git secret add <file1> <file2>
  2. then git secret hide

What happens?

Then the .gitignore will add the file1 and file2 but on the same line.

CleanShot 2022-03-14 at 14 03 25

See this for example

What were you expecting to happen?

the files auto added to .gitignore should appear in new lines

What versions of software are you using?

Operating system: (uname -a) Darwin kimsia-MBP2021 21.3.0 Darwin Kernel Version 21.3.0: Wed Jan 5 21:37:58 PST 2022; root:xnu-8019.80.24~20/RELEASE_ARM64_T6000 arm64

git-secret path: (which git-secret) /opt/homebrew/bin/git-secret

git-secret version: (git secret --version) 0.4.0

git version: (git --version) … git version 2.32.0 (Apple Git-132)

Shell type and version: ($SHELL --version) zsh 5.8 (x86_64-apple-darwin21.0)

gpg version: (gpg --version)
gpg (GnuPG) 2.3.4
libgcrypt 1.10.0
Copyright (C) 2021 Free Software Foundation, Inc.
License GNU GPL-3.0-or-later https://gnu.org/licenses/gpl.html
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Home: /Users/kimsia/.gnupg
Supported algorithms:
Pubkey: RSA, ELG, DSA, ECDH, ECDSA, EDDSA
Cipher: IDEA, 3DES, CAST5, BLOWFISH, AES, AES192, AES256, TWOFISH,
CAMELLIA128, CAMELLIA192, CAMELLIA256
AEAD: EAX, OCB
Hash: SHA1, RIPEMD160, SHA256, SHA384, SHA512, SHA224
Compression: Uncompressed, ZIP, ZLIB, BZIP2

One-off contribution here
image

By the way, can you provide like a support? like pay 50 USD and we give you priority support to answer technical questions for 1 month.

I don't want to dictate features or affect the development cycle. Just want to get priority attention when it comes to technical questions for a short period of time (say 1 month)

@sobolevn
Copy link
Owner

Oh wow, thank you for your support! ❤️‍🔥
And of course, for your bug report.

like pay 50 USD and we give you priority support to answer technical questions for 1 month.

I like this idea, but there are several problems:

  1. I live in Russia, right now we have temporary problems with international payments due to western sanctions. For example, GitHub Sponsors and OpenCollective do not work, because PayPal has blocked all Russian accounts (including mine). We will figure something out. For example, there are different Russian-native platforms for this kind of things
  2. I charge 200$ per hour when doing consulting
  3. Right now I have a big on-going project that takes almost all my time, I will be free ~ in 3 months

But, please, feel free to ask your questions here! I am sure that it will be addressed at some point.
Or maybe @joshrabinowitz wants to help you on a paid manner? He is even more active than me.

@simkimsia
Copy link
Author

I wasn't aware of you based in Russia

I'm aware of the sanctions and sorry to hear about how it affects you

I sincerely hope the war ends soon

@joshrabinowitz
Copy link
Collaborator

joshrabinowitz commented Mar 16, 2022

I see what's going on.

Edit: this bug was introduced as part of a separate bug fix: 39ab72f

The fix for this issue, ac3b77a, was applied after the 0.4.0 release.

So this bug only effects the 0.4.0 release (and not 0.3.3 or before)

Seems like a good reason to make a new release as mentioned in #777

Edit: this is a duplicate/regression of #643 and #651

@joshrabinowitz joshrabinowitz changed the title bug: auto add multiple files to .gitignore file doesn't break into more than 1 newline bug: auto add multiple files to .gitignore file doesn't break into more than 1 newline in 0.4.0 Mar 16, 2022
@joshrabinowitz
Copy link
Collaborator

@simkimsia wrote:

By the way, can you provide like a support? like pay 50 USD and we give you priority support to answer technical questions for 1 month.
I don't want to dictate features or affect the development cycle. Just want to get priority attention when it comes to technical questions for a short period of time (say 1 month)

Hey @simkimsia , I wrote you a message on your twitter account to discuss support options.
Please write me back there, maybe we can work something out!

@simkimsia

This comment was marked as outdated.

@joshrabinowitz

This comment was marked as outdated.

@simkimsia

This comment was marked as outdated.

@simkimsia
Copy link
Author

Replied and also set up a test public repo to ask my questions. thank you

joshrabinowitz added a commit that referenced this issue Mar 23, 2022
* test .gitignore has expected line count, for #792
* let 'add' append filenames to .gitignore in tests
* add comments related to #789
* fix test to allow for more output from 'add'
* improve error message output
* allow for extra output from 'add' in test
* tweaks as per shellcheck lint
* improve comments, cleanup code
* update changelog
* describe test better
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants