last day (14 days later) » 

07:23
1
A: How can the commit stats show negative total line count?

codeWizardWhy? I would expect lines added to be always a number greater or equal than lines removed If you deleted a huge part of the file so those lines are removed. The numbers are very simple: How many lines were added (+) How how many were deleted (-) Why cant the number be like this? The 2...

before I deleted the file I had to add it in the repo and that would also be counted in the stats?
You right, all your changes are counted. added + removed
so, my whole question is, how could i remove lines if I didn't add them beforehand? Hence how can the total be negative? I still don't get it.
Its simply sum of how many lines added vs deleted not how many lines of code the project has
let me explain: Now in your repo you have file with 100 lines. you removed 5 lines and added 5 lines (different ones). the status will display +++++----- which stands for 5 added & 5 removed. There is no reference to the total number of lines in teh file
The numbers are reflecting the changes compared to the previous commit. type git show to view the changes
honestly I still don't get it. I would probably need an example of commit history to understand it.
07:23
Hi there.
Let me show you an example:
a.txt

line1
line2
line3
Good question Emmanuel!
Ok so far?
go on codeWizard
now i modify the file:

line1
line2
line4
it now reads 4++ 1--
07:24
what have i done to the file:

1 added new line (line4)
2. removed line 2
what will be teh summary of this?
1 line (-) removed
1 line (+) added
that is a summary of the last commit only
just a little
You are tight
after the initial commit
what would be the stats? 3++ 0-- right?
07:26
ok, then 4++ 1-- i follow
jl.
jl.
so how do you get to a negative in total?
but in git hub the contributor display the total number of lines modified
here is how you get negative value:
line1
line2
line3
is chaged to:
line1
3++ 2-- right?
no, there is no ++
only --
i did not add any lines
but we said earlier after the initial commit you get 3++ 0--
07:27
well you did in your first commit :)
ok but that repo has a single contributor
jl.
jl.
@codeWizard that is just your last commit summary, not total
So since he stared it he wrote X lines an remove Y lines. he did not start the project from screech, he imported X lines of code for the first commit so he started from Y lines
then he removed X and added Y or whatever
so you're saying the first commit does not count?
no way in hell the first commit was 20kLOC
07:29
1 sec
67++ 0--
oohhh...
the author of the first commit...
it's written "unknown"
that's got to be related to the problem
there you go :)
up to dec 26 the author was "unknown"
after that it switches to the real author
still, surprising that 20kLOC would be added in that interval
but if some commits have an unknown author
that could explain it
Agreed.
this is why, the starting point is thos 20K lines or whatever
thats the GAP :-)
you right
someone else committed without setting his username and or email.
I missed the point that there was only 1 contributer
there is another streak of unknown, dec 28 - jan 1
i am the only author, but from two machines
maybe i did not set up my email in git
07:34
please paste the url here
which url?
i'll write the answer then probably
Cool that you found it
mention that the strange thing is that the project only have single contributer thats why the number did not make sence

last day (14 days later) »