1
0
mirror of https://github.com/git/git.git synced 2024-10-06 09:51:24 +02:00
Commit Graph

1138 Commits

Author SHA1 Message Date
Junio C Hamano
d327b89a22 [PATCH] Tutorial update to adjust for -B fix
Now -B does not say silly "complete rewrite" anymore for small
files such as the one in the tutorial example.

Signed-off-by: Junio C Hamano <junkio@cox.net>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-06-12 20:40:19 -07:00
Junio C Hamano
2210100ac0 [PATCH] Fix rename/copy when dealing with temporarily broken pairs.
When rename/copy uses a file that was broken by diffcore-break
as the source, and the broken filepair gets merged back later,
the output was mislabeled as a rename.  In this case, the source
file ends up staying in the output, so we should label it as a
copy instead.

Signed-off-by: Junio C Hamano <junkio@cox.net>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-06-12 20:40:19 -07:00
Linus Torvalds
a7fa68c5f9 git-whatchanged: make default output format be pretty.
If you want the raw stuff, just do

	git-whatchanged --pretty=raw

and it wil act like it used to.
2005-06-12 20:35:04 -07:00
Linus Torvalds
ba88e54b1a git-diff-tree: fix output with just "--pretty".
It set verbose, but didn't set the output prefix to "diff-tree".
2005-06-12 20:34:09 -07:00
Junio C Hamano
a8db165ee9 [PATCH] Support commit_format in diff-tree
This steals --pretty command line option from rev-list and
teaches diff-tree to do the same.  With this change,

    $ git-whatchanged --pretty

would work as expected.

Signed-off-by: Junio C Hamano <junkio@cox.net>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-06-12 20:29:31 -07:00
Junio C Hamano
dc7090efbc [PATCH] Re-Fix SIGSEGV on unmerged files in git-diff-files -p
When an unmerged path was fed via diff_unmerged() into diffcore,
it eventually called run_diff() with "one" and "two" parameters
with NULL, but run_diff() was not written carefully enough to
notice this situation.

Signed-off-by: Junio C Hamano <junkio@cox.net>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-06-12 20:29:31 -07:00
Linus Torvalds
206de27efa git-apply: ignore empty git headers
A meaningful (ie non-empty) git patch always has more information in the
header than just the "diff --git" line itself: it needs to have either a
patch associated with it (which implies "---" and "+++" lines in the
header) or it needs to have rename/copy/delete/create information in it.

Just ignore git patches which have no change information. Otherwise we'll
end up with a patch that doesn't have filenames etc filled in, and we'll
be unhappy.
2005-06-12 09:37:49 -07:00
Junio C Hamano
025a0709b6 [PATCH] Bugfix: read-cache.c:write_cache() misrecords number of entries.
When we choose to omit deleted entries, we should subtract
numbers of such entries from the total number in the header.

Signed-off-by: Junio C Hamano <junkio@cox.net>

Oops.

Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-06-10 07:42:45 -07:00
Paul Mackerras
c2f6a02251 Show heads as well as tags 2005-06-10 07:54:49 +00:00
Linus Torvalds
aa16021efc git-read-tree: remove deleted files in the working directory
Only when "-u" is used of course.
2005-06-09 15:34:04 -07:00
Junio C Hamano
22f77b772d [PATCH] Add git-diff-stages command.
The diff-* brothers acquired a sibling, git-diff-stages.  With
an unmerged index file, you specify two stage numbers and it
shows the differences between them.

Signed-off-by: Junio C Hamano <junkio@cox.net>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-06-09 15:30:21 -07:00
Linus Torvalds
438195cced git-read-tree: add "--reset" flag
This is the same as "-m", but it will silently ignore any unmerged
entries, which makes it useful for efficiently forcing a new position
regardless of the state of the current index file.

IOW, to reset to a previous HEAD (in case you have had a failed
merge, for example), you'd just do

	git-read-tree -u --reset HEAD

which will also update your working tree to the right state.

NOTE! The "update" will not remove files that may have been added by the
merge.  Yet.
2005-06-09 12:51:01 -07:00
Linus Torvalds
98a96b00b8 One more time.. Clean up git-merge-one-file-script
This uses git-checkout-file to make sure that the full pathname is
created, instead of the script having to verify it by hand.  Also,
simplify the 3-way merge case by just writing to the right file and
setting the initial index contents early.
2005-06-08 17:56:09 -07:00
Linus Torvalds
e0226add28 Fix up git-merge-one-file-script
Junio points out that we may need to create the path leading
up the the file we merge.

And we need to be more careful with the "exec"s we've done
to exit on success - only do the on the last command in the
pipeline, not the first one ;)
2005-06-08 17:36:47 -07:00
Linus Torvalds
566487c8a6 Merge my and Petr's git-merge-one-file-script modifications 2005-06-08 16:54:23 -07:00
Petr Baudis
ec73962d8e [PATCH] git-merge-one-file-script cleanups from Cogito
Chain the resolving sequences (e.g. git-cat-file - chmod -
git-update-cache) through &&s so we stop right away in case one of the
command fails, and report the error code to the script caller.

Also add a copyright notice, some blank lines, ;; on a separate line,
and nicer error messages.

Signed-off-by: Petr Baudis <pasky@ucw.cz>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-06-08 16:51:26 -07:00
Linus Torvalds
ae3858e7e9 Make sure we error out if we can't remove a file on automatic merges.
Pointed out by Junio.
2005-06-08 16:35:30 -07:00
Petr Baudis
17ebe977d7 [PATCH] Tidy up some rev-list-related stuff
This patch tidies up the git-rev-list documentation and epoch.c, which
are in severe clash with the unwritten coding style now, and quite
unreadable.

It also fixes up compile failures with older compilers due to variable
declarations after code.

The patch mostly wraps lines before or on the 80th column, removes
plenty of superfluous empty lines and changes comments from // to /* */.

Signed-off-by: Petr Baudis <pasky@ucw.cz>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-06-08 15:59:09 -07:00
Junio C Hamano
f225b21807 [PATCH] Add read-tree -m 3-way merge tests.
This adds a set of tests to make sure that requirements on
existing cache entries are checked when a read-tree -m 3-way
merge is run with an already populated index file.

Signed-off-by: Junio C Hamano <junkio@cox.net>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-06-08 15:56:09 -07:00
Petr Baudis
8544a6f1b8 [PATCH] Fix git-merge-one-file permissions auto-merging
In the automerge case, permissions were not restored properly after the
merge tool was invoked and overwrote the target file.

Signed-off-by: Petr Baudis <pasky@ucw.cz>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-06-08 15:54:45 -07:00
Linus Torvalds
7f1d112962 Remove MERGE_HEAD after committing merge 2005-06-08 13:44:32 -07:00
Linus Torvalds
9c065315f7 Make "git commit" work correctly in the presense of a manual merge
This has gotten only very light testing, but something like this is
clearly necessary and did the right thing for the one case I threw at
it.
2005-06-08 13:33:15 -07:00
Linus Torvalds
3c65eb1849 cvs-migration: add more of a header to the "annotate" discussion 2005-06-08 13:19:31 -07:00
Christian Meder
1ae4ee8942 [PATCH] Miniscule correction of diff-format.txt
Add missing "space" element to the description of the diff-format.

Signed-off-by: Christian Meder <chris@absolutegiganten.org>
Acked-by: Petr Baudis <pasky@ucw.cz>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-06-08 13:09:01 -07:00
Jason McMullan
5d6ccf5ce7 [PATCH] Anal retentive 'const unsigned char *sha1'
Make 'sha1' parameters const where possible

Signed-off-by: Jason McMullan <jason.mcmullan@timesys.com>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-06-08 13:04:53 -07:00
Jonas Fonseca
e0f0e891c1 [PATCH] git-diff-cache: handle pathspec beginning with a dash
Parse everything after '--' as tree name or pathspec.

Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-06-08 13:03:25 -07:00
Linus Torvalds
2a68a8659f Leave merge failures in the filesystem
This changes how we handle merges: if a automated merge
fails, we will leave the index as a clean entry pointing
to the original branch, and leave the actual file _dirty_
the way the "merge" program left it.

You can then just do "git-diff-files -p" to see what the
merge conflicts did, fix them up, and commit the end result.

NOTE NOTE NOTE! Do _not_ use "git commit" to commit such
a merge. It won't set the parents right. I'll need to fix
that. In the meantime, you'd need to merge using

	git-commit-tree $(git-write) -p HEAD -p MERGE_HEAD

or something like that by hand.
2005-06-08 11:40:59 -07:00
Linus Torvalds
f9e7750621 Fix SIGSEGV on unmerged files in git-diff-files -p
NULL is not considered a VALID pathspec.
2005-06-08 11:31:53 -07:00
Junio C Hamano
7d95ee9351 [PATCH] Tests: read-tree -m test updates.
This updates t1000 (basic 3-way merge test) to check the merge
results for both successful cases (earlier one checked the
result for only one of them).  Also fixes typos in t1002 that
broke '&&' chain, potentially missing a test failure before the
chain got broken.

Signed-off-by: Junio C Hamano <junkio@cox.net>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-06-08 10:19:53 -07:00
Linus Torvalds
5b1ea09de1 Make default merge messages denser.
In particular, make them readable on one line since that's what all the
tools like git-shortlog and gitk end up showing.
2005-06-08 10:09:41 -07:00
Jon Seymour
4e7346735a [PATCH] three --merge-order bug fixes
This patch fixes three bugs in --merge-order support
    * mark_ancestors_uninteresting was unnecessarily exponential which
      caused a problem when a commit with no parents was merged near the
      head of something like the linux kernel
    * removed a spurious statement from find_base which wasn't
      apparently causing problems now, but wasn't correct either.
    * removed an unnecessarily strict check from find_base_for_list
      that causes a problem if git-rev-list commit ^parent-of-commit
      is specified.
    * added some unit tests which were accidentally omitted from
      original merge-order patch

The fix to mark_ancestors_uninteresting isn't an optimal fix - a full
graph scan will still be performed in this case even though it is
not strictly required. However, a full graph scan is linear
and still no worse than git-rev-list HEAD which runs in less than 2
seconds on a warm cache.

Signed-off-by: Jon Seymour <jon.seymour@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-06-08 09:37:10 -07:00
Sven Verdoolaege
32798c707e [PATCH] git-cvs2git: create tags
cvsps seems to put a space after the tag name, so we remove it first.
2005-06-08 08:17:29 -07:00
Linus Torvalds
af3f929f95 git-apply: creatign empty files is nonfatal
(but it will result in a warning)
2005-06-08 08:11:47 -07:00
Linus Torvalds
fcbfd5a6b2 Talk about "git cvsimport" in the cvs migration docs
We should add a lot more information about how you copy repositories,
pulling and pushing, merging etc.  Oh, well.  I'm not exactly known for
my documentation skills. Maybe somebody else will help me..
2005-06-07 15:52:06 -07:00
Junio C Hamano
28f8fafff8 [PATCH] Documentation: describe diff tweaking (fix).
I cannot count ;-)

Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-06-07 15:23:30 -07:00
Junio C Hamano
b0bf8f24e9 [PATCH] Start cvs-migration documentation
This does a section to talk about "cvs annotate".

Signed-off-by: Junio C Hamano <junkio@cox.net>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-06-07 15:23:30 -07:00
Linus Torvalds
a57f0b58d7 git-read-tree: -u without -m is meaningless. Don't allow it.
Also, documetn the "-u" in the usage string.
2005-06-07 15:20:39 -07:00
Linus Torvalds
b5b425074e git-read-tree: make one-way merge also honor the "update" flag
It didn't set CE_UPDATE before, so "-u" was a no-op.
2005-06-07 15:17:33 -07:00
Junio C Hamano
ccef66b55a [PATCH] read-tree: update documentation for 3-way merge.
This explains the new merge world order that formally assigns
specific meaning to each of three tree-ish command line
arguments.  It also mentions -u option

Signed-off-by: Junio C Hamano <junkio@cox.net>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-06-07 15:13:24 -07:00
Linus Torvalds
d4f8b390a4 Add CVS import scripts and programs
This gets the "cvs2git" program from the old git-tools
archive, and adds a nice script around it that makes it
much easier to use.

With this, you should be able to import a CVS archive
using just a simple

	git cvsimport <cvsroot> <module>

and you're done. At least it worked for my one single test.

NOTE!! This may need tweaking. It currently expects (and
verifies) that cvsps version 2.1 is installed, but you
can't actually set any of the cvsps parameters, like the
time fuzz.
2005-06-07 15:11:28 -07:00
Linus Torvalds
001d4a27db git-ssh-push/pull: usability improvements
Allow traditional ssh path specifiers (host:path), and let the user
override the command name on the other end.

With this, I can push to kernel.org with this script

	export GIT_SSH_PULL=/home/torvalds/bin/git-ssh-pull
	git-ssh-push -a -v -w heads/master heads/master master.kernel.org:/pub/scm/linux/kernel/git/torvalds/linux-2.6.git

which while not pretty is at least workable.
2005-06-07 14:23:46 -07:00
Timo Hirvonen
972d1bb067 [PATCH] Use ntohs instead of htons to convert ce_flags to host byte order
Use ntohs instead of htons to convert ce_flags to host byte order

Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-06-07 13:44:11 -07:00
Junio C Hamano
c859600954 [PATCH] read-tree: save more user hassles during fast-forward.
This implements the "never lose the current cache information or
the work tree state, but favor a successful merge over merge
failure" principle in the fast-forward two-tree merge operation.

It comes with a set of tests to cover all the cases described in
the case matrix found in the new documentation.

Signed-off-by: Junio C Hamano <junkio@cox.net>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-06-07 11:41:51 -07:00
Daniel Barkalow
63aff4fed9 [PATCH] Document git-ssh-pull and git-ssh-push
This fixes the documentation for git-ssh-push, as called by users (if you
run git-ssh-pull or git-ssh-push on one machine, the other runs on the
other machine, and they transfer data in the specified direction).

This also adds documentation for the -w option and for using filenames for
the commit-id (which does what you'd want: uses the source side's value,
not the value already on the target, even if you're running it on the
target).

It also credits me with the programs and the documentation for
git-ssh-push.

Someone who knows asciidoc should make sure I didn't mess up the
formatting. I'm only sure of the ascii part.

Signed-off-by: Daniel Barkalow <barkalow@iabervon.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-06-06 19:49:45 -07:00
Linus Torvalds
e5b905c448 git-resolve-script: stop when the automated merge fails
No point in doing a tree write that will just throw
confusing messages on the screen.
2005-06-06 19:37:25 -07:00
Linus Torvalds
ed37b5b2b9 Make fetch/pull scripts terminate cleanly on errors
Don't continue with a merge if the fetch failed.
2005-06-06 17:40:22 -07:00
Linus Torvalds
3f4eff7530 git-resolve-script: don't wait for three seconds any more
We used to overwrite peoples dirty state.  We don't any more.  So don't
print the scary message and don't delay, just do the update already.
2005-06-06 17:39:14 -07:00
Daniel Barkalow
c7c4bbe631 [PATCH] -w support for git-ssh-pull/push
This adds support for -w to git-ssh-pull and git-ssh-push to make
receiving side write the commit that was transferred to a reference file.

Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-06-06 17:12:47 -07:00
Daniel Barkalow
cd541a68b3 [PATCH] Generic support for pulling refs
This adds support to pull.c for requesting a reference and writing it to a
file. All of the git-*-pull programs get stubs for now.

Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-06-06 17:11:11 -07:00
Daniel Barkalow
9182f89ab2 [PATCH] rsh.c environment variable
rsh.c used to set the environment variable for the object database when
invoking the remote command. Now that there is a GIT_DIR variable, use
that instead.

Signed-off-by: Daniel Barkalow <barkalow@iabervon.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-06-06 17:09:45 -07:00