-
Notifications
You must be signed in to change notification settings - Fork 405
Conversation
Ok, i'll tinker with getting it updating the stage when staging in the UI, then updating the interface again to see wtf happens. |
@@ -91,4 +91,10 @@ export default class HunkLine { | |||
if (line.newLineno() > 0) this.newLineNumber = line.newLineno() | |||
this.emitChangeEvent() | |||
} | |||
|
|||
static fromGitUtilsObject(obj) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks like this isnt used. yar? nar?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So it seems git changes the line numbers in some cases. I remember this from when I was fighting with it. Make 3 changes so there are 3 hunks (see the file in fixtures dir for an example), stage the middle hunk, and part of the last hunk. What's staged: The lines the git package thinks are staged: Whats shown in the interface: |
A totally crappy thing to do is change the test to check for line origin and content. Obv no bueno as multiple lines could have those properties.
|
Yeah, great example 👍 I knew it couldn't be that easy! |
@benogle This seems to do The Right Thing®. If a line is staged on the command line, we show it as staged in the diff.