Skip to content

Commit 154c7d0

Browse files
committed
Merge branch 'maint' of git://linux-nfs.org/~bfields/git into maint
* 'maint' of git://linux-nfs.org/~bfields/git: Documentation: Fix references to deprecated commands user-manual: mention "..." in "Generating diffs", etc. user-manual: Add section "Why bisecting merge commits can be harder ..." git-remote.txt: fix example url
2 parents 005e2df + c251005 commit 154c7d0

File tree

4 files changed

+81
-13
lines changed

4 files changed

+81
-13
lines changed

Documentation/core-tutorial.txt

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1082,11 +1082,6 @@ server like git Native transport does. Any stock HTTP server
10821082
that does not even support directory index would suffice. But
10831083
you must prepare your repository with `git-update-server-info`
10841084
to help dumb transport downloaders.
1085-
+
1086-
There are (confusingly enough) `git-ssh-fetch` and `git-ssh-upload`
1087-
programs, which are 'commit walkers'; they outlived their
1088-
usefulness when git Native and SSH transports were introduced,
1089-
and not used by `git pull` or `git push` scripts.
10901085

10911086
Once you fetch from the remote repository, you `merge` that
10921087
with your current branch.

Documentation/git-get-tar-commit-id.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ git-get-tar-commit-id(1)
33

44
NAME
55
----
6-
git-get-tar-commit-id - Extract commit ID from an archive created using git-tar-tree
6+
git-get-tar-commit-id - Extract commit ID from an archive created using git-archive
77

88

99
SYNOPSIS
@@ -14,12 +14,12 @@ SYNOPSIS
1414
DESCRIPTION
1515
-----------
1616
Acts as a filter, extracting the commit ID stored in archives created by
17-
git-tar-tree. It reads only the first 1024 bytes of input, thus its
17+
gitlink:git-archive[1]. It reads only the first 1024 bytes of input, thus its
1818
runtime is not influenced by the size of <tarfile> very much.
1919

2020
If no commit ID is found, git-get-tar-commit-id quietly exists with a
2121
return code of 1. This can happen if <tarfile> had not been created
22-
using git-tar-tree or if the first parameter of git-tar-tree had been
22+
using git-archive or if the first parameter of git-archive had been
2323
a tree ID instead of a commit ID or tag.
2424

2525

Documentation/git-remote.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ $ git remote
9191
origin
9292
$ git branch -r
9393
origin/master
94-
$ git remote add linux-nfs git://linux-nfs.org/pub/nfs-2.6.git
94+
$ git remote add linux-nfs git://linux-nfs.org/pub/linux/nfs-2.6.git
9595
$ git remote
9696
linux-nfs
9797
origin

Documentation/user-manual.txt

Lines changed: 77 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -658,16 +658,23 @@ gitlink:git-diff[1]:
658658
$ git diff master..test
659659
-------------------------------------------------
660660

661-
Sometimes what you want instead is a set of patches:
661+
That will produce the diff between the tips of the two branches. If
662+
you'd prefer to find the diff from their common ancestor to test, you
663+
can use three dots instead of two:
664+
665+
-------------------------------------------------
666+
$ git diff master...test
667+
-------------------------------------------------
668+
669+
Sometimes what you want instead is a set of patches; for this you can
670+
use gitlink:git-format-patch[1]:
662671

663672
-------------------------------------------------
664673
$ git format-patch master..test
665674
-------------------------------------------------
666675

667676
will generate a file with a patch for each commit reachable from test
668-
but not from master. Note that if master also has commits which are
669-
not reachable from test, then the combined result of these patches
670-
will not be the same as the diff produced by the git-diff example.
677+
but not from master.
671678

672679
[[viewing-old-file-versions]]
673680
Viewing old file versions
@@ -2554,6 +2561,72 @@ branches into their own work.
25542561
For true distributed development that supports proper merging,
25552562
published branches should never be rewritten.
25562563

2564+
[[bisect-merges]]
2565+
Why bisecting merge commits can be harder than bisecting linear history
2566+
-----------------------------------------------------------------------
2567+
2568+
The gitlink:git-bisect[1] command correctly handles history that
2569+
includes merge commits. However, when the commit that it finds is a
2570+
merge commit, the user may need to work harder than usual to figure out
2571+
why that commit introduced a problem.
2572+
2573+
Imagine this history:
2574+
2575+
................................................
2576+
---Z---o---X---...---o---A---C---D
2577+
\ /
2578+
o---o---Y---...---o---B
2579+
................................................
2580+
2581+
Suppose that on the upper line of development, the meaning of one
2582+
of the functions that exists at Z is changed at commit X. The
2583+
commits from Z leading to A change both the function's
2584+
implementation and all calling sites that exist at Z, as well
2585+
as new calling sites they add, to be consistent. There is no
2586+
bug at A.
2587+
2588+
Suppose that in the meantime on the lower line of development somebody
2589+
adds a new calling site for that function at commit Y. The
2590+
commits from Z leading to B all assume the old semantics of that
2591+
function and the callers and the callee are consistent with each
2592+
other. There is no bug at B, either.
2593+
2594+
Suppose further that the two development lines merge cleanly at C,
2595+
so no conflict resolution is required.
2596+
2597+
Nevertheless, the code at C is broken, because the callers added
2598+
on the lower line of development have not been converted to the new
2599+
semantics introduced on the upper line of development. So if all
2600+
you know is that D is bad, that Z is good, and that
2601+
gitlink:git-bisect[1] identifies C as the culprit, how will you
2602+
figure out that the problem is due to this change in semantics?
2603+
2604+
When the result of a git-bisect is a non-merge commit, you should
2605+
normally be able to discover the problem by examining just that commit.
2606+
Developers can make this easy by breaking their changes into small
2607+
self-contained commits. That won't help in the case above, however,
2608+
because the problem isn't obvious from examination of any single
2609+
commit; instead, a global view of the development is required. To
2610+
make matters worse, the change in semantics in the problematic
2611+
function may be just one small part of the changes in the upper
2612+
line of development.
2613+
2614+
On the other hand, if instead of merging at C you had rebased the
2615+
history between Z to B on top of A, you would have gotten this
2616+
linear history:
2617+
2618+
................................................................
2619+
---Z---o---X--...---o---A---o---o---Y*--...---o---B*--D*
2620+
................................................................
2621+
2622+
Bisecting between Z and D* would hit a single culprit commit Y*,
2623+
and understanding why Y* was broken would probably be easier.
2624+
2625+
Partly for this reason, many experienced git users, even when
2626+
working on an otherwise merge-heavy project, keep the history
2627+
linear by rebasing against the latest upstream version before
2628+
publishing.
2629+
25572630
[[advanced-branch-management]]
25582631
Advanced branch management
25592632
==========================

0 commit comments

Comments
 (0)