From d4040e0a1728035af34fc67907be088ca14d31c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?SZEDER=20G=C3=A1bor?= Date: Mon, 1 Sep 2008 23:02:09 +0200 Subject: Documentation: fix reference to a for-each-ref option MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ... to match the synopsis section Signed-off-by: SZEDER Gábor Signed-off-by: Junio C Hamano --- Documentation/git-for-each-ref.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/git-for-each-ref.txt b/Documentation/git-for-each-ref.txt index eae6c0e7bc..ebd7c5fbb3 100644 --- a/Documentation/git-for-each-ref.txt +++ b/Documentation/git-for-each-ref.txt @@ -16,7 +16,7 @@ DESCRIPTION Iterate over all refs that match `` and show them according to the given ``, after sorting them according -to the given set of ``. If `` is given, stop after +to the given set of ``. If `` is given, stop after showing that many refs. The interpolated values in `` can optionally be quoted as string literals in the specified host language allowing their direct evaluation in that language. -- cgit v1.2.3 From 9da6f0fff2d6ab4bfad36099b53c911bc498fc2e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?SZEDER=20G=C3=A1bor?= Date: Tue, 2 Sep 2008 03:35:24 +0200 Subject: Documentation: fix disappeared lines in 'git stash' manpage MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Asciidoc removes lines starting with a dot when creating manpages. Since those lines were comments in use case examples showing shell commands, preceed those lines with a hash sign. Signed-off-by: SZEDER Gábor Signed-off-by: Junio C Hamano --- Documentation/git-stash.txt | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/Documentation/git-stash.txt b/Documentation/git-stash.txt index 49e2296a24..e64e1f1244 100644 --- a/Documentation/git-stash.txt +++ b/Documentation/git-stash.txt @@ -159,7 +159,7 @@ perform a pull, and then unstash, like this: + ---------------------------------------------------------------- $ git pull -... + ... file foobar not up to date, cannot merge. $ git stash $ 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: + ---------------------------------------------------------------- -... hack hack hack ... +# ... hack hack hack ... $ git checkout -b my_wip $ git commit -a -m "WIP" $ git checkout master @@ -182,18 +182,18 @@ $ edit emergency fix $ git commit -a -m "Fix in a hurry" $ git checkout my_wip $ git reset --soft HEAD^ -... continue hacking ... +# ... continue hacking ... ---------------------------------------------------------------- + You can use 'git-stash' to simplify the above, like this: + ---------------------------------------------------------------- -... hack hack hack ... +# ... hack hack hack ... $ git stash $ edit emergency fix $ git commit -a -m "Fix in a hurry" $ git stash apply -... continue hacking ... +# ... continue hacking ... ---------------------------------------------------------------- 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: + ---------------------------------------------------------------- -... hack hack hack ... +# ... hack hack hack ... $ git add --patch foo # add just first part to the index $ git stash save --keep-index # save all other changes to the stash $ edit/build/test first part $ git commit foo -m 'First part' # commit fully tested change $ 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 $ git commit foo -m 'Remaining parts' ---------------------------------------------------------------- -- cgit v1.2.3 From f733c70941a79e8d7a05d16fac89294ef0366bda Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?SZEDER=20G=C3=A1bor?= Date: Tue, 2 Sep 2008 03:45:01 +0200 Subject: Documentation: minor cleanup in a use case in 'git stash' manual MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit There is no need to explicitly pass the file to be committed to 'git commit', because it's contents is already in the index. Signed-off-by: SZEDER Gábor Signed-off-by: Junio C Hamano --- Documentation/git-stash.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/git-stash.txt b/Documentation/git-stash.txt index e64e1f1244..051f94d26f 100644 --- a/Documentation/git-stash.txt +++ b/Documentation/git-stash.txt @@ -207,7 +207,7 @@ each change before committing: $ git add --patch foo # add just first part to the index $ git stash save --keep-index # save all other changes to the stash $ 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 # ... repeat above five steps until one commit remains ... $ edit/build/test remaining parts -- cgit v1.2.3 From 86521acaca0cb9951d9ff5ac4bc2c736035267a0 Mon Sep 17 00:00:00 2001 From: Johan Herland Date: Mon, 1 Sep 2008 21:07:33 +0200 Subject: Bring local clone's origin URL in line with that of a remote clone On a local clone, "git clone" would use the fully DWIMmed path as the origin URL in the resulting repo. This was slightly inconsistent with the case of a remote clone where the _given_ URL was used as the origin URL (because the DWIMming was done remotely, and was therefore not available to "git clone"). This behaviour caused problems when cloning a local non-bare repo with relative submodule URLs, because these submodule URLs would then be resolved against the DWIMmed URL (e.g. "/repo/.git") instead of the given URL (e.g. "/repo"). This patch teaches "git clone" to use the _given_ URL - instead of the DWIMmed path - as the origin URL. This causes relative submodule URLs to be resolved correctly, as long the _given_ URL indicates the correct directory against which the submodule URLs should be resolved. The patch also updates a testcase that contained the old-style origin URLs. Signed-off-by: Johan Herland Signed-off-by: Junio C Hamano --- builtin-clone.c | 2 +- t/t5505-remote.sh | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/builtin-clone.c b/builtin-clone.c index c0e3086437..f44eceab3a 100644 --- a/builtin-clone.c +++ b/builtin-clone.c @@ -387,7 +387,7 @@ int cmd_clone(int argc, const char **argv, const char *prefix) path = get_repo_path(repo_name, &is_bundle); if (path) - repo = path; + repo = xstrdup(make_nonrelative_path(repo_name)); else if (!strchr(repo_name, ':')) repo = xstrdup(make_absolute_path(repo_name)); else diff --git a/t/t5505-remote.sh b/t/t5505-remote.sh index be9ee9326f..c4496635df 100755 --- a/t/t5505-remote.sh +++ b/t/t5505-remote.sh @@ -109,7 +109,7 @@ test_expect_success 'remove remote' ' cat > test/expect << EOF * remote origin - URL: $(pwd)/one/.git + URL: $(pwd)/one Remote branch merged with 'git pull' while on branch master master New remote branch (next fetch will store in remotes/origin) @@ -140,7 +140,7 @@ test_expect_success 'show' ' cat > test/expect << EOF * remote origin - URL: $(pwd)/one/.git + URL: $(pwd)/one Remote branch merged with 'git pull' while on branch master master Tracked remote branches @@ -169,7 +169,7 @@ test_expect_success 'prune' ' cat > test/expect << EOF Pruning origin -URL: $(pwd)/one/.git +URL: $(pwd)/one * [would prune] origin/side2 EOF -- cgit v1.2.3 From 62e00b0a9a72337a1ae2818ff3640e07c78db636 Mon Sep 17 00:00:00 2001 From: Heikki Orsila Date: Mon, 1 Sep 2008 03:50:28 +0300 Subject: Improve documentation for --dirstat diff option Signed-off-by: Heikki Orsila Signed-off-by: Junio C Hamano --- Documentation/diff-options.txt | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/Documentation/diff-options.txt b/Documentation/diff-options.txt index cba90fd27c..746646bb3d 100644 --- a/Documentation/diff-options.txt +++ b/Documentation/diff-options.txt @@ -59,12 +59,11 @@ endif::git-format-patch[] lines. --dirstat[=limit]:: - Output only the sub-directories that are impacted by a diff, - and to what degree they are impacted. You can override the - default cut-off in percent (3) by "--dirstat=limit". If you - want to enable "cumulative" directory statistics, you can use - the "--cumulative" flag, which adds up percentages recursively - even when they have been already reported for a sub-directory. + Output the distribution of relative amount of changes (number of lines added or + removed) for each sub-directory. Directories with changes below + a cut-off percent (3% by default) are not shown. The cut-off percent + can be set with "--dirstat=limit". Changes in a child directory is not + counted for the parent directory, unless "--cumulative" is used. --summary:: Output a condensed summary of extended header information -- cgit v1.2.3 From db3a95459cb873c302051b4b2b693be5ba248c13 Mon Sep 17 00:00:00 2001 From: Miklos Vajna Date: Wed, 3 Sep 2008 01:49:05 +0200 Subject: Makefile: add merge_recursive.h to LIB_H When modifying merge-recursive.h, for example builtin-merge-recursive.c have to be recompiled which was not true till now, causing various runtime errors using an incremental build. Signed-off-by: Miklos Vajna Signed-off-by: Junio C Hamano --- Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/Makefile b/Makefile index 00991b7c12..672ea74233 100644 --- a/Makefile +++ b/Makefile @@ -358,6 +358,7 @@ LIB_H += list-objects.h LIB_H += ll-merge.h LIB_H += log-tree.h LIB_H += mailmap.h +LIB_H += merge-recursive.h LIB_H += object.h LIB_H += pack.h LIB_H += pack-refs.h -- cgit v1.2.3