1
0
mirror of https://github.com/git/git.git synced 2024-10-05 03:21:35 +02:00
Commit Graph

12151 Commits

Author SHA1 Message Date
Junio C Hamano
7481ebe991 Merge branch 'cp/p4'
* cp/p4:
  git-p4: Detect changes to executable bit and include them in p4 submit.
  git-p4: Add a helper function to parse the full git diff-tree output.
2007-11-07 18:16:18 -08:00
Junio C Hamano
bd6ba4d28b Merge branch 'maint'
* maint:
  Add Documentation/CodingGuidelines
  When exec() fails include the failing command in the error message
  RelNotes-1.5.3.5: fix another typo
2007-11-07 18:07:07 -08:00
Junio C Hamano
e0901de4b1 Merge branch 'mh/work-tree'
* mh/work-tree:
  Make git-blame fail when working tree is needed and we're not in one
  Don't always require working tree for git-rm
  Use setup_work_tree() in builtin-ls-files.c
  Refactor working tree setup
2007-11-07 17:37:00 -08:00
Mike Hommey
e1f14cce69 Small code readability improvement in show_reference() in builtin-tag.c
Signed-off-by: Mike Hommey <mh@glandium.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-11-07 17:25:47 -08:00
Uwe Kleine-König
620bb245b9 send-email: apply --suppress-from to S-o-b and cc-cmd
Signed-off-by: Uwe Kleine-König <Uwe.Kleine-Koenig@digi.com>
Cc: Ryan Anderson <ryan@michonline.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-11-07 17:23:04 -08:00
Ralf Wildenhues
3c307bfbe8 Fix minor nits in configure.ac
Avoid "test -o" as it is only XSI not POSIX, and not portable.
Avoid exit(3) in test programs in favor of return, to accommodate
for newer Autoconf not providing a declaration for exit.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-11-07 17:21:41 -08:00
Johannes Schindelin
fc8b5f0307 Deprecate git-lost-found
"git fsck" learnt the option "--lost-found" in v1.5.3-rc0~5, to make
"git lost-found" obsolete.  It is time to deprecate "git lost-found".

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-11-07 17:12:53 -08:00
Johannes Schindelin
6d0618a820 Add Documentation/CodingGuidelines
Even if our code is quite a good documentation for our coding style,
some people seem to prefer a document describing it.

The part about the shell scripts is clearly just copied from one of
Junio's helpful mails, and some parts were added from comments by
Junio, Andreas Ericsson and Robin Rosenberg.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-11-07 17:05:53 -08:00
Gerrit Pape
e7509ee388 contrib/hooks/post-receive-email: make subject prefix configurable
Email subjects are prefixed with "[SCM] " by default, make this optionally
configurable through the hooks.emailprefix config option.

Suggested by martin f krafft through
 http://bugs.debian.org/428418

Signed-off-by: Gerrit Pape <pape@smarden.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-11-07 16:45:31 -08:00
Gerrit Pape
15a2f53011 contrib/hooks/post-receive-email: reformat to wrap comments at 76 chars
Signed-off-by: Gerrit Pape <pape@smarden.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-11-07 16:45:31 -08:00
Gerrit Pape
b5786c8283 contrib/hooks/post-receive-email: fix typo
Signed-off-by: Gerrit Pape <pape@smarden.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-11-07 16:45:31 -08:00
Nicolas Pitre
3891f390ea restore fetching with thin-pack capability
Broken since commit fa74052922cf39e5a39ad7178d1b13c2da9b4519.

Signed-off-by: Nicolas Pitre <nico@cam.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-11-07 16:19:07 -08:00
Ask Bjørn Hansen
6aaa65da20 When exec() fails include the failing command in the error message
git-svn occasionally fails with no details as to what went wrong - this should help debug those situations.

Signed-off-by: Ask Bjørn Hansen <ask@develooper.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-11-07 11:39:37 -08:00
David D Kilzer
f49439e1e1 RelNotes-1.5.3.5: fix another typo
Signed-off-by: David D Kilzer <ddkilzer@kilzer.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-11-07 11:37:15 -08:00
Mike Hommey
1981820be2 Make git-blame fail when working tree is needed and we're not in one
Signed-off-by: Mike Hommey <mh@glandium.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-11-05 22:47:57 -08:00
Mike Hommey
271bb08735 Don't always require working tree for git-rm
This allows to do git rm --cached -r directory, instead of
git ls-files -z directory | git update-index --remove -z --stdin.
This can be particularly useful for git-filter-branch users.

Signed-off-by: Mike Hommey <mh@glandium.org>
Acked-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-11-05 22:47:57 -08:00
Mike Hommey
7d8ae93292 Use setup_work_tree() in builtin-ls-files.c
Signed-off-by: Mike Hommey <mh@glandium.org>
Acked-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-11-05 22:47:57 -08:00
Mike Hommey
59f0f2f33a Refactor working tree setup
Create a setup_work_tree() that can be used from any command requiring
a working tree conditionally.

Signed-off-by: Mike Hommey <mh@glandium.org>
Acked-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-11-05 22:47:57 -08:00
Junio C Hamano
fe61935007 Merge branch 'maint'
* maint:
  Remove a couple of duplicated include
  grep with unmerged index
  git-daemon: fix remote port number in log entry
  git-svn: t9114: verify merge commit message in test
  git-svn: fix dcommit clobbering when committing a series of diffs
2007-11-05 22:03:47 -08:00
Steffen Prohaska
a1f611d5d0 Fix comment in strbuf.h to use correct name strbuf_avail()
Signed-off-by: Steffen Prohaska <prohaska@zib.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-11-05 21:09:39 -08:00
Marco Costalba
d8e21ba896 Remove a couple of duplicated include
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-11-05 20:50:38 -08:00
Junio C Hamano
b67a43bb8f grep with unmerged index
We called flush_grep() every time we saw an unmerged entry in
the index.  If we happen to find an unmerged entry before we saw
more than two paths, we incorrectly declared that the user had
too many non-paths options in front.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-11-05 18:57:58 -08:00
Junio C Hamano
62c666a703 Merge branch 'gp/maint-diffdoc' into maint
* gp/maint-diffdoc:
  git-diff.txt: add section "output format" describing the diff formats
2007-11-05 18:56:55 -08:00
Pierre Habouzit
9b3beb5812 Some better parse-options documentation.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-11-05 18:47:01 -08:00
Gerrit Pape
c67359be45 git-daemon: fix remote port number in log entry
The port number in struct sockaddr_in needs to be converted from network
byte order to host byte order (on some architectures).

Signed-off-by: Gerrit Pape <pape@smarden.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-11-05 18:39:18 -08:00
Junio C Hamano
0aab4abdd4 gc: --prune prunes unreferenced objects.
Brandon Casey correctly points out that we repack with -A without --prune
and with -a with --prune, so it is not just unreferenced loose objects
that are pruned away when the option is given.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-11-05 16:39:00 -08:00
Brian Gernhardt
9f12bec438 t3502: Disambiguate between file and rev by adding --
On a case insensitive file system, this test fails because git-diff
doesn't know if it is asking for the file "A" or the tag "a".

Adding "--" at the end of the ambiguous commands allows the test to
finish properly.

Signed-off-by: Brian Gernhardt <benji@silverinsanity.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-11-05 15:04:57 -08:00
Shawn Bohrer
ae3e76c299 Add more tests for git-clean
Signed-off-by: Shawn Bohrer <shawn.bohrer@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-11-05 13:42:35 -08:00
Daniel Barkalow
378c4832ef Use parseopts in builtin-push
Signed-off-by: Daniel Barkalow <barkalow@iabervon.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-11-05 13:27:35 -08:00
Eric Wong
fb159580a1 git-svn: t9114: verify merge commit message in test
It's possible that we end up with an incorrect commit message
in this test after making changes to fix the clobber bug
in dcommit.

Signed-off-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-11-05 12:58:39 -08:00
Eric Wong
c74d9acf20 git-svn: fix dcommit clobbering when committing a series of diffs
Our revision number sent to SVN is set to the last revision we
committed if we've made any previous commits in a dcommit
invocation.

Although our SVN Editor code uses the delta of two (old) trees
to generate information to send upstream, it'll still send
complete resultant files upstream; even if the tree they're
based against is out-of-date.

The combination of sending a file that does not include the
latest changes, but set with a revision number of a commit we
just made will cause SVN to accept the resultant file even if it
was generated against an old tree.

More trouble was caused when fixing this because we were
rebasing uncessarily at times.  We used git-diff-tree to check
the imported SVN revision against our HEAD, not the last tree we
committed to SVN.  The unnecessary rebasing caused merge commits
upstream to SVN to fail.

Signed-off-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-11-05 12:57:34 -08:00
Johannes Schindelin
93fc05eb9e Split off the pretty print stuff into its own file
The file commit.c got quite large, but it does not have to be: the
code concerning pretty printing is pretty well contained.  In fact,
this commit just splits it off into pretty.c, leaving commit.c with
just 672 lines.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-11-05 11:52:14 -08:00
Johannes Sixt
c2015b3ae0 Fix an infinite loop in sq_quote_buf().
sq_quote_buf() treats single-quotes and exclamation marks specially, but
it incorrectly parsed the input for single-quotes and backslashes.

Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-11-04 15:16:59 -08:00
Junio C Hamano
140dd77a5c Merge branch 'jc/format-patch-encoding'
* jc/format-patch-encoding:
  test format-patch -s: make sure MIME content type is shown as needed
  format-patch -s: add MIME encoding header if signer's name requires so
2007-11-04 01:28:46 -07:00
Junio C Hamano
02273fdbd0 Merge branch 'jc/revert-merge'
* jc/revert-merge:
  cherry-pick/revert -m: add tests
  revert/cherry-pick: work on merge commits as well

Conflicts:

	builtin-revert.c
2007-11-04 01:26:02 -07:00
Junio C Hamano
c8a140fee4 Merge branch 'ss/mailsplit'
* ss/mailsplit:
  Make mailsplit and mailinfo strip whitespace from the start of the input
2007-11-04 01:17:50 -07:00
Junio C Hamano
e091653951 Merge branch 'np/pack'
* np/pack:
  pack-objects: get rid of an ugly cast
  make the pack index version configurable

Conflicts:

	builtin-pack-objects.c
2007-11-04 01:11:17 -07:00
Junio C Hamano
2dfffd3e09 Merge branch 'jn/gitweb'
* jn/gitweb:
  gitweb: Use config file for repository description and URLs
  gitweb: Read repo config using 'git config -z -l'
  gitweb: Add tests for overriding gitweb config with repo config
  gitweb: Use href(-replay=>1, action=>...) to generate alternate views
  gitweb: Use href(-replay=>1, page=>...) to generate pagination links
  gitweb: Easier adding/changing parameters to current URL
  gitweb: Remove CGI::Carp::set_programname() call from t9500 gitweb test
  gitweb: Add 'status_str' to parse_difftree_raw_line output
  gitweb: Always set 'from_file' and 'to_file' in parse_difftree_raw_line
2007-11-04 01:10:08 -07:00
Junio C Hamano
33e12acafe Merge branch 'np/fetch'
* np/fetch:
  git-fetch: more terse fetch output
2007-11-04 01:06:48 -07:00
Junio C Hamano
2515f935b9 Merge branch 'maint'
* maint:
  RelNotes-1.5.3.5: fix typo
  Delay pager setup in git blame
  git-cvsimport: really convert underscores in branch names to dots with -u
2007-11-03 23:50:54 -07:00
Johannes Schindelin
2e7a9785c2 git-reset: do not be confused if there is nothing to reset
The purpose of the function update_index_from_diff() (which is the
callback function we give do_diff_cache()) is to update those index
entries which differ from the given commit.

Since do_diff_cache() plays games with the in-memory index, this function
discarded the cache and reread it.

Then, back in the function read_from_tree() we wrote the index.

Of course, this broke down when there were no changes and
update_index_from_diff() was not called, and therefore the mangled index
was not discarded.

The solution is to move the index writing into the function
update_index_from_diff().

Noticed by Björn Steinbrink.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-11-03 21:44:57 -07:00
Heikki Orsila
19391c371c git-clone: honor "--" to end argument parsing
Signed-off-by: Heikki Orsila <heikki.orsila@iki.fi>
2007-11-03 21:44:13 -07:00
David D Kilzer
ee787400de RelNotes-1.5.3.5: fix typo
Signed-off-by: David D Kilzer <ddkilzer@kilzer.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-11-03 21:43:58 -07:00
Benoit Sigoure
aa807bc266 git-svn: sort the options in the --help message.
"git svn <cmd> --help" gave options in the order they were found in a
Perl hash, which meant "randomly" to humans.

Signed-off-by: Benoit Sigoure <tsuna@lrde.epita.fr>
Acked-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-11-03 21:39:12 -07:00
Steven Grimm
4b7bbdd14c builtin-fetch: Add "-q" as a synonym for "--quiet"
"-q" is the very first option described in the git-fetch manpage, and it
isn't supported.

Signed-off-by: Steven Grimm <koreth@midwinter.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-11-03 21:37:30 -07:00
Mike Hommey
b92565dc5c Delay pager setup in git blame
This avoids to launch the pager when git blame fails for any reason.

Signed-off-by: Mike Hommey <mh@glandium.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-11-03 21:31:37 -07:00
Gerrit Pape
a0554224a2 git-cvsimport: really convert underscores in branch names to dots with -u
The documentation states for the -u option that underscores in tag and
branch names are converted to dots, but this was actually implemented
for the tag names only.

Kurt Roeckx reported this through
 http://bugs.debian.org/446495

Signed-off-by: Gerrit Pape <pape@smarden.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-11-03 21:31:22 -07:00
J. Bruce Fields
00ae82895e errors: "strict subset" -> "ancestor"
The term "ancestor" is a bit more intuitive (and more consistent with
the documentation) than the term "strict subset".

Also, remove superfluous "ref", capitalize, and add some carriage
returns, changing:

    error: remote 'refs/heads/master' is not a strict subset of local ref 'refs/heads/master'. maybe you are not up-to-date and need to pull first?
    error: failed to push to 'ssh://linux-nfs.org/~bfields/exports/git.git'

to:

    error: remote 'refs/heads/master' is not an ancestor of
    local 'refs/heads/master'.
    Maybe you are not up-to-date and need to pull first?
    error: failed to push to 'ssh://linux-nfs.org/~bfields/exports/git.git'

Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-11-03 21:29:18 -07:00
Nicolas Pitre
165f390250 git-fetch: more terse fetch output
This makes the fetch output much more terse and prettier on a 80 column
display, based on a consensus reached on the mailing list.  Here's an
example output:

Receiving objects: 100% (5439/5439), 1.60 MiB | 636 KiB/s, done.
Resolving deltas: 100% (4604/4604), done.
From git://git.kernel.org/pub/scm/git/git
 ! [rejected]        html -> origin/html  (non fast forward)
   136e631..f45e867  maint -> origin/maint  (fast forward)
   9850e2e..44dd7e0  man -> origin/man  (fast forward)
   3e4bb08..e3d6d56  master -> origin/master  (fast forward)
   fa3665c..536f64a  next -> origin/next  (fast forward)
 + 4f6d9d6...768326f pu -> origin/pu  (forced update)
 * [new branch]      todo -> origin/todo

Some portions of this patch have been extracted from earlier proposals
by Jeff King and Shawn Pearce.

Signed-off-by: Nicolas Pitre <nico@cam.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-11-02 22:36:31 -07:00
Jakub Narebski
0e121a2cd4 gitweb: Use config file for repository description and URLs
Allow to use configuration variable gitweb.description for repository
description if there is no $GIT_DIR/description file, and multivalued
configuration variable gitweb.url for URLs of a project (to clone or
fetch from) if there is no $GIT_DIR/cloneurl file.

While repository description is shown in the projects list page, so it
is better to use file and not config variable for performance, it is I
think better to use gitweb.url for URLs (as it is shown only on
project summary page).

Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-11-02 18:27:36 -07:00