git-fame-rb icon indicating copy to clipboard operation
git-fame-rb copied to clipboard

Does not work in subdirectories

Open NobbZ opened this issue 9 years ago • 13 comments

given the following folderstructure

+ project
  + .git
  + subfolder

I can run git fame only in project while I do get Error: Branch 'master' does not exist. in any subfolder. It worked pretty well with 1.7.3 where I got a fame-table of the corresponding subfolder exclusively.

NobbZ avatar Jun 26 '16 12:06 NobbZ

In the latest version you need to specify the git directory if you aren't in the same location as the .git folder. I'm not sure why I designed it this way, but I remember I had a good reason for it :) You can set the path manually using --repository="../my/path.

oleander avatar Oct 21 '16 02:10 oleander

@oleander I am still getting the "Error: Branch 'master' does not exist." even after giving the below git fame --branch=master --repository="."

git-fame 2.5.1 (c) 2012-2016 Linus Oleander Am running on gitBash on windows, gem version 2.5.1

rsharmachamp1 avatar Nov 24 '16 18:11 rsharmachamp1

@rsharmachamp1 Sorry about that, lets see if we can fix it. Is the .git folder located in . as you specified?

oleander avatar Nov 25 '16 14:11 oleander

yes, its there, and I tried in master as well as other branches too. for all branches it says "<branch_name> does not exist"

rsharmachamp1 avatar Nov 25 '16 15:11 rsharmachamp1

What does git branch yield? Also, could you try to specify the output of git rev-parse --show-toplevel as the directory to --repository=? So if it yields /a/b/c try running git fame --repository="/a/b/c".

oleander avatar Nov 25 '16 16:11 oleander

$ git branch

  • develop master milestone_m19

Both of the below give same "Error: Branch 'master' does not exist." git fame --repository="/C/src/git/rahuls_test" git fame --repository="C:/src/git/rahuls_test"

I am in C:/src/git/rahuls_test while running all commands, .git directory is also located here.

rsharmachamp1 avatar Nov 26 '16 14:11 rsharmachamp1

Same issue here. Running windows.

C:\work\project>git branch
* develop
  feature/coupons
  feature/orders
  feature/transform

C:\work\project>git-fame --branch=develop .
Error: Branch 'develop' does not exist.
Try --help for help.

C:\work\project>git-fame .
Error: Branch 'master' does not exist.
Try --help for help.

Petah avatar Dec 16 '16 12:12 Petah

I run git fame in project's folder ,git bash here show "print(tabulate(auth_stats, stats_tot, args["--sort"])) UnicodeEncodeError: 'ascii' codec can't encode characters in position 4552-4554: ordinal not in range(128)".

moyulcy avatar Apr 17 '17 06:04 moyulcy

Having the same issue, running in project's folder (where .git is located) displays "Error: Branch 'master' does not exist."

kazykenov avatar Jun 21 '17 12:06 kazykenov

Same issue, same scenario, running windows

garethrepton avatar Sep 13 '17 13:09 garethrepton

Same problem here. Also running windows. Using bash through cmder with git version 2.14.2.windows.1

korthout avatar Oct 20 '17 09:10 korthout

Hi, i have exactly the same issue and is blocking my activity on git fame. How do we resolve this? Kindly assist.

kannanbalu avatar Jan 07 '18 18:01 kannanbalu

I've found a work for windows which is to use Ubuntu Bash windows feature. From there install git_fame and go.

jackdh avatar Mar 08 '18 13:03 jackdh