diff options
| author | Junio C Hamano <gitster@pobox.com> | 2008-03-03 01:20:19 -0800 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2008-03-03 01:20:19 -0800 |
| commit | f830d45b9fdb04a5d79c25bb3a3d891d8d3b58e9 (patch) | |
| tree | cfa4d86ace88be833c37498023967023bfa02743 /hash-object.c | |
| parent | bd56ff54f710d463a6858bdc7ef6245f9ef30f42 (diff) | |
| parent | 7435982102093179474a128648179a44042d8a1c (diff) | |
| download | git-f830d45b9fdb04a5d79c25bb3a3d891d8d3b58e9.tar.gz | |
Merge commit '74359821' into js/reflog-delete
* commit '74359821': (128 commits)
tests: introduce test_must_fail
Fix builtin checkout crashing when given an invalid path
templates/Makefile: don't depend on local umask setting
Correct name of diff_flush() in API documentation
Start preparing for 1.5.4.4
format-patch: remove a leftover debugging message
completion: support format-patch's --cover-letter option
Eliminate confusing "won't bisect on seeked tree" failure
builtin-reflog.c: don't install new reflog on write failure
send-email: fix In-Reply-To regression
git-svn: Don't prompt for client cert password everytime.
git.el: Do not display empty directories.
Fix 'git cvsexportcommit -w $cvsdir ...' when used with relative $GIT_DIR
Add testcase for 'git cvsexportcommit -w $cvsdir ...' with relative $GIT_DIR
Prompt to continue when editing during rebase --interactive
Documentation/git svn log: add a note about timezones.
git-p4: Support usage of perforce client spec
git-p4: git-p4 submit cleanups.
git-p4: Removed git-p4 submit --direct.
git-p4: Clean up git-p4 submit's log message handling.
...
Diffstat (limited to 'hash-object.c')
| -rw-r--r-- | hash-object.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/hash-object.c b/hash-object.c index 0a58f3f126..61e7160b36 100644 --- a/hash-object.c +++ b/hash-object.c @@ -41,6 +41,7 @@ int main(int argc, char **argv) const char *prefix = NULL; int prefix_length = -1; int no_more_flags = 0; + int hashstdin = 0; git_config(git_default_config); @@ -65,13 +66,20 @@ int main(int argc, char **argv) else if (!strcmp(argv[i], "--help")) usage(hash_object_usage); else if (!strcmp(argv[i], "--stdin")) { - hash_stdin(type, write_object); + if (hashstdin) + die("Multiple --stdin arguments are not supported"); + hashstdin = 1; } else usage(hash_object_usage); } else { const char *arg = argv[i]; + + if (hashstdin) { + hash_stdin(type, write_object); + hashstdin = 0; + } if (0 <= prefix_length) arg = prefix_filename(prefix, prefix_length, arg); @@ -79,5 +87,7 @@ int main(int argc, char **argv) no_more_flags = 1; } } + if (hashstdin) + hash_stdin(type, write_object); return 0; } |
