E46E my misunderstanding of the CLI corrupted my `assignee` file · Issue #106 · dspinellis/git-issue · GitHub
[go: up one dir, main page]

Skip to content

my misunderstanding of the CLI corrupted my assignee file #106

@SebKuzminsky

Description

@SebKuzminsky

Hi folks, i'm evaluating git-issue for use in a small team of developers, and i ran in to a paper-cut-level problem. I tried adding and removing assignees to an issue, and that worked as expected:

$ PAGER='' git issue show c9cd471 
issue c9cd471577a3b4d80ae6b239fe210e0309ae0de1
Author: Sebastian Kuzminsky <seb@scytherobotics.com>
Date:   Fri, 30 May 2025 15:02:16 -0600
Tags:   open

    figure out "git issue assign"
    
    It seems to be possible to assign issues to email addresses

$ git issue assign c9cd471 seb@
Added assignee seb@

$ PAGER='' git issue show c9cd471 
issue c9cd471577a3b4d80ae6b239fe210e0309ae0de1
Author: Sebastian Kuzminsky <seb@scytherobotics.com>
Date:   Fri, 30 May 2025 15:02:16 -0600
Tags:   open
Assigned-to:    s
A345
eb@

    figure out "git issue assign"
    
    It seems to be possible to assign issues to email addresses

$ cat .issues/issues/c9/cd471577a3b4d80ae6b239fe210e0309ae0de1/assignee 
seb@

So far so good, but i misunderstood/misremembered the order of the command-line arguments for removing an assignee, and it corrupted the .assign file of the issue i was working with:

$ git issue assign c9cd471 -r seb@   # <== THIS IS WRONG!
Added assignee -r
Entry seb@ already exists

$ cat .issues/issues/c9/cd471577a3b4d80ae6b239fe210e0309ae0de1/assignee 
-r
seb@

$ PAGER='' git issue show c9cd471
issue c9cd471577a3b4d80ae6b239fe210e0309ae0de1
Author: Sebastian Kuzminsky <seb@scytherobotics.com>
Date:   Fri, 30 May 2025 15:02:16 -0600
Tags:   open
Assigned-to:    -r
        seb@

    figure out "git issue assign"
    
    It seems to be possible to assign issues to email addresses

I re-read the manpage and tried to remove the bogus assignee named -r , and this is where everything went wrong:

$ git issue assign -r c9cd471 -r  # <== THIS BREAKS!
grep: issues/c9/cd471577a3b4d80ae6b239fe210e0309ae0de1/assignee.new: input file is also the output
grep: .git/objects/69/9323e086a065eec8707e5137e81e223786ad87: binary file matches
grep: .git/objects/58/bdccc3c7a46bef97148cf8ea87cb5988b1e287: binary file matches
grep: .git/objects/db/c0d039221a358735332bab4a7a88902a17e6c4: binary file matches
grep: .git/objects/e6/9de29bb2d1d6434b8b29ae775ad8c2e48c5391: binary file matches
grep: .git/objects/8a/95f2e283bb848d2c06e93a8ce782a70d3fc736: binary file matches
grep: .git/objects/b8/b0c4e4ca3389310d3b8a1e3259ac565820ea2b: binary file matches
grep: .git/objects/63/27121f4aea92bcdb44e330c204c7c28aa20b23: binary file matches
grep: .git/objects/0b/f62814aaccf7553c6fde865028b8eecc18113f: binary file matches
grep: .git/objects/df/efbd29d87a2bf8c4308294dd00b960716ab3b5: binary file matches
grep: .git/objects/f8/81910c853b829f90e8ee92c97687b23b435979: binary file matches
grep: .git/objects/81/75d733dbe125416bb62fee075a40ae3b502885: binary file matches
grep: .git/objects/1f/f0a5957e6de8ce4a361eebc4e0e3c8697ec4fc: binary file matches
grep: .git/objects/c7/da04d8b939fdf81c03d9c53d0a9e2ffc124f6f: binary file matches
grep: .git/objects/da/134da6f56c4d9551b04b7a977abbb9b4a0118d: binary file matches
grep: .git/objects/da/cb7d8505397d63148ec8d6f8248d79b09e49c6: binary file matches
grep: .git/objects/fa/3a1ad8e967f11cf2f097a9b1dd2a18cb48ecc1: binary file matches
grep: .git/objects/bd/f634f6b1ab7641463b6d0e84a409e98ea8d013: binary file matches
grep: .git/objects/e0/b9fe01b4e60f55d4add4f4777807f14f08baf4: binary file matches
grep: .git/objects/bf/abc10086c49154a68624c20ccc9fac437a42b6: binary file matches
grep: .git/objects/67/104b81dc515d6ead356891fb8c5f821fdd92bb: binary file matches
grep: .git/objects/2c/7240e1094909156dd0258b862d4a1755a7a7be: binary file matches
grep: .git/objects/c9/cd471577a3b4d80ae6b239fe210e0309ae0de1: binary file matches
grep: .git/objects/a5/bb619cd62a74f333d0737a3ec21bf87d7c0c9c: binary file matches
grep: .git/objects/f5/f4f253466c1a1ff9d6310c015da404c45fcb9a: binary file matches
grep: .git/objects/f5/10327578a4562e26a7c64bdf061e4a49f85ee6: binary file matches
grep: .git/objects/34/3b587ff52f5a5601c4a0ba4e4db9e47980074c: binary file matches
grep: .git/objects/34/fe59874b42b97d6dbf86bd65e34eee6262e2aa: binary file matches
grep: .git/objects/a2/9dd72b7d906208ec432e99d7a907bec8b3245a: binary file matches
grep: .git/objects/59/723993e2cd672f6bb600f9439a8fb6d779b2c8: binary file matches
grep: .git/objects/3b/af956735f796216944b45bd7a3aa777a11f137: binary file matches
grep: .git/objects/99/65efe2d17b0cf90713e58c39e99ce38e1ed9bc: binary file matches
grep: .git/objects/5b/c1f79fc4552d4da6f3e0fb07cc7e96d110c38e: binary file matches
grep: .git/objects/b7/79e653fac370f9e0cc8566ac36d1fe91c3593a: binary file matches
grep: .git/objects/b7/0c116644b7c774f2be846c30efe08a3a72caf8: binary file matches
grep: .git/objects/aa/be1bf1059bc5dea83e59ce0f28cbcf80cf0bbf: binary file matches
grep: .git/objects/04/f7c70229557e0f432e852ff2e39f2840d78629: binary file matches
grep: .git/objects/29/5d9c21950a63e2a73ca293f344cb735563db9c: binary file matches
grep: .git/objects/f3/694897e8e04419e7147fb0dd4f6e418fc1ecc0: binary file matches
grep: .git/objects/2f/eecd4c359bcd4e7fcbcf63aa48c1d776ea8efe: binary file matches
grep: .git/objects/8d/ba0fcee0784d739d50d26103e876ec26219049: binary file matches
grep: .git/objects/d2/b13c77ac98c264b2f82b505b53aab3d9b17e1f: binary file matches
grep: .git/objects/c1/2d755a56458ba2eb5b872627bb39b701a40a29: binary file matches
grep: .git/objects/fb/5289f3aef733b6846d82adecdd04071c04edc4: binary file matches
grep: .git/objects/fb/4f040b257310d4c0d95be04e5efa603fd89c6a: binary file matches
grep: .git/objects/76/19bb67b5e18b7cfd29b50c15c4eff0d0e19422: binary file matches
grep: .git/objects/54/4db6711c53667cd42a5884c0327ecfc50da35b: binary file matches
grep: .git/objects/54/60418ef1fcd4e0feefed2aefe5e5b360adbc75: binary file matches
grep: .git/objects/4d/de8bed7fe11136f3348a18257e5a3af4af5337: binary file matches
grep: .git/objects/be/b60cab94e4986d2e741dd49da84a031560ede0: binary file matches
grep: .git/objects/7f/33878a43ada2ea5c7254648a8a09be65f25974: binary file matches
grep: .git/objects/e7/01dd25ba8fbffb6266b776cadd6a5aebf2bcc3: binary file matches
grep: .git/objects/ae/957fe0d743ea1aca91ab3a4da352b384e69ff0: binary file matches
grep: .git/objects/92/16c35141b1f2b1b6d2f088c35e862efff39ba8: binary file matches
grep: .git/objects/ad/b33ed683f23f2d872028fae5cd53392deefb2f: binary file matches
grep: .git/objects/ad/a662647d6d3a41d8e94adf2270c0f01853528d: binary file matches
grep: .git/objects/ad/b01d17c61fb05cd2dc53352133aabab70ba509: binary file matches
grep: .git/objects/55/7411603d37f8957dfdc14d135f75a516081226: binary file matches
grep: .git/objects/61/fa5310814b234acd7ffc661ef3b5b7f4becdd8: binary file matches
grep: .git/objects/14/49343bf7f3e3e2f86ac5e04a8ef099566b151a: binary file matches
grep: .git/objects/08/255b89170b9c767000feb3eac74de7771ec49f: binary file matches
grep: .git/objects/7d/7a9771faa7359ee6bda7e0e6a2d6650b28e241: binary file matches
grep: .git/objects/7d/e8f976b55d9c696cfaf2d3064ffb2dcabf6298: binary file matches
grep: .git/objects/26/4aaf1f49cce5f93a62696eaa1c1d8f87906fa0: binary file matches
grep: .git/objects/9b/cd96604bce09f6ccf9a7f44e8b51a922efa1ab: binary file matches
grep: .git/objects/9c/331752512108b28ce62b3dd1e9a1e9868eb402: binary file matches
grep: .git/objects/38/4df15b516cffeda40db1976877c508326e4f1c: binary file matches
grep: .git/objects/38/ad0e9e4408bd41fd484348e3d3da2e4fc89f7b: binary file matches
grep: .git/objects/ec/bf690d7329d3655e9de3301fc05816c62fee5b: binary file matches
grep: .git/objects/e4/7e9f92545c987b2387f8871b583b1b31a4019b: binary file matches
grep: .git/objects/20/e612a03872f7f1f31f183986a3cc4d0e79e583: binary file matches
grep: .git/objects/20/d28a1c4502acbb2e4e4e3c521a67793ad2293e: binary file matches
grep: .git/objects/4f/a54e447b5a0701901b028aea57f5dbaa691d09: binary file matches
grep: .git/objects/72/612ccd7e93f8d2775a2452fff413822f0d8e0e: binary file matches
grep: .git/objects/f4/40ebb8f990b13e2eac7f336c016a544fdda15e: binary file matches
grep: .git/objects/f4/17ff5f56356fa9115b94cbdca144f503ccbc2f: binary file matches
grep: .git/objects/16/7504a9bbaba005ab2acda2fabbbf92acb0aa46: binary file matches
grep: .git/objects/4a/79c55273318a5ef95718c7e59a7b87e1c86a09: binary file matches
grep: .git/objects/f7/a122ff404845aeae069ed7f328412f4d865df0: binary file matches
grep: .git/objects/77/bec9f8ecb61a5414762637e807cacb4cdb4d24: binary file matches
grep: .git/objects/f6/f86f255ef1a2558712279052664d5307e10694: binary file matches
grep: .git/objects/49/9a9a431e74f33e2d4ea4d4f9e2baf6f53a067f: binary file matches
grep: .git/objects/49/635752b16640a7ac0019c44cf822586f20bc6b: binary file matches
grep: .git/objects/ee/32f729386f8e4ee81802873ff3fc99332233c7: binary file matches
grep: .git/objects/ee/acc0550851cb6c55d16a610a38261feb954d11: binary file matches
grep: .git/objects/5c/444892dc033de70a35f6bea4b38edb3a6aa970: binary file matches
grep: .git/objects/33/336762fa63ac724ee73d09ec82a606cd3198db: binary file matches
grep: .git/objects/33/dbf5281e35561539b027c0d1fd4bad6f202ad1: binary file matches
grep: .git/objects/5e/df976c5128a45ab5a4b379bde87325528ae973: binary file matches
grep: .git/objects/15/670c06971f8d3313a848a45bf63948cefa77d0: binary file matches
grep: .git/objects/94/7ec89baf28ce3e95d27584b507a241590b9e9b: binary file matches
grep: .git/objects/fe/f97c4098652ee3e206cfa52a11a8bfe9b20556: binary file matches
grep: .git/objects/28/80350b842c1827f97f41fd5297bacf15067818: binary file matches
grep: .git/objects/ac/20c3a923a46caf980176895a8c4b3c5d613139: binary file matches
grep: .git/objects/ac/8a2f47aa06aec1d8210782b551cde9d7065a1f: binary file matches
grep: .git/objects/ac/710835446e3abd60b966c9e4dd6f1dbe9c8b98: binary file matches
grep: .git/objects/d3/b52d51d22d1d9d648f8c690524f850bd266e23: binary file matches
grep: .git/objects/d3/b621d91708b4906e96a473cab762466a270ce0: binary file matches
grep: .git/objects/d3/7532b0364fde3f0c65ac74fe51e0b214f0d2b8: binary file matches
grep: .git/index: binary file matches
Removed assignee -r

$ PAGER='' git issue show c9cd471
issue c9cd471577a3b4d80ae6b239fe210e0309ae0de1
Author: Sebastian Kuzminsky <seb@scytherobotics.com>
Date:   Fri, 30 May 2025 15:02:16 -0600
Tags:   open
Assigned-to:    issues/c9/cd471577a3b4d80ae6b239fe210e0309ae0de1/assignee:-r
        issues/c9/cd471577a3b4d80ae6b239fe210e0309ae0de1/assignee:seb@
        issues/c9/cd471577a3b4d80ae6b239fe210e0309ae0de1/tags:open
        issues/c9/cd471577a3b4d80ae6b239fe210e0309ae0de1/comments/34fe59874b42b97d6dbf86bd65e34eee6262e2aa:I don't 
think it bridges with jira, but i don't know if i care about that.
        issues/c9/cd471577a3b4d80ae6b239fe210e0309ae0de1/description:figure out "git issue assign"
        issues/c9/cd471577a3b4d80ae6b239fe210e0309ae0de1/description:
(dozens of lines of garbage like this truncated)

Since git-issue uses git for its storage it was easy enough to git log in the .issue repo and find the commit where i accidentally added an assignee named -r, and git reset --hard to the commit before that to undo the breakage.

But still, it might be more user-friendly for git-issue to sanitize/validate the command line before using it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0