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

pathspec 'master_cc' did not match any file(s) known to git #8

Closed
eis opened this issue Jan 23, 2012 · 2 comments
Closed

pathspec 'master_cc' did not match any file(s) known to git #8

eis opened this issue Jan 23, 2012 · 2 comments

Comments

@eis
Copy link

eis commented Jan 23, 2012

Hi,

trying to run gitcc rebase from cygwin bash gets me this:

$ gitcc rebase
Encoding=ISO8859-1

git branch
git ls-files --modified
git log -n 1 --pretty=format:%ai master_cc
cleartool lsh -fmt %o%m|%Nd|%u|%En|%Vn|%Nc\n -recurse .
git branch
git checkout master_cc
Traceback (most recent call last):
File "/cygdrive/c/versioncontrol/git-cc/gitcc", line 48, in
main()
File "/cygdrive/c/versioncontrol/git-cc/gitcc", line 14, in main
return invoke(cmd, args)
File "/cygdrive/c/versioncontrol/git-cc/gitcc", line 38, in invoke
cmd.main(_args)
File "/cygdrive/c/versioncontrol/git-cc/rebase.py", line 52, in main
doStash(lambda: doCommit(cs), stash)
File "/cygdrive/c/versioncontrol/git-cc/common.py", line 39, in doStash
f()
File "/cygdrive/c/versioncontrol/git-cc/rebase.py", line 52, in
doStash(lambda: doCommit(cs), stash)
File "/cygdrive/c/versioncontrol/git-cc/rebase.py", line 61, in doCommit
git_exec(['checkout', CC_TAG])
File "/cygdrive/c/versioncontrol/git-cc/common.py", line 48, in git_exec
return popen('git', cmd, GIT_DIR, *_args)
File "/cygdrive/c/versioncontrol/git-cc/common.py", line 61, in popen
raise Exception((stderr + stdout).decode(ENCODING))
Exception: error: pathspec 'master_cc' did not match any file(s) known to git.

Suggestions?

Note: Since I had to change the encoding part, lines are few off. I also tried this:

$ gitcc rebase --load .git/lshistory.bak
Encoding=ISO8859-1

git branch
git ls-files --modified
git log -n 1 --pretty=format:%ai master_cc
git branch
git checkout master_cc
Traceback (most recent call last):
File "/cygdrive/c/versioncontrol/git-cc/gitcc", line 48, in
main()
File "/cygdrive/c/versioncontrol/git-cc/gitcc", line 14, in main
return invoke(cmd, args)
File "/cygdrive/c/versioncontrol/git-cc/gitcc", line 38, in invoke
cmd.main(_args)
File "/cygdrive/c/versioncontrol/git-cc/rebase.py", line 52, in main
doStash(lambda: doCommit(cs), stash)
File "/cygdrive/c/versioncontrol/git-cc/common.py", line 39, in doStash
f()
File "/cygdrive/c/versioncontrol/git-cc/rebase.py", line 52, in
doStash(lambda: doCommit(cs), stash)
File "/cygdrive/c/versioncontrol/git-cc/rebase.py", line 61, in doCommit
git_exec(['checkout', CC_TAG])
File "/cygdrive/c/versioncontrol/git-cc/common.py", line 48, in git_exec
return popen('git', cmd, GIT_DIR, *_args)
File "/cygdrive/c/versioncontrol/git-cc/common.py", line 61, in popen
raise Exception((stderr + stdout).decode(ENCODING))
Exception: error: pathspec 'master_cc' did not match any file(s) known to git.

there is a 'main' branch on my clearcase view so that shouldn't be the case. I'm using a snapshot view.

@charleso
Copy link
Owner

Hi Eis,

Sorry, this is bad error handling in gitcc. It's assuming that once you have at least one commit that you've already had a successful rebase and that it has created a branch called 'master_cc'. You have two options:

  1. Start again. You can made this faster by re-using the .git/lshistory.bak if you've only done one rebase. That will save you heaps of time if you have lots of history.
  2. Manually create a branch master_cc (ie git branch master_cc). This represents the last commit that was pulled from Clearcase previous. It is meant to highlight any changes that you have made on master since (but haven't pushed yet).

I'm worried that you got into this state somehow, so it means something went wrong which may cause more problems. Did you create commits before doing your first rebase?

In any case, it's not a big deal but just a matter of sorting out where things went off track. Let me know how you go.

Charles

@eis
Copy link
Author

eis commented Jan 26, 2012

Ok, started again with a machine having considerably more memory (12GB vs 2GB) and didn't have the issue then (have another issue now, opening issue about that too..). Thank you.

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

No branches or pull requests

2 participants