Skip to content

Upload queue not reset when resetting commit staging #82

Closed

Description

@skalnik

I added some files via git add they then show up in git media queues. However if I decide to not commit those files and git reset HEAD ., they remain in git media queues.

renderables/ on master › git add git-media/ 

renderables/ › git media queues
upload
  git-media/psds/100.psd
  git-media/psds/1000-2.psd
  git-media/psds/300.psd

renderables/ › git reset HEAD .  

renderables/ on master › git media queues
upload
  git-media/psds/100.psd
  git-media/psds/1000-2.psd
  git-media/psds/300.psd

renderables/ on master › git st
On branch master
Your branch is up-to-date with 'origin/master'.

Untracked files:
  (use "git add <file>..." to include in what will be committed)

    .gitattributes
    git-media/

nothing added to commit but untracked files present (use "git add" to track)

Activity

  1. technoweenie commented on Jun 26, 2014

    @technoweenie
    Contributor

    You can clear it out manually by deleting .git/media/queues/upload or something like that. We should have a git media reset command, and maybe git media queues clear.

  2. skalnik commented on Jun 26, 2014

    @skalnik
    ContributorAuthor

    Makes sense. And based on chat talk, this may be hard to make automatic: chat/1304736005

  3. technoweenie commented on Jun 26, 2014

    @technoweenie
    Contributor

    Confirmed, git reset doesn't run checkout, and therefore does not trigger post-checkout.

    #!/bin/sh
    
    echo "prev: $1
    new: $2
    is_branch: $3" >> post-checkout.log
    
  4. rubyist commented on Jun 26, 2014

    @rubyist
    Contributor

    we could perhaps re-verify the content hash, or (more quickly) store some extra file metadata. A reset is pretty likely to change the file and we can dequeue or refuse to sync it. If the reset doesn't change the file somehow and only unstages it, though, that's harder.

  5. rubyist commented on Jun 26, 2014

    @rubyist
    Contributor

    Maybe we can also check queued files against currently staged files or something

  6. technoweenie commented on Jun 26, 2014

    @technoweenie
    Contributor

    @rubyist: I like that idea. We could start by making git media queues smarter:

    Files to be pushed:
    
      git-media/psds/100.psd
      git-media/psds/1000-2.psd
    
    Untracked files:
    
      git-media/psds/300.psd
    
  7. rubyist commented on Oct 2, 2014

    @rubyist
    Contributor

    The upload queue is 💀, so this should be cool now!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions