Skip to content

import-all() support git submodule and add drop-all() function#2

Open
allenyllee wants to merge 5 commits into501st-alpha1:masterfrom
allenyllee:dev1
Open

import-all() support git submodule and add drop-all() function#2
allenyllee wants to merge 5 commits into501st-alpha1:masterfrom
allenyllee:dev1

Conversation

@allenyllee
Copy link

Hi @501st-alpha1 ,
I come from your stackoverflow anwser, and tries to use your script, it's a great job! But I've encountered some problems, so I try to fix those as below:

  1. import-all() function support git submodule
  2. fix import() function prompt error when its first time stash commit
  3. push() and drop() function use full length SHA instead of short SHA (because I've encounter a problem of different short SHA length between machines)
  4. Also delete local refs/stashes when drop() remote refs/stashes
  5. add drop-all() function

As you say in #1 (comment), I try to split it into 5 commits. But it can be difficult to separate it into 5 PRs, because every commit is based on previous modification, and the modification is on the same file. If I make each commit as a PR, which all based on your latest commit, when you merge one of those PRs, then merge the other one, it will be conflicted.

Also, separate it into 5 PRs seems takes more effort than just split and commit it sequentially. So I just split it into atomic commit, and still single PR. Tall me if you have other thoughts.

# remove from remote refs/stashes
git push $remote :refs/stashes/$stashCommit
# remove from local refs/stashes
git update-ref -d refs/stashes/$stashCommit

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is important; I added this as a comment to the original Stack Overflow answer (and obviously credited you).

@WrichikBasu
Copy link

@501st-alpha1 Any update on when (and if) this PR will be merged?

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants