1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-11-05 08:47:56 +01:00
Commit graph

3734 commits

Author SHA1 Message Date
Eric Wong
551ce28fe1 git-svn: 0.9.1: add --version and copyright/license (GPL v2+) information
Signed-off-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-02-20 13:32:42 -08:00
Eric Wong
96a40b27c9 contrib/git-svn: add Makefile, test, and associated ignores
Signed-off-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-02-20 13:32:42 -08:00
Eric Wong
cf52b8f063 git-svn: fix several corner-case and rare bugs with 'commit'
None of these were really show-stoppers (or even triggered)
on most of the trees I've tracked.

* Node change prevention for identically named nodes.  This is
  a limitation of SVN, but we find the error and exit before
  it's passed to SVN so we don't dirty our working tree when our
  commit fails.  git-svn will exit with an error code 1 if any
  of the following conditions are found:

  1.  a directory is removed and a file of the same name of the
      removed directory is created
  1a. a file has its parent directory removed and the file is
      takes the name of the removed parent directory::
          baz/zzz    =>  baz
  2.  a file is removed and a directory of the same name of the
      removed file is created.
  2a. a file is moved into a deeper directory that shares the
      previous name of the file::
          dir/$file  =>  dir/file/$file

  Since SVN cannot handle these cases, the user will have to
  manually split the commit into several parts.

* --rmdir now handles nested/deep removals. If dir/a/b/c/d/e/file
  is removed, and everything else is in the dir/ hierarchy is
  otherwise empty, then dir/ will be deleted when file is deleted
  from svn and --rmdir specified.

* Always assert that we have written the tree we want to write
  on commits.  This helped me find several bugs in the symlink
  handling code (which as been fixed).

* Several symlink handling fixes.  We now refuse to set
  permissions on symlinks.  We also always unlink a file
  if we're going to overwrite it.

* Apply changes in a pre-determined order, so we always have
  rename from locations handy before we delete them.

Signed-off-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-02-20 13:32:41 -08:00
Eric Wong
bbe0c9b8d8 contrib/git-svn.txt: add a note about renamed/copied directory support
Signed-off-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-02-20 13:32:41 -08:00
Eric Wong
472ee9e3d6 git-svn: change ; to && in addremove()
Signed-off-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-02-20 13:32:41 -08:00
Eric Wong
ce6f351903 git-svn: remove any need for the XML::Simple dependency
XML::Simple was originally required back when I made svn-arch-mirror
because I needed to explictly track renames with Arch.  Then I carried
it over to git-svn because I was afraid somebody could commit an svn
log message that could throw off a non-XML log parser.  Then I noticed
the <n> lines column in the header.  So, no more XML :)

Signed-off-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-02-20 13:32:41 -08:00
Eric Wong
8de010ad28 git-svn: Allow for more argument types for commit (from..to)
Allow 'from..to' notation from the command line.

More liberal sha1 parsing when reading from stdin no longer requires the
sha1 to be the first character, so a leading 'commit ' string is OK.

Signed-off-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-02-20 13:32:41 -08:00
Eric Wong
72942938bf git-svn: allow --find-copies-harder and -l<num> to be passed on commit
Both of these options are passed directly to git-diff-tree when
committing to a SVN repository.

Signed-off-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-02-20 13:32:40 -08:00
Eric Wong
a18b632762 git-svn: fix a typo in defining the --no-stop-on-copy option
Just a typo, I doubt anybody would use (and I highly recommend not
using) this option anyways.  But you never know...

Signed-off-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-02-20 13:32:40 -08:00
Junio C Hamano
5be4eabf90 Merge branch 'jc/pack-thin' into next
* jc/pack-thin:
  Use thin pack transfer in "git fetch".
  Add git-push --thin.
2006-02-20 00:45:38 -08:00
Junio C Hamano
b19696c2e7 Use thin pack transfer in "git fetch".
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-02-20 00:38:39 -08:00
Junio C Hamano
a79a276360 Add git-push --thin.
Maybe we would want to make this default before it graduates to
the master branch, but in the meantime to help testing things,
this allows you to say "git push --thin destination".

Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-02-20 00:09:41 -08:00
Junio C Hamano
bb837eccf4 Merge branch 'jc/pack-thin' into next
* jc/pack-thin:
  send-pack --thin: use "thin pack" delta transfer.
  Thin pack - create packfile with missing delta base.
2006-02-19 22:28:46 -08:00
Junio C Hamano
2245be3e7a send-pack --thin: use "thin pack" delta transfer.
The new flag loosens the usual "self containedness" requirment
of packfiles, and sends deltified representation of objects when
we know the other side has the base objects needed to unpack
them.  This would help reducing the transfer size.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-02-19 22:28:04 -08:00
Junio C Hamano
7a979d99ba Thin pack - create packfile with missing delta base.
This goes together with "rev-list --object-edge" change, to feed
pack-objects list of edge commits in addition to the usual
object list.  Upon seeing such list, pack-objects loosens the
usual "self contained delta" constraints, and can produce delta
against blobs and trees contained in the edge commits without
storing the delta base objects themselves.

The resulting packfile is not usable in .git/object/packs, but
is a good way to implement "delta-only" transfer.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-02-19 22:27:39 -08:00
Junio C Hamano
8c0db2f519 Merge branch 'jc/rev-list' into next
* jc/rev-list:
  rev-list --objects-edge
  Merge branch 'jc/merge-msg'
  Merge branch 'jc/mv'
  Documentation: fix typo in rev-parse --short option description.
2006-02-19 21:37:10 -08:00
Junio C Hamano
c649657501 rev-list --objects-edge
This new flag is similar to --objects, but causes rev-list to
show list of "uninteresting" commits that appear on the edge
commit prefixed with '-'.

Downstream pack-objects will be changed to take these as hints
to use the trees and blobs contained with them as base objects
of resulting pack, producing an incomplete (not self-contained)
pack.

Such a pack cannot be used in .git/objects/pack (it is prevented
by git-index-pack erroring out if it is fed to git-fetch-pack -k
or git-clone-pack), but would be useful when transferring only
small changes to huge blobs.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-02-19 21:35:55 -08:00
Junio C Hamano
21a02335f8 Merge branch 'js/portable' into next
* js/portable:
  Really honour NO_PYTHON
  avoid makefile override warning
  Fixes for ancient versions of GNU make
2006-02-19 21:19:39 -08:00
Junio C Hamano
73be17f0b3 Merge branch 'jc/merge-msg'
* jc/merge-msg:
  fmt-merge-msg: do not add excess newline at the end.
  fmt-merge-msg: say which branch things were merged into unless 'master'
2006-02-19 21:18:17 -08:00
Junio C Hamano
1561a9b662 Merge branch 'jc/mv'
* jc/mv:
  Allow git-mv to accept ./ in paths.
2006-02-19 21:17:59 -08:00
Junio C Hamano
2e12a089ff Merge branch 'jc/merge-msg' into next
* jc/merge-msg:
  fmt-merge-msg: do not add excess newline at the end.
2006-02-19 21:17:06 -08:00
Junio C Hamano
a15f43312f fmt-merge-msg: do not add excess newline at the end.
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-02-19 21:14:56 -08:00
Johannes Schindelin
a348ab702a Really honour NO_PYTHON
Do not even test for subprocess (trying to execute python).

Signed-off-by: Johannes E. Schindelin <Johannes.Schindelin@gmx.de>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-02-19 16:55:38 -08:00
Johannes Schindelin
2a3763ef3d avoid makefile override warning
Signed-off-by: Johannes E. Schindelin <Johannes.Schindelin@gmx.de>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-02-19 16:55:38 -08:00
Junio C Hamano
5102349cc0 Documentation: fix typo in rev-parse --short option description.
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-02-19 10:23:17 -08:00
Junio C Hamano
0d27c3f699 Merge branch 'jc/mv' into next
* jc/mv:
  Allow git-mv to accept ./ in paths.
  Merge fixes up to GIT 1.2.2
  Fix retries in git-cvsimport
  archimport: remove files from the index before adding/updating
2006-02-18 23:43:54 -08:00
Junio C Hamano
9a0e6731c6 Allow git-mv to accept ./ in paths.
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-02-18 23:42:03 -08:00
Junio C Hamano
1a9366c0d4 Merge part of js/portable into next 2006-02-18 23:19:33 -08:00
Johannes Schindelin
39c015c556 Fixes for ancient versions of GNU make
Some versions of GNU make do not understand $(call), and have problems to
interpret rules like this:

some_target: CFLAGS += -Dsome=defs

[jc: simplified substitution a bit. ]

Signed-off-by: Johannes E. Schindelin <Johannes.Schindelin@gmx.de>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-02-18 23:17:01 -08:00
Johannes Schindelin
abb7c7b31c Optionally work without python
In some setups (notably server setups) you do not need that dependency.
Gracefully handle the absence of python when NO_PYTHON is defined.

Signed-off-by: Johannes E. Schindelin <Johannes.Schindelin@gmx.de>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-02-18 23:16:09 -08:00
Junio C Hamano
9121a1a1a0 Merge branch 'jc/ident' into next
* jc/ident:
  Keep Porcelainish from failing by broken ident after making changes.
  Delay "empty ident" errors until they really matter.
2006-02-18 23:15:13 -08:00
Junio C Hamano
8cd52c3ca9 Merge branch 'jc/merge-msg' into next
* jc/merge-msg:
  fmt-merge-msg: say which branch things were merged into unless 'master'
  Add an Emacs interface in contrib.
2006-02-18 23:15:12 -08:00
Junio C Hamano
709a9e5771 Merge fixes up to GIT 1.2.2 2006-02-18 22:55:42 -08:00
Junio C Hamano
2b020455f9 fmt-merge-msg: say which branch things were merged into unless 'master'
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-02-18 22:37:02 -08:00
Junio C Hamano
e3b59a44f6 Keep Porcelainish from failing by broken ident after making changes.
"empty ident not allowed" error makes commit-tree fail, so we
are already safer in that we would not end up with commit
objects that have bogus names on the author or committer fields.
However, before commit-tree is called there are already changes
made to the index file and the working tree.  The operation can
be resumed after fixing the environment problem, but when this
triggers to a newcomer with unusable gecos, the first question
becomes "what did I lose and how would I recover".

This patch modifies some Porcelainish commands to verify
GIT_COMMITTER_IDENT as soon as we know we are going to make some
commits before doing much damage to prevent confusion.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-02-18 20:51:26 -08:00
Junio C Hamano
749be728d4 Delay "empty ident" errors until they really matter.
Previous one warned people upfront to encourage fixing their
environment early, but some people just use repositories and git
tools read-only without making any changes, and in such a case
there is not much point insisting on them having a usable ident.

This round attempts to move the error until either "git-var"
asks for the ident explicitly or "commit-tree" wants to use it.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-02-18 20:31:05 -08:00
Martin Mares
39ba7d5464 Fix retries in git-cvsimport
Fixed a couple of bugs in recovering from broken connections:

The _line() method now returns undef correctly when the connection
is broken instead of falling off the function and returning garbage.

Retries are now reported to stderr and the eventual partially
downloaded file is discarded instead of being appended to.

The "Server gone away" test has been removed, because it was
reachable only if the garbage return bug bit.

Signed-off-by: Martin Mares <mj@ucw.cz>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-02-18 16:19:00 -08:00
Eric Wong
3ff903bfb9 archimport: remove files from the index before adding/updating
This fixes a bug when importing where a directory gets removed/renamed
but is immediately replaced by a file of the same name in the same
changeset.

This fix only applies to the accurate (default) strategy the moment.

This patch should also fix the fast strategy if/when it is updated
to handle the cases that would've triggered this bug.

This bug was originally found in git-svn, but I remembered I did the
same thing with archimport as well.

Signed-off-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-02-18 11:21:16 -08:00
Alexandre Julliard
711fc8f660 Add an Emacs interface in contrib.
This is an Emacs interface for git. The user interface is modeled on
pcl-cvs. It has been developed on Emacs 21 and will probably need some
tweaking to work on XEmacs.

The basic command is 'M-x git-status' which displays a buffer listing
modified files in the selected project tree. In that buffer the
following features are supported:

  - add/remove files
  - list unknown files
  - commit marked files
  - manage .gitignore
  - commit merges based on MERGE_HEAD
  - revert files to the HEAD version
  - resolve conflicts with smerge or ediff
  - diff files against HEAD/base/mine/other or combined diff
  - get a log of the revisions for specified files

There are plenty of unimplemented features too, see the TODO list at
the top of the file...

Signed-off-by: Alexandre Julliard <julliard@winehq.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-02-18 10:57:15 -08:00
Junio C Hamano
290252e063 Merge branch 'fix'
* fix:
  Make git-reset delete empty directories
2006-02-18 01:26:14 -08:00
Junio C Hamano
9c92f563be Merge branch 'jc/ident'
* jc/ident:
  Make "empty ident" error message a bit more helpful.
  Merge branch 'jc/topo'
  Merge branch 'jc/rebase-limit'
  gitview: typofix
  git-svn: remove files from the index before adding/updating
2006-02-18 01:24:54 -08:00
Junio C Hamano
925f918769 Make "empty ident" error message a bit more helpful.
It appears that some people who did not care about having bogus
names in their own commit messages are bitten by the recent
change to require a sane environment [*1*].

While it was a good idea to prevent people from using bogus
names to create commits and doing sign-offs, the error message
is not very informative.  This patch attempts to warn things
upfront and hint people how to fix their environments.

[Footnote]

*1* The thread is this one.

    http://marc.theaimsgroup.com/?t=113868084800004

    Especially this message.

    http://marc.theaimsgroup.com/?m=113932830015032

Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-02-18 01:24:38 -08:00
Junio C Hamano
62a4417b57 Merge branch 'jc/topo'
* jc/topo:
  topo-order: make --date-order optional.
2006-02-18 01:24:10 -08:00
Junio C Hamano
8fa40aa915 Merge branch 'jc/rebase-limit'
* jc/rebase-limit:
  rebase: allow rebasing onto different base.
2006-02-18 01:24:01 -08:00
Aneesh Kumar K.V
c4d133a2b8 gitview: typofix
Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@gmail.com>
2006-02-18 01:22:42 -08:00
Eric Wong
0870321548 git-svn: remove files from the index before adding/updating
This fixes a bug when importing where a directory gets removed/renamed
but is immediately replaced by a file of the same name in the same
revision.

Signed-off-by: Eric Wong <normalperson@yhbt.net>
2006-02-18 01:22:39 -08:00
Shawn Pearce
772d8a3b63 Make git-reset delete empty directories
When git-reset --hard is used and a subdirectory becomes
empty (as it contains no tracked files in the target tree)
the empty subdirectory should be removed.  This matches
the behavior of git-checkout-index and git-read-tree -m
which would not have created the subdirectory or would
have deleted it when updating the working directory.

Subdirectories which are not empty will be left behind.
This may happen if the subdirectory still contains object
files from the user's build process (for example).

[jc: simplified the logic a bit, while keeping the test script.]
2006-02-17 23:52:57 -08:00
Junio C Hamano
416b3cb430 Merge branch 'jc/pack-reuse'
* jc/pack-reuse:
  pack-objects: avoid delta chains that are too long.
2006-02-17 22:05:40 -08:00
Junio C Hamano
e4c9327a77 pack-objects: avoid delta chains that are too long.
This tries to rework the solution for the excess delta chain
problem. An earlier commit worked it around ``cheaply'', but
repeated repacking risks unbound growth of delta chains.

This version counts the length of delta chain we are reusing
from the existing pack, and makes sure a base object that has
sufficiently long delta chain does not get deltified.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-02-17 21:48:48 -08:00
Junio C Hamano
9b1320a99e Merge branch 'js/portable'
* js/portable:
  Support Irix
  Optionally support old diffs
  Fix cpio call
  SubmittingPatches: note on whitespaces
  Add a README for gitview
  Add contrib/README.
  git-tag: -l to list tags (usability).
2006-02-17 17:34:51 -08:00