The new option, --stage=<n>, lets you copy out from an unmerged,
higher stage. This is to help the new merge world order during
a nontrivial merge.
Signed-off-by: Junio C Hamano <junkio@cox.net>
The merge-one-file used to leave the working tree intact, but
it has long been changed to leave the merge result there since
2a68a8659f commit.
Signed-off-by: Junio C Hamano <junkio@cox.net>
The file parameter is better spelled just "file", not "any file
on the filesystem". We stress that in the description text
later anyway.
Signed-off-by: Junio C Hamano <junkio@cox.net>
More $ shell prompts in examples.
Minor English grammar improvements.
Added a few "See Also"s.
Use back-ticks on more command examples.
Signed-off-by: Jon Loeliger <jdl@freescale.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
The branch policy script I outlined was improved and polished by
Carl and posted on the list twice since then. It is a shame not
to pick it up, so replace the original outline in
howto/update-hook-example.txt with the latest from Carl.
Also talk about setting up git-shell to allow git-push/git-fetch
only SSH access to a shared repository host in the tutorial.
Signed-off-by: Junio C Hamano <junkio@cox.net>
Mention documentation pages that talk about update and
post-update hooks from git-push, because a frequently asked
question is "I want X to happen when I push" and people would
not know to look at git-receive-pack documentation until they
understand that is what runs on the other end.
Signed-off-by: Junio C Hamano <junkio@cox.net>
The table facility was nice in rendering HTML but was disastrous
for man page. Reword the text and do not use table for now.
Signed-off-by: Junio C Hamano <junkio@cox.net>
Work-around asciidoc manpage trouble that does not seem to allow
more than one line in the SYNOPSIS section.
Signed-off-by: Junio C Hamano <junkio@cox.net>
Also work-around asciidoc manpage trouble that does not seem to
allow more than one line in the SYNOPSIS section.
Signed-off-by: Junio C Hamano <junkio@cox.net>
This switch was not documented properly. I decided not to mention
the --no-edit switch in the git-cherry-pick documentation since
we always default to no editing.
Signed-off-by: Petr Baudis <pasky@suse.cz>
Signed-off-by: Junio C Hamano <junkio@cox.net>
With this, you can say "git-show-branch topic/* master" to show
all the topic branches you have under .git/refs/heads/topic/ and
your master branch. Another example is "git-show-branch --list
v1.0*" to show all the v1.0 tags. You can disambiguate by
saying "heads/topic/*" to show only topic branches if you have
tags under .git/refs/tags/topic/ as well.
Signed-off-by: Junio C Hamano <junkio@cox.net>
This patch aims to freshen up a bit the git-ls-tree documentation. It hints
that the list of paths are in fact patterns to be matched, explains the new
-t, --name-only and --name-status options, corrects the original autorship
information to refer to yours sincerely, corrects several grammar mistakes,
etc.
Since the documentation still deserves some significant work (at least
proper description of the pattern matching), I also added the stub notice.
Signed-off-by: Petr Baudis <pasky@suse.cz>
Signed-off-by: Junio C Hamano <junkio@cox.net>
This adds '-e' option to git-cat-file, to test for the existence
of the object.
This also cleans up the option-parsing in git-cat-file slightly.
[jc: HPA version had -n option which did rev-parse --verify; the
real value of this patch is the option parsing cleanup.]
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
Use the same trick Josef used to introduce line breaks for
git-mv documentation for now, to help HTML rendering. This
breaks manpages and we need to come up with a better solution.
Noticed by linux@horizon.com (No Name).
Signed-off-by: Junio C Hamano <junkio@cox.net>
This hopefully concludes the latest updates that changes the
behaviour of the merge on an unsuccessful automerge. Instead of
collapsing the conflicted path in the index to show HEAD, we
leave it unmerged, now that diff-files can compare working tree
files with higher stages.
Signed-off-by: Junio C Hamano <junkio@cox.net>
The option description header was there without body text, confusingly
getting rendered as if the description for --tags applied to the option.
Noticed by Carl Baldwin.
Signed-off-by: Junio C Hamano <junkio@cox.net>
Current default, merge-recursive, gives slightly different
message while working from merge-resolve which was used to
prepare the illustration in the tutorial.
Signed-off-by: Junio C Hamano <junkio@cox.net>
After thinking about it more, I realized that much of the change
I did on top of Linus' version does not make much sense. This
commit reverts it so that it by default shows diffs with stage0
paths or stage2 paths with working tree; the unmerged stage to
use can be overridden with -1/-2/-3 option (-2 is the default so
essentially is a no-op).
When the index file is unmerged, we are by definition in the
middle of a conflicting merge, and we should show the diff with
stage 2 by default. More importantly, paths without conflicts
are updated in the working tree and collapsed to stage0 in the
index, so showing diff with stage0 at the same time does not
hurt. In normal cases, stage0 entries should be in sync with
the working tree files and does not clutter the output. It even
helps the user to realize that the working tree has local
changes unrelated to the merge and remember to be careful not to
do a "git-commit -a" after resolving the conflicts.
When there is no unmerged entries, giving diff_unmerged_stage a
default value of 2 does not cause any harm, because it would not
be used anyway. So in all, always showing diff between stage0
paths and unmerged entries from a stage (defaulting to 2) is the
right thing to do, as Linus originally did.
Signed-off-by: Junio C Hamano <junkio@cox.net>
While resolving conflicted merge, it was not easy to compare the
working tree file with unmerged index entries. This commit
introduces new options -1/-2/-3 (with synonyms --base, --ours,
and --theirs) to compare working tree files with specified
stages.
When none of these options are given, the command defaults to -2
if the index file is unmerged, otherwise it acts as before.
[jc: majorly butchered from the version Linus originally posted.]
Signed-off-by: Junio C Hamano <junkio@cox.net>
One "svn log" (or its equivalent) per revision adds delay and server load.
Instead, open two SVN connections -- one for the log, and one for the files.
Positive side effect: Only those log entries which actually contain data
are committed => no more empty commits.
Also, change the "-l" option to set the maximum revision to be pulled,
not the number of revisions.
Signed-off-by: Junio C Hamano <junkio@cox.net>
In git-merge documentation, add a section to describe what happens to
the index and working tree during merge, and what their cleanliness
requirements are before the merge.
Signed-off-by: Junio C Hamano <junkio@cox.net>
Specifying the value for a single letter, single dash option
parameter with equal sign looked funny, and more importantly
calling the flag to override encoding from utf-8 to something
else "-u" (obviously abbreviated from "utf-8") did not make any
sense. So spell it out.
Signed-off-by: Junio C Hamano <junkio@cox.net>
The two synopsis lines have to be prefixed with a space
so that asciidoc inserts a line break inbetween for the
manual page.
Signed-off-by: Josef Weidendorfer <Josef.Weidendorfer@gmx.de>
Signed-off-by: Junio C Hamano <junkio@cox.net>
Dropped a fair amount of reundant code in favour of the library code
in path.c
Added option --strict-paths with documentation, with backwards
compatibility for whitelist entries with symlinks.
Everything that worked earlier still works insofar as I have
remembered testing it.
Signed-off-by: Andreas Ericsson <ae@op5.se>
Signed-off-by: Junio C Hamano <junkio@cox.net>
The "copying over packs" step is to prevent the objects
available in upstream repository to get expanted in the
subsystem maintainer tree, and is still valid if the upstream
repository do not live on the same machine. But if they are on
the same machine using objects/info/alternates is cleaner.
Signed-off-by: Junio C Hamano <junkio@cox.net>
This basically translates the man-page from 'git-developerish' to plain
english, adding some almost-sample output from git-status so users can
recognize what will happen.
Also mention explicitly that --mixed updates the index, while --soft
doesn't. I understood the old text to mean "--mixed is exactly like
--soft, but verbose".
Signed-off-by: Andreas Ericsson <ae@op5.se>
Signed-off-by: Junio C Hamano <junkio@cox.net>
Extend the regex syntax of value_regex so that prepending an exclamation
mark means non-match:
[core]
quetzal = "Dodo" for Brainf*ck
quetzal = "T. Rex" for Malbolge
quetzal = "cat"
You can match the third line with
git-config-set --get quetzal '! for '
Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Signed-off-by: Junio C Hamano <junkio@cox.net>
... namely
--replace-all, to replace any amount of matching lines, not just 0 or 1,
--get, to get the value of one key,
--get-all, the multivar version of --get, and
--unset-all, which deletes all matching lines from .git/config
Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Signed-off-by: Junio C Hamano <junkio@cox.net>
When fetching/pulling from a remote repository the "--tags" option
can be used to pull tags too. Document that it will limit the pull
to only commits reachable from the tags.
Signed-off-by: Tony Luck <tony.luck@intel.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
Now git-apply can grok binary replacement patches, give --binary
flag to git-am. As a safety measure, this is not by default
enabled, so that you do not let malicious e-mailed patch to
replace an arbitrary path with just a couple of lines (diff
index lines, the filename and string "Binary files "...) by
accident.
Signed-off-by: Junio C Hamano <junkio@cox.net>
A new option, --full-index, is introduced to diff family. This
causes the full object name of pre- and post-images to appear on
the index line of patch formatted output, to be used in
conjunction with --allow-binary-replacement option of git-apply.
Signed-off-by: Junio C Hamano <junkio@cox.net>
A new option, --allow-binary-replacement, is introduced.
When you feed a diff that records full SHA1 name of pre- and
post-image blob on its index line to git-apply with this option,
the post-image blob replaces the path if what you have in the
working tree matches the pre-image _and_ post-image blob is
already available in the object directory.
Later we _might_ want to enhance the diff output to also include
the full binary data of the post-image, to make this more
useful, but this is good enough for local rebasing application.
Signed-off-by: Junio C Hamano <junkio@cox.net>
It's by design a bit stupid (matching ^git rather than ^git-), so as
to work with 'gitk' and 'git' as well.
Signed-off-by: Andreas Ericsson <ae@op5.se>
Signed-off-by: Junio C Hamano <junkio@cox.net>
The program 'git' now has --exec-path which needs explaining.
Renamed old "DESCRIPTION" to "CORE GIT COMMANDS" to make room for
"OPTIONS" while following follow some sort of convention.
Also updated AUTHORS section to pat my own back a bit.
Signed-off-by: Andreas Ericsson <ae@op5.se>
Signed-off-by: Junio C Hamano <junkio@cox.net>
Many places in the documentation we still talked about reading
what commit is recorded in .git/HEAD or writing the new head
information into it, both assuming .git/HEAD is a symlink. That
is not necessarily so.
Signed-off-by: Junio C Hamano <junkio@cox.net>
This patch fixes some small problems with the documentation.
Signed-off-by: Nikolai Weibull <nikolai@bitwi.se>
Signed-off-by: Junio C Hamano <junkio@cox.net>