Add usage statement to git-checkout.sh
PATCH 1/1 Add usage statement to git-checkout.sh
Signed-off-by Chris Shoemaker <[email protected]>
---
git-checkout.sh | 7 +++++++ 1 files changed, 7 insertions(+), 0 deletions(-)
2fcbb6e58c0902e19373305b7ea77234f5d3ffba
git-checkout.sh +7 -0
@@ -1,6 +1,10 @@ #!/bin/sh . git-sh-setup || die "Not a git archive" +usage () { + die "usage: git checkout [-f] [-b <new_branch>] [<branch>] [<paths>...]" +} + old=$(git-rev-parse HEAD) new= force=
@@ -26,6 +30,9 @@ while [ "$#" != "0" ]; do --) break ;; + -*) + usage + ;; *) if rev=$(git-rev-parse --verify "$arg^0" 2>/dev/null) then
PATCH 1/1 Add to documentation of git-update-index arguments and usage.
Removed unknown [--version] option.
Signed-off-by Chris Shoemaker <[email protected]>
---
Documentation/git-update-index.txt | 28 ++++++++++++++++++++++++---- update-index.c | 2 +- 2 files changed, 25 insertions(+), 5 deletions(-)
f51a2698073b75c6e0e0f96c0f1f6432167ed85b
Documentation/git-update-index.txt +24 -4
@@ -9,12 +9,13 @@ git-update-index - Modifies the index or SYNOPSIS -------- 'git-update-index' - [--add] [--remove] [--refresh] [--replace] - [--ignore-missing] - [--force-remove] + [--add] [--remove | --force-remove] [--replace] + [--refresh [-q] [--unmerged] [--ignore-missing]] [--cacheinfo <mode> <object> <file>]\* - [--info-only] + [--chmod=(+|-)x] + [--info-only] [--index-info] [-z] [--stdin] + [--verbose] [--] [<file>]\* DESCRIPTION
@@ -42,12 +43,28 @@ OPTIONS Looks at the current cache and checks to see if merges or updates are needed by checking stat() information. +-q:: + Quiet. If --refresh finds that the cache needs an update, the + default behavior is to error out. This option makes + git-update-index continue anyway. + +--unmerged:: + If --refresh finds unmerged changes in the cache, the default + behavior is to error out. This option makes git-update-index + continue anyway. + --ignore-missing:: Ignores missing files during a --refresh --cacheinfo <mode> <object> <path>:: Directly insert the specified info into the cache. +--index-info:: + Read index info from stdin. + +--chmod=(+|-)x:: + Set the execute permissions on the updated files. + --info-only:: Do not create objects in the object database for all <file> arguments that follow this flag; just insert
@@ -70,6 +87,9 @@ OPTIONS read list of paths from the standard input. Paths are separated by LF (i.e. one path per line) by default. +--verbose:: + Report what is being added and removed from index. + -z:: Only meaningful with `--stdin`; paths are separated with NUL character instead of LF.
update-index.c +1 -1
@@ -393,7 +393,7 @@ static void read_index_info(int line_ter }static const char update_index_usage[] = -"git-update-index [-q] [--add] [--replace] [--remove] [--unmerged] [--refresh] [--cacheinfo] [--chmod=(+|-)x] [--info-only] [--force-remove] [--stdin] [--index-info] [--ignore-missing] [-z] [--version] [--] <file>..." ; +"git-update-index [-q] [--add] [--replace] [--remove] [--unmerged] [--refresh] [--cacheinfo] [--chmod=(+|-)x] [--info-only] [--force-remove] [--stdin] [--index-info] [--ignore-missing] [-z] [--verbose] [--] <file>..." ;int main (int argc,const char **argv) {
PATCH 1/1 Add to usage and docs for git-add.sh
Signed-off-by Chris Shoemaker <[email protected]>
---
Documentation/git-add.txt | 9 ++++++++- git-add.sh | 7 +++++++ 2 files changed, 15 insertions(+), 1 deletions(-)
2bc166e3e8241432b88ff793ec69a979a7056b3e
Documentation/git-add.txt +8 -1
@@ -7,7 +7,7 @@ git-add - Add files to the cache. SYNOPSIS -------- -'git-add' <file>... +'git-add' [-n] [-v] <file>... DESCRIPTION -----------
@@ -19,6 +19,13 @@ OPTIONS <file>...:: Files to add to the cache. +-n:: + Don't actually add the file(s), just show if they exist. + +-v:: + Be verbose. + + Author ------ Written by Linus Torvalds <[email protected]>
git-add.sh +7 -0
@@ -1,5 +1,9 @@ #!/bin/sh +usage() { + die "usage: git add [-n] [-v] <file>..." +} + show_only= verbose= while : ; do
@@ -10,6 +14,9 @@ while : ; do -v) verbose=--verbose ;; + -*) + usage + ;; *) break ;;