This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 267877 - Adding files is ignored when going to comit
Summary: Adding files is ignored when going to comit
Status: NEW
Alias: None
Product: versioncontrol
Classification: Unclassified
Component: Git (show other bugs)
Version: 8.2
Hardware: PC Mac OS X
: P4 normal (vote)
Assignee: Ondrej Vrabec
Depends on:
Reported: 2016-09-05 05:11 UTC by brettryan
Modified: 2016-09-06 03:42 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Note You need to log in before you can comment on or make changes to this bug.
Description brettryan 2016-09-05 05:11:05 UTC
The Git action "Add" (Git > Add) on a project node does not affect what is being committed with a commit.

Steps to reproduce

1. Modify two files within a git project.
2. Invoke Git > Add for one file
3. Invoke Git > commit
4. Enter commit message and complete dialog.

Expected behaviour

Only "added" files should be committed

Actual behaviour

All files are both selected within the commit dialog and get committed when completed.

This leads to the question, what's the point on adding if the tick-boxes are available? Does this not make adding redundant? Adding from a command line makes sense, but it doesn't really make as much sense in the IDE.

In the interest of simplicity I would vote to remove the add function in order to make the use-case simpler.
Comment 1 Ondrej Vrabec 2016-09-05 06:54:34 UTC
(In reply to brettryan from comment #0)
> The Git action "Add" (Git > Add) on a project node does not affect what is
> being committed with a commit.
It should. You're probably looking at a wrong view in the commit dialog - you must be in HEAD/Working Tree mode. If you switch to HEAD/Index mode, you will be able to commit only the files you have added.

Git Add is useful, mainly for those who understand how Git staging index works, so removing it does not sound like a good message to them. Also it's useful when you're resolving conflicts during merge in which case git add is the command that resolves the conflict.
Comment 2 brettryan 2016-09-06 03:42:59 UTC
Hmm, ok. It appears the default view is HEAD/Working, those two buttons are fairly discrete to be missed as they are tiny icons, I would recommend at least adding text beside them to make the interface more understandable.

I normally don't use the NetBeans Git interface because I find it too clumsy for accessibility users and it's much faster to use the command line. I was performing a NetCAT test where this was picked up. Being a command line user I do understand the staging principal, but from a UI perspective I would imagine that the tick-boxes would represent the staging itself.