mirror of
https://github.com/git/git.git
synced 2026-03-14 10:53:25 +01:00
Merge branch 'master' into next
* master: Documentation: Define symref and update HEAD description Document git-runstatus git-apply: slightly clean up bitfield usage sparse fix: Using plain integer as NULL pointer sparse fix: non-ANSI function declaration git-apply: Documentation typo fix Fix git-for-each-refs broken for tags
This commit is contained in:
@@ -150,7 +150,7 @@ discouraged.
|
||||
* `strip` outputs warnings for a few such errors, strips out the
|
||||
trailing whitespaces and applies the patch.
|
||||
|
||||
--inacurate-eof::
|
||||
--inaccurate-eof::
|
||||
Under certain circumstances, some versions of diff do not correctly
|
||||
detect a missing new-line at the end of the file. As a result, patches
|
||||
created by such diff programs do not record incomplete lines
|
||||
|
||||
69
Documentation/git-runstatus.txt
Normal file
69
Documentation/git-runstatus.txt
Normal file
@@ -0,0 +1,69 @@
|
||||
git-runstatus(1)
|
||||
================
|
||||
|
||||
NAME
|
||||
----
|
||||
git-runstatus - A helper for git-status and git-commit
|
||||
|
||||
|
||||
SYNOPSIS
|
||||
--------
|
||||
'git-runstatus' [--color|--nocolor] [--amend] [--verbose] [--untracked]
|
||||
|
||||
|
||||
DESCRIPTION
|
||||
-----------
|
||||
Examines paths in the working tree that has changes unrecorded
|
||||
to the index file, and changes between the index file and the
|
||||
current HEAD commit. The former paths are what you _could_
|
||||
commit by running 'git-update-index' before running 'git
|
||||
commit', and the latter paths are what you _would_ commit by
|
||||
running 'git commit'.
|
||||
|
||||
If there is no path that is different between the index file and
|
||||
the current HEAD commit, the command exits with non-zero status.
|
||||
|
||||
Note that this is _not_ the user level command you would want to
|
||||
run from the command line. Use 'git-status' instead.
|
||||
|
||||
|
||||
OPTIONS
|
||||
-------
|
||||
--color::
|
||||
Show colored status, highlighting modified file names.
|
||||
|
||||
--nocolor::
|
||||
Turn off coloring.
|
||||
|
||||
--amend::
|
||||
Show status based on HEAD^1, not HEAD, i.e. show what
|
||||
'git-commit --amend' would do.
|
||||
|
||||
--verbose::
|
||||
Show unified diff of all file changes.
|
||||
|
||||
--untracked::
|
||||
Show files in untracked directories, too. Without this
|
||||
option only its name and a trailing slash are displayed
|
||||
for each untracked directory.
|
||||
|
||||
|
||||
OUTPUT
|
||||
------
|
||||
The output from this command is designed to be used as a commit
|
||||
template comments, and all the output lines are prefixed with '#'.
|
||||
|
||||
|
||||
Author
|
||||
------
|
||||
Originally written by Linus Torvalds <torvalds@osdl.org> as part
|
||||
of git-commit, and later rewritten in C by Jeff King.
|
||||
|
||||
Documentation
|
||||
--------------
|
||||
Documentation by David Greaves, Junio C Hamano and the git-list <git@vger.kernel.org>.
|
||||
|
||||
GIT
|
||||
---
|
||||
Part of the gitlink:git[7] suite
|
||||
|
||||
@@ -302,6 +302,9 @@ gitlink:git-request-pull[1]::
|
||||
gitlink:git-rev-parse[1]::
|
||||
Pick out and massage parameters.
|
||||
|
||||
gitlink:git-runstatus[1]::
|
||||
A helper for git-status and git-commit.
|
||||
|
||||
gitlink:git-send-email[1]::
|
||||
Send patch e-mails out of "format-patch --mbox" output.
|
||||
|
||||
|
||||
@@ -282,6 +282,13 @@ SCM::
|
||||
SHA1::
|
||||
Synonym for object name.
|
||||
|
||||
symref::
|
||||
Symbolic reference: instead of containing the SHA1 id itself, it
|
||||
is of the format 'ref: refs/some/thing' and when referenced, it
|
||||
recursively dereferences to this reference. 'HEAD' is a prime
|
||||
example of a symref. Symbolic references are manipulated with
|
||||
the gitlink:git-symbolic-ref[1] command.
|
||||
|
||||
topic branch::
|
||||
A regular git branch that is used by a developer to
|
||||
identify a conceptual line of development. Since branches
|
||||
|
||||
@@ -70,12 +70,16 @@ refs/tags/`name`::
|
||||
object, or a tag object that points at a commit object).
|
||||
|
||||
HEAD::
|
||||
A symlink of the form `refs/heads/'name'` to point at
|
||||
the current branch, if exists. It does not mean much if
|
||||
the repository is not associated with any working tree
|
||||
A symref (see glossary) to the `refs/heads/` namespace
|
||||
describing the currently active branch. It does not mean
|
||||
much if the repository is not associated with any working tree
|
||||
(i.e. a 'bare' repository), but a valid git repository
|
||||
*must* have such a symlink here. It is legal if the
|
||||
named branch 'name' does not (yet) exist.
|
||||
*must* have the HEAD file; some porcelains may use it to
|
||||
guess the designated "default" branch of the repository
|
||||
(usually 'master'). It is legal if the named branch
|
||||
'name' does not (yet) exist. In some legacy setups, it is
|
||||
a symbolic link instead of a symref that points at the current
|
||||
branch.
|
||||
|
||||
branches::
|
||||
A slightly deprecated way to store shorthands to be used
|
||||
|
||||
@@ -160,7 +160,7 @@ static int write_zip_entry(const unsigned char *sha1,
|
||||
void *buffer = NULL;
|
||||
void *deflated = NULL;
|
||||
|
||||
crc = crc32(0, Z_NULL, 0);
|
||||
crc = crc32(0, NULL, 0);
|
||||
|
||||
path = construct_path(base, baselen, filename, S_ISDIR(mode), &pathlen);
|
||||
if (verbose)
|
||||
|
||||
@@ -140,12 +140,15 @@ struct fragment {
|
||||
struct patch {
|
||||
char *new_name, *old_name, *def_name;
|
||||
unsigned int old_mode, new_mode;
|
||||
int is_rename, is_copy, is_new, is_delete, is_binary;
|
||||
int is_new, is_delete; /* -1 = unknown, 0 = false, 1 = true */
|
||||
int rejected;
|
||||
unsigned long deflate_origlen;
|
||||
int lines_added, lines_deleted;
|
||||
int score;
|
||||
int inaccurate_eof:1;
|
||||
unsigned int inaccurate_eof:1;
|
||||
unsigned int is_binary:1;
|
||||
unsigned int is_copy:1;
|
||||
unsigned int is_rename:1;
|
||||
struct fragment *fragments;
|
||||
char *result;
|
||||
unsigned long resultsize;
|
||||
|
||||
@@ -478,9 +478,9 @@ static void grab_sub_body_contents(struct atom_value *val, int deref, struct obj
|
||||
if (!strcmp(name, "subject"))
|
||||
v->s = copy_line(subpos);
|
||||
else if (!strcmp(name, "body"))
|
||||
v->s = bodypos;
|
||||
v->s = xstrdup(bodypos);
|
||||
else if (!strcmp(name, "contents"))
|
||||
v->s = subpos;
|
||||
v->s = xstrdup(subpos);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
extern int wt_status_use_color;
|
||||
|
||||
static const char runstatus_usage[] =
|
||||
"git-runstatus [--color|--nocolor] [--amend] [--verbose]";
|
||||
"git-runstatus [--color|--nocolor] [--amend] [--verbose] [--untracked]";
|
||||
|
||||
int cmd_runstatus(int argc, const char **argv, const char *prefix)
|
||||
{
|
||||
|
||||
@@ -90,7 +90,7 @@ static SHA_CTX input_ctx;
|
||||
static int input_fd, output_fd, mmap_fd;
|
||||
|
||||
/* Discard current buffer used content. */
|
||||
static void flush()
|
||||
static void flush(void)
|
||||
{
|
||||
if (input_offset) {
|
||||
if (output_fd >= 0)
|
||||
|
||||
@@ -844,7 +844,7 @@ unmap:
|
||||
die("index file corrupt");
|
||||
}
|
||||
|
||||
int discard_cache()
|
||||
int discard_cache(void)
|
||||
{
|
||||
int ret;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user