path: root/wt-status.h
AgeCommit message (Collapse)Author
2007-12-13git-commit: squelch needless message during an empty mergeJunio C Hamano
When recording a merge that conflicted and ends up in no changes after manual resolution, commit callchain looked like this: cmd_commit() -> prepare_log_message() -> run_status() -> wt_status_print() This invocation of run_status() is asked to find out if there is a committable change, but it unconditionally gave instructions such as "use git-add" at the same time. When in merge, we do allow an empty change to be recorded, so after showing this message the code still went ahead and made a commit. This introduces "nowarn" parameter to run_status() to avoid these useless messages. If we are not allowed to create an empty commit, we already call run_status() again in the original codepath, and the message will be shown from that call anyway. Signed-off-by: Junio C Hamano <>
2007-12-08add status.relativePaths config variableJeff King
The output of git-status was recently changed to output relative paths. Setting this variable to false restores the old behavior for any old-timers that prefer it. Signed-off-by: Jeff King <> Signed-off-by: Junio C Hamano <>
2007-11-23builtin-commit: do not color status output shown in the message templateJunio C Hamano
Noticed by Ping Yin on the list. Signed-off-by: Junio C Hamano <>
2007-11-23git status: show relative paths when run in a subdirectoryJohannes Schindelin
To show the relative paths, the function formerly called quote_crlf() (now called quote_path()) takes the prefix as an additional argument. While at it, the static buffers were replaced by strbufs. Signed-off-by: Johannes Schindelin <> Signed-off-by: Junio C Hamano <>
2007-09-19Enable wt-status to run against non-standard index file.Kristian Høgsberg
We still default to get_index_file(), but this can be overridden by setting wt_status.index_file after calling wt_status_prepare(). Signed-off-by: Kristian Høgsberg <> Signed-off-by: Junio C Hamano <>
2007-09-19Enable wt-status output to a given FILE pointer.Kristian Høgsberg
Still defaults to stdout, but you can now override wt_status.fp after calling wt_status_prepare(). Signed-off-by: Kristian Høgsberg <> Signed-off-by: Junio C Hamano <>
2007-01-10Provide better feedback for the untracked only case in status outputJürgen Rühle
Since 98bf8a47c296f51ea9722fef4bb81dbfb70cd4bb status would claim that git-commit could be useful even if there are no changes except untracked files. Since wt-status is already computing all the information needed go the whole way and actually track the (non-)emptiness of all three sections separately, unify the code, and provide useful messages for each individual case. Thanks to Junio and Michael Loeffler for suggestions. Signed-off-by: Jürgen Rühle <>
2007-01-03Improve "nothing to commit" part of status outputJürgen Rühle
Previously git-status in a clean working directory would advice the user to use git add. This isn't very helpful when there is nothing to add in the working directory, therefore note a clean working directory while displaying the other sections and print the appropriate message for each case. Signed-off-by: Jürgen Rühle <> Signed-off-by: Junio C Hamano <>
2006-09-13Teach runstatus about --untrackedJohannes Schindelin
Actually, teach runstatus what to do if it is not passed; it should not list the contents of completely untracked directories, but only the name of that directory (plus a trailing '/'). [jc: with comments by Jeff King to match hide-empty-directories behaviour of the original.] Signed-off-by: Johannes Schindelin <> Signed-off-by: Junio C Hamano <> convert run_status to a C builtinJeff King
This creates a new git-runstatus which should do roughly the same thing as the run_status function from Except for color support, the main focus has been to keep the output identical, so that it can be verified as correct and then used as a C platform for other improvements to the status printing code. Signed-off-by: Jeff King <> Signed-off-by: Junio C Hamano <>