1
0
mirror of https://github.com/git/git.git synced 2024-10-20 12:18:36 +02:00
Commit Graph

175 Commits

Author SHA1 Message Date
Junio C Hamano
cf4403a010 Merge branch 'cp/textconv-cat-file'
* cp/textconv-cat-file:
  git-cat-file.txt: Document --textconv
  t/t8007: test textconv support for cat-file
  textconv: support for cat_file
  sha1_name: add get_sha1_with_context()
2010-06-27 12:07:55 -07:00
Junio C Hamano
4af574dbdc Merge branch 'ab/blame-textconv'
* ab/blame-textconv:
  t/t8006: test textconv support for blame
  textconv: support for blame
  textconv: make the API public

Conflicts:
	diff.h
2010-06-27 12:07:44 -07:00
Junio C Hamano
f526d120f6 Merge branch 'maint'
* maint:
  msvc: Fix some compiler warnings
  Documentation: grep: fix asciidoc problem with --
  msvc: Fix some "expr evaluates to function" compiler warnings
2010-06-25 11:45:27 -07:00
Ramsay Jones
4e0d7a8018 msvc: Fix some "expr evaluates to function" compiler warnings
In particular, the following warning is issued while compiling
notes.c:

    notes.c(927) : warning C4550: expression evaluates to a \
function which is missing an argument list

along with identical warnings on lines 928, 1016 and 1017.

In order to suppress the warning, we change the definition of
combine_notes_fn, so that the symbol type is an (explicit)
"pointer to function ...".  As a result, several other
declarations need some minor fix-up to take account of the
new typedef.

Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
Acked-by: Johan Herland <johan@herland.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-06-24 09:42:12 -07:00
Junio C Hamano
6bead0c320 Merge branch 'sb/format-patch-signature'
* sb/format-patch-signature:
  completion: Add --signature and format.signature
  format-patch: Add a signature option (--signature)
2010-06-22 09:45:22 -07:00
Junio C Hamano
8c7da8690d Merge branch 'cc/cherry-pick-series'
* cc/cherry-pick-series:
  Documentation/revert: describe passing more than one commit
  Documentation/cherry-pick: describe passing more than one commit
  revert: add tests to check cherry-picking many commits
  revert: allow cherry-picking more than one commit
  revert: change help_msg() to take no argument
  revert: refactor code into a do_pick_commit() function
  revert: use run_command_v_opt() instead of execv_git_cmd()
  revert: cleanup code for -x option
2010-06-22 09:45:21 -07:00
Junio C Hamano
81b43b54b2 Merge branch 'cc/maint-commit-reflog-msg' into maint
* cc/maint-commit-reflog-msg:
  commit: use value of GIT_REFLOG_ACTION env variable as reflog message
2010-06-22 09:31:48 -07:00
Junio C Hamano
abd3fd358b Merge branch 'jk/maint-advice-empty-amend' into maint
* jk/maint-advice-empty-amend:
  commit: give advice on empty amend
2010-06-22 09:31:48 -07:00
Junio C Hamano
b2a6095308 Merge branch 'tc/commit-abbrev-fix' into maint
* tc/commit-abbrev-fix:
  commit::print_summary(): don't use format_commit_message()
  t7502-commit: add summary output tests for empty and merge commits
  t7502-commit: add tests for summary output
2010-06-22 09:31:47 -07:00
Junio C Hamano
4b2405ce19 Merge branch 'cb/ls-files-cdup' into maint
* cb/ls-files-cdup:
  ls-files: allow relative pathspec
  quote.c: separate quoting and relative path generation
2010-06-22 08:31:46 -07:00
Junio C Hamano
e3ed7f721c Merge branch 'tc/merge-m-log' into maint
* tc/merge-m-log:
  merge: --log appends shortlog to message if specified
  fmt-merge-msg: add function to append shortlog only
  fmt-merge-msg: refactor merge title formatting
  fmt-merge-msg: minor refactor of fmt_merge_msg()
  merge: rename variable
  merge: update comment
  t7604-merge-custom-message: show that --log doesn't append to -m
  t7604-merge-custom-message: shift expected output creation
2010-06-22 08:31:25 -07:00
Junio C Hamano
958ff4a597 Merge branch 'ph/clone-message-reword' into maint
* ph/clone-message-reword:
  clone: reword messages to match the end-user perception
2010-06-22 08:31:20 -07:00
Junio C Hamano
0d2416e060 Merge branch 'jn/maint-amend-missing-name' into maint
* jn/maint-amend-missing-name:
  commit --amend: cope with missing display name
2010-06-22 08:30:44 -07:00
Junio C Hamano
21919d396a Merge branch 'pc/remove-warn' into maint
* pc/remove-warn:
  Remove a redundant errno test in a usage of remove_path
  Introduce remove_or_warn function
  Implement the rmdir_or_warn function
  Generalise the unlink_or_warn function
2010-06-22 08:30:38 -07:00
Junio C Hamano
6cd52edbbd Merge branch 'cc/maint-commit-reflog-msg'
* cc/maint-commit-reflog-msg:
  commit: use value of GIT_REFLOG_ACTION env variable as reflog message
2010-06-21 06:02:50 -07:00
Junio C Hamano
542ed78232 Merge branch 'jk/maint-advice-empty-amend'
* jk/maint-advice-empty-amend:
  commit: give advice on empty amend
2010-06-21 06:02:49 -07:00
Junio C Hamano
1623191be4 Merge branch 'sm/branch-broken-ref'
* sm/branch-broken-ref:
  branch: don't fail listing branches if one of the commits wasn't found
  branch: exit status now reflects if branch listing finds an error
2010-06-21 06:02:47 -07:00
Junio C Hamano
1a5296cb92 Merge branch 'tc/commit-abbrev-fix'
* tc/commit-abbrev-fix:
  commit::print_summary(): don't use format_commit_message()
  t7502-commit: add summary output tests for empty and merge commits
  t7502-commit: add tests for summary output
2010-06-21 06:02:46 -07:00
Junio C Hamano
cecff3a45b Merge branch 'tr/receive-pack-aliased-update-fix'
* tr/receive-pack-aliased-update-fix:
  check_aliased_update: strcpy() instead of strcat() to copy
2010-06-21 06:02:46 -07:00
Junio C Hamano
632d3f4b5b Merge branch 'gs/usage-to-stdout'
* gs/usage-to-stdout:
  parseopt: wrap rev-parse --parseopt usage for eval consumption
  print the usage string on stdout instead of stderr

Conflicts:
	parse-options.h
2010-06-21 06:02:45 -07:00
Junio C Hamano
8d676d85f7 Merge branch 'gv/portable'
* gv/portable:
  test-lib: use DIFF definition from GIT-BUILD-OPTIONS
  build: propagate $DIFF to scripts
  Makefile: Tru64 portability fix
  Makefile: HP-UX 10.20 portability fixes
  Makefile: HPUX11 portability fixes
  Makefile: SunOS 5.6 portability fix
  inline declaration does not work on AIX
  Allow disabling "inline"
  Some platforms lack socklen_t type
  Make NO_{INET_NTOP,INET_PTON} configured independently
  Makefile: some platforms do not have hstrerror anywhere
  git-compat-util.h: some platforms with mmap() lack MAP_FAILED definition
  test_cmp: do not use "diff -u" on platforms that lack one
  fixup: do not unconditionally disable "diff -u"
  tests: use "test_cmp", not "diff", when verifying the result
  Do not use "diff" found on PATH while building and installing
  enums: omit trailing comma for portability
  Makefile: -lpthread may still be necessary when libc has only pthread stubs
  Rewrite dynamic structure initializations to runtime assignment
  Makefile: pass CPPFLAGS through to fllow customization

Conflicts:
	Makefile
	wt-status.h
2010-06-21 06:02:44 -07:00
Junio C Hamano
5bebcd4ecb Merge branch 'em/checkout-orphan'
* em/checkout-orphan:
  log_ref_setup: don't return stack-allocated array
  bash completion: add --orphan to 'git checkout'
  t3200: test -l with core.logAllRefUpdates options
  checkout --orphan: respect -l option always
  refs: split log_ref_write logic into log_ref_setup
  Documentation: alter checkout --orphan description
2010-06-21 06:02:41 -07:00
Junio C Hamano
60335534a6 Merge branch 'rs/diff-no-minimal' into maint
* rs/diff-no-minimal:
  git diff too slow for a file
2010-06-21 05:38:50 -07:00
Junio C Hamano
e1ba0f6340 Merge branch 'bg/apply-blank-trailing-context' into maint
* bg/apply-blank-trailing-context:
  apply: Allow blank *trailing* context lines to match beyond EOF
2010-06-21 05:38:36 -07:00
Clément Poulain
e5fba602e5 textconv: support for cat_file
Make the textconv_object function public, and add --textconv option to cat-file
to perform conversion on blob objects. Using --textconv implies that we are
working on a blob.
As files drivers need to be initialized, a new config is required in addition
to git_default_config. Therefore git_cat_file_config() is introduced

Signed-off-by: Clément Poulain <clement.poulain@ensimag.imag.fr>
Signed-off-by: Diane Gasselin <diane.gasselin@ensimag.imag.fr>
Signed-off-by: Axel Bonnet <axel.bonnet@ensimag.imag.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-06-18 12:57:21 -07:00
Junio C Hamano
e09151281d Merge branch 'cb/ls-files-cdup'
* cb/ls-files-cdup:
  ls-files: allow relative pathspec
  quote.c: separate quoting and relative path generation
2010-06-18 11:16:56 -07:00
Junio C Hamano
880bd9d080 Merge branch 'mg/status-b'
* mg/status-b:
  Documentation+t5708: document and test status -s -b
  Show branch information in short output of git status
2010-06-18 11:16:55 -07:00
Junio C Hamano
1c5d6b2a40 Merge branch 'jn/remote-set-branches'
* jn/remote-set-branches:
  Add git remote set-branches

Conflicts:
	builtin/remote.c
2010-06-18 11:16:55 -07:00
Junio C Hamano
199d4c0d43 Merge branch 'rc/ls-remote-default'
* rc/ls-remote-default:
  ls-remote: print URL when no repo is specified
2010-06-18 11:16:54 -07:00
Junio C Hamano
8642abc764 Merge branch 'tc/merge-m-log'
* tc/merge-m-log:
  merge: --log appends shortlog to message if specified
  fmt-merge-msg: add function to append shortlog only
  fmt-merge-msg: refactor merge title formatting
  fmt-merge-msg: minor refactor of fmt_merge_msg()
  merge: rename variable
  merge: update comment
  t7604-merge-custom-message: show that --log doesn't append to -m
  t7604-merge-custom-message: shift expected output creation

Conflicts:
	builtin.h
2010-06-18 11:16:54 -07:00
Junio C Hamano
fd8b005c0d Merge branch 'ph/clone-message-reword'
* ph/clone-message-reword:
  clone: reword messages to match the end-user perception
2010-06-18 11:16:53 -07:00
Axel Bonnet
3b8a12e8f8 textconv: support for blame
This patches enables to perform textconv with blame if a textconv driver is
available fos the file.

The main task is performed by the textconv_object function which prepares
diff_filespec and if possible converts the file using diff textconv API.
Only regular files are converted, so the mode of diff_filespec is faked.

Textconv conversion is enabled by default (equivalent to the option
--textconv), since blaming binary files is useless in most cases.
The option --no-textconv is used to disable textconv conversion.

The declarations of several functions are modified to give access to a
diff_options, in order to know whether the textconv option is activated or not.

Signed-off-by: Axel Bonnet <axel.bonnet@ensimag.imag.fr>
Signed-off-by: Clément Poulain <clement.poulain@ensimag.imag.fr>
Signed-off-by: Diane Gasselin <diane.gasselin@ensimag.imag.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-06-18 09:41:01 -07:00
Junio C Hamano
3c0ae1bd72 Merge 'maint' updates in
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-06-16 17:09:31 -07:00
Junio C Hamano
799c34449e Merge branch 'jn/shortlog' into maint
* jn/shortlog:
  pretty: Respect --abbrev option
  shortlog: Document and test --format option
  t4201 (shortlog): Test output format with multiple authors
  t4201 (shortlog): guard setup with test_expect_success
  Documentation/shortlog: scripted users should not rely on implicit HEAD
2010-06-16 16:22:51 -07:00
Junio C Hamano
318d401346 Merge branch 'np/index-pack-memsave' into maint
* np/index-pack-memsave:
  index-pack: smarter memory usage when appending objects
  index-pack: rationalize unpack_entry_data()
  index-pack: smarter memory usage when resolving deltas
2010-06-16 16:22:23 -07:00
Junio C Hamano
f62e53c897 Merge branch 'sp/maint-describe-tiebreak-with-tagger-date' into maint
* sp/maint-describe-tiebreak-with-tagger-date:
  describe: Break annotated tag ties by tagger date
  tag.c: Parse tagger date (if present)
  tag.c: Refactor parse_tag_buffer to be saner to program
  tag.h: Remove unused signature field
  tag.c: Correct indentation
2010-06-16 16:21:15 -07:00
Junio C Hamano
5c1eba5e31 Merge branch 'np/malloc-threading' into maint
* np/malloc-threading:
  Thread-safe xmalloc and xrealloc needs a recursive mutex
  Make xmalloc and xrealloc thread-safe
2010-06-16 16:21:06 -07:00
Junio C Hamano
6e10b9c999 Merge branch 'mh/status-optionally-refresh' into maint
* mh/status-optionally-refresh:
  t7508: add a test for "git status" in a read-only repository
  git status: refresh the index if possible
  t7508: add test for "git status" refreshing the index
2010-06-16 16:16:40 -07:00
Stephen Boyd
6622d9c710 format-patch: Add a signature option (--signature)
By default, git uses the version string as the signature for all
patches output by format-patch. Many employers (mine included)
require the use of a signature on all outgoing mails. In a
format-patch | send-email workflow there isn't an easy way to modify
the signature without breaking the pipe and manually replacing the
version string with the signature required. Instead of doing all that
work, add an option (--signature) and a config variable
(format.signature) to replace the default git version signature when
formatting patches.

This does modify the original behavior of format-patch a bit. First
off the version string is now placed in the cover letter by default.
Secondly, once the configuration variable format.signature is added
to the .config file there is no way to revert back to the default
git version signature. Instead, specifying the --no-signature option
will remove the signature from the patches entirely.

Signed-off-by: Stephen Boyd <bebarino@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-06-16 10:08:59 -07:00
Ævar Arnfjörð Bjarmason
ef7a8e3b95 notes: Initialize variable to appease Sun Studio
Sun Studio 12 Update 1 thinks that *t could be uninitialized,
ostensibly because it doesn't take rewrite_cmd into account in its
static analysis.

    builtin/notes.c: In function `notes_copy_from_stdin':
    builtin/notes.c:419: warning: 't' might be used uninitialized in this function

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-06-15 07:50:39 -07:00
Junio C Hamano
2d4fef9b86 Merge branch 'mg/notes-dry-run'
* mg/notes-dry-run:
  notes: dry-run and verbose options for prune
2010-06-13 11:22:39 -07:00
Junio C Hamano
534930807c Merge branch 'rs/grep-binary'
* rs/grep-binary:
  grep: support NUL chars in search strings for -F
  grep: use REG_STARTEND for all matching if available
  grep: continue case insensitive fixed string search after NUL chars
  grep: use memmem() for fixed string search
  grep: --name-only over binary
  grep: --count over binary
  grep: grep: refactor handling of binary mode options
  grep: add test script for binary file handling
2010-06-13 11:21:44 -07:00
Junio C Hamano
44e08b003d Merge branch 'js/try-to-free-stackable'
* js/try-to-free-stackable:
  Do not call release_pack_memory in malloc wrappers when GIT_TRACE is used
  Have set_try_to_free_routine return the previous routine
2010-06-13 11:21:21 -07:00
Junio C Hamano
de8c359786 Merge branch 'jn/maint-amend-missing-name'
* jn/maint-amend-missing-name:
  commit --amend: cope with missing display name
2010-06-13 11:20:52 -07:00
Junio C Hamano
39b5977b13 Merge branch 'rs/diff-no-minimal'
* rs/diff-no-minimal:
  git diff too slow for a file
2010-06-13 11:20:46 -07:00
Christian Couder
643cb5f7c9 commit: use value of GIT_REFLOG_ACTION env variable as reflog message
The environment variable GIT_REFLOG_ACTION was used by git-commit.sh,
but when it was converted to a builtin
(f5bbc3225c4b073a7ff3218164a0c820299bc9c6, Port git commit to C,
Nov 8 2007) this was lost.

Let's use it again as it is more user friendly when reverting or
cherry-picking to see "revert" or "cherry-pick" in the reflog rather
than to just see "commit".

Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Acked-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-06-13 09:42:38 -07:00
Thomas Rast
47e9cd28f8 parseopt: wrap rev-parse --parseopt usage for eval consumption
9c7304e (print the usage string on stdout instead of stderr,
2010-05-17) broke rev-parse --parseopt: when run with -h, the usage
notice on stdout ended up in the shell eval.

Wrap the usage in a cat <<\EOF ... EOF block when printing to stdout.
I do not expect any usage lines to ever start with EOF so this
shouldn't be an undue burden.

Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-06-13 09:38:14 -07:00
Thomas Rast
157aaea5ff log_ref_setup: don't return stack-allocated array
859c301 (refs: split log_ref_write logic into log_ref_setup,
2010-05-21) refactors the stack allocation of the log_file array into
the new log_ref_setup() function, but passes it back to the caller.

Since the original intent seems to have been to split the work between
log_ref_setup and log_ref_write, make it the caller's responsibility
to allocate the buffer.

Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Reported-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-06-12 09:34:17 -07:00
Jeff King
f197ed2fbe commit: give advice on empty amend
We generally disallow empty commits with "git commit". The
output produced by the wt_status functions is generally
sufficient to explain what happened.

With --amend commits, however, things are a little more
confusing. We would create an empty commit not if you
actually have staged changes _now_, but if your staged
changes match HEAD^. In this case, it is not immediately
obvious why "git commit" claims no changes, but "git status"
does not. Furthermore, we should point the user in the
direction of git reset, which would eliminate the empty
commit entirely.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-06-11 08:55:57 -07:00
Junio C Hamano
92a75a391e Merge branch 'maint'
* maint:
  Change C99 comments to old-style C comments
2010-06-07 22:15:31 -07:00