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

12578 commits

Author SHA1 Message Date
Johannes Schindelin
16ed34ad35 filter-branch: fix dirty way to provide the helpers to commit filters
The helper functions 'map' and 'skip_commit' were provided to commit
filters by sourcing filter-branch itself.  This was done with a certain
environment variable set to indicate that only the functions should be
defined, and the script should return then.

This was really hacky, and it did not work all that well, since the
full path to git-filter-branch was not known at all times.

Avoid that by putting the functions into a variable, and eval'ing
that variable.  The commit filter gets these functions by prepending
the variable to the specified commands.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-11-28 15:19:35 -08:00
Pascal Obry
aa4f31d5a3 git-stash: do not get fooled with "color.diff = true"
When colors are set to "true" on the repository, the git log output
will contain control characters to set/reset the colors, even when
the output is to a pipe. This makes list_stash() fail as the
downstream sed does not see what it is expecting.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-11-27 20:42:21 -08:00
Steffen Prohaska
ecf4831d89 Use is_absolute_path() in diff-lib.c, lockfile.c, setup.c, trace.c
Using the helper function to test for absolute paths makes porting easier.

Signed-off-by: Steffen Prohaska <prohaska@zib.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-11-26 12:32:05 -08:00
Wincent Colaiuta
e0fda6abd1 Fix typo in draft 1.5.4 release notes
Signed-off-by: Wincent Colaiuta <win@wincent.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-11-26 12:32:04 -08:00
Junio C Hamano
1ab58e8d6f Merge branch 'maint'
* maint:
  user-manual: recovering from corruption
  user-manual: clarify language about "modifying" old commits
  user-manual: failed push to public repository
  user-manual: define "branch" and "working tree" at start
  git-checkout: describe detached head correctly
2007-11-25 19:10:01 -08:00
Junio C Hamano
dc3e3ea3c8 Merge branch 'maint' of git://linux-nfs.org/~bfields/git into maint
* 'maint' of git://linux-nfs.org/~bfields/git:
  user-manual: recovering from corruption
  user-manual: clarify language about "modifying" old commits
  user-manual: failed push to public repository
  user-manual: define "branch" and "working tree" at start
2007-11-25 19:04:27 -08:00
J. Bruce Fields
1cdade2c4c user-manual: recovering from corruption
Some instructions on dealing with corruption of the object database.

Most of this text is from an example by Linus, identified by Nicolas
Pitre <nico@cam.org> with a little further editing by me.

Signed-off-by: "J. Bruce Fields" <bfields@citi.umich.edu>
2007-11-25 21:13:10 -05:00
André Goddard Rosa
84ef033832 Print the real filename that we failed to open.
When we fail to open a temporary file to be renamed to something else,
we reported the final filename, not the temporary file we failed to
open.

Signed-off-by: André Goddard Rosa <andre.goddard@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-11-25 16:53:32 -08:00
J. Bruce Fields
7cb192eab0 user-manual: clarify language about "modifying" old commits
It's important to remember that git doesn't really allowing "editing" or
"modifying" commits, only replacing them by new commits.  Redo some of
the language to make this clearer.

Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
2007-11-25 19:01:57 -05:00
Junio C Hamano
757f58ed38 revert/cherry-pick: do not mention the original ref
When you cherry-pick or revert a commit, naming it with an annotated
tag, we added a comment, attempting to repeat what we got from the end
user, to the message.

But this was inconsistent.  When we got "cherry-pick branch", we
recorded the object name (40-letter SHA-1) without saying anything like
"original was 'branch'".  There was no need to.  Also recent rewrite to
use parse-options made it impossible to parrot the original command line
without "unparsing".

This removes the code that implements the misguided "we dereferenced the
tag so record that in the commit message" behaviour.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-11-25 15:56:55 -08:00
J. Bruce Fields
81eb417ad4 user-manual: failed push to public repository
More details on the case of a failed push to a public (non-shared)
repository.

Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
2007-11-25 18:14:28 -05:00
J. Bruce Fields
0c4a33b54f user-manual: define "branch" and "working tree" at start
Some explanation here might help.

Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
2007-11-25 14:06:12 -05:00
Junio C Hamano
f0c4881fac git-checkout: describe detached head correctly
When you have a file called HEAD in the work tree, the code to report
where the HEAD is at when "git checkout $commit^0" is done triggered
unnecessary ambiguity checking.

Explicitly mark the command line with "--" and make it clear that we are
talking about a revision.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-11-25 10:38:22 -08:00
Junio C Hamano
92b7ba16b7 Update draft release notes for 1.5.4
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-11-24 19:54:25 -08:00
Junio C Hamano
c4316674c4 Merge branch 'maint'
* maint:
  Fix rev-list when showing objects involving submodules
  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-24 19:52:45 -08:00
Junio C Hamano
788ea12d43 Merge branch 'rv/maint-index-commit' into maint
* rv/maint-index-commit:
  Make GIT_INDEX_FILE apply to git-commit
2007-11-24 18:03:29 -08:00
Junio C Hamano
be4b37b9ad Merge branch 'lt/maint-rev-list-gitlink' into maint
* lt/maint-rev-list-gitlink:
  Fix rev-list when showing objects involving submodules
2007-11-24 18:03:20 -08:00
Junio C Hamano
bc2b8eafaf Merge branch 'jc/maint-add-sync-stat' into maint
* jc/maint-add-sync-stat:
  t2200: test more cases of "add -u"
  git-add: make the entry stat-clean after re-adding the same contents
  ce_match_stat, run_diff_files: use symbolic constants for readability
2007-11-24 18:03:04 -08:00
Junio C Hamano
d1c7cd13dc Merge branch 'jc/maint-format-patch-encoding' into maint
* jc/maint-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-24 18:02:30 -08:00
Junio C Hamano
18a135f419 Merge branch 'bs/maint-t7005' into maint
* bs/maint-t7005:
  t7005-editor.sh: Don't invoke real vi when it is in GIT_EXEC_PATH
2007-11-24 18:01:46 -08:00
Junio C Hamano
89919f4f57 Merge branch 'bs/maint-commit-options' into maint
* bs/maint-commit-options:
  git-commit: Add tests for invalid usage of -a/--interactive with paths
  git-commit.sh: Fix usage checks regarding paths given when they do not make sense
2007-11-24 17:54:08 -08:00
Junio C Hamano
87194d26d9 Deprecate peek-remote
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-11-24 17:41:18 -08:00
Junio C Hamano
29cc0ef1ab t4119: correct overeager war-on-whitespace
Earlier a6080a0a44 (War on whitespace)
dropped a necessary trailing whitespace from the test vector.
2007-11-24 16:46:42 -08:00
Junio C Hamano
fd200790dc Merge branch 'jk/send-pack'
* jk/send-pack: (24 commits)
  send-pack: cluster ref status reporting
  send-pack: fix "everything up-to-date" message
  send-pack: tighten remote error reporting
  make "find_ref_by_name" a public function
  Fix warning about bitfield in struct ref
  send-pack: assign remote errors to each ref
  send-pack: check ref->status before updating tracking refs
  send-pack: track errors for each ref
  git-push: add documentation for the newly added --mirror mode
  Add tests for git push'es mirror mode
  Update the tracking references only if they were succesfully updated on remote
  Add a test checking if send-pack updated local tracking branches correctly
  git-push: plumb in --mirror mode
  Teach send-pack a mirror mode
  send-pack: segfault fix on forced push
  Reteach builtin-ls-remote to understand remotes
  send-pack: require --verbose to show update of tracking refs
  receive-pack: don't mention successful updates
  more terse push output
  Build in ls-remote
  ...
2007-11-24 16:45:37 -08:00
Junio C Hamano
6c6ea3800d Merge branch 'sb/clean'
* sb/clean:
  Teach git clean to use setup_standard_excludes()
  git-clean: Fix error message if clean.requireForce is not set.
  Make git-clean a builtin
2007-11-24 16:31:34 -08:00
Junio C Hamano
ab002e34e2 Merge branch 'js/mingw-fallouts'
* js/mingw-fallouts:
  fetch-pack: Prepare for a side-band demultiplexer in a thread.
  rehabilitate some t5302 tests on 32-bit off_t machines
  Allow ETC_GITCONFIG to be a relative path.
  Introduce git_etc_gitconfig() that encapsulates access of ETC_GITCONFIG.
  Allow a relative builtin template directory.
  Close files opened by lock_file() before unlinking.
  builtin run_command: do not exit with -1.
  Move #include <sys/select.h> and <sys/ioctl.h> to git-compat-util.h.
  Use is_absolute_path() in sha1_file.c.
  Skip t3902-quoted.sh if the file system does not support funny names.
  t5302-pack-index: Skip tests of 64-bit offsets if necessary.
  t7501-commit.sh: Not all seds understand option -i
  t5300-pack-object.sh: Split the big verify-pack test into smaller parts.
2007-11-24 16:31:25 -08:00
Junio C Hamano
25f3cd527d Merge branch 'mh/rebase-skip-hard'
* mh/rebase-skip-hard:
  Do git reset --hard HEAD when using git rebase --skip
2007-11-24 16:31:08 -08:00
Junio C Hamano
faf8280850 Merge branch 'cc/bisect'
* cc/bisect:
  Bisect reset: do nothing when not bisecting.
  Bisect: use "$GIT_DIR/BISECT_NAMES" to check if we are bisecting.
  Bisect visualize: use "for-each-ref" to list all good refs.
  git-bisect: modernize branch shuffling hack
  git-bisect: use update-ref to mark good/bad commits
  git-bisect: war on "sed"
  Bisect reset: remove bisect refs that may have been packed.
2007-11-24 16:31:02 -08:00
Junio C Hamano
f81117b84d Merge branch 'maint'
* maint:
  Fix sample pre-commit hook
2007-11-22 23:25:42 -08:00
Junio C Hamano
7a3db75bee Fix sample pre-commit hook
If the worktree happened to have a file called HEAD, "diff-index --cached HEAD"
would complain about the ambiguity between revision and path.  Avoid it by
using an explicit "--" for disambiguation.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-11-22 23:25:19 -08:00
Junio C Hamano
31e7bded60 Addendum to "MaintNotes"
Add "how to maintain git" document. Foreward by Jeff King.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-11-22 17:41:45 -08:00
Junio C Hamano
193f7e98da Make test scripts executable. 2007-11-22 16:52:17 -08:00
Junio C Hamano
fa30383642 Merge branch 'maint'
* maint:
  Make test scripts executable.
  bundle create: keep symbolic refs' names instead of resolving them
2007-11-22 16:51:18 -08:00
Junio C Hamano
958e67c0a8 Make test scripts executable. 2007-11-22 16:48:55 -08:00
Johannes Schindelin
6047a234c5 rebase -i: move help to end of todo file
[PATCH] rebase -i: move help to end of todo file

Many editors start in the first line, so the 9-line help text was an
annoyance.  So move it to the end.

Requested by Junio.

While at it, add a hint how to abort the rebase.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-11-22 15:35:06 -08:00
Johannes Schindelin
c5546e88fe bundle create: keep symbolic refs' names instead of resolving them
When creating a bundle, symbolic refs used to be resolved to the
non-symbolic refs they point to before being written to the list
of contained refs.  I.e. "git bundle create a1.bundle HEAD master"
would show something like

388afe7881b33102fada216dd07806728773c011        refs/heads/master
388afe7881b33102fada216dd07806728773c011        refs/heads/master

instead of

388afe7881b33102fada216dd07806728773c011        HEAD
388afe7881b33102fada216dd07806728773c011        refs/heads/master

Introduce a special handling so that the symbolic refs are listed
with the names passed on the command line.

Noticed by Santi Béjar.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-11-22 15:15:25 -08:00
Thomas Harning
a00a42ae33 git-merge-ours: make it a builtin.
Except that this fixes a longstanding corner case bug by
tightening the way underlying diff-index command is run, it is
functionally equivalent to the scripted version.

Signed-off-by: Thomas Harning Jr <harningt@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-11-22 14:21:59 -08:00
Wincent Colaiuta
a7d9da6c97 Refactor patch_update_cmd
Split patch_update_cmd into two functions, one to prompt the user for
a path to patch and another to do the actual work given that file path.
This lays the groundwork for a future commit which will teach
git-add--interactive to accept a path parameter and jump directly to
the patch subcommand for that path, bypassing the interactive prompt.

Signed-off-by: Wincent Colaiuta <win@wincent.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-11-22 00:51:56 -08:00
Wincent Colaiuta
5f5b611805 Authenticate only once in git-send-email
When using git-send-email with SMTP authentication sending a patch series
would redundantly authenticate multiple times, once for each patch. In
the worst case, this would actually prevent the series from being sent
because the server would reply with a "5.5.0 Already Authenticated"
status code which would derail the process.

This commit teaches git-send-email to authenticate once and only once at
the beginning of the series.

Signed-off-by: Wincent Colaiuta <win@wincent.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-11-22 00:50:21 -08:00
Junio C Hamano
060009b419 Merge git://git.bogomips.org/git-svn
* git://git.bogomips.org/git-svn:
  git-svn: allow `info' command to work offline
  git-svn: info --url [path]
  git-svn info: implement info command
  git-svn: extract reusable code into utility functions
  t9106: fix a race condition that caused svn to miss modifications
2007-11-22 00:34:49 -08:00
Junio C Hamano
f8b6809d52 Fix "quote" misconversion for rewrite diff output.
663af3422a (Full rework of
quote_c_style and write_name_quoted.) mistakenly used puts()
when writing out a fixed string when it did not want to add a
terminating LF.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-11-21 23:06:44 -08:00
Eric Wong
a5460eb7bb git-svn: allow `info' command to work offline
Cache the repository root whenever we connect to the repository.
This will allow us to notice URL changes if the user changes the
URL in .git/config, too.

If the repository is no longer accessible, or if `git svn info'
is the first and only command run; then '(offline)' will be
displayed for "Repository Root:" in the output.

Signed-off-by: Eric Wong <normalperson@yhbt.net>
2007-11-21 20:11:11 -08:00
David D. Kilzer
8b014d7157 git-svn: info --url [path]
Return the svn URL for the given path, or return the svn
repository URL if no path is given.

Added 18 tests to t/t9119-git-svn-info.sh.

Signed-off-by: David D. Kilzer <ddkilzer@kilzer.net>
Acked-by: Eric Wong <normalperson@yhbt.net>
2007-11-21 20:11:11 -08:00
David D. Kilzer
e6fefa926d git-svn info: implement info command
Implement "git-svn info" for files and directories based on the
"svn info" command.  Note that the -r/--revision argument is not
supported yet.

Added 18 tests in t/t9119-git-svn-info.sh.

[ew: small fix to work without arguments on all working directories]

Signed-off-by: David D. Kilzer <ddkilzer@kilzer.net>
Acked-by: Eric Wong <normalperson@yhbt.net>
2007-11-21 20:11:11 -08:00
David D. Kilzer
b2b3ada7fc git-svn: extract reusable code into utility functions
Extacted canonicalize_path() in the main package.

Created new Git::SVN::Util package with an md5sum() function.  A
new package was created so that Digest::MD5 did not have to be
loaded in the main package.  Replaced code in the SVN::Git::Editor
and SVN::Git::Fetcher packages with calls to md5sum().

Extracted the format_svn_date(), parse_git_date() and
set_local_timezone() functions within the Git::SVN::Log package.

Signed-off-by: David D. Kilzer <ddkilzer@kilzer.net>
Acked-by: Eric Wong <normalperson@yhbt.net>
2007-11-21 20:11:11 -08:00
Eric Wong
8d92f24852 t9106: fix a race condition that caused svn to miss modifications
carbonated beverage noticed this test was occasionally failing.

Signed-off-by: Eric Wong <normalperson@yhbt.net>
2007-11-21 20:11:11 -08:00
Junio C Hamano
d794d9e70e Merge git://repo.or.cz/git-gui
* git://repo.or.cz/git-gui: (96 commits)
  git-gui 0.9.0
  git-gui: Bind Meta-T for "Stage To Commit" menu action
  git-gui: Allow users to set font weights to bold
  git-gui: Update Japanese strings (part 2)
  git-gui: Update Japanese strings
  Updated russian translation of git-gui
  po2msg: actually output statistics
  po2msg: ignore untranslated messages
  po2msg: ignore entries marked with "fuzzy"
  git-gui: Protect against bad translation strings
  git-gui: Make sure we get errors from git-update-index
  More updates and corrections to the russian translation of git-gui
  Updated Russian translation.
  git-gui: Update German translation
  git-gui: Add more terms to glossary.
  git-gui: Paper bag fix the global config parsing
  git-gui: Honor a config.mak in git-gui's top level
  git-gui: Collapse $env(HOME) to ~/ in recent repositories on Windows
  git-gui: Support cloning Cygwin based work-dirs
  git-gui: Use proper Windows shortcuts instead of bat files
  ...
2007-11-21 00:00:56 -08:00
Shun Kei Leung
183f84365d git-p4: Fix typo in --detect-labels
Signed-off-by: Kevin Leung <kevinlsk@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-11-20 23:27:44 -08:00
Jeff King
07f507155d send-pack: cluster ref status reporting
Instead of intermingling success and failure, we now print:

  1. all uptodate refs (if args.verbose is enabled)
  2. successfully pushed refs
  3. failed refs

with the assumption that the user is most likely to see the
ones at the end, and therefore we order them from "least
interesting" to "most interesting."

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-11-20 23:25:31 -08:00
Jeff King
b9c506f7d9 avoid "defined but not used" warning for fetch_objs_via_walker
Because this function is static and used only by the
http-walker, when NO_CURL is defined, gcc emits a "defined
but not used" warning.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-11-20 23:11:00 -08:00