git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH 3/5] pull: use git rev-parse -q

From
Miklos Vajna <vmiklos@frugalware.org>
Date
Dec 3, 2008, 13:26 UTC
Message-ID
<8c4e8eda234e8e37d4a7a3ac43ffc7738e6fac4b.1228310570.git.vmiklos@frugalware.org>
In-Reply-To
<73193271279140eda04ec46097936e64f3c526d6.1228310570.git.vmiklos@frugalware.org>
Signed-off-by: Miklos Vajna <vmiklos@frugalware.org>
---
 git-pull.sh |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/git-pull.sh b/git-pull.sh
index 1cac898..2c7f432 100755
--- a/git-pull.sh
+++ b/git-pull.sh
@@ -121,13 +121,13 @@ test true = "$rebase" && {
 	test -z "$origin" && origin=$(get_default_remote)
 	reflist="$(get_remote_refs_for_fetch "$@" 2>/dev/null |
 		sed "s|refs/heads/\(.*\):|\1|")" &&
-	oldremoteref="$(git rev-parse --verify \
-		"refs/remotes/$origin/$reflist" 2>/dev/null)"
+	oldremoteref="$(git rev-parse -q --verify \
+		"refs/remotes/$origin/$reflist")"
 }
-orig_head=$(git rev-parse --verify HEAD 2>/dev/null)
+orig_head=$(git rev-parse -q --verify HEAD)
 git fetch $verbosity --update-head-ok "$@" || exit 1
 
-curr_head=$(git rev-parse --verify HEAD 2>/dev/null)
+curr_head=$(git rev-parse -q --verify HEAD)
 if test -n "$orig_head" && test "$curr_head" != "$orig_head"
 then
 	# The fetch involved updating the current branch.
-- 
1.6.0.4
Previous: Miklos VajnaNext: Miklos Vajna
Message 4 of 6 in “More "use rev-parse -q" patches”
  1. 0/5 More "use rev-parse -q" patchesMiklos Vajna, Dec 3, 2008
  2. 1/5 filter-branch: use git rev-parse -qMiklos Vajna, Dec 3, 2008
  3. 2/5 lost-found: use git rev-parse -qMiklos Vajna, Dec 3, 2008
  4. 3/5 pull: use git rev-parse -qMiklos Vajna, Dec 3, 2008
  5. 4/5 rebase: use git rev-parse -qMiklos Vajna, Dec 3, 2008
  6. 5/5 submodule: use git rev-parse -qMiklos Vajna, Dec 3, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.