<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>256887</bug_id>
          
          <creation_ts>2023-05-17 04:44:26 -0700</creation_ts>
          <short_desc>[git-webkit] pr from a detached head leads to surprising errors</short_desc>
          <delta_ts>2023-05-17 09:33:58 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>Tools / Tests</component>
          <version>WebKit Nightly Build</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          <see_also>https://bugs.webkit.org/show_bug.cgi?id=240468</see_also>
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Sam Sneddon [:gsnedders]">gsnedders</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>ap</cc>
    
    <cc>jbedard</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1955878</commentid>
    <comment_count>0</comment_count>
    <who name="Sam Sneddon [:gsnedders]">gsnedders</who>
    <bug_when>2023-05-17 04:44:26 -0700</bug_when>
    <thetext>Bug 240468 apparently fixed this, but this once again doesn&apos;t work. Clearly we need to be careful about where we push to (what do we call it?), but at the very least we should exit with some more meaningful error (like &quot;cannot push from a detached HEAD&quot;) or we should come up with some default branch name to push to.

```
gsnedders@gsnedders-marsha OS2 % git status
interactive rebase in progress; onto 4518454316d9
Last commands done (3 commands done):
   squash b256b58e80bd Test W3C import with existing tests-options.json data https://bugs.webkit.org/show_bug.cgi?id=256851
   break
  (see more in file /Volumes/gsnedders/projects/Safari/OpenSource/.git/worktrees/OS2/rebase-merge/done)
No commands remaining.
You are currently editing a commit while rebasing branch &apos;wpt-importer-extra-unittests-256851&apos; on &apos;4518454316d9&apos;.
  (use &quot;git commit --amend&quot; to amend the current commit)
  (use &quot;git rebase --continue&quot; once you are satisfied with your changes)

nothing to commit, working tree clean
gsnedders@gsnedders-marsha OS2 % ./Tools/Scripts/git-webkit pr
branch &apos;main&apos; set up to track &apos;origin/main&apos;.
    Found 1 commit...
Total errors found: 0 in 1 files
error: The destination you provided is not a full refname (i.e.,
starting with &quot;refs/&quot;). We tried to guess what you meant by:

- Looking for a ref that matches &apos;HEAD&apos; on the remote side.
- Checking if the &lt;src&gt; being pushed (&apos;HEAD&apos;)
  is a ref in &quot;refs/{heads,tags}/&quot;. If so we add a corresponding
  refs/{heads,tags}/ prefix on the remote side.

Neither worked, so we gave up. You must fully qualify the ref.
hint: The &lt;src&gt; part of the refspec is a commit object.
hint: Did you mean to create a new branch by pushing to
hint: &apos;HEAD:refs/heads/HEAD&apos;?
error: failed to push some refs to &apos;github.com:gsnedders/WebKit.git&apos;
Failed to push &apos;HEAD&apos; to &apos;fork&apos; (alias of &apos;git@github.com:gsnedders/WebKit.git&apos;)
Your checkout may be mis-configured, try re-running &apos;git-webkit setup&apos; or
your checkout may not have permission to push to &apos;git@github.com:gsnedders/WebKit.git&apos;
```</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1955879</commentid>
    <comment_count>1</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2023-05-17 04:44:42 -0700</bug_when>
    <thetext>&lt;rdar://problem/109453606&gt;</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>