Merge branch 'maint'

* maint:
  Makefile: add merge_recursive.h to LIB_H
  Improve documentation for --dirstat diff option
  Bring local clone's origin URL in line with that of a remote clone
  Documentation: minor cleanup in a use case in 'git stash' manual
  Documentation: fix disappeared lines in 'git stash' manpage
  Documentation: fix reference to a for-each-ref option
maint
Junio C Hamano 2008-09-02 17:10:08 -07:00
commit 106db883b7
6 changed files with 19 additions and 19 deletions

View File

@ -59,12 +59,11 @@ endif::git-format-patch[]
lines. lines.


--dirstat[=limit]:: --dirstat[=limit]::
Output only the sub-directories that are impacted by a diff, Output the distribution of relative amount of changes (number of lines added or
and to what degree they are impacted. You can override the removed) for each sub-directory. Directories with changes below
default cut-off in percent (3) by "--dirstat=limit". If you a cut-off percent (3% by default) are not shown. The cut-off percent
want to enable "cumulative" directory statistics, you can use can be set with "--dirstat=limit". Changes in a child directory is not
the "--cumulative" flag, which adds up percentages recursively counted for the parent directory, unless "--cumulative" is used.
even when they have been already reported for a sub-directory.


--summary:: --summary::
Output a condensed summary of extended header information Output a condensed summary of extended header information

View File

@ -16,7 +16,7 @@ DESCRIPTION


Iterate over all refs that match `<pattern>` and show them Iterate over all refs that match `<pattern>` and show them
according to the given `<format>`, after sorting them according according to the given `<format>`, after sorting them according
to the given set of `<key>`. If `<max>` is given, stop after to the given set of `<key>`. If `<count>` is given, stop after
showing that many refs. The interpolated values in `<format>` showing that many refs. The interpolated values in `<format>`
can optionally be quoted as string literals in the specified can optionally be quoted as string literals in the specified
host language allowing their direct evaluation in that language. host language allowing their direct evaluation in that language.

View File

@ -159,7 +159,7 @@ perform a pull, and then unstash, like this:
+ +
---------------------------------------------------------------- ----------------------------------------------------------------
$ git pull $ git pull
... ...
file foobar not up to date, cannot merge. file foobar not up to date, cannot merge.
$ git stash $ git stash
$ git pull $ git pull
@ -174,7 +174,7 @@ make a commit to a temporary branch to store your changes away, and
return to your original branch to make the emergency fix, like this: return to your original branch to make the emergency fix, like this:
+ +
---------------------------------------------------------------- ----------------------------------------------------------------
... hack hack hack ... # ... hack hack hack ...
$ git checkout -b my_wip $ git checkout -b my_wip
$ git commit -a -m "WIP" $ git commit -a -m "WIP"
$ git checkout master $ git checkout master
@ -182,18 +182,18 @@ $ edit emergency fix
$ git commit -a -m "Fix in a hurry" $ git commit -a -m "Fix in a hurry"
$ git checkout my_wip $ git checkout my_wip
$ git reset --soft HEAD^ $ git reset --soft HEAD^
... continue hacking ... # ... continue hacking ...
---------------------------------------------------------------- ----------------------------------------------------------------
+ +
You can use 'git-stash' to simplify the above, like this: You can use 'git-stash' to simplify the above, like this:
+ +
---------------------------------------------------------------- ----------------------------------------------------------------
... hack hack hack ... # ... hack hack hack ...
$ git stash $ git stash
$ edit emergency fix $ edit emergency fix
$ git commit -a -m "Fix in a hurry" $ git commit -a -m "Fix in a hurry"
$ git stash apply $ git stash apply
... continue hacking ... # ... continue hacking ...
---------------------------------------------------------------- ----------------------------------------------------------------


Testing partial commits:: Testing partial commits::
@ -203,13 +203,13 @@ more commits out of the changes in the work tree, and you want to test
each change before committing: each change before committing:
+ +
---------------------------------------------------------------- ----------------------------------------------------------------
... hack hack hack ... # ... hack hack hack ...
$ git add --patch foo # add just first part to the index $ git add --patch foo # add just first part to the index
$ git stash save --keep-index # save all other changes to the stash $ git stash save --keep-index # save all other changes to the stash
$ edit/build/test first part $ edit/build/test first part
$ git commit foo -m 'First part' # commit fully tested change $ git commit -m 'First part' # commit fully tested change
$ git stash pop # prepare to work on all other changes $ git stash pop # prepare to work on all other changes
... repeat above five steps until one commit remains ... # ... repeat above five steps until one commit remains ...
$ edit/build/test remaining parts $ edit/build/test remaining parts
$ git commit foo -m 'Remaining parts' $ git commit foo -m 'Remaining parts'
---------------------------------------------------------------- ----------------------------------------------------------------

View File

@ -362,6 +362,7 @@ LIB_H += list-objects.h
LIB_H += ll-merge.h LIB_H += ll-merge.h
LIB_H += log-tree.h LIB_H += log-tree.h
LIB_H += mailmap.h LIB_H += mailmap.h
LIB_H += merge-recursive.h
LIB_H += object.h LIB_H += object.h
LIB_H += pack.h LIB_H += pack.h
LIB_H += pack-refs.h LIB_H += pack-refs.h

View File

@ -387,7 +387,7 @@ int cmd_clone(int argc, const char **argv, const char *prefix)


path = get_repo_path(repo_name, &is_bundle); path = get_repo_path(repo_name, &is_bundle);
if (path) if (path)
repo = path; repo = xstrdup(make_nonrelative_path(repo_name));
else if (!strchr(repo_name, ':')) else if (!strchr(repo_name, ':'))
repo = xstrdup(make_absolute_path(repo_name)); repo = xstrdup(make_absolute_path(repo_name));
else else

View File

@ -109,7 +109,7 @@ test_expect_success 'remove remote' '


cat > test/expect << EOF cat > test/expect << EOF
* remote origin * remote origin
URL: $(pwd)/one/.git URL: $(pwd)/one
Remote branch merged with 'git pull' while on branch master Remote branch merged with 'git pull' while on branch master
master master
New remote branch (next fetch will store in remotes/origin) New remote branch (next fetch will store in remotes/origin)
@ -140,7 +140,7 @@ test_expect_success 'show' '


cat > test/expect << EOF cat > test/expect << EOF
* remote origin * remote origin
URL: $(pwd)/one/.git URL: $(pwd)/one
Remote branch merged with 'git pull' while on branch master Remote branch merged with 'git pull' while on branch master
master master
Tracked remote branches Tracked remote branches
@ -169,7 +169,7 @@ test_expect_success 'prune' '


cat > test/expect << EOF cat > test/expect << EOF
Pruning origin Pruning origin
URL: $(pwd)/one/.git URL: $(pwd)/one
* [would prune] origin/side2 * [would prune] origin/side2
EOF EOF